home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Acao / bubble_tanks_2.swf / scripts / __Packages / BubbleTanksWorld.as < prev    next >
Encoding:
Text File  |  2008-09-02  |  61.7 KB  |  1,876 lines

  1. class BubbleTanksWorld
  2. {
  3.    var startX;
  4.    var startY;
  5.    var bossX;
  6.    var bossY;
  7.    var arrBubblefields;
  8.    var current;
  9.    var x;
  10.    var y;
  11.    var enemyDepth;
  12.    var previous;
  13.    function BubbleTanksWorld()
  14.    {
  15.       this.startX = 10000;
  16.       this.startY = 10000;
  17.       this.bossX = 0;
  18.       this.bossY = 0;
  19.       this.arrBubblefields = new Array();
  20.       var _loc3_ = new Bubblefield();
  21.       if(_global.gameMode == 2)
  22.       {
  23.          false;
  24.          _loc3_ = _global.arena;
  25.       }
  26.       _loc3_.x = this.startX;
  27.       _loc3_.y = this.startY;
  28.       this.arrBubblefields.push(_loc3_);
  29.       this.current = _loc3_;
  30.       this.x = this.startX;
  31.       this.y = this.startY;
  32.       this.enemyDepth = 5000;
  33.    }
  34.    function RequestEnemyDepth()
  35.    {
  36.       var _loc2_ = this.enemyDepth;
  37.       this.enemyDepth = this.enemyDepth + 1;
  38.       if(this.enemyDepth >= 20000)
  39.       {
  40.          this.enemyDepth = 5000;
  41.       }
  42.       return _loc2_;
  43.    }
  44.    function CreateBubblefield(xloc, yloc, blnForceEasy)
  45.    {
  46.       var _loc3_ = new Bubblefield();
  47.       this.arrBubblefields.push(_loc3_);
  48.       _loc3_.x = xloc;
  49.       _loc3_.y = yloc;
  50.       if(_global.gameMode == 2)
  51.       {
  52.          if(xloc == this.startX && yloc == this.startY)
  53.          {
  54.             this.CreateEnemies(_loc3_,xloc,yloc);
  55.          }
  56.       }
  57.       else
  58.       {
  59.          this.CreateEnemies(_loc3_,xloc,yloc,blnForceEasy);
  60.       }
  61.       this.Sort();
  62.       return _loc3_;
  63.    }
  64.    function MoveUp()
  65.    {
  66.       this.previous = this.current;
  67.       var _loc2_ = this.Find(this.x,this.y + 1);
  68.       if(_loc2_ == undefined)
  69.       {
  70.          _loc2_ = this.CreateBubblefield(this.x,this.y + 1,false);
  71.       }
  72.       this.current = _loc2_;
  73.       this.y += 1;
  74.    }
  75.    function MoveDown()
  76.    {
  77.       this.previous = this.current;
  78.       var _loc2_ = this.Find(this.x,this.y - 1);
  79.       if(_loc2_ == undefined)
  80.       {
  81.          _loc2_ = this.CreateBubblefield(this.x,this.y - 1,false);
  82.       }
  83.       this.current = _loc2_;
  84.       this.y += -1;
  85.    }
  86.    function MoveLeft()
  87.    {
  88.       this.previous = this.current;
  89.       var _loc2_ = this.Find(this.x - 1,this.y);
  90.       if(_loc2_ == undefined)
  91.       {
  92.          _loc2_ = this.CreateBubblefield(this.x - 1,this.y,false);
  93.       }
  94.       this.current = _loc2_;
  95.       this.x += -1;
  96.    }
  97.    function MoveRight()
  98.    {
  99.       this.previous = this.current;
  100.       var _loc2_ = this.Find(this.x + 1,this.y);
  101.       if(_loc2_ == undefined)
  102.       {
  103.          _loc2_ = this.CreateBubblefield(this.x + 1,this.y,false);
  104.       }
  105.       this.current = _loc2_;
  106.       this.x += 1;
  107.    }
  108.    function MoveTo(xLoc, yLoc)
  109.    {
  110.       this.previous = this.current;
  111.       var _loc2_ = this.Find(xLoc,yLoc);
  112.       if(_loc2_ == undefined)
  113.       {
  114.          _loc2_ = this.CreateBubblefield(xLoc,yLoc,false);
  115.       }
  116.       this.current = _loc2_;
  117.       this.x = xLoc;
  118.       this.y = yLoc;
  119.    }
  120.    function GetRight(blnCreateIfDNE)
  121.    {
  122.       var _loc2_ = this.Find(this.x + 1,this.y);
  123.       if(_loc2_ == undefined)
  124.       {
  125.          if(blnCreateIfDNE == true)
  126.          {
  127.             _loc2_ = this.CreateBubblefield(this.x + 1,this.y,blnCreateIfDNE);
  128.          }
  129.       }
  130.       return _loc2_;
  131.    }
  132.    function GetLeft(blnCreateIfDNE)
  133.    {
  134.       var _loc2_ = this.Find(this.x - 1,this.y);
  135.       if(_loc2_ == undefined)
  136.       {
  137.          if(blnCreateIfDNE == true)
  138.          {
  139.             _loc2_ = this.CreateBubblefield(this.x - 1,this.y,blnCreateIfDNE);
  140.          }
  141.       }
  142.       return _loc2_;
  143.    }
  144.    function GetDown(blnCreateIfDNE)
  145.    {
  146.       var _loc2_ = this.Find(this.x,this.y - 1);
  147.       if(_loc2_ == undefined)
  148.       {
  149.          if(blnCreateIfDNE == true)
  150.          {
  151.             _loc2_ = this.CreateBubblefield(this.x,this.y - 1,blnCreateIfDNE);
  152.          }
  153.       }
  154.       return _loc2_;
  155.    }
  156.    function GetUp(blnCreateIfDNE)
  157.    {
  158.       var _loc2_ = this.Find(this.x,this.y + 1);
  159.       if(_loc2_ == undefined)
  160.       {
  161.          if(blnCreateIfDNE == true)
  162.          {
  163.             _loc2_ = this.CreateBubblefield(this.x,this.y + 1,blnCreateIfDNE);
  164.          }
  165.       }
  166.       return _loc2_;
  167.    }
  168.    function Sort()
  169.    {
  170.       this.arrBubblefields.sortOn(["x","y"],Array.NUMERIC);
  171.    }
  172.    function Find(xLoc, yLoc)
  173.    {
  174.       var _loc3_ = undefined;
  175.       var _loc2_ = this.arrBubblefields.bSearch({x:xLoc,y:yLoc},Array.NUMERIC);
  176.       if(_loc2_ != -1)
  177.       {
  178.          _loc3_ = this.arrBubblefields[_loc2_];
  179.       }
  180.       return _loc3_;
  181.    }
  182.    function PrintBubblefieldCoordsList()
  183.    {
  184.       var _loc3_ = "";
  185.       var _loc2_ = 0;
  186.       while(_loc2_ < this.arrBubblefields.length)
  187.       {
  188.          _loc3_ += "(" + this.arrBubblefields[_loc2_].x + ", " + this.arrBubblefields[_loc2_].y + ") ";
  189.          _loc2_ = _loc2_ + 1;
  190.       }
  191.    }
  192.    function CreateEnemies(tempBubblefield, xloc, yloc, blnEasyMode)
  193.    {
  194.       var _loc21_ = false;
  195.       var _loc3_ = undefined;
  196.       var _loc19_ = xloc - this.startX;
  197.       var _loc18_ = yloc - this.startY;
  198.       var _loc14_ = Math.round(Math.sqrt(_loc19_ * _loc19_ + _loc18_ * _loc18_));
  199.       if(blnEasyMode == true)
  200.       {
  201.          _loc3_ = this.GetEnemyOptionsEasy(_root.game.GetMaxLife());
  202.       }
  203.       else if(_root.game.IsBossNeeded(xloc,yloc) == true)
  204.       {
  205.          this.bossX = xloc;
  206.          this.bossY = yloc;
  207.          _loc21_ = true;
  208.          tempBubblefield.blnBoss = true;
  209.       }
  210.       else
  211.       {
  212.          var _loc20_ = 0;
  213.          if(_root.game.IsHelpNeeded() == true)
  214.          {
  215.             _loc20_ = this.RandNum(0,100);
  216.          }
  217.          if(_loc20_ > 50)
  218.          {
  219.             _loc3_ = this.GetEnemyOptionsHelp(_loc14_);
  220.          }
  221.          else if(_loc14_ < 10)
  222.          {
  223.             _loc3_ = this.GetEnemyOptionsClose(_loc14_);
  224.          }
  225.          else if(_loc14_ >= 10 && _loc14_ < 20)
  226.          {
  227.             _loc3_ = this.GetEnemyOptionsMiddle(_loc14_);
  228.          }
  229.          else if(_loc14_ >= 20 && _loc14_ < 30)
  230.          {
  231.             _loc3_ = this.GetEnemyOptionsFar(_loc14_);
  232.          }
  233.          else if(_loc14_ >= 30)
  234.          {
  235.             _loc3_ = this.GetEnemyOptionsVeryFar(_loc14_);
  236.          }
  237.       }
  238.       if(_loc21_ == false)
  239.       {
  240.          var _loc9_ = 0;
  241.          var _loc11_ = 0;
  242.          var _loc16_ = 0;
  243.          var _loc13_ = 0;
  244.          var _loc6_ = 0;
  245.          while(_loc6_ < _loc3_.length)
  246.          {
  247.             _loc16_ += _loc3_[_loc6_].chance;
  248.             _loc6_ = _loc6_ + 1;
  249.          }
  250.          _loc13_ = Math.round(Math.random() * _loc16_);
  251.          _loc6_ = 0;
  252.          while(_loc6_ < _loc3_.length)
  253.          {
  254.             _loc11_ = _loc9_ + _loc3_[_loc6_].chance;
  255.             _loc3_[_loc6_].minChance = _loc9_;
  256.             _loc3_[_loc6_].maxChance = _loc11_;
  257.             _loc9_ = _loc11_;
  258.             _loc6_ = _loc6_ + 1;
  259.          }
  260.          var _loc7_ = -1;
  261.          _loc6_ = 0;
  262.          while(_loc6_ < _loc3_.length)
  263.          {
  264.             if(_loc13_ >= _loc3_[_loc6_].minChance && _loc13_ < _loc3_[_loc6_].maxChance)
  265.             {
  266.                _loc7_ = _loc6_;
  267.                break;
  268.             }
  269.             _loc6_ = _loc6_ + 1;
  270.          }
  271.          if(_loc7_ == -1)
  272.          {
  273.             _loc7_ = _loc3_.length - 1;
  274.          }
  275.          _loc3_[_loc7_].Begin();
  276.          var _loc10_ = 0;
  277.          var _loc12_ = "";
  278.          var _loc17_ = _loc3_[_loc7_].GetNumInstructions();
  279.          var _loc8_ = 0;
  280.          while(_loc8_ < _loc17_)
  281.          {
  282.             _loc10_ = _loc3_[_loc7_].enemyNum;
  283.             _loc12_ = _loc3_[_loc7_].enemyType;
  284.             var _loc5_ = 0;
  285.             while(_loc5_ < _loc10_)
  286.             {
  287.                var _loc4_ = new Vector();
  288.                _loc4_._x = Math.round(Math.random() * 500) - 250;
  289.                _loc4_._y = Math.round(Math.random() * 400) - 200;
  290.                tempBubblefield.AddUnit("enemy_" + this.enemyDepth,_loc12_,_loc4_,this.enemyDepth);
  291.                this.enemyDepth = this.enemyDepth + 1;
  292.                if(this.enemyDepth >= 20000)
  293.                {
  294.                   this.enemyDepth = 5000;
  295.                }
  296.                _loc5_ = _loc5_ + 1;
  297.             }
  298.             _loc3_[_loc7_].Next();
  299.             _loc8_ = _loc8_ + 1;
  300.          }
  301.       }
  302.       false;
  303.    }
  304.    function GetEnemyOptionsHelp(worldDistance)
  305.    {
  306.       var _loc3_ = new Array();
  307.       if(worldDistance < 7)
  308.       {
  309.          var _loc2_ = undefined;
  310.          _loc2_ = new WorldInstruction(50);
  311.          _loc2_.AddInstruction("Enemy_17",1,2);
  312.          _loc2_.AddInstruction("Enemy_1",2,3);
  313.          if(_root.game._enemySet2 == 1)
  314.          {
  315.             _loc2_.AddInstruction("Enemy_4",0,2);
  316.          }
  317.          else if(_root.game._enemySet2 == 2)
  318.          {
  319.             _loc2_.AddInstruction("Enemy_18",0,2);
  320.          }
  321.          _loc3_.push(_loc2_);
  322.       }
  323.       else if(worldDistance >= 7 && worldDistance < 20)
  324.       {
  325.          _loc2_ = new WorldInstruction(50);
  326.          _loc2_.AddInstruction("Enemy_17",1,2);
  327.          _loc2_.AddInstruction("Enemy_1",3,5);
  328.          if(_root.game._enemySet2 == 1)
  329.          {
  330.             _loc2_.AddInstruction("Enemy_4",1,3);
  331.          }
  332.          else if(_root.game._enemySet2 == 2)
  333.          {
  334.             _loc2_.AddInstruction("Enemy_18",1,3);
  335.          }
  336.          _loc3_.push(_loc2_);
  337.       }
  338.       else if(worldDistance >= 20)
  339.       {
  340.          _loc2_ = new WorldInstruction(50);
  341.          _loc2_.AddInstruction("Enemy_92",1,2);
  342.          _loc2_.AddInstruction("Enemy_1",2,4);
  343.          if(_root.game._enemySet2 == 1)
  344.          {
  345.             _loc2_.AddInstruction("Enemy_4",1,3);
  346.          }
  347.          else if(_root.game._enemySet2 == 2)
  348.          {
  349.             _loc2_.AddInstruction("Enemy_18",1,3);
  350.          }
  351.          _loc3_.push(_loc2_);
  352.          _loc2_ = new WorldInstruction(50);
  353.          if(_root.game._enemySet2 == 1)
  354.          {
  355.             _loc2_.AddInstruction("Enemy_4",2,3);
  356.          }
  357.          else if(_root.game._enemySet2 == 2)
  358.          {
  359.             _loc2_.AddInstruction("Enemy_18",2,3);
  360.          }
  361.          _loc2_.AddInstruction("Enemy_10",1,1);
  362.          _loc3_.push(_loc2_);
  363.       }
  364.       return _loc3_;
  365.    }
  366.    function GetEnemyOptionsEasy(maxLife)
  367.    {
  368.       var _loc3_ = new Array();
  369.       if(maxLife < 75)
  370.       {
  371.          var _loc2_ = undefined;
  372.          _loc2_ = new WorldInstruction(50);
  373.          _loc2_.AddInstruction("Enemy_17",2,3);
  374.          _loc2_.AddInstruction("Enemy_1",3,4);
  375.          if(_root.game._enemySet2 == 1)
  376.          {
  377.             _loc2_.AddInstruction("Enemy_4",1,3);
  378.          }
  379.          else if(_root.game._enemySet2 == 2)
  380.          {
  381.             _loc2_.AddInstruction("Enemy_18",1,3);
  382.          }
  383.          _loc3_.push(_loc2_);
  384.       }
  385.       else if(maxLife >= 75 && maxLife < 200)
  386.       {
  387.          _loc2_ = new WorldInstruction(50);
  388.          _loc2_.AddInstruction("Enemy_17",2,3);
  389.          _loc2_.AddInstruction("Enemy_1",5,6);
  390.          if(_root.game._enemySet2 == 1)
  391.          {
  392.             _loc2_.AddInstruction("Enemy_4",2,3);
  393.          }
  394.          else if(_root.game._enemySet2 == 2)
  395.          {
  396.             _loc2_.AddInstruction("Enemy_18",2,3);
  397.          }
  398.          _loc3_.push(_loc2_);
  399.       }
  400.       else if(maxLife >= 200 && maxLife < 400)
  401.       {
  402.          _loc2_ = new WorldInstruction(50);
  403.          _loc2_.AddInstruction("Enemy_17",2,3);
  404.          _loc2_.AddInstruction("Enemy_92",2,2);
  405.          if(_root.game._enemySet2 == 1)
  406.          {
  407.             _loc2_.AddInstruction("Enemy_4",2,3);
  408.          }
  409.          else if(_root.game._enemySet2 == 2)
  410.          {
  411.             _loc2_.AddInstruction("Enemy_18",2,3);
  412.          }
  413.          _loc3_.push(_loc2_);
  414.       }
  415.       else if(maxLife >= 400 && maxLife < 800)
  416.       {
  417.          _loc2_ = new WorldInstruction(50);
  418.          _loc2_.AddInstruction("Enemy_17",2,3);
  419.          _loc2_.AddInstruction("Enemy_92",4,5);
  420.          _loc2_.AddInstruction("Enemy_1",2,3);
  421.          _loc3_.push(_loc2_);
  422.       }
  423.       else
  424.       {
  425.          _loc2_ = new WorldInstruction(50);
  426.          _loc2_.AddInstruction("Enemy_17",2,3);
  427.          _loc2_.AddInstruction("Enemy_92",6,8);
  428.          _loc2_.AddInstruction("Enemy_1",2,3);
  429.          _loc3_.push(_loc2_);
  430.          _loc2_ = new WorldInstruction(50);
  431.          if(_root.game._enemySet2 == 1)
  432.          {
  433.             _loc2_.AddInstruction("Enemy_4",2,3);
  434.          }
  435.          else if(_root.game._enemySet2 == 2)
  436.          {
  437.             _loc2_.AddInstruction("Enemy_18",2,3);
  438.          }
  439.          _loc2_.AddInstruction("Enemy_92",5,7);
  440.          _loc2_.AddInstruction("Enemy_10",1,1);
  441.          _loc3_.push(_loc2_);
  442.       }
  443.       return _loc3_;
  444.    }
  445.    function GetEnemyOptionsClose(worldDistance)
  446.    {
  447.       var _loc3_ = new Array();
  448.       if(worldDistance < 2)
  449.       {
  450.          var _loc2_ = undefined;
  451.          _loc2_ = new WorldInstruction(100);
  452.          _loc2_.AddInstruction("Enemy_17",1,2);
  453.          _loc2_.AddInstruction("Enemy_1",0,1);
  454.          if(_root.game._enemySet2 == 1)
  455.          {
  456.             _loc2_.AddInstruction("Enemy_4",0,2);
  457.          }
  458.          else if(_root.game._enemySet2 == 2)
  459.          {
  460.             _loc2_.AddInstruction("Enemy_18",0,2);
  461.          }
  462.          _loc3_.push(_loc2_);
  463.       }
  464.       else if(worldDistance >= 2 && worldDistance < 4)
  465.       {
  466.          _loc2_ = new WorldInstruction(30);
  467.          _loc2_.AddInstruction("Enemy_17",1,2);
  468.          _loc2_.AddInstruction("Enemy_1",1,2);
  469.          _loc3_.push(_loc2_);
  470.          _loc2_ = new WorldInstruction(60);
  471.          _loc2_.AddInstruction("Enemy_1",1,2);
  472.          if(_root.game._enemySet2 == 1)
  473.          {
  474.             _loc2_.AddInstruction("Enemy_4",0,2);
  475.          }
  476.          else if(_root.game._enemySet2 == 2)
  477.          {
  478.             _loc2_.AddInstruction("Enemy_18",0,2);
  479.          }
  480.          _loc3_.push(_loc2_);
  481.          _loc2_ = new WorldInstruction(30);
  482.          _loc2_.AddInstruction("Enemy_1",0,1);
  483.          if(_root.game._enemySet2 == 1)
  484.          {
  485.             _loc2_.AddInstruction("Enemy_4",0,2);
  486.          }
  487.          else if(_root.game._enemySet2 == 2)
  488.          {
  489.             _loc2_.AddInstruction("Enemy_18",0,2);
  490.          }
  491.          _loc2_.AddInstruction("Enemy_76",1,3);
  492.          _loc3_.push(_loc2_);
  493.       }
  494.       else if(worldDistance >= 4 && worldDistance < 6)
  495.       {
  496.          _loc2_ = new WorldInstruction(30);
  497.          _loc2_.AddInstruction("Enemy_1",0,2);
  498.          if(_root.game._enemySet == 1)
  499.          {
  500.             _loc2_.AddInstruction("Enemy_2",1,4);
  501.          }
  502.          else if(_root.game._enemySet == 2)
  503.          {
  504.             _loc2_.AddInstruction("Enemy_93",1,4);
  505.          }
  506.          else if(_root.game._enemySet == 3)
  507.          {
  508.             _loc2_.AddInstruction("Enemy_94",1,4);
  509.          }
  510.          if(_root.game._enemySet2 == 1)
  511.          {
  512.             _loc2_.AddInstruction("Enemy_4",0,2);
  513.          }
  514.          else if(_root.game._enemySet2 == 2)
  515.          {
  516.             _loc2_.AddInstruction("Enemy_18",0,2);
  517.          }
  518.          _loc3_.push(_loc2_);
  519.          _loc2_ = new WorldInstruction(30);
  520.          _loc2_.AddInstruction("Enemy_3",1,2);
  521.          if(_root.game._enemySet == 1)
  522.          {
  523.             _loc2_.AddInstruction("Enemy_2",1,2);
  524.          }
  525.          else if(_root.game._enemySet == 2)
  526.          {
  527.             _loc2_.AddInstruction("Enemy_93",1,2);
  528.          }
  529.          else if(_root.game._enemySet == 3)
  530.          {
  531.             _loc2_.AddInstruction("Enemy_94",2,3);
  532.          }
  533.          if(_root.game._enemySet2 == 1)
  534.          {
  535.             _loc2_.AddInstruction("Enemy_4",0,2);
  536.          }
  537.          else if(_root.game._enemySet2 == 2)
  538.          {
  539.             _loc2_.AddInstruction("Enemy_18",0,2);
  540.          }
  541.          _loc3_.push(_loc2_);
  542.          _loc2_ = new WorldInstruction(30);
  543.          _loc2_.AddInstruction("Enemy_3",1,2);
  544.          _loc2_.AddInstruction("Enemy_41",1,1);
  545.          _loc2_.AddInstruction("Enemy_1",0,2);
  546.          _loc3_.push(_loc2_);
  547.          _loc2_ = new WorldInstruction(10);
  548.          _loc2_.AddInstruction("Enemy_1",0,1);
  549.          if(_root.game._enemySet2 == 1)
  550.          {
  551.             _loc2_.AddInstruction("Enemy_4",0,2);
  552.          }
  553.          else if(_root.game._enemySet2 == 2)
  554.          {
  555.             _loc2_.AddInstruction("Enemy_18",0,2);
  556.          }
  557.          _loc2_.AddInstruction("Enemy_76",1,2);
  558.          _loc3_.push(_loc2_);
  559.          _loc2_ = new WorldInstruction(5);
  560.          _loc2_.AddInstruction("Enemy_86",1,1);
  561.          _loc2_.AddInstruction("Enemy_1",0,3);
  562.          _loc3_.push(_loc2_);
  563.       }
  564.       else if(worldDistance >= 6 && worldDistance < 8)
  565.       {
  566.          _loc2_ = new WorldInstruction(30);
  567.          _loc2_.AddInstruction("Enemy_1",1,2);
  568.          if(_root.game._enemySet == 1)
  569.          {
  570.             _loc2_.AddInstruction("Enemy_2",2,3);
  571.          }
  572.          else if(_root.game._enemySet == 2)
  573.          {
  574.             _loc2_.AddInstruction("Enemy_93",2,3);
  575.          }
  576.          else if(_root.game._enemySet == 3)
  577.          {
  578.             _loc2_.AddInstruction("Enemy_94",3,4);
  579.          }
  580.          if(_root.game._enemySet2 == 1)
  581.          {
  582.             _loc2_.AddInstruction("Enemy_4",0,2);
  583.          }
  584.          else if(_root.game._enemySet2 == 2)
  585.          {
  586.             _loc2_.AddInstruction("Enemy_18",0,2);
  587.          }
  588.          _loc3_.push(_loc2_);
  589.          _loc2_ = new WorldInstruction(30);
  590.          _loc2_.AddInstruction("Enemy_3",1,1);
  591.          if(_root.game._enemySet == 1)
  592.          {
  593.             _loc2_.AddInstruction("Enemy_2",2,3);
  594.          }
  595.          else if(_root.game._enemySet == 2)
  596.          {
  597.             _loc2_.AddInstruction("Enemy_93",2,3);
  598.          }
  599.          else if(_root.game._enemySet == 3)
  600.          {
  601.             _loc2_.AddInstruction("Enemy_94",2,3);
  602.          }
  603.          if(_root.game._enemySet2 == 1)
  604.          {
  605.             _loc2_.AddInstruction("Enemy_4",0,2);
  606.          }
  607.          else if(_root.game._enemySet2 == 2)
  608.          {
  609.             _loc2_.AddInstruction("Enemy_18",0,2);
  610.          }
  611.          _loc3_.push(_loc2_);
  612.          _loc2_ = new WorldInstruction(20);
  613.          _loc2_.AddInstruction("Enemy_3",2,2);
  614.          _loc2_.AddInstruction("Enemy_9",1,1);
  615.          _loc2_.AddInstruction("Enemy_1",0,2);
  616.          _loc3_.push(_loc2_);
  617.          _loc2_ = new WorldInstruction(10);
  618.          _loc2_.AddInstruction("Enemy_1",0,1);
  619.          if(_root.game._enemySet2 == 1)
  620.          {
  621.             _loc2_.AddInstruction("Enemy_4",0,2);
  622.          }
  623.          else if(_root.game._enemySet2 == 2)
  624.          {
  625.             _loc2_.AddInstruction("Enemy_18",0,2);
  626.          }
  627.          _loc2_.AddInstruction("Enemy_76",1,3);
  628.          _loc3_.push(_loc2_);
  629.          _loc2_ = new WorldInstruction(5);
  630.          _loc2_.AddInstruction("Enemy_R1",1,1);
  631.          if(_root.game._enemySet2 == 1)
  632.          {
  633.             _loc2_.AddInstruction("Enemy_4",1,3);
  634.          }
  635.          else if(_root.game._enemySet2 == 2)
  636.          {
  637.             _loc2_.AddInstruction("Enemy_18",1,3);
  638.          }
  639.          _loc3_.push(_loc2_);
  640.          _loc2_ = new WorldInstruction(5);
  641.          _loc2_.AddInstruction("Enemy_86",1,1);
  642.          if(_root.game._enemySet2 == 1)
  643.          {
  644.             _loc2_.AddInstruction("Enemy_4",1,3);
  645.          }
  646.          else if(_root.game._enemySet2 == 2)
  647.          {
  648.             _loc2_.AddInstruction("Enemy_18",1,3);
  649.          }
  650.          _loc3_.push(_loc2_);
  651.       }
  652.       else if(worldDistance >= 8)
  653.       {
  654.          _loc2_ = new WorldInstruction(20);
  655.          _loc2_.AddInstruction("Enemy_17",1,2);
  656.          if(_root.game._enemySet == 1)
  657.          {
  658.             _loc2_.AddInstruction("Enemy_2",3,4);
  659.          }
  660.          else if(_root.game._enemySet == 2)
  661.          {
  662.             _loc2_.AddInstruction("Enemy_93",3,4);
  663.          }
  664.          else if(_root.game._enemySet == 3)
  665.          {
  666.             _loc2_.AddInstruction("Enemy_94",3,4);
  667.          }
  668.          if(_root.game._enemySet2 == 1)
  669.          {
  670.             _loc2_.AddInstruction("Enemy_4",0,2);
  671.          }
  672.          else if(_root.game._enemySet2 == 2)
  673.          {
  674.             _loc2_.AddInstruction("Enemy_18",0,2);
  675.          }
  676.          _loc3_.push(_loc2_);
  677.          _loc2_ = new WorldInstruction(40);
  678.          _loc2_.AddInstruction("Enemy_76",0,2);
  679.          _loc2_.AddInstruction("Enemy_3",0,2);
  680.          if(_root.game._enemySet == 1)
  681.          {
  682.             _loc2_.AddInstruction("Enemy_2",2,3);
  683.          }
  684.          else if(_root.game._enemySet == 2)
  685.          {
  686.             _loc2_.AddInstruction("Enemy_93",2,3);
  687.          }
  688.          else if(_root.game._enemySet == 3)
  689.          {
  690.             _loc2_.AddInstruction("Enemy_94",2,3);
  691.          }
  692.          if(_root.game._enemySet2 == 1)
  693.          {
  694.             _loc2_.AddInstruction("Enemy_4",0,2);
  695.          }
  696.          else if(_root.game._enemySet2 == 2)
  697.          {
  698.             _loc2_.AddInstruction("Enemy_18",0,2);
  699.          }
  700.          _loc3_.push(_loc2_);
  701.          _loc2_ = new WorldInstruction(20);
  702.          _loc2_.AddInstruction("Enemy_95",12,16);
  703.          _loc2_.AddInstruction("Enemy_17",0,2);
  704.          _loc3_.push(_loc2_);
  705.          _loc2_ = new WorldInstruction(20);
  706.          _loc2_.AddInstruction("Enemy_80",1,3);
  707.          if(_root.game._enemySet == 1)
  708.          {
  709.             _loc2_.AddInstruction("Enemy_2",1,2);
  710.          }
  711.          else if(_root.game._enemySet == 2)
  712.          {
  713.             _loc2_.AddInstruction("Enemy_93",1,2);
  714.          }
  715.          else if(_root.game._enemySet == 3)
  716.          {
  717.             _loc2_.AddInstruction("Enemy_94",1,2);
  718.          }
  719.          _loc2_.AddInstruction("Enemy_17",0,2);
  720.          _loc3_.push(_loc2_);
  721.          _loc2_ = new WorldInstruction(5);
  722.          _loc2_.AddInstruction("Enemy_1",0,1);
  723.          if(_root.game._enemySet2 == 1)
  724.          {
  725.             _loc2_.AddInstruction("Enemy_4",0,2);
  726.          }
  727.          else if(_root.game._enemySet2 == 2)
  728.          {
  729.             _loc2_.AddInstruction("Enemy_18",0,2);
  730.          }
  731.          _loc2_.AddInstruction("Enemy_76",1,3);
  732.          _loc3_.push(_loc2_);
  733.       }
  734.       return _loc3_;
  735.    }
  736.    function GetEnemyOptionsMiddle(worldDistance)
  737.    {
  738.       var _loc3_ = new Array();
  739.       if(worldDistance < 12)
  740.       {
  741.          var _loc2_ = undefined;
  742.          _loc2_ = new WorldInstruction(20);
  743.          _loc2_.AddInstruction("Enemy_5",2,3);
  744.          if(_root.game._enemySet == 1)
  745.          {
  746.             _loc2_.AddInstruction("Enemy_2",1,2);
  747.          }
  748.          else if(_root.game._enemySet == 2)
  749.          {
  750.             _loc2_.AddInstruction("Enemy_93",1,2);
  751.          }
  752.          else if(_root.game._enemySet == 3)
  753.          {
  754.             _loc2_.AddInstruction("Enemy_94",1,2);
  755.          }
  756.          _loc2_.AddInstruction("Enemy_1",0,2);
  757.          _loc3_.push(_loc2_);
  758.          _loc2_ = new WorldInstruction(25);
  759.          _loc2_.AddInstruction("Enemy_5",2,3);
  760.          _loc2_.AddInstruction("Enemy_3",1,1);
  761.          if(_root.game._enemySet == 1)
  762.          {
  763.             _loc2_.AddInstruction("Enemy_2",0,1);
  764.          }
  765.          else if(_root.game._enemySet == 2)
  766.          {
  767.             _loc2_.AddInstruction("Enemy_93",0,1);
  768.          }
  769.          else if(_root.game._enemySet == 3)
  770.          {
  771.             _loc2_.AddInstruction("Enemy_94",0,1);
  772.          }
  773.          _loc2_.AddInstruction("Enemy_17",1,2);
  774.          _loc3_.push(_loc2_);
  775.          _loc2_ = new WorldInstruction(10);
  776.          _loc2_.AddInstruction("Enemy_95",9,12);
  777.          _loc2_.AddInstruction("Enemy_76",1,2);
  778.          _loc3_.push(_loc2_);
  779.          _loc2_ = new WorldInstruction(10);
  780.          _loc2_.AddInstruction("Enemy_76",2,2);
  781.          _loc2_.AddInstruction("Enemy_80",3,4);
  782.          _loc2_.AddInstruction("Enemy_1",1,1);
  783.          if(_root.game._enemySet2 == 1)
  784.          {
  785.             _loc2_.AddInstruction("Enemy_4",0,2);
  786.          }
  787.          else if(_root.game._enemySet2 == 2)
  788.          {
  789.             _loc2_.AddInstruction("Enemy_18",0,2);
  790.          }
  791.          _loc3_.push(_loc2_);
  792.          _loc2_ = new WorldInstruction(10);
  793.          _loc2_.AddInstruction("Enemy_12",1,1);
  794.          if(_root.game._enemySet2 == 1)
  795.          {
  796.             _loc2_.AddInstruction("Enemy_4",1,3);
  797.          }
  798.          else if(_root.game._enemySet2 == 2)
  799.          {
  800.             _loc2_.AddInstruction("Enemy_18",1,3);
  801.          }
  802.          _loc3_.push(_loc2_);
  803.          _loc2_ = new WorldInstruction(15);
  804.          if(_root.game._enemySet2 == 1)
  805.          {
  806.             _loc2_.AddInstruction("Enemy_42",1,1);
  807.          }
  808.          else if(_root.game._enemySet2 == 2)
  809.          {
  810.             _loc2_.AddInstruction("Enemy_43",1,1);
  811.          }
  812.          if(_root.game._enemySet == 1)
  813.          {
  814.             _loc2_.AddInstruction("Enemy_2",2,4);
  815.          }
  816.          else if(_root.game._enemySet == 2)
  817.          {
  818.             _loc2_.AddInstruction("Enemy_93",2,4);
  819.          }
  820.          else if(_root.game._enemySet == 3)
  821.          {
  822.             _loc2_.AddInstruction("Enemy_94",3,4);
  823.          }
  824.          if(_root.game._enemySet2 == 1)
  825.          {
  826.             _loc2_.AddInstruction("Enemy_4",1,2);
  827.          }
  828.          else if(_root.game._enemySet2 == 2)
  829.          {
  830.             _loc2_.AddInstruction("Enemy_18",1,2);
  831.          }
  832.          _loc2_.AddInstruction("Enemy_1",0,2);
  833.          _loc3_.push(_loc2_);
  834.          _loc2_ = new WorldInstruction(5);
  835.          _loc2_.AddInstruction("Enemy_90",1,1);
  836.          _loc2_.AddInstruction("Enemy_76",0,2);
  837.          _loc2_.AddInstruction("Enemy_1",1,5);
  838.          _loc2_.AddInstruction("Enemy_17",0,2);
  839.          _loc3_.push(_loc2_);
  840.          _loc2_ = new WorldInstruction(3);
  841.          _loc2_.AddInstruction("Enemy_97",1,1);
  842.          _loc2_.AddInstruction("Enemy_1",1,5);
  843.          _loc2_.AddInstruction("Enemy_17",0,2);
  844.          _loc3_.push(_loc2_);
  845.       }
  846.       else if(worldDistance >= 12 && worldDistance < 14)
  847.       {
  848.          _loc2_ = new WorldInstruction(20);
  849.          _loc2_.AddInstruction("Enemy_5",3,4);
  850.          _loc2_.AddInstruction("Enemy_76",1,2);
  851.          _loc2_.AddInstruction("Enemy_1",0,2);
  852.          _loc3_.push(_loc2_);
  853.          _loc2_ = new WorldInstruction(20);
  854.          _loc2_.AddInstruction("Enemy_5",2,3);
  855.          _loc2_.AddInstruction("Enemy_6",2,2);
  856.          _loc2_.AddInstruction("Enemy_1",0,2);
  857.          _loc3_.push(_loc2_);
  858.          _loc2_ = new WorldInstruction(20);
  859.          _loc2_.AddInstruction("Enemy_5",1,3);
  860.          _loc2_.AddInstruction("Enemy_6",1,2);
  861.          _loc2_.AddInstruction("Enemy_76",1,2);
  862.          _loc2_.AddInstruction("Enemy_1",0,2);
  863.          _loc2_.AddInstruction("Enemy_17",1,1);
  864.          _loc3_.push(_loc2_);
  865.          _loc2_ = new WorldInstruction(10);
  866.          _loc2_.AddInstruction("Enemy_5",2,3);
  867.          _loc2_.AddInstruction("Enemy_6",1,2);
  868.          _loc2_.AddInstruction("Enemy_1",0,2);
  869.          _loc2_.AddInstruction("Enemy_17",1,1);
  870.          _loc3_.push(_loc2_);
  871.          _loc2_ = new WorldInstruction(10);
  872.          _loc2_.AddInstruction("Enemy_5",2,3);
  873.          _loc2_.AddInstruction("Enemy_48",1,2);
  874.          _loc2_.AddInstruction("Enemy_1",0,2);
  875.          _loc2_.AddInstruction("Enemy_17",1,1);
  876.          _loc3_.push(_loc2_);
  877.          _loc2_ = new WorldInstruction(10);
  878.          _loc2_.AddInstruction("Enemy_12",1,1);
  879.          _loc2_.AddInstruction("Enemy_6",0,2);
  880.          if(_root.game._enemySet2 == 1)
  881.          {
  882.             _loc2_.AddInstruction("Enemy_4",1,2);
  883.          }
  884.          else if(_root.game._enemySet2 == 2)
  885.          {
  886.             _loc2_.AddInstruction("Enemy_18",1,2);
  887.          }
  888.          _loc3_.push(_loc2_);
  889.          _loc2_ = new WorldInstruction(15);
  890.          _loc2_.AddInstruction("Enemy_13",2,4);
  891.          if(_root.game._enemySet2 == 1)
  892.          {
  893.             _loc2_.AddInstruction("Enemy_42",0,1);
  894.          }
  895.          else if(_root.game._enemySet2 == 2)
  896.          {
  897.             _loc2_.AddInstruction("Enemy_43",0,1);
  898.          }
  899.          _loc2_.AddInstruction("Enemy_1",0,2);
  900.          _loc2_.AddInstruction("Enemy_17",1,1);
  901.          _loc3_.push(_loc2_);
  902.          _loc2_ = new WorldInstruction(5);
  903.          _loc2_.AddInstruction("Enemy_90",1,1);
  904.          _loc2_.AddInstruction("Enemy_76",0,1);
  905.          _loc2_.AddInstruction("Enemy_1",1,5);
  906.          _loc2_.AddInstruction("Enemy_17",0,2);
  907.          _loc3_.push(_loc2_);
  908.          _loc2_ = new WorldInstruction(5);
  909.          _loc2_.AddInstruction("Enemy_97",1,1);
  910.          _loc2_.AddInstruction("Enemy_1",1,5);
  911.          _loc2_.AddInstruction("Enemy_17",0,2);
  912.          _loc3_.push(_loc2_);
  913.       }
  914.       else if(worldDistance >= 14 && worldDistance < 16)
  915.       {
  916.          _loc2_ = new WorldInstruction(30);
  917.          if(_root.game._enemySet2 == 1)
  918.          {
  919.             _loc2_.AddInstruction("Enemy_7",2,2);
  920.          }
  921.          else if(_root.game._enemySet2 == 2)
  922.          {
  923.             _loc2_.AddInstruction("Enemy_91",2,2);
  924.          }
  925.          _loc2_.AddInstruction("Enemy_6",1,2);
  926.          if(_root.game._enemySet2 == 1)
  927.          {
  928.             _loc2_.AddInstruction("Enemy_4",1,2);
  929.          }
  930.          else if(_root.game._enemySet2 == 2)
  931.          {
  932.             _loc2_.AddInstruction("Enemy_18",1,2);
  933.          }
  934.          _loc3_.push(_loc2_);
  935.          _loc2_ = new WorldInstruction(20);
  936.          if(_root.game._enemySet2 == 1)
  937.          {
  938.             _loc2_.AddInstruction("Enemy_7",1,2);
  939.          }
  940.          else if(_root.game._enemySet2 == 2)
  941.          {
  942.             _loc2_.AddInstruction("Enemy_91",1,2);
  943.          }
  944.          _loc2_.AddInstruction("Enemy_6",1,2);
  945.          _loc2_.AddInstruction("Enemy_76",1,2);
  946.          _loc2_.AddInstruction("Enemy_1",0,2);
  947.          _loc2_.AddInstruction("Enemy_17",1,1);
  948.          _loc3_.push(_loc2_);
  949.          _loc2_ = new WorldInstruction(20);
  950.          _loc2_.AddInstruction("Enemy_11",1,2);
  951.          _loc2_.AddInstruction("Enemy_48",1,1);
  952.          if(_root.game._enemySet == 1)
  953.          {
  954.             _loc2_.AddInstruction("Enemy_2",1,1);
  955.          }
  956.          else if(_root.game._enemySet == 2)
  957.          {
  958.             _loc2_.AddInstruction("Enemy_93",1,1);
  959.          }
  960.          else if(_root.game._enemySet == 3)
  961.          {
  962.             _loc2_.AddInstruction("Enemy_94",1,1);
  963.          }
  964.          _loc2_.AddInstruction("Enemy_17",1,2);
  965.          _loc3_.push(_loc2_);
  966.          _loc2_ = new WorldInstruction(20);
  967.          _loc2_.AddInstruction("Enemy_5",3,4);
  968.          _loc2_.AddInstruction("Enemy_48",2,2);
  969.          _loc2_.AddInstruction("Enemy_1",0,2);
  970.          _loc2_.AddInstruction("Enemy_17",1,1);
  971.          _loc3_.push(_loc2_);
  972.          _loc2_ = new WorldInstruction(20);
  973.          _loc2_.AddInstruction("Enemy_5",2,4);
  974.          _loc2_.AddInstruction("Enemy_9",1,2);
  975.          _loc2_.AddInstruction("Enemy_1",0,2);
  976.          _loc2_.AddInstruction("Enemy_17",1,2);
  977.          _loc3_.push(_loc2_);
  978.          _loc2_ = new WorldInstruction(20);
  979.          if(_root.game._enemySet2 == 1)
  980.          {
  981.             _loc2_.AddInstruction("Enemy_7",1,2);
  982.          }
  983.          else if(_root.game._enemySet2 == 2)
  984.          {
  985.             _loc2_.AddInstruction("Enemy_91",1,2);
  986.          }
  987.          _loc2_.AddInstruction("Enemy_9",2,3);
  988.          _loc2_.AddInstruction("Enemy_1",0,2);
  989.          _loc2_.AddInstruction("Enemy_17",1,2);
  990.          _loc3_.push(_loc2_);
  991.          _loc2_ = new WorldInstruction(10);
  992.          _loc2_.AddInstruction("Enemy_12",1,1);
  993.          _loc2_.AddInstruction("Enemy_6",1,2);
  994.          if(_root.game._enemySet2 == 1)
  995.          {
  996.             _loc2_.AddInstruction("Enemy_4",1,2);
  997.          }
  998.          else if(_root.game._enemySet2 == 2)
  999.          {
  1000.             _loc2_.AddInstruction("Enemy_18",1,2);
  1001.          }
  1002.          _loc3_.push(_loc2_);
  1003.          _loc2_ = new WorldInstruction(5);
  1004.          _loc2_.AddInstruction("Enemy_13",3,4);
  1005.          if(_root.game._enemySet2 == 1)
  1006.          {
  1007.             _loc2_.AddInstruction("Enemy_42",0,1);
  1008.          }
  1009.          else if(_root.game._enemySet2 == 2)
  1010.          {
  1011.             _loc2_.AddInstruction("Enemy_43",0,1);
  1012.          }
  1013.          _loc2_.AddInstruction("Enemy_1",0,2);
  1014.          _loc2_.AddInstruction("Enemy_17",1,1);
  1015.          _loc3_.push(_loc2_);
  1016.       }
  1017.       else if(worldDistance >= 16 && worldDistance < 18)
  1018.       {
  1019.          _loc2_ = new WorldInstruction(20);
  1020.          if(_root.game._enemySet2 == 1)
  1021.          {
  1022.             _loc2_.AddInstruction("Enemy_7",2,4);
  1023.          }
  1024.          else if(_root.game._enemySet2 == 2)
  1025.          {
  1026.             _loc2_.AddInstruction("Enemy_91",2,4);
  1027.          }
  1028.          _loc2_.AddInstruction("Enemy_6",1,2);
  1029.          if(_root.game._enemySet2 == 1)
  1030.          {
  1031.             _loc2_.AddInstruction("Enemy_4",1,2);
  1032.          }
  1033.          else if(_root.game._enemySet2 == 2)
  1034.          {
  1035.             _loc2_.AddInstruction("Enemy_18",1,2);
  1036.          }
  1037.          _loc3_.push(_loc2_);
  1038.          _loc2_ = new WorldInstruction(30);
  1039.          if(_root.game._enemySet2 == 1)
  1040.          {
  1041.             _loc2_.AddInstruction("Enemy_7",1,3);
  1042.          }
  1043.          else if(_root.game._enemySet2 == 2)
  1044.          {
  1045.             _loc2_.AddInstruction("Enemy_91",1,3);
  1046.          }
  1047.          if(_root.game._enemySet == 1)
  1048.          {
  1049.             _loc2_.AddInstruction("Enemy_88",1,2);
  1050.          }
  1051.          else if(_root.game._enemySet == 2)
  1052.          {
  1053.             _loc2_.AddInstruction("Enemy_89",1,2);
  1054.          }
  1055.          else if(_root.game._enemySet == 3)
  1056.          {
  1057.             _loc2_.AddInstruction("Enemy_65",1,2);
  1058.          }
  1059.          _loc2_.AddInstruction("Enemy_1",0,2);
  1060.          if(_root.game._enemySet2 == 1)
  1061.          {
  1062.             _loc2_.AddInstruction("Enemy_4",0,2);
  1063.          }
  1064.          else if(_root.game._enemySet2 == 2)
  1065.          {
  1066.             _loc2_.AddInstruction("Enemy_18",0,2);
  1067.          }
  1068.          _loc3_.push(_loc2_);
  1069.          _loc2_ = new WorldInstruction(10);
  1070.          _loc2_.AddInstruction("Enemy_11",2,3);
  1071.          _loc2_.AddInstruction("Enemy_48",1,1);
  1072.          if(_root.game._enemySet == 1)
  1073.          {
  1074.             _loc2_.AddInstruction("Enemy_2",1,1);
  1075.          }
  1076.          else if(_root.game._enemySet == 2)
  1077.          {
  1078.             _loc2_.AddInstruction("Enemy_93",1,1);
  1079.          }
  1080.          else if(_root.game._enemySet == 3)
  1081.          {
  1082.             _loc2_.AddInstruction("Enemy_94",1,1);
  1083.          }
  1084.          _loc2_.AddInstruction("Enemy_17",1,2);
  1085.          _loc3_.push(_loc2_);
  1086.          _loc2_ = new WorldInstruction(10);
  1087.          _loc2_.AddInstruction("Enemy_11",1,1);
  1088.          _loc2_.AddInstruction("Enemy_48",2,3);
  1089.          if(_root.game._enemySet == 1)
  1090.          {
  1091.             _loc2_.AddInstruction("Enemy_2",1,1);
  1092.          }
  1093.          else if(_root.game._enemySet == 2)
  1094.          {
  1095.             _loc2_.AddInstruction("Enemy_93",1,1);
  1096.          }
  1097.          else if(_root.game._enemySet == 3)
  1098.          {
  1099.             _loc2_.AddInstruction("Enemy_94",1,1);
  1100.          }
  1101.          _loc2_.AddInstruction("Enemy_17",1,2);
  1102.          _loc3_.push(_loc2_);
  1103.          _loc2_ = new WorldInstruction(20);
  1104.          _loc2_.AddInstruction("Enemy_5",3,4);
  1105.          _loc2_.AddInstruction("Enemy_48",2,2);
  1106.          _loc2_.AddInstruction("Enemy_1",0,2);
  1107.          _loc2_.AddInstruction("Enemy_17",1,1);
  1108.          _loc3_.push(_loc2_);
  1109.          _loc2_ = new WorldInstruction(20);
  1110.          _loc2_.AddInstruction("Enemy_6",2,3);
  1111.          _loc2_.AddInstruction("Enemy_9",1,3);
  1112.          _loc2_.AddInstruction("Enemy_1",0,2);
  1113.          _loc2_.AddInstruction("Enemy_17",1,2);
  1114.          _loc3_.push(_loc2_);
  1115.          _loc2_ = new WorldInstruction(20);
  1116.          if(_root.game._enemySet2 == 1)
  1117.          {
  1118.             _loc2_.AddInstruction("Enemy_7",1,2);
  1119.          }
  1120.          else if(_root.game._enemySet2 == 2)
  1121.          {
  1122.             _loc2_.AddInstruction("Enemy_91",1,2);
  1123.          }
  1124.          _loc2_.AddInstruction("Enemy_9",2,3);
  1125.          _loc2_.AddInstruction("Enemy_1",0,2);
  1126.          _loc2_.AddInstruction("Enemy_17",1,2);
  1127.          _loc3_.push(_loc2_);
  1128.          _loc2_ = new WorldInstruction(20);
  1129.          _loc2_.AddInstruction("Enemy_87",12,16);
  1130.          if(_root.game._enemySet2 == 1)
  1131.          {
  1132.             _loc2_.AddInstruction("Enemy_4",0,2);
  1133.          }
  1134.          else if(_root.game._enemySet2 == 2)
  1135.          {
  1136.             _loc2_.AddInstruction("Enemy_18",0,2);
  1137.          }
  1138.          _loc3_.push(_loc2_);
  1139.          _loc2_ = new WorldInstruction(10);
  1140.          _loc2_.AddInstruction("Enemy_90",1,1);
  1141.          if(_root.game._enemySet2 == 1)
  1142.          {
  1143.             _loc2_.AddInstruction("Enemy_7",1,2);
  1144.          }
  1145.          else if(_root.game._enemySet2 == 2)
  1146.          {
  1147.             _loc2_.AddInstruction("Enemy_91",1,2);
  1148.          }
  1149.          _loc2_.AddInstruction("Enemy_1",0,2);
  1150.          _loc2_.AddInstruction("Enemy_17",1,1);
  1151.          _loc3_.push(_loc2_);
  1152.          _loc2_ = new WorldInstruction(10);
  1153.          _loc2_.AddInstruction("Enemy_86",1,1);
  1154.          _loc2_.AddInstruction("Enemy_76",1,3);
  1155.          _loc2_.AddInstruction("Enemy_1",1,2);
  1156.          _loc2_.AddInstruction("Enemy_17",0,1);
  1157.          _loc3_.push(_loc2_);
  1158.       }
  1159.       else if(worldDistance >= 18)
  1160.       {
  1161.          _loc2_ = new WorldInstruction(30);
  1162.          if(_root.game._enemySet2 == 1)
  1163.          {
  1164.             _loc2_.AddInstruction("Enemy_63",1,2);
  1165.          }
  1166.          else if(_root.game._enemySet2 == 2)
  1167.          {
  1168.             _loc2_.AddInstruction("Enemy_83",1,2);
  1169.          }
  1170.          _loc2_.AddInstruction("Enemy_11",1,1);
  1171.          _loc2_.AddInstruction("Enemy_1",0,2);
  1172.          _loc2_.AddInstruction("Enemy_17",1,2);
  1173.          _loc3_.push(_loc2_);
  1174.          if(_root.game._enemySet2 == 2)
  1175.          {
  1176.             _loc2_ = new WorldInstruction(20);
  1177.             _loc2_.AddInstruction("Enemy_82",1,2);
  1178.             _loc2_.AddInstruction("Enemy_93",3,4);
  1179.             _loc2_.AddInstruction("Enemy_1",1,2);
  1180.             _loc2_.AddInstruction("Enemy_17",0,1);
  1181.             _loc3_.push(_loc2_);
  1182.          }
  1183.          if(_root.game._enemySet2 == 3)
  1184.          {
  1185.             _loc2_ = new WorldInstruction(20);
  1186.             _loc2_.AddInstruction("Enemy_85",1,2);
  1187.             _loc2_.AddInstruction("Enemy_94",3,4);
  1188.             _loc2_.AddInstruction("Enemy_1",1,2);
  1189.             _loc2_.AddInstruction("Enemy_17",0,1);
  1190.             _loc3_.push(_loc2_);
  1191.          }
  1192.          _loc2_ = new WorldInstruction(20);
  1193.          _loc2_.AddInstruction("Enemy_9",0,2);
  1194.          if(_root.game._enemySet == 1)
  1195.          {
  1196.             _loc2_.AddInstruction("Enemy_88",2,2);
  1197.          }
  1198.          else if(_root.game._enemySet == 2)
  1199.          {
  1200.             _loc2_.AddInstruction("Enemy_89",2,2);
  1201.          }
  1202.          else if(_root.game._enemySet == 3)
  1203.          {
  1204.             _loc2_.AddInstruction("Enemy_65",2,2);
  1205.          }
  1206.          _loc2_.AddInstruction("Enemy_1",0,2);
  1207.          _loc2_.AddInstruction("Enemy_17",1,2);
  1208.          _loc3_.push(_loc2_);
  1209.          _loc2_ = new WorldInstruction(20);
  1210.          _loc2_.AddInstruction("Enemy_12",1,1);
  1211.          if(_root.game._enemySet2 == 1)
  1212.          {
  1213.             _loc2_.AddInstruction("Enemy_7",2,3);
  1214.          }
  1215.          else if(_root.game._enemySet2 == 2)
  1216.          {
  1217.             _loc2_.AddInstruction("Enemy_91",2,3);
  1218.          }
  1219.          if(_root.game._enemySet2 == 1)
  1220.          {
  1221.             _loc2_.AddInstruction("Enemy_4",0,2);
  1222.          }
  1223.          else if(_root.game._enemySet2 == 2)
  1224.          {
  1225.             _loc2_.AddInstruction("Enemy_18",0,2);
  1226.          }
  1227.          _loc3_.push(_loc2_);
  1228.          _loc2_ = new WorldInstruction(20);
  1229.          _loc2_.AddInstruction("Enemy_87",12,16);
  1230.          if(_root.game._enemySet2 == 1)
  1231.          {
  1232.             _loc2_.AddInstruction("Enemy_4",0,2);
  1233.          }
  1234.          else if(_root.game._enemySet2 == 2)
  1235.          {
  1236.             _loc2_.AddInstruction("Enemy_18",0,2);
  1237.          }
  1238.          _loc3_.push(_loc2_);
  1239.          _loc2_ = new WorldInstruction(10);
  1240.          _loc2_.AddInstruction("Enemy_90",1,1);
  1241.          if(_root.game._enemySet2 == 1)
  1242.          {
  1243.             _loc2_.AddInstruction("Enemy_7",1,2);
  1244.          }
  1245.          else if(_root.game._enemySet2 == 2)
  1246.          {
  1247.             _loc2_.AddInstruction("Enemy_91",1,2);
  1248.          }
  1249.          _loc2_.AddInstruction("Enemy_1",0,2);
  1250.          _loc2_.AddInstruction("Enemy_17",1,1);
  1251.          _loc3_.push(_loc2_);
  1252.          _loc2_ = new WorldInstruction(10);
  1253.          _loc2_.AddInstruction("Enemy_86",1,1);
  1254.          _loc2_.AddInstruction("Enemy_76",1,3);
  1255.          _loc2_.AddInstruction("Enemy_1",1,2);
  1256.          _loc2_.AddInstruction("Enemy_17",0,1);
  1257.          _loc3_.push(_loc2_);
  1258.       }
  1259.       return _loc3_;
  1260.    }
  1261.    function GetEnemyOptionsFar(worldDistance)
  1262.    {
  1263.       var _loc3_ = new Array();
  1264.       if(worldDistance < 25)
  1265.       {
  1266.          var _loc2_ = undefined;
  1267.          _loc2_ = new WorldInstruction(20);
  1268.          _loc2_.AddInstruction("Enemy_96",2,4);
  1269.          _loc2_.AddInstruction("Enemy_76",1,2);
  1270.          _loc2_.AddInstruction("Enemy_1",1,2);
  1271.          _loc2_.AddInstruction("Enemy_17",0,1);
  1272.          _loc3_.push(_loc2_);
  1273.          _loc2_ = new WorldInstruction(20);
  1274.          _loc2_.AddInstruction("Enemy_96",1,3);
  1275.          _loc2_.AddInstruction("Enemy_44",1,2);
  1276.          _loc2_.AddInstruction("Enemy_1",0,2);
  1277.          _loc2_.AddInstruction("Enemy_17",0,2);
  1278.          _loc3_.push(_loc2_);
  1279.          _loc2_ = new WorldInstruction(20);
  1280.          _loc2_.AddInstruction("Enemy_79",1,2);
  1281.          _loc2_.AddInstruction("Enemy_96",2,2);
  1282.          _loc2_.AddInstruction("Enemy_1",0,2);
  1283.          if(_root.game._enemySet2 == 1)
  1284.          {
  1285.             _loc2_.AddInstruction("Enemy_4",2,3);
  1286.          }
  1287.          else if(_root.game._enemySet2 == 2)
  1288.          {
  1289.             _loc2_.AddInstruction("Enemy_18",2,3);
  1290.          }
  1291.          _loc3_.push(_loc2_);
  1292.          _loc2_ = new WorldInstruction(10);
  1293.          if(_root.game._enemySet2 == 1)
  1294.          {
  1295.             _loc2_.AddInstruction("Enemy_7",2,3);
  1296.          }
  1297.          else if(_root.game._enemySet2 == 2)
  1298.          {
  1299.             _loc2_.AddInstruction("Enemy_91",2,3);
  1300.          }
  1301.          _loc2_.AddInstruction("Enemy_74",1,1);
  1302.          _loc2_.AddInstruction("Enemy_11",0,1);
  1303.          _loc2_.AddInstruction("Enemy_17",0,2);
  1304.          _loc3_.push(_loc2_);
  1305.          _loc2_ = new WorldInstruction(10);
  1306.          if(_root.game._enemySet2 == 1)
  1307.          {
  1308.             _loc2_.AddInstruction("Enemy_7",1,2);
  1309.          }
  1310.          else if(_root.game._enemySet2 == 2)
  1311.          {
  1312.             _loc2_.AddInstruction("Enemy_91",1,2);
  1313.          }
  1314.          _loc2_.AddInstruction("Enemy_74",1,1);
  1315.          _loc2_.AddInstruction("Enemy_11",1,1);
  1316.          _loc2_.AddInstruction("Enemy_17",0,2);
  1317.          _loc3_.push(_loc2_);
  1318.          _loc2_ = new WorldInstruction(20);
  1319.          _loc2_.AddInstruction("Enemy_46",2,2);
  1320.          _loc2_.AddInstruction("Enemy_79",1,2);
  1321.          _loc2_.AddInstruction("Enemy_1",0,2);
  1322.          _loc2_.AddInstruction("Enemy_17",0,2);
  1323.          _loc3_.push(_loc2_);
  1324.          if(_root.game._enemySet2 == 3)
  1325.          {
  1326.             _loc2_ = new WorldInstruction(20);
  1327.             _loc2_.AddInstruction("Enemy_85",2,3);
  1328.             _loc2_.AddInstruction("Enemy_80",1,2);
  1329.             _loc2_.AddInstruction("Enemy_17",0,2);
  1330.             _loc3_.push(_loc2_);
  1331.          }
  1332.          _loc2_ = new WorldInstruction(10);
  1333.          _loc2_.AddInstruction("Enemy_10",1,1);
  1334.          _loc2_.AddInstruction("Enemy_1",1,2);
  1335.          if(_root.game._enemySet2 == 1)
  1336.          {
  1337.             _loc2_.AddInstruction("Enemy_4",2,3);
  1338.          }
  1339.          else if(_root.game._enemySet2 == 2)
  1340.          {
  1341.             _loc2_.AddInstruction("Enemy_18",2,3);
  1342.          }
  1343.          _loc3_.push(_loc2_);
  1344.          _loc2_ = new WorldInstruction(10);
  1345.          _loc2_.AddInstruction("Enemy_90",1,1);
  1346.          _loc2_.AddInstruction("Enemy_96",2,3);
  1347.          _loc2_.AddInstruction("Enemy_1",0,2);
  1348.          if(_root.game._enemySet2 == 1)
  1349.          {
  1350.             _loc2_.AddInstruction("Enemy_4",2,3);
  1351.          }
  1352.          else if(_root.game._enemySet2 == 2)
  1353.          {
  1354.             _loc2_.AddInstruction("Enemy_18",2,3);
  1355.          }
  1356.          _loc3_.push(_loc2_);
  1357.          _loc2_ = new WorldInstruction(10);
  1358.          _loc2_.AddInstruction("Enemy_14",1,1);
  1359.          _loc2_.AddInstruction("Enemy_96",0,1);
  1360.          _loc2_.AddInstruction("Enemy_1",0,2);
  1361.          if(_root.game._enemySet2 == 1)
  1362.          {
  1363.             _loc2_.AddInstruction("Enemy_4",2,3);
  1364.          }
  1365.          else if(_root.game._enemySet2 == 2)
  1366.          {
  1367.             _loc2_.AddInstruction("Enemy_18",2,3);
  1368.          }
  1369.          _loc3_.push(_loc2_);
  1370.          _loc2_ = new WorldInstruction(10);
  1371.          if(_root.game._enemySet == 1)
  1372.          {
  1373.             _loc2_.AddInstruction("Enemy_2",5,6);
  1374.          }
  1375.          else if(_root.game._enemySet == 2)
  1376.          {
  1377.             _loc2_.AddInstruction("Enemy_93",5,6);
  1378.          }
  1379.          else if(_root.game._enemySet == 3)
  1380.          {
  1381.             _loc2_.AddInstruction("Enemy_94",5,6);
  1382.          }
  1383.          _loc2_.AddInstruction("Enemy_12",1,1);
  1384.          _loc3_.push(_loc2_);
  1385.          _loc2_ = new WorldInstruction(10);
  1386.          if(_root.game._enemySet == 1)
  1387.          {
  1388.             _loc2_.AddInstruction("Enemy_88",2,3);
  1389.          }
  1390.          else if(_root.game._enemySet == 2)
  1391.          {
  1392.             _loc2_.AddInstruction("Enemy_89",2,3);
  1393.          }
  1394.          else if(_root.game._enemySet == 3)
  1395.          {
  1396.             _loc2_.AddInstruction("Enemy_65",2,3);
  1397.          }
  1398.          _loc2_.AddInstruction("Enemy_9",0,1);
  1399.          if(_root.game._enemySet2 == 1)
  1400.          {
  1401.             _loc2_.AddInstruction("Enemy_4",0,2);
  1402.          }
  1403.          else if(_root.game._enemySet2 == 2)
  1404.          {
  1405.             _loc2_.AddInstruction("Enemy_18",0,2);
  1406.          }
  1407.          _loc3_.push(_loc2_);
  1408.       }
  1409.       else if(worldDistance >= 25)
  1410.       {
  1411.          _loc2_ = new WorldInstruction(20);
  1412.          _loc2_.AddInstruction("Enemy_96",2,3);
  1413.          _loc2_.AddInstruction("Enemy_11",2,2);
  1414.          _loc2_.AddInstruction("Enemy_9",0,2);
  1415.          _loc2_.AddInstruction("Enemy_1",1,2);
  1416.          if(_root.game._enemySet2 == 1)
  1417.          {
  1418.             _loc2_.AddInstruction("Enemy_4",0,2);
  1419.          }
  1420.          else if(_root.game._enemySet2 == 2)
  1421.          {
  1422.             _loc2_.AddInstruction("Enemy_18",0,2);
  1423.          }
  1424.          _loc3_.push(_loc2_);
  1425.          _loc2_ = new WorldInstruction(20);
  1426.          _loc2_.AddInstruction("Enemy_96",2,3);
  1427.          _loc2_.AddInstruction("Enemy_45",1,1);
  1428.          _loc2_.AddInstruction("Enemy_1",0,2);
  1429.          _loc2_.AddInstruction("Enemy_17",0,2);
  1430.          _loc3_.push(_loc2_);
  1431.          _loc2_ = new WorldInstruction(20);
  1432.          _loc2_.AddInstruction("Enemy_79",2,3);
  1433.          _loc2_.AddInstruction("Enemy_6",1,2);
  1434.          _loc2_.AddInstruction("Enemy_1",0,2);
  1435.          _loc2_.AddInstruction("Enemy_17",0,2);
  1436.          _loc3_.push(_loc2_);
  1437.          _loc2_ = new WorldInstruction(20);
  1438.          _loc2_.AddInstruction("Enemy_47",1,1);
  1439.          if(_root.game._enemySet == 1)
  1440.          {
  1441.             _loc2_.AddInstruction("Enemy_2",2,4);
  1442.          }
  1443.          else if(_root.game._enemySet == 2)
  1444.          {
  1445.             _loc2_.AddInstruction("Enemy_93",2,4);
  1446.          }
  1447.          else if(_root.game._enemySet == 3)
  1448.          {
  1449.             _loc2_.AddInstruction("Enemy_94",2,4);
  1450.          }
  1451.          _loc2_.AddInstruction("Enemy_11",0,1);
  1452.          _loc2_.AddInstruction("Enemy_17",0,2);
  1453.          _loc3_.push(_loc2_);
  1454.          _loc2_ = new WorldInstruction(20);
  1455.          _loc2_.AddInstruction("Enemy_47",1,1);
  1456.          _loc2_.AddInstruction("Enemy_79",2,2);
  1457.          _loc2_.AddInstruction("Enemy_1",0,2);
  1458.          if(_root.game._enemySet2 == 1)
  1459.          {
  1460.             _loc2_.AddInstruction("Enemy_4",2,3);
  1461.          }
  1462.          else if(_root.game._enemySet2 == 2)
  1463.          {
  1464.             _loc2_.AddInstruction("Enemy_18",1,2);
  1465.          }
  1466.          _loc3_.push(_loc2_);
  1467.          _loc2_ = new WorldInstruction(10);
  1468.          _loc2_.AddInstruction("Enemy_10",1,1);
  1469.          _loc2_.AddInstruction("Enemy_1",1,2);
  1470.          if(_root.game._enemySet2 == 1)
  1471.          {
  1472.             _loc2_.AddInstruction("Enemy_4",2,3);
  1473.          }
  1474.          else if(_root.game._enemySet2 == 2)
  1475.          {
  1476.             _loc2_.AddInstruction("Enemy_18",1,2);
  1477.          }
  1478.          _loc3_.push(_loc2_);
  1479.          _loc2_ = new WorldInstruction(10);
  1480.          _loc2_.AddInstruction("Enemy_90",1,1);
  1481.          _loc2_.AddInstruction("Enemy_96",3,4);
  1482.          _loc2_.AddInstruction("Enemy_1",0,2);
  1483.          if(_root.game._enemySet2 == 1)
  1484.          {
  1485.             _loc2_.AddInstruction("Enemy_4",1,2);
  1486.          }
  1487.          else if(_root.game._enemySet2 == 2)
  1488.          {
  1489.             _loc2_.AddInstruction("Enemy_18",1,2);
  1490.          }
  1491.          _loc3_.push(_loc2_);
  1492.          _loc2_ = new WorldInstruction(10);
  1493.          _loc2_.AddInstruction("Enemy_14",1,1);
  1494.          _loc2_.AddInstruction("Enemy_96",2,3);
  1495.          _loc2_.AddInstruction("Enemy_1",0,2);
  1496.          if(_root.game._enemySet2 == 1)
  1497.          {
  1498.             _loc2_.AddInstruction("Enemy_4",2,2);
  1499.          }
  1500.          else if(_root.game._enemySet2 == 2)
  1501.          {
  1502.             _loc2_.AddInstruction("Enemy_18",2,2);
  1503.          }
  1504.          _loc3_.push(_loc2_);
  1505.          _loc2_ = new WorldInstruction(10);
  1506.          _loc2_.AddInstruction("Enemy_86",1,1);
  1507.          _loc2_.AddInstruction("Enemy_76",2,3);
  1508.          _loc2_.AddInstruction("Enemy_1",0,2);
  1509.          _loc3_.push(_loc2_);
  1510.       }
  1511.       return _loc3_;
  1512.    }
  1513.    function GetEnemyOptionsVeryFar(worldDistance)
  1514.    {
  1515.       var _loc5_ = new Array();
  1516.       if(worldDistance < 35)
  1517.       {
  1518.          var _loc3_ = undefined;
  1519.          _loc3_ = new WorldInstruction(20);
  1520.          _loc3_.AddInstruction("Enemy_75",1,2);
  1521.          _loc3_.AddInstruction("Enemy_95",2,3);
  1522.          _loc3_.AddInstruction("Enemy_9",0,1);
  1523.          _loc5_.push(_loc3_);
  1524.          _loc3_ = new WorldInstruction(20);
  1525.          _loc3_.AddInstruction("Enemy_75",1,2);
  1526.          _loc3_.AddInstruction("Enemy_45",1,1);
  1527.          _loc3_.AddInstruction("Enemy_1",0,2);
  1528.          _loc3_.AddInstruction("Enemy_17",0,2);
  1529.          _loc5_.push(_loc3_);
  1530.          _loc3_ = new WorldInstruction(20);
  1531.          _loc3_.AddInstruction("Enemy_98",2,3);
  1532.          _loc3_.AddInstruction("Enemy_96",1,2);
  1533.          _loc3_.AddInstruction("Enemy_1",0,2);
  1534.          _loc3_.AddInstruction("Enemy_17",0,2);
  1535.          _loc5_.push(_loc3_);
  1536.          _loc3_ = new WorldInstruction(20);
  1537.          _loc3_.AddInstruction("Enemy_98",1,3);
  1538.          if(_root.game._enemySet == 1)
  1539.          {
  1540.             _loc3_.AddInstruction("Enemy_2",3,5);
  1541.          }
  1542.          else if(_root.game._enemySet == 2)
  1543.          {
  1544.             _loc3_.AddInstruction("Enemy_93",3,5);
  1545.          }
  1546.          else if(_root.game._enemySet == 3)
  1547.          {
  1548.             _loc3_.AddInstruction("Enemy_94",3,5);
  1549.          }
  1550.          _loc3_.AddInstruction("Enemy_11",0,1);
  1551.          _loc3_.AddInstruction("Enemy_17",0,2);
  1552.          _loc5_.push(_loc3_);
  1553.          _loc3_ = new WorldInstruction(20);
  1554.          _loc3_.AddInstruction("Enemy_47",0,1);
  1555.          _loc3_.AddInstruction("Enemy_99",1,1);
  1556.          _loc3_.AddInstruction("Enemy_96",1,3);
  1557.          if(_root.game._enemySet2 == 1)
  1558.          {
  1559.             _loc3_.AddInstruction("Enemy_4",0,2);
  1560.          }
  1561.          else if(_root.game._enemySet2 == 2)
  1562.          {
  1563.             _loc3_.AddInstruction("Enemy_18",0,2);
  1564.          }
  1565.          _loc5_.push(_loc3_);
  1566.          _loc3_ = new WorldInstruction(10);
  1567.          _loc3_.AddInstruction("Enemy_92",1,1);
  1568.          _loc3_.AddInstruction("Enemy_1",1,2);
  1569.          if(_root.game._enemySet2 == 1)
  1570.          {
  1571.             _loc3_.AddInstruction("Enemy_4",2,3);
  1572.          }
  1573.          else if(_root.game._enemySet2 == 2)
  1574.          {
  1575.             _loc3_.AddInstruction("Enemy_18",2,3);
  1576.          }
  1577.          _loc5_.push(_loc3_);
  1578.          _loc3_ = new WorldInstruction(10);
  1579.          _loc3_.AddInstruction("Enemy_97",1,1);
  1580.          _loc3_.AddInstruction("Enemy_96",1,2);
  1581.          _loc3_.AddInstruction("Enemy_1",0,2);
  1582.          if(_root.game._enemySet2 == 1)
  1583.          {
  1584.             _loc3_.AddInstruction("Enemy_4",2,3);
  1585.          }
  1586.          else if(_root.game._enemySet2 == 2)
  1587.          {
  1588.             _loc3_.AddInstruction("Enemy_18",2,3);
  1589.          }
  1590.          _loc5_.push(_loc3_);
  1591.          _loc3_ = new WorldInstruction(10);
  1592.          _loc3_.AddInstruction("Enemy_90",1,1);
  1593.          _loc3_.AddInstruction("Enemy_75",2,2);
  1594.          _loc3_.AddInstruction("Enemy_1",0,2);
  1595.          if(_root.game._enemySet2 == 1)
  1596.          {
  1597.             _loc3_.AddInstruction("Enemy_4",0,3);
  1598.          }
  1599.          else if(_root.game._enemySet2 == 2)
  1600.          {
  1601.             _loc3_.AddInstruction("Enemy_18",0,3);
  1602.          }
  1603.          _loc5_.push(_loc3_);
  1604.          _loc3_ = new WorldInstruction(10);
  1605.          _loc3_.AddInstruction("Enemy_86",1,1);
  1606.          _loc3_.AddInstruction("Enemy_99",1,1);
  1607.          _loc3_.AddInstruction("Enemy_1",0,2);
  1608.          _loc5_.push(_loc3_);
  1609.       }
  1610.       else if(worldDistance >= 35)
  1611.       {
  1612.          _loc3_ = new WorldInstruction(15);
  1613.          var _loc4_ = 0;
  1614.          while(_loc4_ < 3)
  1615.          {
  1616.             var _loc6_ = this.RandNum(1,15);
  1617.             switch(_loc6_)
  1618.             {
  1619.                case 1:
  1620.                   _loc3_.AddInstruction("Enemy_99",1,1);
  1621.                   break;
  1622.                case 2:
  1623.                   _loc3_.AddInstruction("Enemy_75",1,2);
  1624.                   break;
  1625.                case 3:
  1626.                   _loc3_.AddInstruction("Enemy_98",1,2);
  1627.                   break;
  1628.                case 4:
  1629.                   _loc3_.AddInstruction("Enemy_97",1,1);
  1630.                   if(_root.game._enemySet2 == 1)
  1631.                   {
  1632.                      _loc3_.AddInstruction("Enemy_4",1,4);
  1633.                   }
  1634.                   else if(_root.game._enemySet2 == 2)
  1635.                   {
  1636.                      _loc3_.AddInstruction("Enemy_18",1,4);
  1637.                   }
  1638.                   _loc4_ = _loc4_ + 1;
  1639.                   break;
  1640.                case 5:
  1641.                   if(_root.game._enemySet2 == 1)
  1642.                   {
  1643.                      _loc3_.AddInstruction("Enemy_4",1,4);
  1644.                   }
  1645.                   else if(_root.game._enemySet2 == 2)
  1646.                   {
  1647.                      _loc3_.AddInstruction("Enemy_18",1,4);
  1648.                   }
  1649.                   break;
  1650.                case 6:
  1651.                   if(_root.game._enemySet2 == 1)
  1652.                   {
  1653.                      _loc3_.AddInstruction("Enemy_7",1,2);
  1654.                   }
  1655.                   else if(_root.game._enemySet2 == 2)
  1656.                   {
  1657.                      _loc3_.AddInstruction("Enemy_91",1,2);
  1658.                   }
  1659.                   break;
  1660.                case 7:
  1661.                   _loc3_.AddInstruction("Enemy_9",1,2);
  1662.                   break;
  1663.                case 8:
  1664.                   _loc3_.AddInstruction("Enemy_1",1,2);
  1665.                   break;
  1666.                case 9:
  1667.                   _loc3_.AddInstruction("Enemy_99",1,1);
  1668.                   break;
  1669.                case 10:
  1670.                   _loc3_.AddInstruction("Enemy_96",1,2);
  1671.                   break;
  1672.                case 11:
  1673.                   _loc3_.AddInstruction("Enemy_76",1,2);
  1674.                   break;
  1675.                case 12:
  1676.                   if(_root.game._enemySet == 1)
  1677.                   {
  1678.                      _loc3_.AddInstruction("Enemy_88",1,2);
  1679.                   }
  1680.                   else if(_root.game._enemySet == 2)
  1681.                   {
  1682.                      _loc3_.AddInstruction("Enemy_89",1,2);
  1683.                   }
  1684.                   else if(_root.game._enemySet == 3)
  1685.                   {
  1686.                      _loc3_.AddInstruction("Enemy_65",1,2);
  1687.                   }
  1688.                   break;
  1689.                case 13:
  1690.                   _loc3_.AddInstruction("Enemy_80",1,2);
  1691.                   break;
  1692.                case 14:
  1693.                   _loc3_.AddInstruction("Enemy_95",2,4);
  1694.                   break;
  1695.                case 15:
  1696.                   _loc4_ = _loc4_ + 1;
  1697.             }
  1698.             _loc4_ = _loc4_ + 1;
  1699.          }
  1700.          _loc3_.AddInstruction("Enemy_1",0,3);
  1701.          _loc5_.push(_loc3_);
  1702.          _loc3_ = new WorldInstruction(5);
  1703.          _loc3_.AddInstruction("Enemy_75",2,2);
  1704.          _loc3_.AddInstruction("Enemy_95",3,6);
  1705.          _loc3_.AddInstruction("Enemy_1",0,2);
  1706.          _loc5_.push(_loc3_);
  1707.          _loc3_ = new WorldInstruction(5);
  1708.          _loc3_.AddInstruction("Enemy_75",1,2);
  1709.          _loc3_.AddInstruction("Enemy_98",2,2);
  1710.          _loc3_.AddInstruction("Enemy_1",0,2);
  1711.          if(_root.game._enemySet2 == 1)
  1712.          {
  1713.             _loc3_.AddInstruction("Enemy_4",0,2);
  1714.          }
  1715.          else if(_root.game._enemySet2 == 2)
  1716.          {
  1717.             _loc3_.AddInstruction("Enemy_18",0,2);
  1718.          }
  1719.          _loc5_.push(_loc3_);
  1720.          _loc3_ = new WorldInstruction(5);
  1721.          _loc3_.AddInstruction("Enemy_98",1,3);
  1722.          _loc3_.AddInstruction("Enemy_76",1,3);
  1723.          _loc3_.AddInstruction("Enemy_1",0,2);
  1724.          _loc3_.AddInstruction("Enemy_17",0,2);
  1725.          _loc5_.push(_loc3_);
  1726.          _loc3_ = new WorldInstruction(5);
  1727.          _loc3_.AddInstruction("Enemy_99",1,2);
  1728.          _loc3_.AddInstruction("Enemy_96",2,3);
  1729.          _loc3_.AddInstruction("Enemy_1",1,3);
  1730.          _loc3_.AddInstruction("Enemy_17",0,2);
  1731.          _loc5_.push(_loc3_);
  1732.          _loc3_ = new WorldInstruction(5);
  1733.          _loc3_.AddInstruction("Enemy_99",2,2);
  1734.          _loc3_.AddInstruction("Enemy_5",1,2);
  1735.          _loc3_.AddInstruction("Enemy_76",0,1);
  1736.          _loc3_.AddInstruction("Enemy_1",1,2);
  1737.          _loc3_.AddInstruction("Enemy_17",0,2);
  1738.          _loc5_.push(_loc3_);
  1739.          _loc3_ = new WorldInstruction(5);
  1740.          _loc3_.AddInstruction("Enemy_79",0,2);
  1741.          if(_root.game._enemySet2 == 1)
  1742.          {
  1743.             _loc3_.AddInstruction("Enemy_7",2,3);
  1744.          }
  1745.          else if(_root.game._enemySet2 == 2)
  1746.          {
  1747.             _loc3_.AddInstruction("Enemy_91",2,3);
  1748.          }
  1749.          if(_root.game._enemySet2 == 1)
  1750.          {
  1751.             _loc3_.AddInstruction("Enemy_4",0,2);
  1752.          }
  1753.          else if(_root.game._enemySet2 == 2)
  1754.          {
  1755.             _loc3_.AddInstruction("Enemy_18",0,2);
  1756.          }
  1757.          _loc3_.AddInstruction("Enemy_1",0,2);
  1758.          _loc5_.push(_loc3_);
  1759.          _loc3_ = new WorldInstruction(5);
  1760.          _loc3_.AddInstruction("Enemy_12",1,2);
  1761.          _loc3_.AddInstruction("Enemy_96",2,4);
  1762.          _loc3_.AddInstruction("Enemy_1",1,2);
  1763.          _loc3_.AddInstruction("Enemy_17",0,2);
  1764.          _loc5_.push(_loc3_);
  1765.          _loc3_ = new WorldInstruction(3);
  1766.          _loc3_.AddInstruction("Enemy_45",1,2);
  1767.          _loc3_.AddInstruction("Enemy_96",1,3);
  1768.          _loc3_.AddInstruction("Enemy_17",1,2);
  1769.          _loc5_.push(_loc3_);
  1770.          _loc3_ = new WorldInstruction(3);
  1771.          _loc3_.AddInstruction("Enemy_45",1,2);
  1772.          _loc3_.AddInstruction("Enemy_75",1,1);
  1773.          _loc3_.AddInstruction("Enemy_17",1,2);
  1774.          _loc5_.push(_loc3_);
  1775.          _loc3_ = new WorldInstruction(5);
  1776.          _loc3_.AddInstruction("Enemy_44",1,2);
  1777.          _loc3_.AddInstruction("Enemy_98",1,2);
  1778.          _loc3_.AddInstruction("Enemy_96",0,2);
  1779.          _loc3_.AddInstruction("Enemy_17",0,2);
  1780.          _loc5_.push(_loc3_);
  1781.          _loc3_ = new WorldInstruction(5);
  1782.          _loc3_.AddInstruction("Enemy_92",1,2);
  1783.          _loc3_.AddInstruction("Enemy_3",1,2);
  1784.          _loc3_.AddInstruction("Enemy_96",0,2);
  1785.          _loc3_.AddInstruction("Enemy_17",0,2);
  1786.          _loc5_.push(_loc3_);
  1787.          _loc3_ = new WorldInstruction(3);
  1788.          _loc3_.AddInstruction("Enemy_97",1,1);
  1789.          _loc3_.AddInstruction("Enemy_3",0,2);
  1790.          _loc3_.AddInstruction("Enemy_1",1,2);
  1791.          _loc5_.push(_loc3_);
  1792.          _loc3_ = new WorldInstruction(3);
  1793.          _loc3_.AddInstruction("Enemy_97",1,1);
  1794.          _loc3_.AddInstruction("Enemy_76",0,2);
  1795.          _loc3_.AddInstruction("Enemy_1",1,2);
  1796.          _loc5_.push(_loc3_);
  1797.          if(_root.game._enemySet2 == 2)
  1798.          {
  1799.             _loc3_ = new WorldInstruction(15);
  1800.             _loc3_.AddInstruction("Enemy_82",1,2);
  1801.             _loc3_.AddInstruction("Enemy_93",3,4);
  1802.             _loc3_.AddInstruction("Enemy_1",1,2);
  1803.             _loc3_.AddInstruction("Enemy_17",0,1);
  1804.             _loc5_.push(_loc3_);
  1805.          }
  1806.          if(_root.game._enemySet2 == 3)
  1807.          {
  1808.             _loc3_ = new WorldInstruction(15);
  1809.             _loc3_.AddInstruction("Enemy_85",1,2);
  1810.             _loc3_.AddInstruction("Enemy_94",3,4);
  1811.             _loc3_.AddInstruction("Enemy_1",1,2);
  1812.             _loc3_.AddInstruction("Enemy_17",0,1);
  1813.             _loc5_.push(_loc3_);
  1814.          }
  1815.          _loc3_ = new WorldInstruction(20);
  1816.          _loc3_.AddInstruction("Enemy_9",0,2);
  1817.          if(_root.game._enemySet == 1)
  1818.          {
  1819.             _loc3_.AddInstruction("Enemy_88",2,2);
  1820.          }
  1821.          else if(_root.game._enemySet == 2)
  1822.          {
  1823.             _loc3_.AddInstruction("Enemy_89",2,2);
  1824.          }
  1825.          else if(_root.game._enemySet == 3)
  1826.          {
  1827.             _loc3_.AddInstruction("Enemy_65",2,2);
  1828.          }
  1829.          _loc3_.AddInstruction("Enemy_1",0,2);
  1830.          _loc3_.AddInstruction("Enemy_17",1,2);
  1831.          _loc5_.push(_loc3_);
  1832.          _loc3_ = new WorldInstruction(10);
  1833.          _loc3_.AddInstruction("Enemy_14",1,1);
  1834.          _loc3_.AddInstruction("Enemy_96",0,1);
  1835.          _loc3_.AddInstruction("Enemy_1",0,2);
  1836.          if(_root.game._enemySet2 == 1)
  1837.          {
  1838.             _loc3_.AddInstruction("Enemy_4",2,3);
  1839.          }
  1840.          else if(_root.game._enemySet2 == 2)
  1841.          {
  1842.             _loc3_.AddInstruction("Enemy_18",2,3);
  1843.          }
  1844.          _loc5_.push(_loc3_);
  1845.          _loc3_ = new WorldInstruction(10);
  1846.          _loc3_.AddInstruction("Enemy_90",1,1);
  1847.          _loc3_.AddInstruction("Enemy_76",0,2);
  1848.          _loc3_.AddInstruction("Enemy_1",1,5);
  1849.          _loc3_.AddInstruction("Enemy_17",0,2);
  1850.          _loc5_.push(_loc3_);
  1851.          _loc3_ = new WorldInstruction(10);
  1852.          _loc3_.AddInstruction("Enemy_86",1,1);
  1853.          _loc3_.AddInstruction("Enemy_99",1,1);
  1854.          _loc3_.AddInstruction("Enemy_1",0,2);
  1855.          _loc5_.push(_loc3_);
  1856.          _loc3_ = new WorldInstruction(2);
  1857.          _loc3_.AddInstruction("Enemy_R1",1,1);
  1858.          _loc3_.AddInstruction("Enemy_1",1,2);
  1859.          if(_root.game._enemySet2 == 1)
  1860.          {
  1861.             _loc3_.AddInstruction("Enemy_4",0,2);
  1862.          }
  1863.          else if(_root.game._enemySet2 == 2)
  1864.          {
  1865.             _loc3_.AddInstruction("Enemy_18",0,2);
  1866.          }
  1867.          _loc5_.push(_loc3_);
  1868.       }
  1869.       return _loc5_;
  1870.    }
  1871.    function RandNum(minVal, maxVal)
  1872.    {
  1873.       return Math.round(Math.random() * (maxVal - minVal)) + minVal;
  1874.    }
  1875. }
  1876.