Section 1
//Skip (cinematics.txt.Skip)
package cinematics.txt {
import flash.display.*;
import flash.text.*;
import main.*;
public class Skip extends MovieClip {
public var txt:TextField;
public function Skip(){
addFrameScript(0, frame1);
super();
buttonMode = true;
(getChildByName("txt") as TextField).text = Main.bundle.getString("SKIP");
}
function frame1(){
stop();
}
}
}//package cinematics.txt
Section 2
//Text1 (cinematics.txt.Text1)
package cinematics.txt {
import flash.display.*;
import flash.text.*;
import main.*;
public class Text1 extends MovieClip {
public var txt:TextField;
public function Text1(){
(getChildByName("txt") as TextField).text = Main.bundle.getString("PLOT1");
}
}
}//package cinematics.txt
Section 3
//Text2 (cinematics.txt.Text2)
package cinematics.txt {
import flash.display.*;
import flash.text.*;
import main.*;
public class Text2 extends MovieClip {
public var txt:TextField;
public function Text2(){
(getChildByName("txt") as TextField).text = Main.bundle.getString("PLOT2");
}
}
}//package cinematics.txt
Section 4
//Text3 (cinematics.txt.Text3)
package cinematics.txt {
import flash.display.*;
import flash.text.*;
import main.*;
public class Text3 extends MovieClip {
public var txt:TextField;
public function Text3(){
(getChildByName("txt") as TextField).text = Main.bundle.getString("PLOT3");
}
}
}//package cinematics.txt
Section 5
//Badabom (cinematics.Badabom)
package cinematics {
import flash.events.*;
import map.units.unit.*;
import main.*;
import ui.menus.*;
import utils.*;
public class Badabom extends Menu {
public function Badabom(_arg1:Navigator){
addFrameScript(631, frame632);
super(_arg1, 0, 0);
}
private function die(_arg1:Event=null):void{
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
override public function close():void{
super.close();
SoundManager.stopMusic();
}
override public function go():void{
super.go();
SoundManager.playMusic(SoundManager.EPIC_EXPLOSION);
}
function frame632(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
stop();
}
override public function bindEvents():void{
}
override public function unbindEvents():void{
}
}
}//package cinematics
Section 6
//Intro (cinematics.Intro)
package cinematics {
import flash.events.*;
import map.units.unit.*;
import main.*;
import ui.menus.*;
import utils.*;
import cinematics.txt.*;
public class Intro extends Menu {
public var skip:Skip;
public function Intro(_arg1:Navigator){
addFrameScript(1059, frame1060);
super(_arg1, 0, 0);
}
private function die(_arg1:Event=null):void{
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame1060(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
stop();
}
override public function go():void{
super.go();
SoundManager.playMusic(SoundManager.INTRO_MUSIC);
}
override public function close():void{
super.close();
SoundManager.stopMusic();
}
override public function bindEvents():void{
getMC("skip").addEventListener(MouseEvent.CLICK, die);
}
override public function unbindEvents():void{
getMC("skip").removeEventListener(MouseEvent.CLICK, die);
}
}
}//package cinematics
Section 7
//Bundle (com.moonmana.bundles.Bundle)
package com.moonmana.bundles {
public class Bundle {
private var values:Array;
private var keys:Array;
public function Bundle(){
keys = new Array();
values = new Array();
}
public function getString(_arg1:String, _arg2:String=null):String{
var _local3:int = keys.length;
var _local4:uint;
while (_local4 < _local3) {
if (keys[_local4] == _arg1){
if (_arg2 != null){
return ((values[_local4] as String).replace("{}", _arg2));
};
return (values[_local4]);
};
_local4++;
};
trace(("Bundle string not found! Key: " + _arg1));
return (null);
}
public function put(_arg1:String, _arg2:String):void{
var _local3:int = keys.length;
var _local4:uint;
while (_local4 < _local3) {
if (keys[_local4] == _arg1){
trace(("Rewriting bundle value: " + _arg2));
values[_local4] = _arg2;
return;
};
_local4++;
};
keys.push(_arg1);
values.push(_arg2);
}
}
}//package com.moonmana.bundles
Section 8
//Ad (com.moonmana.mmad.Ad)
package com.moonmana.mmad {
import flash.display.*;
import main.*;
import mochi.*;
import com.moonmana.ui.*;
import com.moonmana.sponsors.AG.*;
import com.moonmana.sponsors.Andkon.*;
import com.moonmana.sponsors.MoFunZone.*;
import CPMStar.*;
public dynamic class Ad extends ScreenObject {
private static var ad:DisplayObject;
private static var _mc:MovieClip;
private static var _adBox:Ad;
private static var ag:MovieClip;
public function Ad(_arg1:int, _arg2:int){
super(_arg1, _arg2);
place();
}
public static function show(_arg1:MovieClip, _arg2:int, _arg3:int):void{
var _local4:String;
if (Main.BUILD == Main.ARMOR_GAMES){
ag = new ArmorGamesMCAd();
_adBox = new Ad((_arg2 + 150), (_arg3 + 122));
_mc = _arg1;
_arg1.addChild(_adBox);
_adBox.addChild(ag);
} else {
if (Main.BUILD == Main.MOFUNZONE){
ag = new MoFunZoneMCAd();
_adBox = new Ad((_arg2 + 28), (_arg3 + 22));
_mc = _arg1;
_arg1.addChild(_adBox);
_adBox.addChild(ag);
} else {
if (Main.BUILD == Main.ANDKON){
ag = new AndkonLogo();
_adBox = new Ad((_arg2 + 40), (_arg3 + 11));
_mc = _arg1;
_arg1.addChild(_adBox);
_adBox.addChild(ag);
} else {
if (!Locker.isAdAllowed(Main.stage)){
return;
};
if (Main.AD_BUILD == Main.CPM){
_local4 = "1364Q47E59848";
ad = new AdLoader(_local4);
_adBox = new Ad(_arg2, _arg3);
_mc = _arg1;
_arg1.addChild(_adBox);
_adBox.addChild(ad);
} else {
_adBox = new Ad(_arg2, _arg3);
_mc = _arg1;
_arg1.addChild(_adBox);
MochiAd.showClickAwayAd({clip:_adBox, id:"3785120d6024b890"});
};
};
};
};
}
public static function remove():void{
if (Main.BUILD == Main.ARMOR_GAMES){
try {
_mc.removeChild(ag);
ag = null;
_mc = null;
} catch(e:Error) {
};
} else {
if (!Locker.isAdAllowed(Main.stage)){
return;
};
try {
if (Main.AD_BUILD == Main.CPM){
if (ad != null){
_adBox.removeChild(ad);
};
if (((!((_adBox == null))) && (!((_mc == null))))){
_mc.removeChild(_adBox);
};
} else {
MochiAd.unload(_adBox);
};
ad = null;
_adBox = null;
_mc = null;
} catch(e:Error) {
};
};
}
}
}//package com.moonmana.mmad
Section 9
//AdsContainer (com.moonmana.mmad.AdsContainer)
package com.moonmana.mmad {
import flash.display.*;
public class AdsContainer extends MovieClip {
public function AdsContainer(){
addFrameScript(0, frame1, 1, frame2);
super();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package com.moonmana.mmad
Section 10
//MMAd (com.moonmana.mmad.MMAd)
package com.moonmana.mmad {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import main.*;
import flash.net.*;
public class MMAd {
private var _text:String;
private var _textField:TextField;
private var _uri:String;
private var _mc:MovieClip;
public function MMAd(_arg1:TextField, _arg2:MovieClip){
_mc = _arg2;
_textField = _arg1;
getAd();
}
public function goUri(_arg1:Event=null):void{
if (_uri == ""){
return;
};
var _local2:URLRequest = new URLRequest(_uri);
navigateToURL(_local2, "_blank");
}
public function clean():void{
_mc.removeEventListener(MouseEvent.MOUSE_DOWN, goUri);
}
public function get text():String{
return (_text);
}
private function getAd():void{
if (((((!((Main.BUILD == Main.ARMOR_GAMES))) && (!((Main.BUILD == Main.MOFUNZONE))))) && (!((Main.BUILD == Main.ANDKON))))){
_text = "Play Mecharon on MoonMana.com";
_uri = "http://www.moonmana.com";
_mc.addEventListener(MouseEvent.MOUSE_DOWN, goUri);
_textField.text = _text;
};
}
public function get uri():String{
return (_uri);
}
private function loaderCompleteHandler(_arg1:Event):void{
var _local2:Array = (_arg1.target.data as String).split("|");
_text = _local2[0];
_uri = _local2[1];
_mc.addEventListener(MouseEvent.MOUSE_DOWN, goUri);
_textField.text = _text;
}
public static function goMoonMana(_arg1:Event=null):void{
if (Main.BUILD == Main.ANDKON){
return;
};
var _local2:URLRequest = new URLRequest("http://www.moonmana.com/referer/1");
navigateToURL(_local2, "_blank");
}
}
}//package com.moonmana.mmad
Section 11
//MoonManaButton (com.moonmana.mmad.MoonManaButton)
package com.moonmana.mmad {
import flash.events.*;
import flash.display.*;
import main.*;
public class MoonManaButton extends MovieClip {
public function MoonManaButton(){
if (Main.BUILD == Main.OTHER){
addEventListener(MouseEvent.CLICK, MMAd.goMoonMana);
};
}
}
}//package com.moonmana.mmad
Section 12
//Spark (com.moonmana.splash.mc.Spark)
package com.moonmana.splash.mc {
import flash.display.*;
public class Spark extends MovieClip {
}
}//package com.moonmana.splash.mc
Section 13
//SparkAnim (com.moonmana.splash.mc.SparkAnim)
package com.moonmana.splash.mc {
import flash.display.*;
import flash.events.*;
import com.moonmana.splash.utils.*;
public class SparkAnim extends MovieClip {
private const X:int = -90;
private const Y:int = -10;
private var _spark:Spark;
private var odd:int;// = 0
private var _count:int;// = 0
public var spark:Spark;
public function SparkAnim(){
addFrameScript(59, frame60);
super();
_spark = (getChildByName("spark") as Spark);
x = (X + ((Math.random() * 18) * (((Math.random() * 2) > 1)) ? -1 : 1));
y = (Y + ((Math.random() * 18) * (((Math.random() * 2) > 1)) ? -1 : 1));
rotation = (Math.random() * 360);
addEventListener(Event.ENTER_FRAME, addTrace);
}
private function removeTrace(_arg1:Event):void{
var _local2:Trace = (_arg1.target as Trace);
_local2.removeEventListener(MMEvent.DEAD2, removeTrace);
removeChild(_local2);
_local2 = null;
if (numChildren == 0){
dispatchEvent(new MMEvent(MMEvent.DEAD));
};
}
public function get sparkRotation():int{
return (_spark.rotation);
}
public function get sparkY():int{
return (_spark.y);
}
private function addTrace(_arg1:Event):void{
_count++;
if (_count < 12){
return;
};
odd = ((odd == 0)) ? 1 : 0;
if (odd){
return;
};
var _local2:Trace = new Trace();
_local2.addEventListener(MMEvent.DEAD2, removeTrace);
addChild(_local2);
_local2.x = sparkX;
_local2.y = sparkY;
_local2.rotation = sparkRotation;
}
function frame60(){
dispatchEvent(new MMEvent(MMEvent.DEAD));
stop();
}
public function clean():void{
removeEventListener(Event.ENTER_FRAME, addTrace);
removeChild(_spark);
}
public function get sparkX():int{
return (_spark.x);
}
}
}//package com.moonmana.splash.mc
Section 14
//Trace (com.moonmana.splash.mc.Trace)
package com.moonmana.splash.mc {
import flash.display.*;
import com.moonmana.splash.utils.*;
public class Trace extends MovieClip {
public function Trace(){
addFrameScript(29, frame30);
super();
}
function frame30(){
dispatchEvent(new MMEvent(MMEvent.DEAD2));
}
}
}//package com.moonmana.splash.mc
Section 15
//MMEvent (com.moonmana.splash.utils.MMEvent)
package com.moonmana.splash.utils {
import flash.events.*;
public class MMEvent extends Event {
public static const DEAD:String = "dead";
public static const END:String = "end";
public static const DEAD2:String = "dead2";
public function MMEvent(_arg1:String){
super(_arg1, true, false);
}
}
}//package com.moonmana.splash.utils
Section 16
//MoonManaLogo (com.moonmana.splash.MoonManaLogo)
package com.moonmana.splash {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class MoonManaLogo extends SimpleButton {
public function MoonManaLogo(){
addEventListener(MouseEvent.MOUSE_DOWN, goMoonMana);
}
public static function goMoonMana(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("http://www.moonmana.com/referer/4");
navigateToURL(_local2, "_blank");
}
}
}//package com.moonmana.splash
Section 17
//MoonManaSplash (com.moonmana.splash.MoonManaSplash)
package com.moonmana.splash {
import flash.events.*;
import com.moonmana.splash.utils.*;
import com.moonmana.splash.mc.*;
import com.moonmana.sponsors.*;
public class MoonManaSplash extends Splash {
private var _count:int;// = 0
public function MoonManaSplash(){
addFrameScript(199, frame200);
super();
addEventListener(Event.ENTER_FRAME, generateSpark);
}
private function removeSpark2(_arg1:Event):void{
var _local2:SparkAnim = (_arg1.target as SparkAnim);
_local2.removeEventListener(MMEvent.DEAD, removeSpark2);
removeChild(_local2);
_local2 = null;
}
function frame200(){
dispatchEvent(new MMEvent(MMEvent.END));
stop();
}
private function generateSpark(_arg1:Event):void{
_count++;
if ((((_count > 20)) || ((_count < 10)))){
return;
};
var _local2:SparkAnim = new SparkAnim();
_local2.addEventListener(MMEvent.DEAD, removeSpark);
addChild(_local2);
}
private function removeSpark(_arg1:Event):void{
var _local2:SparkAnim = (_arg1.target as SparkAnim);
_local2.removeEventListener(MMEvent.DEAD, removeSpark);
_local2.clean();
_local2.addEventListener(MMEvent.DEAD, removeSpark2);
}
}
}//package com.moonmana.splash
Section 18
//AGButton (com.moonmana.sponsors.AG.AGButton)
package com.moonmana.sponsors.AG {
import flash.display.*;
public class AGButton extends SimpleButton {
public function AGButton(_arg1:DisplayObject=null, _arg2:DisplayObject=null, _arg3:DisplayObject=null, _arg4:DisplayObject=null){
super(_arg1, _arg2, _arg3, _arg4);
}
}
}//package com.moonmana.sponsors.AG
Section 19
//AGScores (com.moonmana.sponsors.AG.AGScores)
package com.moonmana.sponsors.AG {
import flash.display.*;
public class AGScores extends MovieClip {
public static var agi;
private static var _onclose:Function;
public static function send(_arg1:DisplayObjectContainer, _arg2:int, _arg3:Function):void{
_onclose = _arg3;
_arg1.addChild(agi);
agi.showScoreboardSubmit(_arg2);
agi.initAGUI({onClose:closeHandler});
}
private static function closeHandler():void{
_onclose();
}
public static function show(_arg1:DisplayObjectContainer, _arg2:Function):void{
_onclose = _arg2;
_arg1.addChild(agi);
agi.showScoreboardList();
agi.initAGUI({onClose:closeHandler});
}
}
}//package com.moonmana.sponsors.AG
Section 20
//ArmorGamesMC (com.moonmana.sponsors.AG.ArmorGamesMC)
package com.moonmana.sponsors.AG {
import flash.events.*;
import com.moonmana.splash.utils.*;
import com.moonmana.sponsors.*;
import flash.net.*;
public class ArmorGamesMC extends Splash {
public function ArmorGamesMC(){
addFrameScript(0, frame1, 217, frame218);
super();
addEventListener(MouseEvent.CLICK, goAG);
buttonMode = true;
}
function frame1(){
gotoAndPlay(2);
}
function frame218(){
stop();
dispatchEvent(new MMEvent(MMEvent.END));
}
public static function goAG(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("http://www.armorgames.com");
navigateToURL(_local2, "_blank");
}
}
}//package com.moonmana.sponsors.AG
Section 21
//ArmorGamesMCAd (com.moonmana.sponsors.AG.ArmorGamesMCAd)
package com.moonmana.sponsors.AG {
import flash.display.*;
import flash.events.*;
public class ArmorGamesMCAd extends MovieClip {
public function ArmorGamesMCAd(){
addFrameScript(0, frame1);
super();
addEventListener(MouseEvent.CLICK, ArmorGamesMC.goAG);
buttonMode = true;
}
function frame1(){
gotoAndPlay(2);
}
}
}//package com.moonmana.sponsors.AG
Section 22
//AndkonLogo (com.moonmana.sponsors.Andkon.AndkonLogo)
package com.moonmana.sponsors.Andkon {
import flash.events.*;
import com.moonmana.ui.*;
import flash.net.*;
public class AndkonLogo extends ScreenObject {
public function AndkonLogo(){
super(26, 0);
addEventListener(MouseEvent.CLICK, go);
buttonMode = true;
}
public static function go(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("http://www.andkon.com");
navigateToURL(_local2, "_blank");
}
}
}//package com.moonmana.sponsors.Andkon
Section 23
//AndkonLogoButton (com.moonmana.sponsors.Andkon.AndkonLogoButton)
package com.moonmana.sponsors.Andkon {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class AndkonLogoButton extends SimpleButton {
public function AndkonLogoButton(){
addEventListener(MouseEvent.CLICK, go);
}
public static function go(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("http://www.andkon.com");
navigateToURL(_local2, "_blank");
}
}
}//package com.moonmana.sponsors.Andkon
Section 24
//EliteGames (com.moonmana.sponsors.EliteGames.EliteGames)
package com.moonmana.sponsors.EliteGames {
import flash.events.*;
import flash.net.*;
public class EliteGames {
public function EliteGames(){
var _local1:Glow = new Glow();
var _local2:Logo = new Logo();
}
public static function go(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("http://www.elite-games.net");
navigateToURL(_local2, "_blank");
}
}
}//package com.moonmana.sponsors.EliteGames
Section 25
//EliteGamesBtn (com.moonmana.sponsors.EliteGames.EliteGamesBtn)
package com.moonmana.sponsors.EliteGames {
import flash.display.*;
public class EliteGamesBtn extends SimpleButton {
public function EliteGamesBtn(_arg1:DisplayObject=null, _arg2:DisplayObject=null, _arg3:DisplayObject=null, _arg4:DisplayObject=null){
super(_arg1, _arg2, _arg3, _arg4);
}
}
}//package com.moonmana.sponsors.EliteGames
Section 26
//Glow (com.moonmana.sponsors.EliteGames.Glow)
package com.moonmana.sponsors.EliteGames {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class Glow extends MovieClip {
private var _ttl:Number;// = 0
public function Glow(){
addFrameScript(0, frame1);
alpha = 0;
addEventListener(MouseEvent.MOUSE_OVER, rollover);
addEventListener(MouseEvent.MOUSE_UP, EliteGames.go);
}
private function glowIt(_arg1:Event):Boolean{
var _local2:GlowFilter = new GlowFilter(11145489, 0.5, (_ttl * 2), (_ttl * 2), 3, 1, false, false);
_ttl--;
if (_ttl < 1){
parent.filters = [];
removeEventListener(Event.ENTER_FRAME, glowIt);
return (false);
};
parent.filters = [_local2];
return (true);
}
private function rollover(_arg1:Event):void{
_ttl = 10;
addEventListener(Event.ENTER_FRAME, glowIt);
}
function frame1(){
}
}
}//package com.moonmana.sponsors.EliteGames
Section 27
//Logo (com.moonmana.sponsors.EliteGames.Logo)
package com.moonmana.sponsors.EliteGames {
import flash.display.*;
public class Logo extends MovieClip {
}
}//package com.moonmana.sponsors.EliteGames
Section 28
//MoFunZoneBtn (com.moonmana.sponsors.MoFunZone.MoFunZoneBtn)
package com.moonmana.sponsors.MoFunZone {
import flash.display.*;
public class MoFunZoneBtn extends SimpleButton {
public function MoFunZoneBtn(_arg1:DisplayObject=null, _arg2:DisplayObject=null, _arg3:DisplayObject=null, _arg4:DisplayObject=null){
super(_arg1, _arg2, _arg3, _arg4);
}
}
}//package com.moonmana.sponsors.MoFunZone
Section 29
//MoFunZoneMain (com.moonmana.sponsors.MoFunZone.MoFunZoneMain)
package com.moonmana.sponsors.MoFunZone {
import flash.display.*;
public class MoFunZoneMain extends MovieClip {
public function MoFunZoneMain(_arg1:Stage){
}
private function readyCallBack():void{
trace("achievement already runing");
}
}
}//package com.moonmana.sponsors.MoFunZone
Section 30
//MoFunZoneMCAd (com.moonmana.sponsors.MoFunZone.MoFunZoneMCAd)
package com.moonmana.sponsors.MoFunZone {
import flash.display.*;
import flash.events.*;
public class MoFunZoneMCAd extends MovieClip {
public function MoFunZoneMCAd(){
addEventListener(MouseEvent.CLICK, MoFunZoneSplash.go);
buttonMode = true;
}
}
}//package com.moonmana.sponsors.MoFunZone
Section 31
//MoFunZoneSplash (com.moonmana.sponsors.MoFunZone.MoFunZoneSplash)
package com.moonmana.sponsors.MoFunZone {
import flash.events.*;
import com.moonmana.sponsors.*;
import flash.net.*;
public class MoFunZoneSplash extends Splash {
public function MoFunZoneSplash(){
addEventListener(MouseEvent.CLICK, go);
buttonMode = true;
}
public static function go(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("http://www.mofunzone.com");
navigateToURL(_local2, "_blank");
}
}
}//package com.moonmana.sponsors.MoFunZone
Section 32
//Splash (com.moonmana.sponsors.Splash)
package com.moonmana.sponsors {
import flash.display.*;
public class Splash extends MovieClip {
}
}//package com.moonmana.sponsors
Section 33
//MMButton (com.moonmana.ui.MMButton)
package com.moonmana.ui {
import flash.events.*;
public class MMButton extends ScreenObject {
public function MMButton(_arg1:int, _arg2:int){
super(_arg1, _arg2);
buttonMode = true;
addEventListener(MouseEvent.MOUSE_OVER, over);
addEventListener(MouseEvent.MOUSE_OUT, up);
addEventListener(MouseEvent.MOUSE_DOWN, down);
}
private function down(_arg1:MouseEvent=null):void{
gotoAndStop("down");
}
public function setLabel(_arg1:String):void{
getTextField("label").text = _arg1;
}
private function over(_arg1:MouseEvent=null):void{
gotoAndStop("over");
}
private function up(_arg1:MouseEvent=null):void{
gotoAndStop("up");
}
}
}//package com.moonmana.ui
Section 34
//ScreenObject (com.moonmana.ui.ScreenObject)
package com.moonmana.ui {
import flash.display.*;
import flash.text.*;
public class ScreenObject extends MovieClip {
private var _x:int;
private var _y:int;
public function ScreenObject(_arg1:int, _arg2:int){
_x = _arg1;
_y = _arg2;
}
public function displace():void{
x = 2000;
}
public function place():void{
x = _x;
y = _y;
}
public function getButton(_arg1:String):SimpleButton{
return ((getChildByName(_arg1) as SimpleButton));
}
public function getMC(_arg1:String):MovieClip{
return ((getChildByName(_arg1) as MovieClip));
}
public function getTextField(_arg1:String):TextField{
return ((getChildByName(_arg1) as TextField));
}
}
}//package com.moonmana.ui
Section 35
//MenuChanger (com.moonmana.MenuChanger)
package com.moonmana {
import flash.events.*;
import flash.text.*;
import main.*;
import flash.ui.*;
import flash.net.*;
public class MenuChanger {
private var _myContextMenu:ContextMenu;
public function MenuChanger(_arg1:Main){
_myContextMenu = new ContextMenu();
removeDefaultItems();
addCustomMenuItems();
_arg1.contextMenu = _myContextMenu;
}
private function getURL(_arg1:String, _arg2:String):void{
var url = _arg1;
var method = _arg2;
var web:String = url;
var request:URLRequest = new URLRequest(web);
try {
navigateToURL(request, method);
} catch(e:Error) {
};
}
private function removeDefaultItems():void{
_myContextMenu.hideBuiltInItems();
var _local1:ContextMenuBuiltInItems = _myContextMenu.builtInItems;
_local1.print = true;
}
private function createLabel():TextField{
var _local1:TextField = new TextField();
return (_local1);
}
private function onClick(_arg1:ContextMenuEvent):void{
if (Main.BUILD == Main.MOFUNZONE){
getURL("http://www.MoFunZone.com", "get");
} else {
if (Main.BUILD == Main.ARMOR_GAMES){
getURL("http://www.Armorgames.com", "get");
} else {
getURL("http://www.MoonMana.com", "get");
};
};
}
private function addCustomMenuItems():void{
var _local1:ContextMenuItem;
if (Main.BUILD == Main.MOFUNZONE){
_local1 = new ContextMenuItem("Go to MoFunZone.com");
} else {
if (Main.BUILD == Main.ARMOR_GAMES){
_local1 = new ContextMenuItem("Go to ArmorGames.com");
} else {
_local1 = new ContextMenuItem("Go to MoonMana.com");
};
};
_local1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onClick);
_myContextMenu.customItems.push(_local1);
}
}
}//package com.moonmana
Section 36
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class AdLoader extends Sprite {
private var cpmstarLoader:Loader;
private var contentspotid:String;
public function AdLoader(_arg1:String){
this.contentspotid = _arg1;
addEventListener(Event.ADDED, addedHandler);
}
private function dispatchHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
private function addedHandler(_arg1:Event):void{
removeEventListener(Event.ADDED, addedHandler);
Security.allowDomain("server.cpmstar.com");
var _local2 = "http://server.cpmstar.com/adviewas3.swf";
var _local3:DisplayObjectContainer = parent;
cpmstarLoader = new Loader();
cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, dispatchHandler);
cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dispatchHandler);
cpmstarLoader.load(new URLRequest(((_local2 + "?contentspotid=") + contentspotid)));
addChild(cpmstarLoader);
}
}
}//package CPMStar
Section 37
//BundleManager (main.BundleManager)
package main {
import com.moonmana.bundles.*;
public class BundleManager {
private var de:Bundle;
private var ru:Bundle;
private var en:Bundle;
private var it:Bundle;
private var dutch:Bundle;
private var ptbr:Bundle;
public static const OTHER:int = 1;
public static const ANDKON:int = 4;
public static const BUILD:int = 1;
public function BundleManager(){
en = new Bundle();
ru = new Bundle();
de = new Bundle();
it = new Bundle();
ptbr = new Bundle();
dutch = new Bundle();
super();
en.put("NEW_GAME", "NEW GAME");
en.put("LOAD_GAME", "LOAD GAME");
en.put("HIGHSCORES", "HIGHSCORES");
if (BUILD == ANDKON){
en.put("MORE_GAMES", "ANDKON ARCADE");
} else {
en.put("MORE_GAMES", "MORE GAMES");
};
en.put("RESUME_GAME", "RESUME GAME");
en.put("SOUNDS_ON", "SOUNDS ON");
en.put("SOUNDS_OFF", "SOUNDS OFF");
en.put("MUSIC_ON", "MUSIC ON");
en.put("MUSIC_OFF", "MUSIC OFF");
en.put("MAIN_MENU", "MAIN MENU");
en.put("TRY_AGAIN", "TRY AGAIN");
en.put("SUBMIT_SCORE", "SUBMIT SCORE");
en.put("NEXT_LEVEL", "NEXT LEVEL");
en.put("GAME_SAVED", "GAME HAS BEEN SAVED");
en.put("GAME_OVER", "GAME OVER");
en.put("THE_END", "THE END ;)");
en.put("WELL_DONE", "WELL DONE");
en.put("TIME", "TIME");
en.put("AMMO", "AMMO");
en.put("KILLS", "KILLS");
en.put("ACCURACY", "ACCURACY");
en.put("SCORE", "SCORE");
en.put("AVAILABLE_PERKS", "Available perks");
en.put("MY_PERKS", "My perks");
en.put("PERK_POINTS", "PERK POINTS");
en.put("ACCEPT", "ACCEPT");
en.put("LEVEL_UP", "LEVEL UP!");
en.put("LEVEL", "Level");
en.put("MENU", "MENU");
en.put("SKIP_TUTORIAL", "SKIP TUTORIAL");
en.put("SKIP", "Skip");
en.put("PLOT1", ("Different worlds have the same problems: " + "pollution, wars, diseases, lack of natural resources."));
en.put("PLOT2", ("Different worlds have the same solutions: " + "to kill, to conquer, to dominate"));
en.put("PLOT3", ("Another world, another year. There was created a killing machine called Mecharon and it " + "starts the mission to find a planet suitable for life"));
en.put("PERK_AMMO_PACK_TITLE", "Ammo pack");
en.put("PERK_ATTACK_SPEED_BOOST_TITLE", "Boost attack speed");
en.put("PERK_BONUS_MAGNET_TITLE", "Bonus magnet");
en.put("PERK_BONUS_WARDEN_TITLE", "Bonus warden");
en.put("PERK_COMBAT_DRONE_TITLE", "Combat drone");
en.put("PERK_CUNNING_RELOADER_TITLE", "Cunning reloader");
en.put("PERK_DODGE_TITLE", "Dodge");
en.put("PERK_ENERGY_WEAPONS_MASTER_TITLE", "Master of Energy weapons");
en.put("PERK_EXPLOSIVE_WEAPONS_MASTER_TITLE", "Master of Explosive weapons");
en.put("PERK_FASTLOADER_TITLE", "Fastloader");
en.put("PERK_FIREARMS_MASTER_TITLE", "Master of Firearms");
en.put("PERK_GREED_TITLE", "Greed");
en.put("PERK_INSECTS_MASTER_TITLE", "Insects master");
en.put("PERK_MINE_LAYER_TITLE", "Mine layer");
en.put("PERK_MISSILES_MASTER_TITLE", "Missiles master");
en.put("PERK_RADIOACTIVE_BULLETS_TITLE", "Radioactive bullets");
en.put("PERK_REPAIR_DRONE_TITLE", "Repair drone");
en.put("PERK_REPAIR_TITLE", "Instant repair");
en.put("PERK_RUNNER_TITLE", "Runner");
en.put("PERK_SCINTIST_TITLE", "Scientist");
en.put("PERK_SHARPSHOOTER_TITLE", "Sharpshooter");
en.put("PERK_SHOCK_DRONE_TITLE", "Shock drone");
en.put("PERK_SNIPER_TITLE", "Sniper");
en.put("PERK_THE_BLACK_HOLE_TITLE", "The Black Hole");
en.put("PERK_THE_CHOOSEN_ONE_TITLE", "The Chosen One");
en.put("PERK_UNSTOPPABLE_TITLE", "Unstoppable");
en.put("PERK_WEAPON_FOCUS_TITLE", "Weapon focus");
en.put("PERK_AMMO_PACK_DESCRIPTION", "% to the amount of ammo");
en.put("PERK_ATTACK_SPEED_BOOST_DESCRIPTION", "% to the rate of fire");
en.put("PERK_BONUS_MAGNET_DESCRIPTION", "You are lucky. It means you get {} times more bonuses");
en.put("PERK_BONUS_WARDEN_DESCRIPTION", "You take good care of your bonuses. They serve you {}% longer");
en.put("PERK_COMBAT_DRONE_DESCRIPTION", (("Just a little hover to fight by your side. " + "Damage: 1 + Your Level. Rate of fire: 240rpm. ") + "You can have only one drone at the same time"));
en.put("PERK_CUNNING_RELOADER_DESCRIPTION", "Every time you reload your weapon you shock the enemies with blastwave. Damage: ");
en.put("PERK_CUNNING_RELOADER_DESCRIPTION_2", ". Stun: {}s");
en.put("PERK_DODGE_DESCRIPTION", "Each level gets you an additional {}% chance to dodge melee attack");
en.put("PERK_ENERGY_WEAPONS_MASTER_DESCRIPTION", "+{}% damage from Iongun, Plasmagun and Railgun");
en.put("PERK_EXPLOSIVE_WEAPONS_MASTER_DESCRIPTION", "+{}% damage from Mortar, Rocket Launcher and Mines");
en.put("PERK_FASTLOADER_DESCRIPTION", "Decreases weapons reload speed by {}% per level");
en.put("PERK_FIREARMS_MASTER_DESCRIPTION", "+{}% damage from Cannon, BRS and Machinegun");
en.put("PERK_GREED_DESCRIPTION", "Each level gets you +{}% to final score");
en.put("PERK_INSECTS_MASTER_DESCRIPTION", "Buggun spawns {} times more bugs from corpses");
en.put("PERK_MINE_LAYER_DESCRIPTION", "Every ");
en.put("PERK_MINE_LAYER_DESCRIPTION_2", " second you lay a mine. It cause {} splash damage");
en.put("PERK_MISSILES_MASTER_DESCRIPTION", "Each level increases the amount of rockets you launch by 1");
en.put("PERK_RADIOACTIVE_BULLETS_DESCRIPTION", "Organic enemies die slowly. Wounded units get {} damage each second");
en.put("PERK_REPAIR_DRONE_DESCRIPTION", "Repairs your mech by 3% each 9 second. You can have only one drone at the same time");
en.put("PERK_REPAIR_DESCRIPTION", "Full repair. Take it now and I'll give you also a shield. For free");
en.put("PERK_RUNNER_DESCRIPTION", "+{}% to your mech's speed");
en.put("PERK_SCINTIST_DESCRIPTION", "You are swift learner. +{}% bonus whenever experience is earned");
en.put("PERK_SHARPSHOOTER_DESCRIPTION", "Critical damage x");
en.put("PERK_SHOCK_DRONE_DESCRIPTION", (("Just a little hover to fight by your side. " + "Stuns for 3s but causes no damage. Rate of fire: 60rpm. ") + "You can have only one drone at the same time"));
en.put("PERK_SNIPER_DESCRIPTION", "Each level gets you an additional +{}% chance to cause a critical hit");
en.put("PERK_THE_BLACK_HOLE_DESCRIPTION", "Hell. It's about BLACK HOLE! (Creates a Black Hole for some seconds)");
en.put("PERK_THE_CHOOSEN_ONE_DESCRIPTION", "There is no spoon, so you get {}% chance to evade any attack");
en.put("PERK_UNSTOPPABLE_DESCRIPTION", "Nobody can stop you (Giant Spiders and other monsters with such ability)");
en.put("PERK_WEAPON_FOCUS_DESCRIPTION", "Current weapon gets {} additional ammo, ");
en.put("PERK_WEAPON_FOCUS_DESCRIPTION_2", "% damage, +{}% reload speed");
en.put("TIP_1", "In this tutorial you will learn how to play Mecharon");
en.put("TIP_2", "Use 'W, A, S, D' to move. Use Left mouse button to shoot");
en.put("TIP_3", "Hold Left mouse button to shoot continuously. Move the Mouse to aim at the monsters");
en.put("TIP_4", "Try to move and shoot at the same time");
en.put("TIP_5", "Pick up the bonuses by walking over them");
en.put("TIP_6", "You can pick a perk by pressing 'space' or by clicking the 'level up' button");
en.put("TIP_7", "This is a weapon powerup. Picking it you gets you another weapon. 'Q' – Previous weapon, 'E' – Next weapon");
en.put("TIP_8", "Oh, mein Gott! What the hell is this?");
en.put("TIP_9", ("Now is time to destroy this useless planet. " + "Activate 4 detonators by walking over them. And be very careful, there are thousands of monsters"));
en.put("TIP_10", "We hope these fighters will be useful for you");
en.put("TIP_11", "Congratulations! You finished Mecharon campaign ");
en.put("TIP_12", "Enjoy this small bonus level and do not forget to submit your score!");
en.put("TIP_13", "Game Design: Artyom Shpytiack, Andrey Zolotarenko");
en.put("TIP_14", "Programming: Artyom Shpytiack");
en.put("TIP_15", "Art: Andrey Zolotarenko");
en.put("TIP_16", "Special thanks to: Tkachenko Yana, Daniel Sidhion (Portuguese-Brazilian translation), ");
en.put("TIP_17", "Andrea DjChipZ (billymetal@gmail.com) (Italian translation), Tom Hendriks (Dutch translation)");
en.put("TIP_18", "The Game developed by MoonMana (c) 2009");
en.put("THE_END_2", "THE END");
en.put("EPISODE", "EPISODE ");
en.put("MISSION_0", "Mission 0: Tutorial");
en.put("MISSION_1", "Mission 1: Invasion");
en.put("MISSION_2", "Mission 2: Arachnophobia");
en.put("MISSION_3", "Mission 3: Oasis");
en.put("MISSION_4", "Mission 4: Acid test");
en.put("MISSION_5", "Mission 5: God Save the Queen");
en.put("MISSION_21", "Mission 1: Running on Ice");
en.put("MISSION_22", "Mission 2: Dangerous Butterflies");
en.put("MISSION_23", "Mission 3: Snow Patrol");
en.put("MISSION_31", "Mission 1: Into The Mystic");
en.put("MISSION_32", "Mission 2: The Hungry Stones");
en.put("MISSION_33", "Mission 3: Mothercare");
en.put("MISSION_34", "Mission 4: Big badabom");
en.put("MISSION_41", "Mission 1: Paradise lost");
en.put("MISSION_42", "Mission 2: The Guardian");
en.put("MISSION_43", "Mission 3: The Cage");
en.put("MISSION_44", "Mission 4: The Dying Fields");
en.put("MISSION_45", "Mission 5: The Prison Keeper");
ru.put("NEW_GAME", "НОВАЯ ИГРА");
ru.put("LOAD_GAME", "ЗАГРУЗИТЬ");
ru.put("HIGHSCORES", "ОЧКИ");
if (BUILD == ANDKON){
ru.put("MORE_GAMES", "ANDKON ARCADE");
} else {
ru.put("MORE_GAMES", "ЕЩЕ ИГРЫ");
};
ru.put("RESUME_GAME", "ПРОДОЛЖИТЬ");
ru.put("SOUNDS_ON", "ЗВУКИ ЕСТЬ");
ru.put("SOUNDS_OFF", "ЗВУКОВ НЕТ");
ru.put("MUSIC_ON", "МУЗЫКА ЕСТЬ");
ru.put("MUSIC_OFF", "МУЗЫКИ НЕТ");
ru.put("MAIN_MENU", "ГЛАВНОЕ МЕНЮ");
ru.put("TRY_AGAIN", "ЕЩЕ РАЗ");
ru.put("SUBMIT_SCORE", "ОТПРАВИТЬ СЧЕТ");
ru.put("NEXT_LEVEL", "ДАЛЕЕ");
ru.put("GAME_SAVED", "ИГРА СОХРАНЕНА");
ru.put("GAME_OVER", "КАПЕЦ");
ru.put("THE_END", "КОНЕЦ ;)");
ru.put("WELL_DONE", "ХОРОШО!");
ru.put("TIME", "ВРЕМЯ");
ru.put("AMMO", "ПАТРОНЫ");
ru.put("KILLS", "УБИТО");
ru.put("ACCURACY", "МЕТКОСТЬ");
ru.put("SCORE", "ОЧКИ");
ru.put("AVAILABLE_PERKS", "Доступные перки");
ru.put("MY_PERKS", "Мои перки");
ru.put("PERK_POINTS", "Перк-поинты");
ru.put("ACCEPT", "ГОТОВО");
ru.put("LEVEL_UP", "УРОВЕНЬ!");
ru.put("LEVEL", "Уровень");
ru.put("MENU", "МЕНЮ");
ru.put("SKIP_TUTORIAL", "ПРОПУСТИТЬ ОБУЧЕНИЕ");
ru.put("SKIP", "Пропустить");
ru.put("PLOT1", "Разные миры - одинаковые проблемы: загрязнения, войны, болезни, истощение природных ресурсов.");
ru.put("PLOT2", "Разные миры - одинаковые решения: убивать, завоевывать, управлять.");
ru.put("PLOT3", ("В другом мире, в другом году. Здесь была создана машина смерти, машина-убийца, названная Мехарон и здесь начинается его " + "мисссия: найти пригодную для жизни планету"));
ru.put("PERK_AMMO_PACK_TITLE", "Патроны");
ru.put("PERK_ATTACK_SPEED_BOOST_TITLE", "Скорострел");
ru.put("PERK_BONUS_MAGNET_TITLE", "Бонус-магнит");
ru.put("PERK_BONUS_WARDEN_TITLE", "Хранитель бонусов");
ru.put("PERK_COMBAT_DRONE_TITLE", "Боевой дрон");
ru.put("PERK_CUNNING_RELOADER_TITLE", "Хитрый перезарядчик");
ru.put("PERK_DODGE_TITLE", "Уклонение");
ru.put("PERK_ENERGY_WEAPONS_MASTER_TITLE", "Мастер Энергетического оружия");
ru.put("PERK_EXPLOSIVE_WEAPONS_MASTER_TITLE", "Взрыватель");
ru.put("PERK_FASTLOADER_TITLE", "Быстрая перезарядка");
ru.put("PERK_FIREARMS_MASTER_TITLE", "Мастер Огнестрельного оружия");
ru.put("PERK_GREED_TITLE", "Жадность");
ru.put("PERK_INSECTS_MASTER_TITLE", "Повелитель насекомых");
ru.put("PERK_MINE_LAYER_TITLE", "Миноукладчик");
ru.put("PERK_MISSILES_MASTER_TITLE", "Ракетный мастер");
ru.put("PERK_RADIOACTIVE_BULLETS_TITLE", "Радиоактивные пули");
ru.put("PERK_REPAIR_DRONE_TITLE", "Ремонтный дрон");
ru.put("PERK_REPAIR_TITLE", "Мгновенная починка");
ru.put("PERK_RUNNER_TITLE", "Бегун");
ru.put("PERK_SCINTIST_TITLE", "Ученый");
ru.put("PERK_SHARPSHOOTER_TITLE", "Меткий стрелок");
ru.put("PERK_SHOCK_DRONE_TITLE", "Шок-дрон");
ru.put("PERK_SNIPER_TITLE", "Снайпер");
ru.put("PERK_THE_BLACK_HOLE_TITLE", "Черная Дыра");
ru.put("PERK_THE_CHOOSEN_ONE_TITLE", "Избранный");
ru.put("PERK_UNSTOPPABLE_TITLE", "Непреклонный");
ru.put("PERK_WEAPON_FOCUS_TITLE", "Фокус на оружии");
ru.put("PERK_AMMO_PACK_DESCRIPTION", "% к количеству патронов");
ru.put("PERK_ATTACK_SPEED_BOOST_DESCRIPTION", "% к скорострельности");
ru.put("PERK_BONUS_MAGNET_DESCRIPTION", "Ты - везунчик. Это значит, что ты получаешь в {} раз(а) больше бонусов");
ru.put("PERK_BONUS_WARDEN_DESCRIPTION", "Ты бережно отсносишься к своим бонусам. Они служат тебе на {}% дольше");
ru.put("PERK_COMBAT_DRONE_DESCRIPTION", (("Всего лишь маленький хувер, сражающийся на твоей стороне. " + "Повреждение: 1 + твой уровень. Скорострельность: 240rpm. ") + "У тебя может быть только один дрон одновременно"));
ru.put("PERK_CUNNING_RELOADER_DESCRIPTION", "Каждый раз, когда ты перезаряжаешь оружие, ты поражаешь врагов взрывной волной. Повреждение: ");
ru.put("PERK_CUNNING_RELOADER_DESCRIPTION_2", ". Оглушение: {}с");
ru.put("PERK_DODGE_DESCRIPTION", "Каждый уровень дает тебе дополнительный {}% шанс уклониться от рукопашной атаки");
ru.put("PERK_ENERGY_WEAPONS_MASTER_DESCRIPTION", "+{}% повреждение Ионной, Плазаменной и Рельсовой пушкой");
ru.put("PERK_EXPLOSIVE_WEAPONS_MASTER_DESCRIPTION", "+{}% повреждение Мортирой, Ракетницей и Минами");
ru.put("PERK_FASTLOADER_DESCRIPTION", "Уменьшает время перезарядки оружия на {}% за уровень");
ru.put("PERK_FIREARMS_MASTER_DESCRIPTION", "+{}% повреждение Пушкой, BRS и Пулеметом");
ru.put("PERK_GREED_DESCRIPTION", "Каждый уровень дает тебе +{}% к финальному счету");
ru.put("PERK_INSECTS_MASTER_DESCRIPTION", "Багомет порождает в {} раз(а) больше жуков из трупов");
ru.put("PERK_MINE_LAYER_DESCRIPTION", "Каждые ");
ru.put("PERK_MINE_LAYER_DESCRIPTION_2", " секунд ты кладешь мину. Она наносит {} сплэшевого повреждения");
ru.put("PERK_MISSILES_MASTER_DESCRIPTION", "Каждый уровень увеличивает количество запускаемых ракет на 1");
ru.put("PERK_RADIOACTIVE_BULLETS_DESCRIPTION", "Органические противники медленно погибают. Раненные юниты получают {} повреждения каждую секунду");
ru.put("PERK_REPAIR_DRONE_DESCRIPTION", "Чинит твоего меха на 3% каждые 9 секунд. У тебя может быть только один дрон одновременно");
ru.put("PERK_REPAIR_DESCRIPTION", "Полная починка. Берешь сейчас - получаешь щит в подарок");
ru.put("PERK_RUNNER_DESCRIPTION", "+{}% к скорости твоего меха");
ru.put("PERK_SCINTIST_DESCRIPTION", "Ты быстро учишься. +{}% каждый раз при получении опыта");
ru.put("PERK_SHARPSHOOTER_DESCRIPTION", "Критическое повреждение x");
ru.put("PERK_SHOCK_DRONE_DESCRIPTION", (("Всего лишь маленький хувер, сражающийся на твоей стороне. " + "Оглушает на 3с, но не наносит повреждений. Скорострельность: 60rpm. ") + "У тебя может быть только один дрон одновременно"));
ru.put("PERK_SNIPER_DESCRIPTION", "Каждый уровень дает тебе дополнительный +{}% шанс нанести критические повреждения");
ru.put("PERK_THE_BLACK_HOLE_DESCRIPTION", "Ад. Это про ЧЕРНУЮ ДЫРУ! (Создает Черную Дыру на несколько секунд)");
ru.put("PERK_THE_CHOOSEN_ONE_DESCRIPTION", "А ведь ложки-то нет, потому ты получаешь {}% шанс избежать любой атаки");
ru.put("PERK_UNSTOPPABLE_DESCRIPTION", "Никто не может тебя остановить (Гигантские пауки и другие монстры с такой способностью)");
ru.put("PERK_WEAPON_FOCUS_DESCRIPTION", "Текущее оружие получает {} дополнительных патрона, ");
ru.put("PERK_WEAPON_FOCUS_DESCRIPTION_2", "% повреждения, +{}% скорости перезарядки");
ru.put("TIP_1", "В этом уроке мы расскажем, как играть в Mecharon");
ru.put("TIP_2", "Используй 'W, A, S, D', чтобы двигаться, левую кнопку мыши - чтобы стрелять");
ru.put("TIP_3", "Удерживай левую кнопку мыши, чтобы стрелять продолжительно. Двигай мышью, чтобы нацеливаться на монстров");
ru.put("TIP_4", "Попробуй одновременно идти и стрелять");
ru.put("TIP_5", "Чтобы подобрать бонусы - пройди по ним");
ru.put("TIP_6", "Ты можешь выбрать перк, если нажмешь 'пробел' или кликнешь на кнопку 'уровень'");
ru.put("TIP_7", "Это - новая пушка. Подбирая такие бонусы, ты получаешь дополнительное оружие. 'Q' – предыдущая пушка, 'E' – следующая");
ru.put("TIP_8", "Ого! Это что за хрень такая?");
ru.put("TIP_9", ("Пришло время уничтожить эту бесполезную планету. " + "Активируй 4 детонатора проходя по ним. И будь очень осторожен - тысячи их!"));
ru.put("TIP_10", "Надеемся, эти истребители помогут тебе!");
ru.put("TIP_11", "Поздравляем! Ты прошел кампанию Mecharon!");
ru.put("TIP_12", "Наслаждайся этим маленьким бонусным уровнем и не забудь отправить счет!");
ru.put("TIP_13", "Гейм дизайн: Артем Шпитяк, Андрей Золотаренко");
ru.put("TIP_14", "Программирование: Артем Шпитяк");
ru.put("TIP_15", "Арт: Андрей Золотаренко");
ru.put("TIP_16", "Большое спасибо: Ткаченко Яне, Daniel Sidhion (Portuguese-Brazilian translation), ");
ru.put("TIP_17", "Andrea DjChipZ (billymetal@gmail.com) (Italian translation), Tom Hendriks (Dutch translation)");
ru.put("TIP_18", "Игра была разработана MoonMana (c) 2009");
ru.put("THE_END_2", "КОНЕЦ");
ru.put("EPISODE", "ЭПИЗОД ");
ru.put("MISSION_0", "Миссия 0: Обучение");
ru.put("MISSION_1", "Миссия 1: Вторжение");
ru.put("MISSION_2", "Миссия 2: Арахнофобия");
ru.put("MISSION_3", "Миссия 3: Оазис");
ru.put("MISSION_4", "Миссия 4: Кислотный тест");
ru.put("MISSION_5", "Миссия 5: Боже, храни Королеву");
ru.put("MISSION_21", "Миссия 1: Бег по льду");
ru.put("MISSION_22", "Миссия 2: Опасные бабочки");
ru.put("MISSION_23", "Миссия 3: Снежный патруль");
ru.put("MISSION_31", "Миссия 1: В мистику");
ru.put("MISSION_32", "Миссия 2: Голодные камни");
ru.put("MISSION_33", "Миссия 3: Мамина забота");
ru.put("MISSION_34", "Миссия 4: Большой бадабум");
ru.put("MISSION_41", "Миссия 1: Потеряный рай");
ru.put("MISSION_42", "Миссия 2: Охранник");
ru.put("MISSION_43", "Миссия 3: Клетка");
ru.put("MISSION_44", "Миссия 4: Долина смерти");
ru.put("MISSION_45", "Миссия 5: Тюремный смотритель");
dutch.put("NEW_GAME", "NIEUW SPEL");
dutch.put("LOAD_GAME", "LAAD SPEL");
dutch.put("HIGHSCORES", "HIGHSCORES");
if (BUILD == ANDKON){
dutch.put("MORE_GAMES", "ANDKON ARCADE");
} else {
dutch.put("MORE_GAMES", "MEER SPELLEN");
};
dutch.put("RESUME_GAME", "HERVAT SPEL");
dutch.put("SOUNDS_ON", "GELUID AAN");
dutch.put("SOUNDS_OFF", "GELUID UIT");
dutch.put("MUSIC_ON", "MUZIEK AAN");
dutch.put("MUSIC_OFF", "MUZIEK UIT");
dutch.put("MAIN_MENU", "HOOFDMENU");
dutch.put("TRY_AGAIN", "PROBEER OPNIEUW");
dutch.put("SUBMIT_SCORE", "SUBMIT SCORE");
dutch.put("NEXT_LEVEL", "VOLGENDE LEVEL");
dutch.put("GAME_SAVED", "HET SPEL IS OPGESLADEN");
dutch.put("GAME_OVER", "GAME OVER");
dutch.put("THE_END", "HET EINDE ;)");
dutch.put("WELL_DONE", "GOED GEDAAN");
dutch.put("TIME", "TIJD");
dutch.put("AMMO", "MUNITIE");
dutch.put("KILLS", "GEDOOD");
dutch.put("ACCURACY", "PRECISIE");
dutch.put("SCORE", "SCORE");
dutch.put("AVAILABLE_PERKS", "Beschikbare vaardigheden");
dutch.put("MY_PERKS", "Mijn vaardigheden");
dutch.put("PERK_POINTS", "Vaardigheids punten");
dutch.put("ACCEPT", "Accepteren");
dutch.put("LEVEL_UP", "LEVEL OMHOOG!");
dutch.put("LEVEL", "Level");
dutch.put("MENU", "MENU");
dutch.put("SKIP_TUTORIAL", "UITLEG OVERSLAAN");
dutch.put("SKIP", "Overslaan");
dutch.put("PLOT1", ("Verschillende werelden hebben hetzelfde probleem: " + "vervuiling, oorlogen, ziektes, tekort aan natuurlijke grondstoffen."));
dutch.put("PLOT2", ("Verschillende werelden hebben dezelfde oplossingen: " + "moorden, overwinnen, en overheersen."));
dutch.put("PLOT3", ("Een andere wereld, een ander jaar. Er was een moordmachine gemaakt met de naam Mecharon, en het " + "begon met het zoeken naar een planeet geschikt om op te leven"));
dutch.put("PERK_AMMO_PACK_TITLE", "Munitie pakket");
dutch.put("PERK_ATTACK_SPEED_BOOST_TITLE", "Vergroot aanvalssnelheid");
dutch.put("PERK_BONUS_MAGNET_TITLE", "Bonus magneet");
dutch.put("PERK_BONUS_WARDEN_TITLE", "Bonus bewaarder");
dutch.put("PERK_COMBAT_DRONE_TITLE", "Gevechts robot");
dutch.put("PERK_CUNNING_RELOADER_TITLE", "Handige herlader");
dutch.put("PERK_DODGE_TITLE", "Ontwijk");
dutch.put("PERK_ENERGY_WEAPONS_MASTER_TITLE", "Meester van de engerie wapens");
dutch.put("PERK_EXPLOSIVE_WEAPONS_MASTER_TITLE", "Meester van de explosieve wapens");
dutch.put("PERK_FASTLOADER_TITLE", "Snellader");
dutch.put("PERK_FIREARMS_MASTER_TITLE", "Meester van de vuurwapens");
dutch.put("PERK_GREED_TITLE", "Hebberigheid");
dutch.put("PERK_INSECTS_MASTER_TITLE", "Insecten meester");
dutch.put("PERK_MINE_LAYER_TITLE", "Mijnenlegger");
dutch.put("PERK_MISSILES_MASTER_TITLE", "Raket meester");
dutch.put("PERK_RADIOACTIVE_BULLETS_TITLE", "Radioactieve kogels");
dutch.put("PERK_REPAIR_DRONE_TITLE", "Repareer robot");
dutch.put("PERK_REPAIR_TITLE", "Onmiddelijke reparatie");
dutch.put("PERK_RUNNER_TITLE", "Renner");
dutch.put("PERK_SCINTIST_TITLE", "Wetenschappen");
dutch.put("PERK_SHARPSHOOTER_TITLE", "Scherpschutter");
dutch.put("PERK_SHOCK_DRONE_TITLE", "Schok robot");
dutch.put("PERK_SNIPER_TITLE", "Sniper");
dutch.put("PERK_THE_BLACK_HOLE_TITLE", "Het zwarte gat");
dutch.put("PERK_THE_CHOOSEN_ONE_TITLE", "De uitverkorene");
dutch.put("PERK_UNSTOPPABLE_TITLE", "Onstopbaar");
dutch.put("PERK_WEAPON_FOCUS_TITLE", "Wapen focus");
dutch.put("PERK_AMMO_PACK_DESCRIPTION", "% bij het aantal munitie");
dutch.put("PERK_ATTACK_SPEED_BOOST_DESCRIPTION", "% bij de vuursnelheid");
dutch.put("PERK_BONUS_MAGNET_DESCRIPTION", "Je hebt geluk! Betekend dat je {} meer bonussen krijgt");
dutch.put("PERK_BONUS_WARDEN_DESCRIPTION", "Je zorgt goed voor je bonussen, je houdt ze {}% langer");
dutch.put("PERK_COMBAT_DRONE_DESCRIPTION", (("Gewoon een kleine zwever die met je mee vecht. " + "Schade: 1 + jouw level. Vuursnelheid: 240rpm. ") + "je mag maar een robot tegelijkertijd hebben."));
dutch.put("PERK_CUNNING_RELOADER_DESCRIPTION", "Elke keer als je herlaad verdoof je de vijanden met een schockgolf. Schade: ");
dutch.put("PERK_CUNNING_RELOADER_DESCRIPTION_2", ". Verdoof: {}s");
dutch.put("PERK_DODGE_DESCRIPTION", "Elk level geeft je een extra {}% kans om hand aanvallen te ontwijken");
dutch.put("PERK_ENERGY_WEAPONS_MASTER_DESCRIPTION", "+{}% schade met Iongun, Plasmagun en Railgun");
dutch.put("PERK_EXPLOSIVE_WEAPONS_MASTER_DESCRIPTION", "+{}% schade met Mortar, Rocket Launcher en Mines");
dutch.put("PERK_FASTLOADER_DESCRIPTION", "Verminderd herlaad snelheid met {}% per level");
dutch.put("PERK_FIREARMS_MASTER_DESCRIPTION", "+{}% schade met Cannon, BRS en Machinegun");
dutch.put("PERK_GREED_DESCRIPTION", "Elk level geeft je +{}% bij je eindscore");
dutch.put("PERK_INSECTS_MASTER_DESCRIPTION", "Insectgeweer maakt {} keer meer insecten van lijken");
dutch.put("PERK_MINE_LAYER_DESCRIPTION", "Alle ");
dutch.put("PERK_MINE_LAYER_DESCRIPTION_2", " seconde dat je een mijn legt, veroorzaakt het spetter schade {}");
dutch.put("PERK_MISSILES_MASTER_DESCRIPTION", "Elk level vergroot het aantal raketten dat je afschiet met 1");
dutch.put("PERK_RADIOACTIVE_BULLETS_DESCRIPTION", "Organische vijanden sterven langzaam. Gewonde vijanden krijgen {} schade per seconde");
dutch.put("PERK_REPAIR_DRONE_DESCRIPTION", "Repareert je mech met 3% elke 9 seconden. Je kan maar een robot tegelijkertijd hebben");
dutch.put("PERK_REPAIR_DESCRIPTION", "Volledige reparatie. Kies het nu, en je krijgt een gratis schild");
dutch.put("PERK_RUNNER_DESCRIPTION", "je mech wordt {}% sneller");
dutch.put("PERK_SCINTIST_DESCRIPTION", "Je bent een snelle leerling. +{}% bonus wanneer je ervaringspunten krijgt");
dutch.put("PERK_SHARPSHOOTER_DESCRIPTION", "Kritieke schade x");
dutch.put("PERK_SHOCK_DRONE_DESCRIPTION", (("Gewoon een kleine zwever die met je mee vecht. " + "Verdoofd voor 3s maar veroorzaakt geen schade. Vuursnelheid: 60rpm. ") + "Je mag maar een robot tegelijkertijd hebben"));
dutch.put("PERK_SNIPER_DESCRIPTION", "Elk level geeft je +{}% kans op een kritiek schot");
dutch.put("PERK_THE_BLACK_HOLE_DESCRIPTION", "Ha. Het is een ZWART GAT! (Veroorzaakt een zwart gat voor een aantal seconden)");
dutch.put("PERK_THE_CHOOSEN_ONE_DESCRIPTION", "Er is geen level om te buigen, dus krijg je {}% kans om een aanval te ontwijken");
dutch.put("PERK_UNSTOPPABLE_DESCRIPTION", "Niemand kan je tegenhouden (Giant Spiders en andere monsters met zulke mogelijkheden)");
dutch.put("PERK_WEAPON_FOCUS_DESCRIPTION", "Momentele wapen krijgt {} extra munitie");
dutch.put("PERK_WEAPON_FOCUS_DESCRIPTION_2", "% schade, +{}% herlaad snelheid");
dutch.put("TIP_1", "In deze uitleg leer je Mecharon spelen");
dutch.put("TIP_2", "Gebruik WASD om te bewegen. Gebruik de linker muisknop om te schieten.");
dutch.put("TIP_3", "Houdt de linker muisknop ingedrukt om te blijven schieten. Gebruik de muis om op de monsters te richten.");
dutch.put("TIP_4", "Probeer tegelijkertijd te bewegen en te schieten");
dutch.put("TIP_5", "Raap bonussen op door er overheen te lopen");
dutch.put("TIP_6", "Je kan vaardigheden kiezen door op spatie te drukken, of door op de level omhoog button te drukken");
dutch.put("TIP_7", "Dit is een wapen versterker. Als je het opraapt krijg je een ander wapen. Met Q ga je naar het vorige, en met E naar het volgende wapen.");
dutch.put("TIP_8", "Oh mijn god, wat is dit?");
dutch.put("TIP_9", ("Nu is het tijd om deze nutteloze planeet te vernietigen. " + "Activeer 4 ontstekers door er over heen te lopen. En ben voorzichtig, er zijn duizenden monsters."));
dutch.put("TIP_10", "We hopen dat deze strijders nuttig voor je zijn.");
dutch.put("TIP_11", "Gefeliciteerd, je hebt Mecharon campagne uitgespeeld!");
dutch.put("TIP_12", "Hier heb jeen een kleine bonus, en vergeet niet je score op te slaan.");
dutch.put("TIP_13", "Game Design: Artyom Shpytiack, Andrey Zolotarenko");
dutch.put("TIP_14", "Programming: Artyom Shpytiack");
dutch.put("TIP_15", "Art: Andrey Zolotarenko");
dutch.put("TIP_16", "Special thanks to: Tkachenko Yana, Daniel Sidhion (Portuguese-Brazilian translation),");
dutch.put("TIP_17", "Andrea DjChipZ (billymetal@gmail.com) (Italian translation), Tom Hendriks (Dutch translation)");
dutch.put("TIP_18", "Spel ontwikkeld door MoonMana (c) 2009");
dutch.put("THE_END_2", "HET EINDE");
dutch.put("EPISODE", "EPISODE ");
dutch.put("MISSION_0", "Mission 0: Uitleg");
dutch.put("MISSION_1", "Mission 1: Invasie");
dutch.put("MISSION_2", "Mission 2: Angst voor spinnen");
dutch.put("MISSION_3", "Mission 3: Oase");
dutch.put("MISSION_4", "Mission 4: Zuur test");
dutch.put("MISSION_5", "Mission 5: God help de konigin");
dutch.put("MISSION_21", "Mission 1: Rennend op het ijs");
dutch.put("MISSION_22", "Mission 2: Gevaarlijke vlinders");
dutch.put("MISSION_23", "Mission 3: Sneeuw patrouille");
dutch.put("MISSION_31", "Mission 1: In het mystieke");
dutch.put("MISSION_32", "Mission 2: De hongerige stenen");
dutch.put("MISSION_33", "Mission 3: Moederzorg");
dutch.put("MISSION_34", "Mission 4: Grote badabom");
dutch.put("MISSION_41", "Mission 1: Paradijs verloren");
dutch.put("MISSION_42", "Mission 2: De bewaker");
dutch.put("MISSION_43", "Mission 3: De kooi");
dutch.put("MISSION_44", "Mission 4: De stervende velden.");
dutch.put("MISSION_45", "Mission 5: De gevangenis bewaker");
it.put("NEW_GAME", "NUOVA PARTITA");
it.put("LOAD_GAME", "CARICA PARTITA");
it.put("HIGHSCORES", "CLASSIFICA");
if (BUILD == ANDKON){
it.put("MORE_GAMES", "ANDKON ARCADE");
} else {
it.put("MORE_GAMES", "ALTRI GIOCHI");
};
it.put("RESUME_GAME", "RIPRENDI");
it.put("SOUNDS_ON", "SUONI ON");
it.put("SOUNDS_OFF", "SUONI OFF");
it.put("MUSIC_ON", "MUSICA ON");
it.put("MUSIC_OFF", "MUSICA OFF");
it.put("MAIN_MENU", "MENU PRINCIPALE");
it.put("TRY_AGAIN", "RIPROVA");
it.put("SUBMIT_SCORE", "INVIA PUNTEGGIO");
it.put("NEXT_LEVEL", "PROSSIMO LIVELLO");
it.put("GAME_SAVED", "GIOCO SALVATO");
it.put("GAME_OVER", "GAME OVER");
it.put("THE_END", "FINE ;)");
it.put("WELL_DONE", "BEN FATTO");
it.put("TIME", "TEMPO");
it.put("AMMO", "MUNIZIONI");
it.put("KILLS", "UCCISIONI");
it.put("ACCURACY", "PRECISIONE");
it.put("SCORE", "PUNTEGGIO");
it.put("AVAILABLE_PERKS", "Premi disponibili");
it.put("MY_PERKS", "I miei premi");
it.put("PERK_POINTS", "PUNTI PREMIO");
it.put("ACCEPT", "ACCETTA");
it.put("LEVEL_UP", "POTENZIAMENTO!");
it.put("LEVEL", "Livello");
it.put("MENU", "MENU");
it.put("SKIP_TUTORIAL", "SALTA TUTORIAL");
it.put("SKIP", "Salta");
it.put("PLOT1", ("Molti pianeti sono afflitti dagli stessi problemi: " + "inquinamento, guerre, malattie, insufficienza di risorse naturali."));
it.put("PLOT2", ("Molti pianeti hanno le stesse soluzioni: " + "uccidere, conquistare, dominare."));
it.put("PLOT3", ("Un altro mondo, un altro anno. Lì venne creata una macchina, chiamata Mecharon, che " + "dà inizio alla ricerca di un pianeta adatto alla vita."));
it.put("PERK_AMMO_PACK_TITLE", "Rifornimento di munizioni");
it.put("PERK_ATTACK_SPEED_BOOST_TITLE", "Aumento velocità di attacco");
it.put("PERK_BONUS_MAGNET_TITLE", "Magnete bonus");
it.put("PERK_BONUS_WARDEN_TITLE", "Custode bonus");
it.put("PERK_COMBAT_DRONE_TITLE", "Drone da combattimento");
it.put("PERK_CUNNING_RELOADER_TITLE", "Ricarica speciale");
it.put("PERK_DODGE_TITLE", "Schivata");
it.put("PERK_ENERGY_WEAPONS_MASTER_TITLE", "Maestro di armi a energia");
it.put("PERK_EXPLOSIVE_WEAPONS_MASTER_TITLE", "Maestro di armi esplosive");
it.put("PERK_FASTLOADER_TITLE", "Ricarica rapida");
it.put("PERK_FIREARMS_MASTER_TITLE", "Maestro di armi da fuoco");
it.put("PERK_GREED_TITLE", "Avido");
it.put("PERK_INSECTS_MASTER_TITLE", "Signore degli insetti");
it.put("PERK_MINE_LAYER_TITLE", "Posamine");
it.put("PERK_MISSILES_MASTER_TITLE", "Esperto di missili");
it.put("PERK_RADIOACTIVE_BULLETS_TITLE", "Proiettili radioattivi");
it.put("PERK_REPAIR_DRONE_TITLE", "Bot di riparazione");
it.put("PERK_REPAIR_TITLE", "Riparazione istantanea");
it.put("PERK_RUNNER_TITLE", "Corridore");
it.put("PERK_SCINTIST_TITLE", "Scienziato");
it.put("PERK_SHARPSHOOTER_TITLE", "Tiratore scelto");
it.put("PERK_SHOCK_DRONE_TITLE", "Bot stordente");
it.put("PERK_SNIPER_TITLE", "Cecchino");
it.put("PERK_THE_BLACK_HOLE_TITLE", "Il Buco Nero");
it.put("PERK_THE_CHOOSEN_ONE_TITLE", "Il Prescelto");
it.put("PERK_UNSTOPPABLE_TITLE", "Inarrestabile");
it.put("PERK_WEAPON_FOCUS_TITLE", "Arma preferita");
it.put("PERK_AMMO_PACK_DESCRIPTION", "% aggiunta alle munizioni");
it.put("PERK_ATTACK_SPEED_BOOST_DESCRIPTION", "% al rateo di fuoco");
it.put("PERK_BONUS_MAGNET_DESCRIPTION", "Sei fortunato. Significa che prendi {} volte i bonus");
it.put("PERK_BONUS_WARDEN_DESCRIPTION", "Hai avuto cura dei tuoi bonus. Ti aiuteranno il {}% più a lungo");
it.put("PERK_COMBAT_DRONE_DESCRIPTION", (("Semplicemente un piccolo amico dalla tua parte. " + "Danno: 1 + Tuo livello. Rateo di fuoco: 240rpm. ") + "Puoi avere solo un drone alla volta."));
it.put("PERK_CUNNING_RELOADER_DESCRIPTION", "Ogni volta che ricarichi stordirai i nemici con quest'onda d'urto. Danno: ");
it.put("PERK_CUNNING_RELOADER_DESCRIPTION_2", ". Stordimento: {}");
it.put("PERK_DODGE_DESCRIPTION", "Ogni livello che passi ti garantisce un {}% di chance di schivare l'attacco corpo a corpo");
it.put("PERK_ENERGY_WEAPONS_MASTER_DESCRIPTION", "+{}% di danno da Iongun, Plasmagun e Railgun");
it.put("PERK_EXPLOSIVE_WEAPONS_MASTER_DESCRIPTION", "+{}% di danno da Mortar, Rocket Launcher e Mines");
it.put("PERK_FASTLOADER_DESCRIPTION", "Aumenta la velocità di ricarica del {}% per livello");
it.put("PERK_FIREARMS_MASTER_DESCRIPTION", "+{}% di danni da Cannon, BRS e Machinegun");
it.put("PERK_GREED_DESCRIPTION", "Ogni livello aggiunge un +{}% al punteggio finale");
it.put("PERK_INSECTS_MASTER_DESCRIPTION", "Buggun rilascia {} volte più insetti del normale");
it.put("PERK_MINE_LAYER_DESCRIPTION", "Ogni ");
it.put("PERK_MINE_LAYER_DESCRIPTION_2", " secondo che piazzi una mina. Causerà {} danni da esplosione");
it.put("PERK_MISSILES_MASTER_DESCRIPTION", "Ogni livello aumenterà i razzi sparati di 1");
it.put("PERK_RADIOACTIVE_BULLETS_DESCRIPTION", "I nemici organici muoiono lentamente. Le unità ferite prenderanno {} danni al secondo");
it.put("PERK_REPAIR_DRONE_DESCRIPTION", "Ripara il tuo mech del 3% ogni 9 secondi. Puoi avere solo un drone alla volta");
it.put("PERK_REPAIR_DESCRIPTION", "Riparazione totale. Prendila adesso e ti darò uno scudo in omaggio.");
it.put("PERK_RUNNER_DESCRIPTION", "+{}% alla velocità del mech.");
it.put("PERK_SCINTIST_DESCRIPTION", "Impari in fretta. +{}% di bonus ogni volta che guadagni esperienza");
it.put("PERK_SHARPSHOOTER_DESCRIPTION", "Colpo critico x");
it.put("PERK_SHOCK_DRONE_DESCRIPTION", (("Un altro piccolo amico che ti darà una mano. " + "Stordisce per 3s ma non causa danni. Rateo di fuoco: 60rpm. ") + "Puoi avere solo un drone alla volta"));
it.put("PERK_SNIPER_DESCRIPTION", "Ogni livello che passi ti dà un +{}% di chance di effettuare un colpo critico");
it.put("PERK_THE_BLACK_HOLE_DESCRIPTION", "Merda. Si tratta del Buco nero! (Crea un Buco Nero per alcuni secondi)");
it.put("PERK_THE_CHOOSEN_ONE_DESCRIPTION", "Il cucchiaio non esiste, quindi hai un {}% di chance di evitare ogni attacco");
it.put("PERK_UNSTOPPABLE_DESCRIPTION", "Nessuno può fermarti (Ragni giganti e altri mostri con quest'abilità)");
it.put("PERK_WEAPON_FOCUS_DESCRIPTION", "L'arma corrente prende {} munizioni addizionali, ");
it.put("PERK_WEAPON_FOCUS_DESCRIPTION_2", "% di danni, +{}% di velocità di ricarica");
it.put("TIP_1", "In questo tutorial imparerai a giocare a Mecharon.");
it.put("TIP_2", "Usa 'W, A, S, D' per muoverti. Usa il pulsante Sinistro del mouse per sparare.");
it.put("TIP_3", "Tienilo premuto per sparare continuamente. Muovi il Mouse per mirare ai nemici.");
it.put("TIP_4", "Prova a muoverti e sparare contemporaneamente.");
it.put("TIP_5", "Raccogli i bonus passandoci sopra.");
it.put("TIP_6", "Puoi ottenere un potenziamento premendo 'spazio' o cliccando il pulsante 'potenziamento'");
it.put("TIP_7", "Questo è un potenziamento arma. Raccogliendolo, otterrai un'altra arma. 'Q' – Arma precedente, 'E' – Arma successiva");
it.put("TIP_8", "Oh mio Dio! Cosa diavolo è?");
it.put("TIP_9", ("Ora è tempo di distruggere questo inutile pianeta. " + "Attiva 4 detonatori passandoci su. E sii molto attento, ci sono migliaia di mostri."));
it.put("TIP_10", "Speriamo che questi guerrieri ti siano utili.");
it.put("TIP_11", "Congratulazioni! Hai completato la campagna di Mecharon ");
it.put("TIP_12", "Divertiti in questo piccolo livello bonus, e non dimenticare di inviare il tuo punteggio!");
it.put("TIP_13", "Game Design: Artyom Shpytiack, Andrey Zolotarenko");
it.put("TIP_14", "Programmazione: Artyom Shpytiack");
it.put("TIP_15", "Grafica: Andrey Zolotarenko");
it.put("TIP_16", "Ringraziamenti speciali a: Tkachenko Yana, Daniel Sidhion (Portuguese-Brazilian translation),");
it.put("TIP_17", "Andrea DjChipZ (billymetal@gmail.com) (Italian translation), Tom Hendriks (Dutch translation)");
it.put("TIP_18", "Gioco sviluppato da MoonMana (c) 2009");
it.put("THE_END_2", "THE END");
it.put("EPISODE", "EPISODE ");
it.put("MISSION_0", "Missione 0: Tutorial");
it.put("MISSION_1", "Missione 1: Invasione");
it.put("MISSION_2", "Missione 2: Aracnofobia");
it.put("MISSION_3", "Missione 3: Oasi");
it.put("MISSION_4", "Missione 4: Test acido");
it.put("MISSION_5", "Missione 5: Dio Salvi la Regina");
it.put("MISSION_21", "Missione 1: Corsa sul Ghiaccio");
it.put("MISSION_22", "Missione 2: Farfalle Pericolose");
it.put("MISSION_23", "Missione 3: Pattuglia Artica");
it.put("MISSION_31", "Missione 1: Mistico");
it.put("MISSION_32", "Missione 2: Le Pietre Fameliche");
it.put("MISSION_33", "Missione 3: Cure di Madre");
it.put("MISSION_34", "Missione 4: Big Badaboom");
it.put("MISSION_41", "Missione 1: Il Paradiso Perduto");
it.put("MISSION_42", "Missione 2: Il Guardiano");
it.put("MISSION_43", "Missione 3: La Gabbia");
it.put("MISSION_44", "Missione 4: I Campi Morti");
it.put("MISSION_45", "Missione 5: Il Guardiano della Prigione");
ptbr.put("NEW_GAME", "NOVO JOGO");
ptbr.put("LOAD_GAME", "CARREGAR JOGO");
ptbr.put("HIGHSCORES", "SCORES");
if (BUILD == ANDKON){
ptbr.put("MORE_GAMES", "ANDKON ARCADE");
} else {
ptbr.put("MORE_GAMES", "MAIS JOGOS");
};
ptbr.put("RESUME_GAME", "RESUMIR JOGO");
ptbr.put("SOUNDS_ON", "SONS LIGADOS");
ptbr.put("SOUNDS_OFF", "SONS DESLIGADOS");
ptbr.put("MUSIC_ON", "MUSICA LIGADA");
ptbr.put("MUSIC_OFF", "MUSICA DESLIGADA");
ptbr.put("MAIN_MENU", "MENU PRINCIPAL");
ptbr.put("TRY_AGAIN", "JOGAR DE NOVO");
ptbr.put("SUBMIT_SCORE", "ENVIAR SCORE");
ptbr.put("NEXT_LEVEL", "PROXIMO NIVEL");
ptbr.put("GAME_SAVED", "O JOGO FOI SALVO");
ptbr.put("GAME_OVER", "GAME OVER");
ptbr.put("THE_END", "FIM ;)");
ptbr.put("WELL_DONE", "MUITO BEM");
ptbr.put("TIME", "TEMPO");
ptbr.put("AMMO", "MUNICAO");
ptbr.put("KILLS", "KILLS");
ptbr.put("ACCURACY", "PRECISAO");
ptbr.put("SCORE", "SCORE");
ptbr.put("AVAILABLE_PERKS", "Aprimoramentos disponíveis");
ptbr.put("MY_PERKS", "Meus aprimoramentos");
ptbr.put("PERK_POINTS", "Pontos de aprimoramento");
ptbr.put("ACCEPT", "ACEITAR");
ptbr.put("LEVEL_UP", "NIVEL COMPLETO");
ptbr.put("LEVEL", "Nível");
ptbr.put("MENU", "MENU");
ptbr.put("SKIP_TUTORIAL", "PULAR TUTORIAL");
ptbr.put("SKIP", "Pular");
ptbr.put("PLOT1", ("Mundos diferentes possuem os mesmos problemas: " + "poluição, guerras, doenças, falta de recursos naturais."));
ptbr.put("PLOT2", ("Mundos diferentes possuem as mesmas soluções: " + "matar, conquistar, dominar"));
ptbr.put("PLOT3", ("Um outro mundo, um outro ano. Uma máquina matadora chamada Mecharon foi criada " + "com a missão de encontrar um planeta adequado para a vida"));
ptbr.put("PERK_AMMO_PACK_TITLE", "Pacote de munição");
ptbr.put("PERK_ATTACK_SPEED_BOOST_TITLE", "Aumenta a velocidade de ataque");
ptbr.put("PERK_BONUS_MAGNET_TITLE", "Ímã de bônus");
ptbr.put("PERK_BONUS_WARDEN_TITLE", "Guarda de bônus");
ptbr.put("PERK_COMBAT_DRONE_TITLE", "Robô de combate");
ptbr.put("PERK_CUNNING_RELOADER_TITLE", "Recarregador aprimorado");
ptbr.put("PERK_DODGE_TITLE", "Esquiva");
ptbr.put("PERK_ENERGY_WEAPONS_MASTER_TITLE", "Mestre de armas de energia");
ptbr.put("PERK_EXPLOSIVE_WEAPONS_MASTER_TITLE", "Mestre de armas explosivas");
ptbr.put("PERK_FASTLOADER_TITLE", "Carregador rápido");
ptbr.put("PERK_FIREARMS_MASTER_TITLE", "Mestre de armas de fogo");
ptbr.put("PERK_GREED_TITLE", "Ganância");
ptbr.put("PERK_INSECTS_MASTER_TITLE", "Mestre de insetos");
ptbr.put("PERK_MINE_LAYER_TITLE", "Colocador de minas");
ptbr.put("PERK_MISSILES_MASTER_TITLE", "Mestre de mísseis");
ptbr.put("PERK_RADIOACTIVE_BULLETS_TITLE", "Tiros radioativos");
ptbr.put("PERK_REPAIR_DRONE_TITLE", "Robô de reparos");
ptbr.put("PERK_REPAIR_TITLE", "Reparo instantâneo");
ptbr.put("PERK_RUNNER_TITLE", "Corredor");
ptbr.put("PERK_SCINTIST_TITLE", "Cientista");
ptbr.put("PERK_SHARPSHOOTER_TITLE", "Atirador aguçado");
ptbr.put("PERK_SHOCK_DRONE_TITLE", "Robô de choque");
ptbr.put("PERK_SNIPER_TITLE", "Franco atirador");
ptbr.put("PERK_THE_BLACK_HOLE_TITLE", "O Buraco Negro");
ptbr.put("PERK_THE_CHOOSEN_ONE_TITLE", "O Escolhido");
ptbr.put("PERK_UNSTOPPABLE_TITLE", "Imparável");
ptbr.put("PERK_WEAPON_FOCUS_TITLE", "Foco na arma");
ptbr.put("PERK_AMMO_PACK_DESCRIPTION", "% adicionado à quantidade de munição");
ptbr.put("PERK_ATTACK_SPEED_BOOST_DESCRIPTION", "% adicionado à velocidade de tiro");
ptbr.put("PERK_BONUS_MAGNET_DESCRIPTION", "Você é sortudo. Significa que você ganha {} vezes mais bônus");
ptbr.put("PERK_BONUS_WARDEN_DESCRIPTION", "Você é muito cuidadoso com seus bônis. Eles duram {}% mais tempo");
ptbr.put("PERK_COMBAT_DRONE_DESCRIPTION", (("Apenas um pequeno ajudante para lutar do seu lado. " + "Dano: 1 + Seu nível. Velocidade de tiro: 240rpm. ") + "Você só pode ter um robô ao mesmo tempo"));
ptbr.put("PERK_CUNNING_RELOADER_DESCRIPTION", "Toda vez que você recarrega sua arma, você cria uma onda de choque nos inimigos. Dano: ");
ptbr.put("PERK_CUNNING_RELOADER_DESCRIPTION_2", ". Atordoamento: {}s");
ptbr.put("PERK_DODGE_DESCRIPTION", "Cada nível te dá uma chance adicional de {}% de se esquivar de ataques corpo-a-corpo");
ptbr.put("PERK_ENERGY_WEAPONS_MASTER_DESCRIPTION", "+{}% de dano com a Iongun, Plasmagun e Railgun");
ptbr.put("PERK_EXPLOSIVE_WEAPONS_MASTER_DESCRIPTION", "+{}% de dano com o Mortar, Rocket Launcher e Mines");
ptbr.put("PERK_FASTLOADER_DESCRIPTION", "Diminui o tempo de recarregamento da arma em {}% por nível");
ptbr.put("PERK_FIREARMS_MASTER_DESCRIPTION", "+{}% de dano com o Cannon, BRS e Machinegun");
ptbr.put("PERK_GREED_DESCRIPTION", "Cada nível adiciona +{}% ao score final");
ptbr.put("PERK_INSECTS_MASTER_DESCRIPTION", "A Buggun gera {} vezes mais insetos de corpos");
ptbr.put("PERK_MINE_LAYER_DESCRIPTION", "Em cada ");
ptbr.put("PERK_MINE_LAYER_DESCRIPTION_2", " segundo você coloca uma mina. Ela causa um dano de {}");
ptbr.put("PERK_MISSILES_MASTER_DESCRIPTION", "Cada nível aumenta em 1 a quantidade de foguetes que você lança");
ptbr.put("PERK_RADIOACTIVE_BULLETS_DESCRIPTION", "Inimigos orgânicos morrem devagar. Unidades atingidas recebem um dano de {} em cada segundo");
ptbr.put("PERK_REPAIR_DRONE_DESCRIPTION", "Repara o seu robô em 3% a cada 9 segundos. Você só pode ter um robô ao mesmo tempo");
ptbr.put("PERK_REPAIR_DESCRIPTION", "Reparo completo. Pegue ele agora e eu também te darei um escudo. Grátis");
ptbr.put("PERK_RUNNER_DESCRIPTION", "+{}% adicionado à sua velocidade");
ptbr.put("PERK_SCINTIST_DESCRIPTION", "Você é um aprendiz veloz. +{}% de bônus toda vez que você ganha experiência");
ptbr.put("PERK_SHARPSHOOTER_DESCRIPTION", "Dano crítico x");
ptbr.put("PERK_SHOCK_DRONE_DESCRIPTION", (("Apenas um pequeno ajudante para lutar do seu lado. " + "Atordoa por 3s, mas causa nenhum dano. Velocidade de tiro: 60rpm. ") + "Você só pode ter um robô ao mesmo tempo"));
ptbr.put("PERK_SNIPER_DESCRIPTION", "Cada nível adiciona +{}% à sua chance de causar um dano crítico");
ptbr.put("PERK_THE_BLACK_HOLE_DESCRIPTION", "Caramba. Isso é um BURACO NEGRO! (Cria um Buraco Negro por alguns segundos)");
ptbr.put("PERK_THE_CHOOSEN_ONE_DESCRIPTION", "Não existe uma colher, então você ganha {}% de chance de esquivar-se de qualquer ataque");
ptbr.put("PERK_UNSTOPPABLE_DESCRIPTION", "Ninguém pode te parar (Aranhas gigantes e outros monstros com essa habilidade)");
ptbr.put("PERK_WEAPON_FOCUS_DESCRIPTION", "A arma atual ganha um adicional de {} na munição, ");
ptbr.put("PERK_WEAPON_FOCUS_DESCRIPTION_2", "% mais dano, +{}% de velocidade de tiro");
ptbr.put("TIP_1", "Nesse tutorial, você aprenderá como jogar Mecharon");
ptbr.put("TIP_2", "Use 'W, A, S, D' para mover. Use o botão esquerdo do mouse para atirar");
ptbr.put("TIP_3", "Segure o botão esquerdo do mouse para atirar continuamente. Mova o mouse para mirar nos monstros");
ptbr.put("TIP_4", "Tente mover e atirar ao mesmo tempo");
ptbr.put("TIP_5", "Ande em cima dos bônus para coletá-los");
ptbr.put("TIP_6", "Você pode escolher um aprimoramento apertando 'espaço' ou clicando no botão 'nível completo'");
ptbr.put("TIP_7", "Esse é um bônus de arma. Você ganha uma nova arma ao coletá-lo. 'Q' – Arma anterior, 'E' – Próxima arma");
ptbr.put("TIP_8", "Oh, meu Deus! Mas que diabos é isso?");
ptbr.put("TIP_9", ("Agora é hora de destruir esse planeta sem utilidade. " + "Ative 4 detonadores ao andar sobre eles. Seja cuidadoso, existem milhares de monstros"));
ptbr.put("TIP_10", "Nós esperamos que esses lutadores sejam úteis para você");
ptbr.put("TIP_11", "Parabéns! Você terminou Mecharon ");
ptbr.put("TIP_12", "Aproveite esse pequeno nível-bônus e não se esqueça de enviar o seu score!");
ptbr.put("TIP_13", "Design do jogo: Artyom Shpytiack, Andrey Zolotarenko");
ptbr.put("TIP_14", "Programação: Artyom Shpytiack");
ptbr.put("TIP_15", "Arte: Andrey Zolotarenko");
ptbr.put("TIP_16", "Agradecimentos especiais para: Tkachenko Yana, Daniel Sidhion (Portuguese-Brazilian translation),");
ptbr.put("TIP_17", "Andrea DjChipZ (billymetal@gmail.com) (Italian translation), Tom Hendriks (Dutch translation)");
ptbr.put("TIP_18", "Esse jogo foi desenvolvido por MoonMana (c) 2009");
ptbr.put("THE_END_2", "O FIM");
ptbr.put("EPISODE", "EPISODIO ");
ptbr.put("MISSION_0", "Missão 0: Tutorial");
ptbr.put("MISSION_1", "Missão 1: Invasão");
ptbr.put("MISSION_2", "Missão 2: Medo de aranhas");
ptbr.put("MISSION_3", "Missão 3: Oásis");
ptbr.put("MISSION_4", "Missão 4: Teste ácido");
ptbr.put("MISSION_5", "Missão 5: Deus, salve a Rainha");
ptbr.put("MISSION_21", "Missão 1: Correndo no gelo");
ptbr.put("MISSION_22", "Missão 2: Borboletas perigosas");
ptbr.put("MISSION_23", "Missão 3: Patrulha do gelo");
ptbr.put("MISSION_31", "Missão 1: Dentro do místico");
ptbr.put("MISSION_32", "Missão 2: As pedras famintas");
ptbr.put("MISSION_33", "Missão 3: Cuidado de mãe");
ptbr.put("MISSION_34", "Missão 4: Grande explosão");
ptbr.put("MISSION_41", "Missão 1: Paraíso perdido");
ptbr.put("MISSION_42", "Missão 2: O Guardião");
ptbr.put("MISSION_43", "Missão 3: A Gaiola");
ptbr.put("MISSION_44", "Missão 4: Os campos mortos");
ptbr.put("MISSION_45", "Missão 5: O dono da prisão");
de.put("NEW_GAME", "NEUES SPIEL");
de.put("LOAD_GAME", "LADE SPIEL");
de.put("HIGHSCORES", "PUNKTE");
de.put("MORE_GAMES", "MEHR SPIELE");
de.put("RESUME_GAME", "FORTSETZEN");
de.put("SOUNDS_ON", "TON AN");
de.put("SOUNDS_OFF", "TON AUS");
de.put("MUSIC_ON", "MUSIK AN");
de.put("MUSIC_OFF", "MUSIK AUS");
de.put("MAIN_MENU", "HAUPTMENU");
de.put("TRY_AGAIN", "WIEDERHOLEN");
de.put("SUBMIT_SCORE", "SENDE PUNKTE");
de.put("NEXT_LEVEL", "WEITER");
de.put("GAME_SAVED", "SPIEL SPEICHERN");
de.put("GAME_OVER", "VERLOREN");
de.put("THE_END", "ENDE ;)");
de.put("WELL_DONE", "GUT!");
de.put("TIME", "ZEIT");
de.put("AMMO", "PATRONEN");
de.put("KILLS", "TOT");
de.put("ACCURACY", "GENAUIGKEIT");
de.put("SCORE", "PUNKTE");
de.put("AVAILABLE_PERKS", "Bonusse");
de.put("MY_PERKS", "Meine Bonusse");
de.put("PERK_POINTS", "Bonus points");
de.put("ACCEPT", "FERTIG");
de.put("LEVEL_UP", "LEVEL HOHER!");
de.put("LEVEL", "Level");
de.put("MENU", "MENU");
de.put("SKIP_TUTORIAL", "Lass eine Ebene aus");
de.put("SKIP", "Überspringen");
de.put("PLOT1", "Verschiedene Welten - gleiche Probleme: Verschmutzung, Kriege, Krankheiten, Erschöpfung der Natur- und Bodenschätze.");
de.put("PLOT2", "Verschiedene Welten - gleiche Entscheidungen: töten, erobern, führen.");
de.put("PLOT3", "In einer anderen Welt. In einem anderen Jahr. Hier ist die Maschine des Todes entstanden, die einen Namen Meharon bekommen hat und hier fängt ihre Mission an: Ein geeignetes Planet für das neue Leben zu finden.");
de.put("PERK_AMMO_PACK_TITLE", "Patronen");
de.put("PERK_ATTACK_SPEED_BOOST_TITLE", "Schnellschussgewehr");
de.put("PERK_BONUS_MAGNET_TITLE", "Bonusmagnet");
de.put("PERK_BONUS_WARDEN_TITLE", "Bonusbeschützer");
de.put("PERK_COMBAT_DRONE_TITLE", "Kampfdrone");
de.put("PERK_CUNNING_RELOADER_TITLE", "Einlader");
de.put("PERK_DODGE_TITLE", "Ausweichen");
de.put("PERK_ENERGY_WEAPONS_MASTER_TITLE", "Master der energetischen Waffen");
de.put("PERK_EXPLOSIVE_WEAPONS_MASTER_TITLE", "Zünder");
de.put("PERK_FASTLOADER_TITLE", "Schnelle Ladung");
de.put("PERK_FIREARMS_MASTER_TITLE", "Master der Schußwaffe");
de.put("PERK_GREED_TITLE", "Gier");
de.put("PERK_INSECTS_MASTER_TITLE", "Insektengebieter");
de.put("PERK_MINE_LAYER_TITLE", "Minenleger");
de.put("PERK_MISSILES_MASTER_TITLE", "Raketenmaster");
de.put("PERK_RADIOACTIVE_BULLETS_TITLE", "Radioaktive Kugeln");
de.put("PERK_REPAIR_DRONE_TITLE", "Reparaturdrone");
de.put("PERK_REPAIR_TITLE", "Augenblickliche Reparatur");
de.put("PERK_RUNNER_TITLE", "Läufer");
de.put("PERK_SCINTIST_TITLE", "Gelehrter");
de.put("PERK_SHARPSHOOTER_TITLE", "Scharfes Auge");
de.put("PERK_SHOCK_DRONE_TITLE", "Schockdrone");
de.put("PERK_SNIPER_TITLE", "Scharfschütze");
de.put("PERK_THE_BLACK_HOLE_TITLE", "Schwarzes Loch");
de.put("PERK_THE_CHOOSEN_ONE_TITLE", "Auserwälter");
de.put("PERK_UNSTOPPABLE_TITLE", "Unbeugsamer");
de.put("PERK_WEAPON_FOCUS_TITLE", "Waffenbündelung");
de.put("PERK_AMMO_PACK_DESCRIPTION", "% zur Patronenzahl");
de.put("PERK_ATTACK_SPEED_BOOST_DESCRIPTION", "% zur Feuergeschwindigkeit");
de.put("PERK_BONUS_MAGNET_DESCRIPTION", "Du bist ein Glückspilz. Es bedeutet, dass du in {} Mal mehr Bonusse bekommst.");
de.put("PERK_BONUS_WARDEN_DESCRIPTION", "Du verhälst dich vorsichtig zu den Bonussen. Sie dienen dir auf {} % länger.");
de.put("PERK_COMBAT_DRONE_DESCRIPTION", (("Dies ist nur ein kleiner Huver , der an deiner Seite kämpft. " + "Beschädigung: 1+ dein Level. Feuergeschwindigkeit: 240rpm. ") + "Du kannst nur eine Drone gleichzeitig haben."));
de.put("PERK_CUNNING_RELOADER_DESCRIPTION", "Jedesmal, wenn du Waffen neu auflädst, werden deine Feinde durch die Detonationswelle zerstört. Die Beschädigung: ");
de.put("PERK_CUNNING_RELOADER_DESCRIPTION_2", ". Betäubung: {}s");
de.put("PERK_DODGE_DESCRIPTION", "Jeder Level gibt dir zusätzlich {}% die Chance sich vom Nahkampf zu entziehen");
de.put("PERK_ENERGY_WEAPONS_MASTER_DESCRIPTION", "+{}% die Beschädigung von der Ionen-, Plasma- und Schienenkanone");
de.put("PERK_EXPLOSIVE_WEAPONS_MASTER_DESCRIPTION", "+{}% die Beschädigung durch Mörser, Leuchtpistole und den Minen");
de.put("PERK_FASTLOADER_DESCRIPTION", "Verringert die Zeit, um die Waffen neu aufzuladen, auf {}% für jeden Level");
de.put("PERK_FIREARMS_MASTER_DESCRIPTION", "+{}% die Beschädigung von der Kanone, BRS und dem Maschinengewehr");
de.put("PERK_GREED_DESCRIPTION", "Jeder Level gibt dir + {} % zum Finalergebnis");
de.put("PERK_INSECTS_MASTER_DESCRIPTION", "Insectkanone bewirkt in {} Mal () mehr Käfer aus den Leichen");
de.put("PERK_MINE_LAYER_DESCRIPTION", "Jeder ");
de.put("PERK_MINE_LAYER_DESCRIPTION_2", " Sekunden legst du die Mine. Sie trägt {} plätschern Beschädigungen auf");
de.put("PERK_MISSILES_MASTER_DESCRIPTION", "Jeder Level vergrössert die Zahl der gestarteten Raketen auf 1");
de.put("PERK_RADIOACTIVE_BULLETS_DESCRIPTION", "Die organischen Gegner kommen langsam um. Verletzten Gegner bekommen jede Sekunde {} Beschädigungen");
de.put("PERK_REPAIR_DRONE_DESCRIPTION", "Pelzreparatur auf 3 % jede 9 Sekunden. Du kannst nur eine Drone gleichzeitig haben");
de.put("PERK_REPAIR_DESCRIPTION", "Die volle Reparatur. Nimm jetzt - und du bekommst das Schild als Geschenk");
de.put("PERK_RUNNER_DESCRIPTION", "+ {} % zur Geschwindigkeit deines Roboter");
de.put("PERK_SCINTIST_DESCRIPTION", "Du lernst schnell. +{}% jedesmal beim Erhalten einer Erfahrung");
de.put("PERK_SHARPSHOOTER_DESCRIPTION", "Kritische Beschädigung x");
de.put("PERK_SHOCK_DRONE_DESCRIPTION", (("Dies ist nur ein kleiner Huver, der an deiner Seite kämpft. " + "Betäubt auf 3s, aber trägt die Beschädigungen nicht auf. Die Feuergeschwindigkeit: 60rpm. ") + "Du kannst nur eine Drone gleichzeitig haben."));
de.put("PERK_SNIPER_DESCRIPTION", "Jeder Level gibt dir zusätzlich +{}% die Chance, die kritischen Beschädigungen zu zufügen");
de.put("PERK_THE_BLACK_HOLE_DESCRIPTION", " Die Hölle. Es geht um das SCHWARZE LOCH! (Das Schwarze Loch entsteht für einige Sekunden)");
de.put("PERK_THE_CHOOSEN_ONE_DESCRIPTION", "Und es gibt doch keinen Löffel, deswegen bekommst du {}% die Chance, um einen beliebigen Angriff zu vermeiden");
de.put("PERK_UNSTOPPABLE_DESCRIPTION", "Niemand kann dich (Riese Spinnen und andere Monster mit solcher Fähigkeit) anhalten");
de.put("PERK_WEAPON_FOCUS_DESCRIPTION", " Gegenwärtige Waffen bekommen {} zusätzliche Patronen, ");
de.put("PERK_WEAPON_FOCUS_DESCRIPTION_2", "% Beschädigung, +{}% Schussgeschwindigkeit");
de.put("TIP_1", "In dieser Stunde werden wir erzählen, wie man Mecharon spielt");
de.put("TIP_2", "Verwende ' W, A, S, D ', um sich zu bewegen und die linke Maus- zum Schießen ");
de.put("TIP_3", "Halte den linken Knopf der Maus fest, um andauernd schießen zu können. Bewege dabei die Maus, um auf die Monster zu zielen.");
de.put("TIP_4", "Versuche gleichzeitig zu gehen und zu schießen");
de.put("TIP_5", "Um die Bonusse auszuwählen, musst du dich durch die Bonusse passieren");
de.put("TIP_6", "Du kannst einen Bonus auswählen, wenn du auf 'das Leerzeichen' drückst oder auf die Befehlsschaltfläche 'Level' klickst");
de.put("TIP_7", "Das ist die neue Kanone. Wenn du solche Bonusse auswählst, bekommst du die zusätzlichen Waffen. ' Q ' – die vorhergehende Kanone, ' E ' – folgende Kanone.");
de.put("TIP_8", "Wow! Was ist das für ein Scheiß?");
de.put("TIP_9", ("Es ist die Zeit gekommen, diesen nutzlosen Planeten zu zerstören. " + "Aktiviere 4 Detonatoren, wenn du da durch gehst. Aber sei sehr vorsichtig- es sind Tausende!"));
de.put("TIP_10", "Wir hoffen, diese Jagdflugzeuge werden dir helfen!");
de.put("TIP_11", "Glückwunsch! Du hast die Kampagne Mecharon geschafft!");
de.put("TIP_12", "Genieße diesen kleinen Bonusniveau und vergiss nicht, die Punkte abzuschicken!");
de.put("TIP_13", "Game Designe of Artem Schpytyack, Andrey Zolotarenko");
de.put("TIP_14", "Programmierer: Artem Schpytyack");
de.put("TIP_15", "Art: Andrey Zolotarenko");
de.put("TIP_16", "Vielen Dank: Tkatschenko Jana, Daniel Sidhion (Portuguese-Brazilian translation), ");
de.put("TIP_17", "Andrea DjChipZ (billymetal@gmail.com) (Italian translation), Tom Hendriks (Dutch translation)");
de.put("TIP_18", "Das Spiel wurde entwickelt von MoonMana (c) 2009");
de.put("THE_END_2", "ENDE");
de.put("EPISODE", "EPISODE ");
de.put("MISSION_0", "Mission 0: Ausbildung");
de.put("MISSION_1", "Mission 1: Angriff");
de.put("MISSION_2", "Mission 2: Arachnofobie");
de.put("MISSION_3", "Mission 3: Oase");
de.put("MISSION_4", "Mission 4: Säurehaltige Prüfung");
de.put("MISSION_5", "Mission 5: Gott, beschütze die Königin!");
de.put("MISSION_21", "Mission 1: Eislaufen");
de.put("MISSION_22", "Mission 2: Gefährliche Schmetterlinge");
de.put("MISSION_23", "Mission 3: Die Schneestreife");
de.put("MISSION_31", "Mission 1: In die Mystik");
de.put("MISSION_32", "Mission 2: Hungrige Steine");
de.put("MISSION_33", "Mission 3: Mütterliche Sorgen");
de.put("MISSION_34", "Mission 4: Großes Badabum");
de.put("MISSION_41", "Mission 1: Verlorenes Paradies");
de.put("MISSION_42", "Mission 2: Wachmann");
de.put("MISSION_43", "Mission 3: Käfig");
de.put("MISSION_44", "Mission 4: Tal des Todes");
de.put("MISSION_45", "Mission 5: Gefängniswärter");
}
public function getDu():Bundle{
return (dutch);
}
public function getBr():Bundle{
return (ptbr);
}
public function getIt():Bundle{
return (it);
}
public function getDe():Bundle{
return (de);
}
public function getRu():Bundle{
return (ru);
}
public function getEn():Bundle{
return (en);
}
}
}//package main
Section 38
//KeyHandler (main.KeyHandler)
package main {
import flash.display.*;
import flash.events.*;
public class KeyHandler {
private var escape:Boolean;// = false
private var space:Boolean;// = false
private var downArrow:Boolean;// = false
private var del:Boolean;// = false
private var isKeyDown:Boolean;// = false
private var keyDown:Object;
private var pressRepeatTime:Number;// = 0
private var upArrow:Boolean;// = false
private var key1:Boolean;// = false
private var key2:Boolean;// = false
private var key3:Boolean;// = false
private var key4:Boolean;// = false
private var pressTime:Number;// = 0
private var isKeyHold:Boolean;// = false
private var leftArrow:Boolean;// = false
private var lastRepeatTime:Number;// = 0
private var rightArrow:Boolean;// = false
private var tilda:Boolean;// = false
private var enter:Boolean;// = false
private var home:Boolean;// = false
private var e:Boolean;// = false
private var h:Boolean;// = false
private var k:Boolean;// = false
private var m:Boolean;// = false
private var p:Boolean;// = false
private var q:Boolean;// = false
private var o:Boolean;// = false
private static const KEY_REPEAT:int = 0;
private static const KEY_HOLD_TIME:int = 0;
public function KeyHandler(_arg1:Stage){
keyDown = {leftArrow:false, rightArrow:false, upArrow:false, downArrow:false, key1:false, key2:false, key3:false, key4:false, space:false, home:false, enter:false, escape:false, q:false, e:false, o:false, p:false, m:false, h:false, tilda:false};
super();
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
_arg1.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
_arg1.addEventListener(Event.ENTER_FRAME, handleKeys);
}
private function keyUpHandler(_arg1:KeyboardEvent):void{
isKeyHold = false;
if ((((((_arg1.keyCode == 69)) || ((_arg1.keyCode == 35)))) || ((_arg1.keyCode == 48)))){
keyDown["e"] = false;
e = false;
} else {
if ((((((_arg1.keyCode == 81)) || ((_arg1.keyCode == 36)))) || ((_arg1.keyCode == 57)))){
keyDown["q"] = false;
q = false;
} else {
if (_arg1.keyCode == 80){
keyDown["p"] = false;
p = false;
} else {
if (_arg1.keyCode == 79){
keyDown["o"] = false;
o = false;
} else {
if (_arg1.keyCode == 77){
keyDown["m"] = false;
m = false;
} else {
if (_arg1.keyCode == 75){
keyDown["k"] = false;
k = false;
} else {
if (_arg1.keyCode == 72){
keyDown["h"] = false;
h = false;
} else {
if ((((_arg1.keyCode == 37)) || ((_arg1.keyCode == 65)))){
keyDown["leftArrow"] = false;
leftArrow = false;
} else {
if ((((_arg1.keyCode == 39)) || ((_arg1.keyCode == 68)))){
keyDown["rightArrow"] = false;
rightArrow = false;
} else {
if ((((_arg1.keyCode == 38)) || ((_arg1.keyCode == 87)))){
keyDown["upArrow"] = false;
upArrow = false;
} else {
if ((((_arg1.keyCode == 40)) || ((_arg1.keyCode == 83)))){
keyDown["downArrow"] = false;
downArrow = false;
} else {
if ((((_arg1.keyCode == 32)) || ((_arg1.keyCode == 96)))){
keyDown["space"] = false;
space = false;
} else {
if ((((_arg1.keyCode == 46)) || ((_arg1.keyCode == 53)))){
keyDown["del"] = false;
del = false;
} else {
if ((((_arg1.keyCode == 36)) || ((_arg1.keyCode == 54)))){
keyDown["home"] = false;
home = false;
} else {
if (_arg1.keyCode == 13){
keyDown["enter"] = false;
enter = false;
} else {
if (_arg1.keyCode == 27){
keyDown["escape"] = false;
escape = false;
} else {
if (_arg1.keyCode == 192){
keyDown["tilda"] = false;
tilda = false;
} else {
if ((((_arg1.keyCode == 49)) || ((_arg1.keyCode == 97)))){
keyDown["key1"] = false;
key1 = false;
} else {
if ((((_arg1.keyCode == 50)) || ((_arg1.keyCode == 98)))){
keyDown["key2"] = false;
key2 = false;
} else {
if ((((_arg1.keyCode == 51)) || ((_arg1.keyCode == 99)))){
keyDown["key3"] = false;
key3 = false;
} else {
if ((((_arg1.keyCode == 52)) || ((_arg1.keyCode == 100)))){
keyDown["key4"] = false;
key4 = false;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function get isLeftDown():Boolean{
return (((isKeyDown) && (leftArrow)));
}
public function tick(_arg1:Number):void{
}
public function get isUpDown():Boolean{
return (((isKeyDown) && (upArrow)));
}
private function handleKeys(_arg1:Event):void{
isKeyDown = true;
if (((p) && (!(keyDown["p"])))){
keyDown["p"] = true;
Main.mm.esc();
};
if (((o) && (!(keyDown["o"])))){
keyDown["o"] = true;
if (Main.mm.state == Navigator.GAME){
Main.mm.hero.weaponManager.freezeUnFreeze();
};
};
if (Main.BUILD == Main.HACKS){
if (((m) && (!(keyDown["m"])))){
keyDown["m"] = true;
if (Main.mm.state == Navigator.GAME){
Main.mm.hero.weaponManager.demoMode();
};
};
if (((k) && (!(keyDown["k"])))){
keyDown["k"] = true;
if (Main.mm.state == Navigator.GAME){
Main.mm.currentMap.skipMap();
};
};
if (((h) && (!(keyDown["h"])))){
keyDown["h"] = true;
if (Main.mm.state == Navigator.GAME){
Main.mm.hero.heal(100);
};
};
if (((del) && (!(keyDown["del"])))){
if (Main.mm.state == Navigator.GAME){
keyDown["del"] = true;
};
Main.mm.appocalipso();
};
if (((home) && (!(keyDown["home"])))){
if (Main.mm.state == Navigator.GAME){
keyDown["home"] = true;
};
Main.mm.currentMap.skipMap();
};
};
if (((e) && (!(keyDown["e"])))){
keyDown["e"] = true;
if (Main.mm.state == Navigator.GAME){
Main.mm.hero.weaponManager.nextWeapon();
};
};
if (((q) && (!(keyDown["q"])))){
keyDown["q"] = true;
if (Main.mm.state == Navigator.GAME){
Main.mm.hero.weaponManager.prevWeapon();
};
};
if (((rightArrow) && (!(keyDown["rightArrow"])))){
if (Main.mm.state == Navigator.GAME){
keyDown["rightArrow"] = true;
keyDown["leftArrow"] = false;
leftArrow = false;
};
};
if (((leftArrow) && (!(keyDown["leftArrow"])))){
if (Main.mm.state == Navigator.GAME){
keyDown["leftArrow"] = true;
keyDown["rightArrow"] = false;
rightArrow = false;
};
};
if (((upArrow) && (!(keyDown["upArrow"])))){
if (Main.mm.state == Navigator.GAME){
keyDown["upArrow"] = true;
keyDown["downArrow"] = false;
downArrow = false;
};
};
if (((downArrow) && (!(keyDown["downArrow"])))){
if (Main.mm.state == Navigator.GAME){
keyDown["downArrow"] = true;
keyDown["upArrow"] = false;
upArrow = false;
};
};
if (((space) && (!(keyDown["space"])))){
if (Main.mm.state == Navigator.GAME){
keyDown["space"] = true;
};
Main.mm.goLevelUp();
};
if (((escape) && (!(keyDown["escape"])))){
keyDown["escape"] = true;
Main.mm.esc();
};
if (((tilda) && (!(keyDown["tilda"])))){
keyDown["tilda"] = true;
};
if (((enter) && (!(keyDown["enter"])))){
keyDown["enter"] = true;
};
if (((key1) && (!(keyDown["key1"])))){
keyDown["key1"] = true;
};
if (((key2) && (!(keyDown["key2"])))){
keyDown["key2"] = true;
};
if (((key3) && (!(keyDown["key3"])))){
keyDown["key3"] = true;
};
if (((key4) && (!(keyDown["key4"])))){
keyDown["key4"] = true;
};
}
public function get isDownDown():Boolean{
return (((isKeyDown) && (downArrow)));
}
public function get arrowPressed():Boolean{
return (((isKeyDown) && (((((((rightArrow) || (leftArrow))) || (upArrow))) || (downArrow)))));
}
public function get isRightDown():Boolean{
return (((isKeyDown) && (rightArrow)));
}
public function keyDownHandler(_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == 37)) || ((_arg1.keyCode == 65)))){
leftArrow = true;
} else {
if ((((_arg1.keyCode == 39)) || ((_arg1.keyCode == 68)))){
rightArrow = true;
} else {
if ((((_arg1.keyCode == 38)) || ((_arg1.keyCode == 87)))){
upArrow = true;
} else {
if ((((_arg1.keyCode == 40)) || ((_arg1.keyCode == 83)))){
downArrow = true;
} else {
if ((((((_arg1.keyCode == 81)) || ((_arg1.keyCode == 36)))) || ((_arg1.keyCode == 57)))){
q = true;
} else {
if ((((((_arg1.keyCode == 69)) || ((_arg1.keyCode == 35)))) || ((_arg1.keyCode == 48)))){
e = true;
} else {
if (_arg1.keyCode == 80){
p = true;
} else {
if (_arg1.keyCode == 79){
o = true;
} else {
if ((((_arg1.keyCode == 32)) || ((_arg1.keyCode == 96)))){
space = true;
} else {
if (_arg1.keyCode == 77){
m = true;
} else {
if (_arg1.keyCode == 75){
k = true;
} else {
if (_arg1.keyCode == 72){
h = true;
} else {
if ((((_arg1.keyCode == 46)) || ((_arg1.keyCode == 53)))){
del = true;
} else {
if ((((_arg1.keyCode == 36)) || ((_arg1.keyCode == 54)))){
home = true;
} else {
if (_arg1.keyCode == 13){
enter = true;
} else {
if (_arg1.keyCode == 27){
escape = true;
} else {
if (_arg1.keyCode == 192){
tilda = true;
} else {
if ((((_arg1.keyCode == 49)) || ((_arg1.keyCode == 97)))){
key1 = true;
} else {
if ((((_arg1.keyCode == 50)) || ((_arg1.keyCode == 98)))){
key2 = true;
} else {
if ((((_arg1.keyCode == 51)) || ((_arg1.keyCode == 99)))){
key3 = true;
} else {
if ((((_arg1.keyCode == 52)) || ((_arg1.keyCode == 100)))){
key4 = true;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
}
}//package main
Section 39
//Locker (main.Locker)
package main {
import flash.display.*;
public class Locker {
private var _stage:Stage;
private static const lk:String = "prrqpdqd1frp";
public function Locker(_arg1:Stage){
_stage = _arg1;
}
private function de(_arg1:String):String{
var _local4:String;
var _local5:Number;
var _local2 = "";
var _local3:int;
while (_local3 < _arg1.length) {
_local4 = _arg1.substring(_local3, (_local3 + 1));
_local5 = _local4.charCodeAt();
_local2 = (_local2 + String.fromCharCode((_local5 - 3)));
_local3++;
};
return (_local2);
}
public function u():Boolean{
var _local1:Array = new Array();
_local1.push(de(lk));
var _local2:String = _stage.loaderInfo.url;
var _local3:Number = (_local2.indexOf("://") + 3);
var _local4:Number = _local2.indexOf("/", _local3);
var _local5:String = _local2.substring(_local3, _local4);
var _local6:Number = (_local5.lastIndexOf(".") - 1);
var _local7:Number = (_local5.lastIndexOf(".", _local6) + 1);
_local5 = _local5.substring(_local7, _local5.length);
trace(("domain -" + _local5));
trace(("us[i]: " + _local1[0]));
var _local8:int;
while (_local8 < _local1.length) {
if (_local5 == _local1[_local8]){
trace("valid");
return (true);
};
_local8++;
};
trace("invalid");
return (false);
}
public function isURL(_arg1:String):Boolean{
var _local2:String = _stage.loaderInfo.url;
var _local3:Number = (_local2.indexOf("://") + 3);
var _local4:Number = _local2.indexOf("/", _local3);
var _local5:String = _local2.substring(_local3, _local4);
var _local6:Number = (_local5.lastIndexOf(".") - 1);
var _local7:Number = (_local5.lastIndexOf(".", _local6) + 1);
_local5 = _local5.substring(_local7, _local5.length);
if (_local5 == _arg1){
return (true);
};
return (false);
}
private function checkDependecies():Boolean{
return ((String.fromCharCode(119) == String.fromCharCode(String.fromCharCode(119).charCodeAt())));
}
public static function isAdAllowed(_arg1:Stage):Boolean{
var _local2:String = _arg1.loaderInfo.url;
if ((((_local2.indexOf("kongregate") >= 0)) || ((_local2.indexOf("freeonlinegames.com") >= 0)))){
return (false);
};
return (true);
}
public static function isArmorGames(_arg1:Stage):Boolean{
var _local2:String = _arg1.loaderInfo.url;
if (_local2.indexOf("armorgames.com") >= 0){
return (true);
};
return (false);
}
}
}//package main
Section 40
//Main (main.Main)
package main {
import flash.display.*;
import flash.events.*;
import com.moonmana.bundles.*;
import mochi.*;
import com.moonmana.mmad.*;
import com.moonmana.*;
import utils.*;
import com.moonmana.splash.utils.*;
import utils.events.*;
import com.moonmana.sponsors.AG.*;
import com.moonmana.sponsors.MoFunZone.*;
import com.moonmana.splash.mc.*;
import com.moonmana.sponsors.*;
import com.moonmana.splash.*;
import flash.utils.*;
public dynamic class Main extends MovieClip {
private var currentTime:Number;// = 0
private var lastTimeMS:Number;
private var t:int;
public var spark:Spark;
public static const CPM:int = 0;
public static const ARMOR_GAMES:int = 0;
public static const SCREEN_WIDTH:int = 640;
public static const MOFUNZONE:int = 2;
public static const MS:Number = 20;
public static const MOCHI:int = 1;
public static const AD_BUILD:int = 1;
public static const VERSION:String = "v.1.00";
public static const BUILD:int = 1;
public static const ELITE_GAMES:int = 5;
public static const ANDKON:int = 4;
public static const SCREEN_HEIGHT:int = 480;
public static const HACKS:int = 3;
public static const SECOND:int = 1000;
public static const OTHER:int = 1;
private static var _navi:Navigator;
private static var _mms:Splash;
public static var killsAchieved:Boolean = false;
public static var debug:Boolean = false;
private static var _options:Options = new Options();
public static var fps:Boolean = false;
private static var preloader:Preloader;
private static var _kh:KeyHandler;
private static var _stage:Stage;
public function Main(){
lastTimeMS = getTimer();
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
var _local1:MenuChanger = new MenuChanger(this);
preloader = (getChildByName("preloader") as Preloader);
_stage = stage;
preloader.stage = stage;
preloader.addEventListener(Event.ENTER_FRAME, preloader.update);
preloader.addEventListener(StageEvent.LOADING_FINISHED, run);
addEventListener(Event.ADDED_TO_STAGE, mochi);
}
private function mochi(_arg1:Event):void{
Ad.show(this, 170, 59);
if (BUILD != ARMOR_GAMES){
MochiBot.track(this, "6748dd82");
};
MochiServices.connect("3785120d6024b890", root);
removeEventListener(Event.ADDED_TO_STAGE, mochi);
}
private function tick(_arg1:Event):void{
currentTime = getTimer();
if (currentTime >= (lastTimeMS + MS)){
lastTimeMS = currentTime;
_navi.tick(currentTime);
_kh.tick(currentTime);
};
}
function frame2(){
stop();
}
private function goMenu(_arg1:Event=null):void{
var _local3:MoFunZoneMain;
if (((!((BUILD == ANDKON))) && (!((BUILD == ELITE_GAMES))))){
_mms.removeEventListener(MMEvent.END, goMenu);
stage.removeChild(_mms);
_mms = null;
};
var _local2:Locker = new Locker(stage);
if ((((BUILD == ARMOR_GAMES)) && (!(Locker.isArmorGames(stage))))){
gotoAndStop(5);
return;
};
if ((((BUILD == HACKS)) && (!(_local2.isURL("arcadeprehacks.com"))))){
gotoAndStop(4);
return;
};
if ((((BUILD == MOFUNZONE)) && (!(_local2.isURL("mofunzone.com"))))){
gotoAndStop(4);
return;
};
if ((((BUILD == ELITE_GAMES)) && (!(_local2.isURL("elite-games.net"))))){
gotoAndStop(4);
return;
};
if ((((BUILD == ANDKON)) && (!(_local2.isURL("andkon.com"))))){
gotoAndStop(4);
return;
};
if (BUILD == OTHER){
};
if (BUILD == MOFUNZONE){
_local3 = new MoFunZoneMain(stage);
};
addEventListener(Event.ENTER_FRAME, tick);
_kh = new KeyHandler(stage);
_navi = new Navigator(stage);
}
private function run(_arg1:Event=null):void{
preloader.removeEventListener(StageEvent.LOADING_FINISHED, run);
(preloader.getChildByName("playButton") as SimpleButton).addEventListener(MouseEvent.CLICK, start);
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
public function start(_arg1:Event):void{
Ad.remove();
(preloader.getChildByName("playButton") as SimpleButton).removeEventListener(MouseEvent.CLICK, start);
removeChild(preloader);
preloader = null;
gotoAndStop(3);
SoundManager.loadSounds();
if (((!((BUILD == ANDKON))) && (!((BUILD == ELITE_GAMES))))){
if (BUILD == ARMOR_GAMES){
_mms = new ArmorGamesMC();
} else {
if (BUILD == MOFUNZONE){
_mms = new MoFunZoneSplash();
} else {
_mms = new MoonManaSplash();
};
};
_mms.x = 320;
_mms.y = 240;
stage.addChild(_mms);
_mms.addEventListener(MMEvent.END, goMenu);
} else {
goMenu();
};
}
function frame1(){
stop();
}
public static function get bundle():Bundle{
return (_options.bundle);
}
public static function get stage():Stage{
return (_stage);
}
public static function get options():Options{
return (_options);
}
public static function get mm():Navigator{
return (_navi);
}
public static function get kh():KeyHandler{
return (_kh);
}
}
}//package main
Section 41
//Navigator (main.Navigator)
package main {
import flash.display.*;
import flash.events.*;
import map.units.hero.*;
import map.*;
import map.units.unit.*;
import map.ui.*;
import mochi.*;
import map.ui.levelUp.*;
import ui.menus.*;
import map.ui.titles.*;
import cinematics.*;
import utils.debug.*;
import map.ui.stats.*;
import ui.cursors.*;
import com.moonmana.mmad.*;
import flash.ui.*;
import utils.*;
import map.maps.*;
import map.maps.planet1.*;
import com.moonmana.sponsors.AG.*;
import flash.net.*;
import flash.utils.*;
public class Navigator {
private var _badabom:Badabom;
private var _stage:Stage;
private var _mouseHide:Boolean;// = false
private var _state:int;// = 1
private var _isLevelComplete:Boolean;// = false
private var _mainMenu:MainMenu;
private var _mapMask:MapMask;
private var _fps:FPSBox;
private var _escMenu:EscMenu;
private var _ui:MapUI;
private var _currentMap:Map;
private var _statistics:StatisticsUI;
private var _levelStartTime:int;// = 0
private var _episodeTitleStartTime:int;// = 0
private var _hero:Hero;
private var _levelComplete:LevelCompleteUI;
private var _perkMenuUI:PerkMenuUI;
private var _intro:Intro;
private var _cursor:CursorAttack;
private var _episodeTitle:EpisodeTitle;
public static const STATISTICS:int = 2;
public static const MAIN_MENU:int = 5;
public static const ESC_MENU:int = 0;
private static const MOUSE_HIDE_TIME:int = 3000;
public static const GAME:int = 1;
private static const BORDER:int = 50;
public static const EPISODE_TITLE:int = 4;
public static const LEVEL_UP:int = 3;
public function Navigator(_arg1:Stage){
_levelComplete = new LevelCompleteUI();
_mapMask = new MapMask();
_cursor = new CursorAttack();
super();
_stage = _arg1;
if (Main.fps){
_fps = new FPSBox();
_fps.x = 380;
_fps.y = (Main.SCREEN_HEIGHT - 20);
};
_mainMenu = new MainMenu(this);
_mainMenu.go();
_state = MAIN_MENU;
}
public function get hero():Hero{
return (_currentMap.hero);
}
private function mouseHide():void{
Mouse.hide();
_mouseHide = false;
_levelStartTime = 0;
}
public function isSaved():Boolean{
var _local1:SharedObject = SharedObject.getLocal("game_data");
if (_local1.data.map == undefined){
return (false);
};
return (true);
}
public function esc(_arg1:Event=null):void{
if (_state == ESC_MENU){
_state = GAME;
unpause();
_escMenu.close();
_escMenu = null;
addUIButtonsEventListeners();
deprepareButtons();
_stage.focus = null;
Mouse.hide();
_stage.addChild(_cursor);
} else {
if (_state == GAME){
goEscMenu();
} else {
if (_state == LEVEL_UP){
closeLevelUp();
};
};
};
}
private function goRestart(_arg1:MouseEvent):void{
cleanStatisticsState();
_currentMap = _currentMap.getNewMap();
_hero.load();
startOver();
}
public function get state():int{
return (_state);
}
public function load():void{
var _local1:SharedObject = SharedObject.getLocal("game_data");
_currentMap = MapLoader.getMapById(_stage, _ui, _local1.data.map);
_hero = new Hero(_stage, _ui);
_hero.load();
_hero.addEventListener(UnitEvent.REALLY_DEAD, goStatistics);
}
public function goMainMenuEsc(_arg1:Event=null):void{
_escMenu.close();
_escMenu = null;
goMainMenu();
}
private function mouseMove(_arg1:MouseEvent=null):void{
_cursor.x = _stage.mouseX;
_cursor.y = _stage.mouseY;
}
public function tick(_arg1:Number):void{
if ((((((_state == ESC_MENU)) || ((_state == GAME)))) || ((_state == LEVEL_UP)))){
mouseMove();
};
if (_state == GAME){
_currentMap.tick(_arg1);
if (((!(_mouseHide)) && ((_arg1 >= (_levelStartTime + MOUSE_HIDE_TIME))))){
_mouseHide = true;
Mouse.hide();
};
};
if (_state == GAME){
if ((((_currentMap.state == Map.LEVEL_COMPLETE)) && (!(_isLevelComplete)))){
_levelComplete.place();
_stage.addChild(_levelComplete);
_isLevelComplete = true;
} else {
if ((((_currentMap.state == Map.LEVEL_COMPLETE)) && ((_arg1 >= (_currentMap.finishTime + _currentMap.levelCompleteTime))))){
if (!_hero.dead){
_hero.save();
save();
};
goStatistics();
};
};
};
if ((((_state == EPISODE_TITLE)) && ((_arg1 > (_episodeTitleStartTime + EpisodeTitle.DELAY))))){
cleanEpisodeTitle();
startOver();
};
}
private function cleanEpisodeTitle():void{
_stage.removeChild(_episodeTitle);
_episodeTitle = null;
}
public function save():void{
if (_currentMap.nextId == 0){
return;
};
var _local1:SharedObject = SharedObject.getLocal("game_data");
_local1.data.map = _currentMap.nextId;
_local1.flush();
}
public function get stage():Stage{
return (_stage);
}
public function set state(_arg1:int):void{
_state = _arg1;
}
private function get isLevelUpAvailable():Boolean{
return ((_hero.expManager.perkPoints > 0));
}
private function goEpisodeTitle():void{
_state = EPISODE_TITLE;
_episodeTitleStartTime = getTimer();
_episodeTitle = _currentMap.episodeTitle;
_stage.addChild(_episodeTitle);
}
private function closeLevelUp(_arg1:MouseEvent=null):void{
addUIButtonsEventListeners();
deprepareButtons();
_stage.removeChild(_perkMenuUI);
_perkMenuUI.acceptButton.removeEventListener(MouseEvent.CLICK, closeLevelUp);
_perkMenuUI = null;
_state = GAME;
_currentMap.unpause();
_stage.addChild(_cursor);
Mouse.hide();
_stage.focus = null;
if (isLevelUpAvailable){
_ui.showLevelUpButton();
};
}
private function goStatistics(_arg1:Event=null):void{
var e = _arg1;
SoundManager.stopMusic();
_currentMap.clean();
_state = STATISTICS;
try {
_stage.removeChild(_levelComplete);
} catch(e:Error) {
};
_stage.removeChild(_currentMap);
_stage.removeChild(_ui);
var gameOver:Boolean = _hero.dead;
if (((gameOver) && (isLevelUpAvailable))){
_ui.hideLevelUpButton();
};
var lastMap = (_currentMap.nextId == 0);
_hero.mergeStatistics();
_statistics = new StatisticsUI(_currentMap, gameOver, lastMap);
_statistics.fillStatistics((lastMap) ? _hero.totalStatistics : _hero.statistics);
_stage.addChild(_statistics);
if (!gameOver){
if (lastMap){
_statistics.button.addEventListener(MouseEvent.CLICK, submitScore);
} else {
_statistics.button.addEventListener(MouseEvent.CLICK, goNextLevel);
};
} else {
_statistics.button.addEventListener(MouseEvent.CLICK, goRestart);
};
_statistics.mainMenuButton.addEventListener(MouseEvent.CLICK, goMainMenuFromStatistics);
Ad.show(_statistics.getAdBox(), 0, 0);
try {
_stage.removeChild(_cursor);
} catch(e:Error) {
};
Mouse.show();
Mouse.show();
}
private function cleanStatisticsState():void{
try {
if (_statistics != null){
_stage.removeChild(_statistics);
};
} catch(e:Error) {
};
Ad.remove();
if (!_hero.dead){
_statistics.button.removeEventListener(MouseEvent.CLICK, goNextLevel);
} else {
_statistics.button.removeEventListener(MouseEvent.CLICK, goRestart);
};
_statistics.mainMenuButton.removeEventListener(MouseEvent.CLICK, goMainMenuFromStatistics);
_statistics.clean();
_statistics = null;
}
private function addUIButtonsEventListeners():void{
_ui.levelUpButton.addEventListener(MouseEvent.CLICK, goLevelUp);
_ui.levelUpButton.addEventListener(MouseEvent.MOUSE_OVER, prepareButtons);
_ui.levelUpButton.addEventListener(MouseEvent.MOUSE_OUT, deprepareButtons);
_ui.menuButton.addEventListener(MouseEvent.CLICK, goEscMenu);
_ui.menuButton.addEventListener(MouseEvent.MOUSE_OVER, prepareButtons);
_ui.menuButton.addEventListener(MouseEvent.MOUSE_OUT, deprepareButtons);
if (_currentMap.isTutorialMap){
_ui.tutorialButton.addEventListener(MouseEvent.MOUSE_OVER, prepareButtons);
_ui.tutorialButton.addEventListener(MouseEvent.MOUSE_OUT, deprepareButtons);
};
}
public function newGame(_arg1:Event=null):void{
_intro.removeEventListener(UnitEvent.DEAD, newGame);
_intro.close();
_intro = null;
_ui = new MapUI();
_currentMap = new Map1_0(_stage, _ui);
prepareUI();
_hero = new Hero(_stage, _ui);
_hero.addEventListener(UnitEvent.REALLY_DEAD, goStatistics);
_hero.save();
_hero.addEventListener(UnitEvent.LEVEL_UP, _currentMap.showLevelUpTip);
goEpisodeTitle();
}
public function goLevelUp(_arg1:MouseEvent=null):void{
var e = _arg1;
if (((!((_state == GAME))) || (_hero.dead))){
return;
};
Mouse.show();
try {
_stage.removeChild(_cursor);
} catch(e:Error) {
};
if (((!(isLevelUpAvailable)) || ((_state == STATISTICS)))){
return;
};
_ui.hideLevelUpButton();
removeUIButtonsEventListeners();
_perkMenuUI = new PerkMenuUI(_stage, _hero.perkManager, _hero.expManager);
_stage.addChild(_perkMenuUI);
_perkMenuUI.place();
_perkMenuUI.prepare();
_perkMenuUI.acceptButton.addEventListener(MouseEvent.CLICK, closeLevelUp);
_perkMenuUI.goAvailable();
pause();
_state = LEVEL_UP;
}
private function deprepareButtons(_arg1:MouseEvent=null):void{
Mouse.hide();
_stage.addChild(_cursor);
_hero.addEventListeners();
}
private function addMapChilds():void{
_stage.addChild(_currentMap);
_stage.addChild(_ui);
if (Main.fps){
_stage.addChild(_fps);
};
_stage.addChild(_mapMask);
_mapMask.place();
_currentMap.mask = _mapMask;
_stage.addChild(_cursor);
mouseHide();
}
private function goBadabom():void{
_badabom = new Badabom(this);
_badabom.go();
_badabom.addEventListener(UnitEvent.DEAD, goNextLevel);
}
public function get currentMap():Map{
return (_currentMap);
}
public function goMainMenu(_arg1:Event=null):void{
var e = _arg1;
try {
_stage.removeChild(_currentMap);
} catch(e:Error) {
};
try {
_stage.removeChild(_ui);
} catch(e:Error) {
};
removeUIButtonsEventListeners();
_ui = null;
_hero.removeEventListener(UnitEvent.REALLY_DEAD, goStatistics);
_hero.removeEventListeners();
_hero = null;
_currentMap = null;
_state = MAIN_MENU;
_mainMenu = new MainMenu(this);
_mainMenu.go();
}
public function goMainMenuFromStatistics(_arg1:Event=null):void{
cleanStatisticsState();
goMainMenu();
}
private function goNextLevel(_arg1:Event):void{
if (_statistics != null){
cleanStatisticsState();
};
if ((_currentMap is Map1_0)){
(_currentMap as Map1_0).cleanTips();
};
if (_currentMap.nextId == 41){
if (_badabom == null){
goBadabom();
return;
};
_badabom.close();
_badabom = null;
};
_stage.focus = null;
_currentMap = _currentMap.getNextMap();
prepareUI();
goEpisodeTitle();
}
private function startOver():void{
SoundManager.playMusic();
_hero.reset();
_hero.addEventListeners();
_hero.expManager.showLevelUp();
if ((_currentMap is Map1_0)){
_hero.addEventListener(UnitEvent.LEVEL_UP, _currentMap.showLevelUpTip);
};
_currentMap.placeHero(_hero);
_state = GAME;
_isLevelComplete = false;
addMapChilds();
_stage.focus = null;
}
public function clean():void{
_hero.removeEventListener(UnitEvent.REALLY_DEAD, goStatistics);
}
private function prepareUI():void{
_ui.place();
addUIButtonsEventListeners();
}
private function submitScore(_arg1:MouseEvent):void{
if (Main.BUILD == Main.ARMOR_GAMES){
AGScores.send(_statistics, _hero.finalScore, goMainMenuFromStatistics);
} else {
if (Main.BUILD == Main.MOFUNZONE){
} else {
_stage.removeChild(_statistics);
MochiScores.showLeaderboard({boardID:"dcfc886f78167630", score:((Main.BUILD == Main.HACKS)) ? 0 : _hero.finalScore, onClose:goMainMenuFromStatistics});
};
};
}
public function appocalipso(_arg1:Event=null):void{
_currentMap.appocalipso();
}
public function goIntro(_arg1:Event=null):void{
_mainMenu.close();
_mainMenu = null;
_intro = new Intro(this);
_intro.go();
_intro.addEventListener(UnitEvent.DEAD, newGame);
}
public function goEscMenu(_arg1:Event=null):void{
pause();
_escMenu = new EscMenu(this);
_escMenu.go();
prepareButtons();
removeUIButtonsEventListeners();
_state = ESC_MENU;
}
private function removeUIButtonsEventListeners():void{
_ui.levelUpButton.removeEventListener(MouseEvent.CLICK, goLevelUp);
_ui.levelUpButton.removeEventListener(MouseEvent.MOUSE_OVER, prepareButtons);
_ui.levelUpButton.removeEventListener(MouseEvent.MOUSE_OUT, deprepareButtons);
_ui.menuButton.removeEventListener(MouseEvent.CLICK, goEscMenu);
_ui.menuButton.removeEventListener(MouseEvent.MOUSE_OVER, prepareButtons);
_ui.menuButton.removeEventListener(MouseEvent.MOUSE_OUT, deprepareButtons);
if (_currentMap.isTutorialMap){
_ui.tutorialButton.removeEventListener(MouseEvent.MOUSE_OVER, prepareButtons);
_ui.tutorialButton.removeEventListener(MouseEvent.MOUSE_OUT, deprepareButtons);
};
}
private function pause():void{
_currentMap.pause();
removeUIButtonsEventListeners();
}
public function loadGame(_arg1:Event=null):void{
if (!isSaved()){
return;
};
_mainMenu.close();
_mainMenu = null;
_ui = new MapUI();
load();
prepareUI();
goEpisodeTitle();
}
private function prepareButtons(_arg1:MouseEvent=null):void{
var e = _arg1;
Mouse.show();
try {
_stage.removeChild(_cursor);
} catch(e:Error) {
};
_hero.removeEventListeners();
}
private function unpause():void{
_currentMap.unpause();
addUIButtonsEventListeners();
}
}
}//package main
Section 42
//Options (main.Options)
package main {
import com.moonmana.bundles.*;
import utils.*;
public class Options {
private var _bundle:Bundle;
private var _effects:Boolean;// = true
private var _music:Boolean;// = true
private var _showTips:Boolean;// = true
private var _language:int;// = 0
public static const LANGUAGE_DE:int = 6;
public static const LANGUAGE_RU:int = 1;
public static const LANGUAGE_EN:int = 2;
public static const LANGUAGE_IT:int = 4;
public static const LANGUAGE_BR:int = 5;
public static const LANGUAGE_DU:int = 3;
private static var bundleManager:BundleManager = new BundleManager();
public function Options(){
_language = LANGUAGE_EN;
_bundle = bundleManager.getEn();
}
public function get bundle():Bundle{
return (_bundle);
}
public function get music():Boolean{
return (_music);
}
public function switchShowTips():void{
_showTips = !(_showTips);
}
public function set showTips(_arg1:Boolean):void{
_showTips = _arg1;
}
public function switchMusic():void{
_music = !(_music);
if (!_music){
SoundManager.stopMusic();
} else {
SoundManager.playMusic();
};
}
public function setLanguage(_arg1:int):void{
if (_language != _arg1){
_language = _arg1;
switch (_language){
case LANGUAGE_BR:
_bundle = bundleManager.getBr();
break;
case LANGUAGE_IT:
_bundle = bundleManager.getIt();
break;
case LANGUAGE_RU:
_bundle = bundleManager.getRu();
break;
case LANGUAGE_DU:
_bundle = bundleManager.getDu();
break;
case LANGUAGE_EN:
_bundle = bundleManager.getEn();
break;
case LANGUAGE_DE:
_bundle = bundleManager.getDe();
break;
};
};
}
public function switchEffects():void{
_effects = !(_effects);
}
public function get effects():Boolean{
return (_effects);
}
public function get showTips():Boolean{
return (_showTips);
}
}
}//package main
Section 43
//Preloader (main.Preloader)
package main {
import flash.display.*;
import flash.events.*;
import com.moonmana.ui.*;
import com.moonmana.mmad.*;
import utils.events.*;
public dynamic class Preloader extends ScreenObject {
public var preee:MovieClip;
public var playButton:SimpleButton;
public var adBox:AdsContainer;
private var _stage:Stage;
public function Preloader(){
addFrameScript(114, frame115);
super(0, 0);
}
public function update(_arg1:Event):void{
var _local2:Number = _stage.loaderInfo.bytesLoaded;
var _local3:Number = _stage.loaderInfo.bytesTotal;
var _local4:Number = 0;
if (_local3 > 0){
_local4 = Math.floor(((_local2 / _local3) * 100));
};
gotoAndStop((_local4 + 1));
if ((((_local2 == _local3)) || ((_local3 == 0)))){
removeEventListener(Event.ENTER_FRAME, update);
dispatchEvent(new StageEvent(StageEvent.LOADING_FINISHED));
gotoAndPlay(101);
};
}
function frame115(){
stop();
}
public function getAdBox():MovieClip{
return ((getChildByName("adBox") as MovieClip));
}
public function set stage(_arg1:Stage):void{
_stage = _arg1;
}
}
}//package main
Section 44
//Condition (map.conditions.Condition)
package map.conditions {
public class Condition {
public function done():Boolean{
return (false);
}
}
}//package map.conditions
Section 45
//ConditionsManager (map.conditions.ConditionsManager)
package map.conditions {
public class ConditionsManager {
private var _conditions:Array;
public function ConditionsManager(){
_conditions = new Array();
super();
}
public function done():Boolean{
var _local1:Boolean;
var _local2:int;
while (_local2 < _conditions.length) {
_local1 = ((_local1) || ((_conditions[_local2] as Condition).done()));
_local2++;
};
return (_local1);
}
public function push(_arg1:Condition):void{
_conditions.push(_arg1);
}
}
}//package map.conditions
Section 46
//KillemAllCondition (map.conditions.KillemAllCondition)
package map.conditions {
import map.spawn.*;
public class KillemAllCondition extends Condition {
private var _spawnManager:SpawnManager;
public function KillemAllCondition(_arg1:SpawnManager){
_spawnManager = _arg1;
}
override public function done():Boolean{
return (_spawnManager.complete);
}
}
}//package map.conditions
Section 47
//PlantBombsCondition (map.conditions.PlantBombsCondition)
package map.conditions {
import map.maps.planet3.*;
public class PlantBombsCondition extends Condition {
private var _bombsManager:BombsManager;
public function PlantBombsCondition(_arg1:BombsManager){
_bombsManager = _arg1;
}
override public function done():Boolean{
return (_bombsManager.complete);
}
}
}//package map.conditions
Section 48
//SkipLevelCondition (map.conditions.SkipLevelCondition)
package map.conditions {
public class SkipLevelCondition extends Condition {
private var _skipped:Boolean;// = false
public function set skipped(_arg1:Boolean):void{
_skipped = _arg1;
}
override public function done():Boolean{
return (_skipped);
}
}
}//package map.conditions
Section 49
//BlackHole (map.items.impl.BlackHole)
package map.items.impl {
import map.units.hero.*;
import map.*;
import map.units.unit.*;
import map.units.utils.*;
import map.items.*;
import flash.utils.*;
public class BlackHole extends DurationItem {
private var _bhe:BlackHoleEffect;
private var _map:Map;
private var _units:Array;
private var _lastTickTime:int;
private static const DRAWNING:int = 4;
private static const DRAWNING_SIZE2:int = 80000;
private static const DESTROY_SIZE2:int = 1400;
private static const TICK:int = 0;
private static const DAMAGE:int = 1;
public function BlackHole(){
_units = new Array();
addFrameScript(59, frame60, 75, frame76);
super(Item.BLACK_HOLE, 10, 12);
}
function frame76(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
private function collapse(_arg1:UnitEvent):void{
_bhe.removeEventListener(UnitEvent.DEAD, collapse);
_map.removeChild(_bhe);
_bhe = null;
}
function frame60(){
gotoAndPlay("lie");
}
public function execute(_arg1:Hero, _arg2:Map):void{
_lastTickTime = getTimer();
_map = _arg2;
_bhe = new BlackHoleEffect();
_bhe.x = _arg1.x;
_bhe.y = _arg1.y;
_map.addChild(_bhe);
}
public function onComplete():void{
var _local1:int;
while (_local1 < _units.length) {
if (_units[_local1].hp == 0){
_units[_local1] = null;
} else {
_units[_local1].paralyzed = false;
};
_local1++;
};
_units = null;
_bhe.gotoAndPlay("collapse");
_bhe.addEventListener(UnitEvent.DEAD, collapse);
}
private function push(_arg1:Unit):void{
var _local2:Boolean;
var _local3:int;
while (_local3 < _units.length) {
if (_units[_local3] == _arg1){
_local2 = true;
break;
};
_local3++;
};
if (!_local2){
_units.push(_arg1);
_arg1.paralyzed = true;
};
}
public function tickHole(_arg1:Number):void{
var _local2:int;
var _local3:Unit;
var _local4:int;
var _local5:Angle;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
if (_arg1 > (_lastTickTime + TICK)){
_lastTickTime = _arg1;
_local2 = 0;
while (_local2 < _map.mobs.units.length) {
_local3 = (_map.mobs.units[_local2] as Unit);
if ((_local3 is BlackHoleImmune)){
} else {
_local4 = MathUtils.distance2(_local3.x, _local3.y, _bhe.x, _bhe.y);
if (_local4 < DRAWNING_SIZE2){
push(_local3);
_local5 = new Angle(_local3.x, _local3.y, _bhe.x, _bhe.y);
_local5.calculateRotation();
_local6 = Math.cos((((_local5.rotation + 90) * Math.PI) / 180));
_local7 = Math.sin((((_local5.rotation + 90) * Math.PI) / 180));
_local8 = (_local6 * DRAWNING);
_local9 = (_local7 * DRAWNING);
_local3.x = (_local3.x + _local8);
_local3.y = (_local3.y + _local9);
if (_local4 < DESTROY_SIZE2){
_local3.causeClearDeath();
_local2--;
};
};
};
_local2++;
};
};
}
}
}//package map.items.impl
Section 50
//BlackHoleEffect (map.items.impl.BlackHoleEffect)
package map.items.impl {
import flash.display.*;
import map.units.unit.*;
public class BlackHoleEffect extends MovieClip {
public function BlackHoleEffect(){
addFrameScript(129, frame130, 140, frame141);
super();
}
function frame141(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame130(){
gotoAndPlay("rotate");
}
}
}//package map.items.impl
Section 51
//BlackHoleImmune (map.items.impl.BlackHoleImmune)
package map.items.impl {
public interface BlackHoleImmune {
}
}//package map.items.impl
Section 52
//DoubleExp (map.items.impl.DoubleExp)
package map.items.impl {
import map.units.unit.*;
import map.items.*;
public class DoubleExp extends DurationItem {
public function DoubleExp(){
addFrameScript(59, frame60, 75, frame76);
super(Item.DOUBLE_EXP, 1, 12);
}
function frame76(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame60(){
gotoAndPlay("lie");
}
}
}//package map.items.impl
Section 53
//ExpPoints (map.items.impl.ExpPoints)
package map.items.impl {
import map.units.hero.*;
import map.units.unit.*;
import map.items.*;
public class ExpPoints extends InstantItem {
private static const EXP:int = 150;
public function ExpPoints(){
addFrameScript(59, frame60, 75, frame76);
super(Item.EXP_POINTS, 1);
}
function frame76(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
override public function execute(_arg1:Hero):void{
_arg1.increaseExperience((EXP * _arg1.level));
}
function frame60(){
gotoAndPlay("lie");
}
}
}//package map.items.impl
Section 54
//Medikit (map.items.impl.Medikit)
package map.items.impl {
import map.units.hero.*;
import map.units.unit.*;
import map.items.*;
public class Medikit extends InstantItem {
private static const HEAL:int = 25;
public function Medikit(){
addFrameScript(59, frame60, 75, frame76);
super(Item.MEDIKIT, 1);
}
function frame76(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
override public function execute(_arg1:Hero):void{
_arg1.heal(((_arg1.maxHp * HEAL) / 100));
}
function frame60(){
gotoAndPlay("lie");
}
}
}//package map.items.impl
Section 55
//MissilePack (map.items.impl.MissilePack)
package map.items.impl {
import map.units.hero.*;
import map.units.unit.*;
import map.items.*;
public class MissilePack extends DurationItem {
public function MissilePack(){
addFrameScript(59, frame60, 75, frame76);
super(Item.MISSILE_PACK, 13, 9);
}
public function onComplete(_arg1:Hero):void{
_arg1.removeMissilePack();
}
function frame76(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame60(){
gotoAndPlay("lie");
}
private function removeBonusWeapon(_arg1:UnitEvent):void{
}
}
}//package map.items.impl
Section 56
//QuadDamage (map.items.impl.QuadDamage)
package map.items.impl {
import map.units.unit.*;
import map.items.*;
public class QuadDamage extends DurationItem {
public function QuadDamage(){
addFrameScript(59, frame60, 75, frame76);
super(Item.QUAD_DAMAGE, 2, 8);
}
function frame76(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame60(){
gotoAndPlay("lie");
}
}
}//package map.items.impl
Section 57
//Shield (map.items.impl.Shield)
package map.items.impl {
import map.units.unit.*;
import map.items.*;
public class Shield extends DurationItem {
public function Shield(){
addFrameScript(59, frame60, 75, frame76);
super(Item.SHIELD, 1, 10);
}
function frame76(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame60(){
gotoAndPlay("lie");
}
}
}//package map.items.impl
Section 58
//ShieldEffect (map.items.impl.ShieldEffect)
package map.items.impl {
import flash.display.*;
public class ShieldEffect extends MovieClip {
}
}//package map.items.impl
Section 59
//SpeedUp (map.items.impl.SpeedUp)
package map.items.impl {
import map.units.unit.*;
import map.items.*;
public class SpeedUp extends DurationItem {
public static const SPEED_UP:Number = 1.3;
public function SpeedUp(){
addFrameScript(59, frame60, 75, frame76);
super(Item.SPEEDUP, 1, 12);
}
function frame76(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame60(){
gotoAndPlay("lie");
}
}
}//package map.items.impl
Section 60
//WeaponPowerUp (map.items.impl.WeaponPowerUp)
package map.items.impl {
import map.units.hero.*;
import map.units.unit.*;
import map.items.*;
public class WeaponPowerUp extends DurationItem {
public static const FIRE_RATE:Number = 1.5;
public static const RELOADING:Number = 1.5;
public function WeaponPowerUp(){
addFrameScript(59, frame60, 75, frame76);
super(Item.WEAPON_POWER_UP, 1, 9);
}
public function onComplete(_arg1:Hero):void{
_arg1.weaponManager.setWeaponPowerUp(false);
}
function frame76(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
public function execute(_arg1:Hero):void{
_arg1.weaponManager.setWeaponPowerUp(true);
}
function frame60(){
gotoAndPlay("lie");
}
}
}//package map.items.impl
Section 61
//BugGunItem (map.items.weapons.BugGunItem)
package map.items.weapons {
import map.weapons.*;
import map.items.*;
public class BugGunItem extends WeaponItem {
public function BugGunItem(){
super(WeaponManager.BUGGUN);
}
}
}//package map.items.weapons
Section 62
//IongunItem (map.items.weapons.IongunItem)
package map.items.weapons {
import map.weapons.*;
import map.items.*;
public class IongunItem extends WeaponItem {
public function IongunItem(){
super(WeaponManager.IONGUN);
}
}
}//package map.items.weapons
Section 63
//IonShotgunItem (map.items.weapons.IonShotgunItem)
package map.items.weapons {
import map.weapons.*;
import map.items.*;
public class IonShotgunItem extends WeaponItem {
public function IonShotgunItem(){
super(WeaponManager.ION_SHOTGUN);
}
}
}//package map.items.weapons
Section 64
//LaserItem (map.items.weapons.LaserItem)
package map.items.weapons {
import map.weapons.*;
import map.items.*;
public class LaserItem extends WeaponItem {
public function LaserItem(){
super(WeaponManager.LASER);
}
}
}//package map.items.weapons
Section 65
//LocustGunItem (map.items.weapons.LocustGunItem)
package map.items.weapons {
import map.weapons.*;
import map.items.*;
public class LocustGunItem extends WeaponItem {
public function LocustGunItem(){
super(WeaponManager.LOCUST_GUN);
}
}
}//package map.items.weapons
Section 66
//MachinegunItem (map.items.weapons.MachinegunItem)
package map.items.weapons {
import map.weapons.*;
import map.items.*;
public class MachinegunItem extends WeaponItem {
public function MachinegunItem(){
super(WeaponManager.MACHINEGUN);
}
}
}//package map.items.weapons
Section 67
//MortarItem (map.items.weapons.MortarItem)
package map.items.weapons {
import map.weapons.*;
import map.items.*;
public class MortarItem extends WeaponItem {
public function MortarItem(){
super(WeaponManager.MORTAR);
}
}
}//package map.items.weapons
Section 68
//PlasmagunItem (map.items.weapons.PlasmagunItem)
package map.items.weapons {
import map.weapons.*;
import map.items.*;
public class PlasmagunItem extends WeaponItem {
public function PlasmagunItem(){
super(WeaponManager.PLASMAGUN);
}
}
}//package map.items.weapons
Section 69
//RailgunItem (map.items.weapons.RailgunItem)
package map.items.weapons {
import map.weapons.*;
import map.items.*;
public class RailgunItem extends WeaponItem {
public function RailgunItem(){
super(WeaponManager.RAILGUN);
}
}
}//package map.items.weapons
Section 70
//RocketLauncherItem (map.items.weapons.RocketLauncherItem)
package map.items.weapons {
import map.weapons.*;
import map.items.*;
public class RocketLauncherItem extends WeaponItem {
public function RocketLauncherItem(){
super(WeaponManager.ROCKET_LAUNCHER);
}
}
}//package map.items.weapons
Section 71
//ShotgunItem (map.items.weapons.ShotgunItem)
package map.items.weapons {
import map.weapons.*;
import map.items.*;
public class ShotgunItem extends WeaponItem {
public function ShotgunItem(){
super(WeaponManager.SHOTGUN);
}
}
}//package map.items.weapons
Section 72
//DurationItem (map.items.DurationItem)
package map.items {
public class DurationItem extends Item {
private var _duration:int;
private var _timeLeft:int;
public function DurationItem(_arg1:int, _arg2:int, _arg3:int){
super(_arg1, _arg2);
_duration = _arg3;
}
public function get duration():int{
return (_duration);
}
public function set timeLeft(_arg1:int):void{
_timeLeft = _arg1;
}
public function get timeLeft():int{
return (_timeLeft);
}
}
}//package map.items
Section 73
//InstantItem (map.items.InstantItem)
package map.items {
import map.units.hero.*;
public class InstantItem extends Item {
public function InstantItem(_arg1:int, _arg2:int){
super(_arg1, _arg2);
}
public function execute(_arg1:Hero):void{
}
}
}//package map.items
Section 74
//Item (map.items.Item)
package map.items {
import flash.display.*;
import map.units.unit.*;
import flash.geom.*;
import flash.utils.*;
public class Item extends MovieClip {
private var _dropped:Boolean;// = false
private var _dropShiftPoint:Point;
private var _taken:Boolean;// = false
private var _dying:Boolean;// = false
private var _type:int;// = 0
private var _dropTime:int;
private var _dropLevel:int;// = 0
public static const BLACK_HOLE:int = 9;
public static const SIZE:int = 800;
private static const DESAPPEAR_TIME:int = 9000;
public static const QUAD_DAMAGE:int = 8;
private static const LIFE_TIME:int = 5000;
public static const SHIELD:int = 2;
public static const EXP_POINTS:int = 7;
public static const DOUBLE_EXP:int = 5;
public static const WEAPON_POWER_UP:int = 4;
public static const MEDIKIT:int = 1;
public static const SPEEDUP:int = 3;
public static const MISSILE_PACK:int = 6;
public function Item(_arg1:int, _arg2:int){
_type = _arg1;
_dropLevel = _arg2;
}
private function die(_arg1:UnitEvent):void{
removeEventListener(UnitEvent.DEAD, die);
dispatchEvent(new UnitEvent(UnitEvent.REALLY_DEAD));
}
public function tick(_arg1:Number):void{
if (((((!(_dropped)) || (_taken))) || (_dying))){
return;
};
if (_arg1 > (_dropTime + DESAPPEAR_TIME)){
gotoAndPlay("die");
_dying = true;
addEventListener(UnitEvent.DEAD, die);
};
}
public function take():void{
_taken = true;
removeEventListener(UnitEvent.DEAD, die);
}
public function set dropShiftPoint(_arg1:Point):void{
_dropShiftPoint = _arg1;
}
public function drop():void{
_dropped = true;
_dropTime = getTimer();
}
public function get dropLevel():int{
return (_dropLevel);
}
public function get type():int{
return (_type);
}
public function get dropShiftPoint():Point{
return (_dropShiftPoint);
}
}
}//package map.items
Section 75
//ItemManager (map.items.ItemManager)
package map.items {
import map.units.hero.*;
import main.*;
import map.perks.impl.*;
import map.items.impl.*;
import flash.utils.*;
public class ItemManager extends HeroManager {
private var _items:Array;
private var _weaponPowerUp:Boolean;// = false
private var _shield:Boolean;// = false
private var _doubleExp:Boolean;// = false
private var _blackHoles:Array;
private var _lastTickTime:Number;
private var _missilePack:MissilePack;
private var _speedup:Boolean;// = false
private var _quadDamage:Boolean;// = false
public function ItemManager(_arg1:Hero){
_items = new Array();
_blackHoles = new Array();
super(_arg1);
_lastTickTime = getTimer();
}
public function get weaponPowerUp():Boolean{
return (_weaponPowerUp);
}
public function get doubleExp():Boolean{
return (_doubleExp);
}
public function put(_arg1:Item):void{
var _local2:Boolean;
var _local3:int;
if ((_arg1 is InstantItem)){
(_arg1 as InstantItem).execute(_hero);
} else {
if ((_arg1 is DurationItem)){
(_arg1 as DurationItem).timeLeft = (((_arg1 as DurationItem).duration * ((_hero.perkManager.bonusWardenPerk.level * BonusWardenPerk.INCREMENT) + 100)) / 100);
};
if (!(_arg1 is BlackHole)){
_local3 = 0;
while (_local3 < _items.length) {
if ((_items[_local3] as Item).type == _arg1.type){
_items[_local3] = _arg1;
_local2 = true;
break;
};
_local3++;
};
};
if (!_local2){
_items.push(_arg1);
switch (_arg1.type){
case Item.SHIELD:
_shield = true;
_hero.shieldOn();
break;
case Item.SPEEDUP:
_speedup = true;
break;
case Item.WEAPON_POWER_UP:
_weaponPowerUp = true;
break;
case Item.DOUBLE_EXP:
_doubleExp = true;
break;
case Item.QUAD_DAMAGE:
_quadDamage = true;
break;
case Item.MISSILE_PACK:
_missilePack = (_arg1 as MissilePack);
_hero.addMissilePack();
break;
};
};
};
if ((_arg1 is WeaponPowerUp)){
(_arg1 as WeaponPowerUp).execute(_hero);
};
if ((_arg1 is BlackHole)){
_blackHoles.push((_arg1 as BlackHole));
(_arg1 as BlackHole).execute(_hero, _map);
};
_hero.ui.getItemsUI().redraw(_items);
}
public function get quadDamage():Boolean{
return (_quadDamage);
}
public function tick(_arg1:Number):void{
var _local3:int;
var _local4:DurationItem;
var _local2:int;
while (_local2 < _blackHoles.length) {
_blackHoles[_local2].tickHole(_arg1);
_local2++;
};
if (_arg1 > (_lastTickTime + Main.SECOND)){
_lastTickTime = getTimer();
_local3 = 0;
while (_local3 < _items.length) {
if ((_items[_local3] is DurationItem)){
_local4 = (_items[_local3] as DurationItem);
_local4.timeLeft--;
if (_local4.timeLeft <= 0){
switch (_local4.type){
case Item.SHIELD:
_shield = false;
_hero.shieldOff();
break;
case Item.SPEEDUP:
_speedup = false;
break;
case Item.WEAPON_POWER_UP:
_weaponPowerUp = false;
(_items[_local3] as WeaponPowerUp).onComplete(_hero);
break;
case Item.DOUBLE_EXP:
_doubleExp = false;
break;
case Item.QUAD_DAMAGE:
_quadDamage = false;
break;
case Item.MISSILE_PACK:
(_items[_local3] as MissilePack).onComplete(_hero);
break;
case Item.BLACK_HOLE:
(_items[_local3] as BlackHole).onComplete();
_local2 = 0;
while (_local2 < _blackHoles.length) {
if (_blackHoles[_local2] == _items[_local3]){
_blackHoles.splice(_local2, 1);
};
_local2++;
};
break;
};
_items.splice(_local3, 1);
_local3--;
};
};
_local3++;
};
_hero.ui.getItemsUI().redraw(_items);
};
}
public function reset():void{
var _local2:DurationItem;
var _local3:int;
var _local1:int;
while (_local1 < _items.length) {
if ((_items[_local1] is DurationItem)){
_local2 = (_items[_local1] as DurationItem);
switch (_local2.type){
case Item.SHIELD:
_shield = false;
_hero.shieldOff();
break;
case Item.SPEEDUP:
_speedup = false;
break;
case Item.WEAPON_POWER_UP:
_weaponPowerUp = false;
(_items[_local1] as WeaponPowerUp).onComplete(_hero);
break;
case Item.DOUBLE_EXP:
_doubleExp = false;
break;
case Item.QUAD_DAMAGE:
_quadDamage = false;
break;
case Item.MISSILE_PACK:
(_items[_local1] as MissilePack).onComplete(_hero);
break;
case Item.BLACK_HOLE:
(_items[_local1] as BlackHole).onComplete();
_local3 = 0;
while (_local3 < _blackHoles.length) {
if (_blackHoles[_local3] == _items[_local1]){
_blackHoles.splice(_local3, 1);
};
_local3++;
};
break;
};
};
_local1++;
};
_items = new Array();
}
public function get speedup():Boolean{
return (_speedup);
}
public function get shield():Boolean{
return (_shield);
}
}
}//package map.items
Section 76
//ItemSpawner (map.items.ItemSpawner)
package map.items {
import flash.events.*;
import map.units.hero.*;
import map.*;
import map.units.unit.*;
import map.perks.impl.*;
import map.perks.*;
import map.items.impl.*;
public class ItemSpawner extends EventDispatcher {
private var _perkManager:PerkManager;
private var _items:Array;
private var _chance:int;// = 12
private var _hero:Hero;
private static const COUNT:int = 9;
public function ItemSpawner(){
_items = new Array();
super();
}
private function get chance():int{
return (((_perkManager.bonusMagnetPerk.level > 0)) ? ((_chance * _perkManager.bonusMagnetPerk.level) * BonusMagnetPerk.MULTIPLIER) : _chance);
}
public function dropItem(_arg1:Item):void{
_arg1.drop();
_items.push(_arg1);
_arg1.gotoAndPlay("lie");
}
public function removeItemAt(_arg1:int):void{
_items.splice(_arg1, 1);
}
private function getRandomItem():Item{
var _local1:Item;
var _local3:int;
var _local2 = ((Math.random() * 100) < chance);
if (_local2){
while ((((_local1 == null)) || ((_local1.dropLevel > _hero.level)))) {
_local3 = Math.floor((1 + (Math.random() * COUNT)));
switch (_local3){
case Item.BLACK_HOLE:
_local1 = new BlackHole();
break;
case Item.DOUBLE_EXP:
_local1 = new DoubleExp();
break;
case Item.EXP_POINTS:
_local1 = new ExpPoints();
break;
case Item.MEDIKIT:
_local1 = new Medikit();
break;
case Item.MISSILE_PACK:
_local1 = new MissilePack();
break;
case Item.QUAD_DAMAGE:
_local1 = new QuadDamage();
break;
case Item.SHIELD:
_local1 = new Shield();
break;
case Item.SPEEDUP:
_local1 = new SpeedUp();
break;
case Item.WEAPON_POWER_UP:
_local1 = new WeaponPowerUp();
break;
};
};
};
return (_local1);
}
public function get items():Array{
return (_items);
}
public function set hero(_arg1:Hero):void{
_perkManager = _arg1.perkManager;
_hero = _arg1;
}
public function removeItem(_arg1:Item):void{
var _local2:int;
while (_local2 < _items.length) {
if (_items[_local2] == _arg1){
_items.splice(_local2, 1);
break;
};
_local2++;
};
}
public function spawn(_arg1:Unit, _arg2:Map):void{
var _local3:Item;
if (_arg1.dropItem != null){
_local3 = _arg1.dropItem;
} else {
_local3 = getRandomItem();
};
if (_local3 != null){
dropItem(_local3);
_local3.x = (_arg1.x + ((_local3.dropShiftPoint == null)) ? 0 : _local3.dropShiftPoint.x);
_local3.y = (_arg1.y + ((_local3.dropShiftPoint == null)) ? 0 : _local3.dropShiftPoint.y);
_arg2.addChildAt(_local3, 2);
_local3.addEventListener(UnitEvent.REALLY_DEAD, _arg2.removeItem);
};
}
public function tick(_arg1:Number):void{
var _local2:int;
while (_local2 < _items.length) {
(_items[_local2] as Item).tick(_arg1);
_local2++;
};
}
}
}//package map.items
Section 77
//WeaponItem (map.items.WeaponItem)
package map.items {
import map.units.hero.*;
import map.weapons.*;
import map.weapons.hero.heads.*;
public class WeaponItem extends InstantItem {
private static const ANGLE:int = 1;
public function WeaponItem(_arg1:int){
super((100 + _arg1), 0);
var _local2:Head = WeaponManager.getWeapon(_arg1).getNewHead();
_local2.name = "head";
addChild(_local2);
}
override public function tick(_arg1:Number):void{
getChildByName("head").rotation = (getChildByName("head").rotation + ANGLE);
}
override public function execute(_arg1:Hero):void{
_arg1.weaponManager.pickWeapon((type - 100));
}
}
}//package map.items
Section 78
//Bugs7SW (map.maps.planet1.Bugs7SW)
package map.maps.planet1 {
import map.*;
import map.spawn.*;
import map.units.planet1.*;
public class Bugs7SW extends SpawnWave {
private static const COUNT:int = 7;
public function Bugs7SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new Bug(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet1
Section 79
//DesertMap (map.maps.planet1.DesertMap)
package map.maps.planet1 {
import flash.display.*;
import map.*;
import map.ui.*;
import map.ui.titles.*;
public class DesertMap extends Map {
public function DesertMap(_arg1:Stage, _arg2:String, _arg3:MapUI, _arg4:int, _arg5:int, _arg6:int, _arg7:int){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
override public function get underlay():MovieClip{
return (new Episode1Underlay());
}
override public function get episodeTitle():EpisodeTitle{
var _local1:Episode1Title = new Episode1Title();
_local1.title = _title;
return (_local1);
}
}
}//package map.maps.planet1
Section 80
//Firebugs2SW (map.maps.planet1.Firebugs2SW)
package map.maps.planet1 {
import map.*;
import map.spawn.*;
import map.units.planet1.*;
public class Firebugs2SW extends SpawnWave {
private static const COUNT:int = 2;
public function Firebugs2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new FireBug(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet1
Section 81
//FunSpiderAndrey1SW (map.maps.planet1.FunSpiderAndrey1SW)
package map.maps.planet1 {
import map.*;
import map.spawn.*;
import map.units.planet1.*;
public class FunSpiderAndrey1SW extends SpawnWave {
private static const COUNT:int = 1;
public function FunSpiderAndrey1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new FunSpiderAndrey(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet1
Section 82
//FunSpiderMe1SW (map.maps.planet1.FunSpiderMe1SW)
package map.maps.planet1 {
import map.*;
import map.spawn.*;
import map.units.planet1.*;
public class FunSpiderMe1SW extends SpawnWave {
private static const COUNT:int = 1;
public function FunSpiderMe1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new FunSpiderMe(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet1
Section 83
//GiantDesertSpiders1SW (map.maps.planet1.GiantDesertSpiders1SW)
package map.maps.planet1 {
import map.*;
import map.spawn.*;
import map.units.planet1.*;
public class GiantDesertSpiders1SW extends SpawnWave {
private static const COUNT:int = 1;
public function GiantDesertSpiders1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new GiantDesertSpider(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet1
Section 84
//GiantGreenSpiders1SW (map.maps.planet1.GiantGreenSpiders1SW)
package map.maps.planet1 {
import map.*;
import map.spawn.*;
import map.units.planet1.*;
public class GiantGreenSpiders1SW extends SpawnWave {
private static const COUNT:int = 1;
public function GiantGreenSpiders1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new GiantGreenSpider(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet1
Section 85
//LocustgunMantisSW (map.maps.planet1.LocustgunMantisSW)
package map.maps.planet1 {
import map.*;
import map.spawn.*;
import map.units.planet1.*;
import map.items.weapons.*;
public class LocustgunMantisSW extends SpawnWave {
private static const COUNT:int = 1;
public function LocustgunMantisSW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local2:Mantis;
var _local1:int;
while (_local1 < count) {
_local2 = new Mantis(4);
_local2.dropItem = new LocustGunItem();
spawns.push(new Spawn(_map, _local2, Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet1
Section 86
//MachinegunSpiderSW (map.maps.planet1.MachinegunSpiderSW)
package map.maps.planet1 {
import map.*;
import map.spawn.*;
import map.units.planet1.*;
import map.items.weapons.*;
public class MachinegunSpiderSW extends SpawnWave {
private static const COUNT:int = 1;
public function MachinegunSpiderSW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local2:GiantDesertSpider;
var _local1:int;
while (_local1 < count) {
_local2 = new GiantDesertSpider(5);
_local2.dropItem = new MachinegunItem();
spawns.push(new Spawn(_map, _local2, Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet1
Section 87
//Mantis2SW (map.maps.planet1.Mantis2SW)
package map.maps.planet1 {
import map.*;
import map.spawn.*;
import map.units.planet1.*;
public class Mantis2SW extends SpawnWave {
private static const COUNT:int = 2;
public function Mantis2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new Mantis(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet1
Section 88
//Map1_0 (map.maps.planet1.Map1_0)
package map.maps.planet1 {
import flash.display.*;
import map.*;
import map.units.unit.*;
import map.tutorial.*;
import main.*;
import map.ui.*;
public class Map1_0 extends DesertMap {
private var _levelUpTip:TutorialTip;
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_0");
public function Map1_0(_arg1:Stage, _arg2:MapUI){
_isTutorialMap = true;
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new TutorialSpider1SW(this, 13));
_local3.push(new TutorialSpider1SW(this, 8));
_local3.push(new TutorialSpider1SW(this, 10));
_local3.push(new PowerUpTutorialSpider3SW(this, 6));
_local3.push(new TutorialSpider1SW(this, 6));
_local3.push(new TutorialSpider1SW(this));
_local3.push(new TutorialSpider1SW(this, 5));
_local3.push(new TutorialSpider1SW(this, 5));
_local3.push(new TutorialSpider1SW(this, 4));
_local3.push(new TutorialSpider1SW(this));
_local3.push(new TutorialSpider1SW(this));
_local3.push(new TutorialSpider1SW(this, 4));
_local3.push(new TutorialSpider1SW(this, 5));
_spawnManager.waves = _local3;
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_1"), 5, 2000));
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_2"), 12));
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_3"), 19));
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_4"), 28));
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_5"), 42));
_levelUpTip = new TutorialTip(_stage, Main.bundle.getString("TIP_6"));
_tutorialManager.addTip(_levelUpTip);
}
public function cleanTips():void{
try {
_hero.removeEventListener(UnitEvent.LEVEL_UP, showLevelUpTip);
} catch(e:Error) {
};
}
override public function getNewMap():Map{
return (new Map1_0(_stage, _ui));
}
public function showLevelUpTip(_arg1:UnitEvent):void{
_hero.removeEventListener(UnitEvent.LEVEL_UP, showLevelUpTip);
_levelUpTip.show();
}
override public function getNextMap():Map{
return (new Map1_1(_stage, _ui));
}
override public function get nextId():int{
return (12);
}
}
}//package map.maps.planet1
Section 89
//Map1_1 (map.maps.planet1.Map1_1)
package map.maps.planet1 {
import flash.display.*;
import map.*;
import main.*;
import map.ui.*;
public class Map1_1 extends DesertMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_1");
public function Map1_1(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new Bugs7SW(this, 5));
_local3.push(new Firebugs2SW(this, 2));
_local3.push(new Bugs7SW(this, 7));
_local3.push(new Firebugs2SW(this, 4));
_local3.push(new Bugs7SW(this, 3));
_local3.push(new Bugs7SW(this, 5));
_local3.push(new Firebugs2SW(this, 2));
_local3.push(new Bugs7SW(this, 2));
_local3.push(new SmallGreenSpiders2SW(this));
_local3.push(new Bugs7SW(this, 4));
_local3.push(new Firebugs2SW(this));
_spawnManager.waves = _local3;
}
override public function getNewMap():Map{
return (new Map1_1(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map1_2(_stage, _ui));
}
override public function get nextId():int{
return (12);
}
}
}//package map.maps.planet1
Section 90
//Map1_2 (map.maps.planet1.Map1_2)
package map.maps.planet1 {
import flash.display.*;
import map.*;
import map.tutorial.*;
import main.*;
import map.ui.*;
public class Map1_2 extends DesertMap {
private var _weaponTip:TutorialTip;
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_2");
public function Map1_2(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new SmallGreenSpiders2SW(this));
_local3.push(new SmallGreenSpiders2SW(this));
_local3.push(new SmallDesertSpiders2SW(this));
_local3.push(new SmallDesertSpiders2SW(this, 4));
_local3.push(new ShotgunSpiderSW(this));
_local3.push(new Bugs7SW(this));
_local3.push(new SmallGreenSpiders2SW(this));
_local3.push(new SmallGreenSpiders2SW(this));
_local3.push(new SmallDesertSpiders2SW(this));
_local3.push(new SmallDesertSpiders2SW(this, 4));
_local3.push(new Firebugs2SW(this));
_local3.push(new Bugs7SW(this));
_local3.push(new SmallGreenSpiders2SW(this));
_local3.push(new SmallGreenSpiders2SW(this));
_local3.push(new SmallGreenSpiders2SW(this, 8));
_local3.push(new GiantGreenSpiders1SW(this));
_local3.push(new Firebugs2SW(this));
_local3.push(new Bugs7SW(this));
_local3.push(new GiantGreenSpiders1SW(this));
_local3.push(new GiantGreenSpiders1SW(this, 5));
_local3.push(new Firebugs2SW(this));
_local3.push(new Bugs7SW(this));
_local3.push(new GiantGreenSpiders1SW(this));
_local3.push(new GiantGreenSpiders1SW(this, 3));
_local3.push(new Firebugs2SW(this));
_local3.push(new Bugs7SW(this));
_local3.push(new GiantGreenSpiders1SW(this, 3));
_local3.push(new GiantGreenSpiders1SW(this));
_spawnManager.waves = _local3;
_weaponTip = new TutorialTip(_stage, Main.bundle.getString("TIP_7"));
_tutorialManager.addTip(_weaponTip);
}
override public function getNewMap():Map{
return (new Map1_2(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map1_3(_stage, _ui));
}
override public function get nextId():int{
return (13);
}
public function showTip():void{
_weaponTip.show();
}
}
}//package map.maps.planet1
Section 91
//Map1_3 (map.maps.planet1.Map1_3)
package map.maps.planet1 {
import flash.display.*;
import map.*;
import main.*;
import map.ui.*;
public class Map1_3 extends DesertMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_3");
public function Map1_3(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new SmallGreenSpiders2SW(this));
_local3.push(new SmallDesertSpiders2SW(this, 3));
_local3.push(new Bugs7SW(this, 8));
_local3.push(new Firebugs2SW(this, 2));
_local3.push(new Firebugs2SW(this, 3));
_local3.push(new Firebugs2SW(this));
_local3.push(new RedMantis2SW(this, 5));
_local3.push(new SmallGreenSpiders2SW(this));
_local3.push(new GiantGreenSpiders1SW(this, 5));
_local3.push(new RedMantis2SW(this, 5));
_local3.push(new SmallDesertSpiders2SW(this, 5));
_local3.push(new GiantDesertSpiders1SW(this, 15));
_local3.push(new MachinegunSpiderSW(this, 10));
_local3.push(new RedMantis2SW(this, 9));
_local3.push(new SmallDesertSpiders2SW(this, 5));
_local3.push(new SmallDesertSpiders2SW(this, 5));
_local3.push(new GiantDesertSpiders1SW(this, 2));
_local3.push(new RedMantis2SW(this, 9));
_local3.push(new Firebugs2SW(this, 4));
_local3.push(new Firebugs2SW(this, 4));
_local3.push(new Firebugs2SW(this, 4));
_local3.push(new RedMantis2SW(this, 9));
_local3.push(new Firebugs2SW(this));
_local3.push(new Firebugs2SW(this));
_local3.push(new GiantDesertSpiders1SW(this, 2));
_local3.push(new GiantDesertSpiders1SW(this, 2));
_local3.push(new GiantDesertSpiders1SW(this, 2));
_spawnManager.waves = _local3;
}
override public function getNewMap():Map{
return (new Map1_3(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map1_4(_stage, _ui));
}
override public function get nextId():int{
return (14);
}
}
}//package map.maps.planet1
Section 92
//Map1_4 (map.maps.planet1.Map1_4)
package map.maps.planet1 {
import flash.display.*;
import map.*;
import main.*;
import map.ui.*;
public class Map1_4 extends DesertMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_4");
public function Map1_4(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new Mantis2SW(this));
_local3.push(new Bugs7SW(this, 8));
_local3.push(new SmallGreenSpiders2SW(this, 4));
_local3.push(new SmallGreenSpiders2SW(this));
_local3.push(new SmallGreenSpiders2SW(this, 9));
_local3.push(new GiantGreenSpiders1SW(this, 7));
_local3.push(new Mantis2SW(this, 4));
_local3.push(new Bugs7SW(this, 4));
_local3.push(new Bugs7SW(this, 14));
_local3.push(new Mantis2SW(this, 9));
_local3.push(new SmallGreenSpiders2SW(this));
_local3.push(new SmallGreenSpiders2SW(this, 3));
_local3.push(new GiantGreenSpiders1SW(this, 4));
_local3.push(new Bugs7SW(this, 6));
if (Main.BUILD == Main.ARMOR_GAMES){
_local3.push(new LocustgunMantisSW(this, 13));
};
_local3.push(new Bugs7SW(this, 10));
_local3.push(new Mantis2SW(this, 5));
_local3.push(new GiantGreenSpiders1SW(this, 6));
_local3.push(new Mantis2SW(this, 5));
_local3.push(new Bugs7SW(this, 12));
_local3.push(new SmallDesertSpiders2SW(this, 3));
_local3.push(new Mantis2SW(this));
_local3.push(new GiantGreenSpiders1SW(this, 5));
_local3.push(new Mantis2SW(this));
_spawnManager.waves = _local3;
}
override public function getNewMap():Map{
return (new Map1_4(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map1_5(_stage, _ui));
}
override public function get nextId():int{
return (15);
}
}
}//package map.maps.planet1
Section 93
//Map1_5 (map.maps.planet1.Map1_5)
package map.maps.planet1 {
import flash.display.*;
import map.*;
import map.tutorial.*;
import main.*;
import map.ui.*;
import map.maps.planet2.*;
public class Map1_5 extends DesertMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 860;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_5");
public function Map1_5(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new Queen1SW(this));
_local3.push(new RedMantis2SW(this, 15));
_local3.push(new Mantis2SW(this, 17));
_local3.push(new RedMantis2SW(this, 16));
_local3.push(new Mantis2SW(this, 17));
_local3.push(new RedMantis2SW(this, 16));
_local3.push(new Mantis2SW(this, 15));
_local3.push(new RedMantis2SW(this, 12));
_local3.push(new Mantis2SW(this, 13));
_spawnManager.waves = _local3;
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_8"), 5));
}
override public function getNewMap():Map{
return (new Map1_5(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map2_1(_stage, _ui));
}
override public function get levelCompleteTime():int{
return (LEVEL_COMPLETE_TIME_PLUS);
}
override public function get nextId():int{
return (21);
}
}
}//package map.maps.planet1
Section 94
//PowerUpTutorialSpider3SW (map.maps.planet1.PowerUpTutorialSpider3SW)
package map.maps.planet1 {
import map.*;
import map.spawn.*;
import map.items.impl.*;
import map.units.planet1.*;
public class PowerUpTutorialSpider3SW extends SpawnWave {
private static const COUNT:int = 3;
public function PowerUpTutorialSpider3SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:TutorialSpider = new TutorialSpider();
_local1.dropItem = new Shield();
spawns.push(new Spawn(_map, _local1, Math.floor((Math.random() * 4))));
var _local2:TutorialSpider = new TutorialSpider();
_local2.dropItem = new WeaponPowerUp();
spawns.push(new Spawn(_map, _local2, Math.floor((Math.random() * 4))));
var _local3:TutorialSpider = new TutorialSpider();
_local3.dropItem = new ExpPoints();
spawns.push(new Spawn(_map, _local3, Math.floor((Math.random() * 4))));
}
}
}//package map.maps.planet1
Section 95
//Queen1SW (map.maps.planet1.Queen1SW)
package map.maps.planet1 {
import map.*;
import flash.geom.*;
import map.spawn.*;
import map.units.planet1.*;
public class Queen1SW extends SpawnWave {
private static const COUNT:int = 1;
public function Queen1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new Queen(), Spawn.NORTH, null, new Point(550, 300)));
_local1++;
};
}
}
}//package map.maps.planet1
Section 96
//RedMantis2SW (map.maps.planet1.RedMantis2SW)
package map.maps.planet1 {
import map.*;
import map.spawn.*;
import map.units.planet1.*;
public class RedMantis2SW extends SpawnWave {
private static const COUNT:int = 2;
public function RedMantis2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new RedMantis(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet1
Section 97
//ShotgunSpiderSW (map.maps.planet1.ShotgunSpiderSW)
package map.maps.planet1 {
import map.*;
import map.units.unit.*;
import main.*;
import map.spawn.*;
import map.units.planet1.*;
import map.items.weapons.*;
public class ShotgunSpiderSW extends SpawnWave {
private var _spider:GiantGreenSpider;
private static const COUNT:int = 1;
public function ShotgunSpiderSW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
private function showTip(_arg1:UnitEvent):void{
_spider.removeEventListener(UnitEvent.DEAD, showTip);
(Main.mm.currentMap as Map1_2).showTip();
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
_spider = new GiantGreenSpider(3);
_spider.dropItem = new ShotgunItem();
_spider.addEventListener(UnitEvent.DEAD, showTip);
spawns.push(new Spawn(_map, _spider, Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet1
Section 98
//SmallDesertSpiders2SW (map.maps.planet1.SmallDesertSpiders2SW)
package map.maps.planet1 {
import map.*;
import map.spawn.*;
import map.units.planet1.*;
public class SmallDesertSpiders2SW extends SpawnWave {
private static const COUNT:int = 2;
public function SmallDesertSpiders2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new SmallDesertSpider(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet1
Section 99
//SmallGreenSpiders2SW (map.maps.planet1.SmallGreenSpiders2SW)
package map.maps.planet1 {
import map.*;
import map.spawn.*;
import map.units.planet1.*;
public class SmallGreenSpiders2SW extends SpawnWave {
private static const COUNT:int = 2;
public function SmallGreenSpiders2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new SmallGreenSpider(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet1
Section 100
//TutorialSpider1SW (map.maps.planet1.TutorialSpider1SW)
package map.maps.planet1 {
import map.*;
import map.spawn.*;
import map.units.planet1.*;
public class TutorialSpider1SW extends SpawnWave {
private static const COUNT:int = 1;
public function TutorialSpider1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new TutorialSpider(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet1
Section 101
//BigBigFoot1SW (map.maps.planet2.BigBigFoot1SW)
package map.maps.planet2 {
import map.*;
import map.spawn.*;
import map.units.planet2.*;
public class BigBigFoot1SW extends SpawnWave {
private static const COUNT:int = 1;
public function BigBigFoot1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new BigBigFoot(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet2
Section 102
//GiantIcers1SW (map.maps.planet2.GiantIcers1SW)
package map.maps.planet2 {
import map.*;
import map.spawn.*;
import map.units.planet2.*;
public class GiantIcers1SW extends SpawnWave {
private static const COUNT:int = 1;
public function GiantIcers1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new GiantIcer(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet2
Section 103
//IceMap (map.maps.planet2.IceMap)
package map.maps.planet2 {
import flash.display.*;
import map.*;
import map.ui.*;
import map.ui.titles.*;
public class IceMap extends Map {
public function IceMap(_arg1:Stage, _arg2:String, _arg3:MapUI, _arg4:int, _arg5:int, _arg6:int, _arg7:int){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
override public function get underlay():MovieClip{
return (new Episode2Underlay());
}
override public function get episodeTitle():EpisodeTitle{
var _local1:Episode2Title = new Episode2Title();
_local1.title = _title;
return (_local1);
}
}
}//package map.maps.planet2
Section 104
//Map2_1 (map.maps.planet2.Map2_1)
package map.maps.planet2 {
import flash.display.*;
import map.*;
import main.*;
import map.ui.*;
public class Map2_1 extends IceMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_21");
public function Map2_1(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new Sleazoid2SW(this));
_local3.push(new Sleazoid2SW(this));
_local3.push(new Sleazoid2SW(this, 3));
_local3.push(new SmallIcers2SW(this, 5));
_local3.push(new SmallIcers2SW(this, 5));
_local3.push(new Sleazoid2SW(this, 5));
_local3.push(new Sleazoid2SW(this));
_local3.push(new SmallIcers2SW(this));
_local3.push(new SmallIcers2SW(this, 5));
_local3.push(new MediumIcers1SW(this, 5));
_local3.push(new MediumIcers1SW(this, 1));
_local3.push(new SmallIcers2SW(this));
_local3.push(new Sleazoid2SW(this, 5));
_local3.push(new Sleazoid2SW(this));
_local3.push(new SmallIcers2SW(this));
_local3.push(new Sleazoid2SW(this, 5));
_local3.push(new SmallIcers2SW(this));
_local3.push(new Sleazoid2SW(this));
_local3.push(new Sleazoid2SW(this, 2));
_local3.push(new SmallIcers2SW(this));
_local3.push(new SmallIcers2SW(this));
_local3.push(new SmallIcers2SW(this));
_local3.push(new MediumIcers1SW(this, 1));
_local3.push(new MediumIcers1SW(this, 3));
_local3.push(new Sleazoid2SW(this, 2));
_local3.push(new Sleazoid2SW(this));
_local3.push(new MediumIcers1SW(this, 5));
_local3.push(new Sleazoid2SW(this));
_local3.push(new MediumIcers1SW(this, 5));
_local3.push(new Sleazoid2SW(this));
_local3.push(new MediumIcers1SW(this, 1));
_local3.push(new MediumIcers1SW(this, 5));
_spawnManager.waves = _local3;
}
override public function getNewMap():Map{
return (new Map2_1(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map2_2(_stage, _ui));
}
override public function get nextId():int{
return (22);
}
}
}//package map.maps.planet2
Section 105
//Map2_2 (map.maps.planet2.Map2_2)
package map.maps.planet2 {
import flash.display.*;
import map.*;
import main.*;
import map.ui.*;
public class Map2_2 extends IceMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_22");
public function Map2_2(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new Sleazoid2SW(this));
_local3.push(new Sleazoid2SW(this));
_local3.push(new SmallBigFoot2SW(this, 5));
_local3.push(new Sleazoid2SW(this, 3));
_local3.push(new Sleazoid2SW(this));
_local3.push(new SmallBigFoot2SW(this, 5));
_local3.push(new Sleazoid2SW(this, 3));
_local3.push(new Sleazoid2SW(this));
_local3.push(new SmallBigFoot2SW(this, 4));
_local3.push(new Scate2SW(this, 2));
_local3.push(new Scate2SW(this, 2));
_local3.push(new SmallIcers2SW(this, 3));
_local3.push(new SmallIcers2SW(this));
_local3.push(new SmallBigFoot2SW(this, 5));
_local3.push(new Sleazoid2SW(this, 3));
_local3.push(new SmallIcers2SW(this));
_local3.push(new SmallBigFoot2SW(this, 5));
_local3.push(new SmallIcers2SW(this));
_local3.push(new MediumIcers1SW(this, 5));
_local3.push(new SmallIcers2SW(this, 4));
_local3.push(new SmallIcers2SW(this));
_local3.push(new Scate2SW(this, 5));
_local3.push(new SmallBigFoot2SW(this, 5));
_local3.push(new SmallBigFoot2SW(this, 5));
_local3.push(new MortarBigBigFootSW(this, 2));
_local3.push(new SmallBigFoot2SW(this, 2));
_local3.push(new SmallBigFoot2SW(this, 2));
_local3.push(new Scate2SW(this, 5));
_local3.push(new SmallBigFoot2SW(this, 2));
_local3.push(new Scate2SW(this, 5));
_local3.push(new Sleazoid2SW(this));
_local3.push(new Sleazoid2SW(this));
_local3.push(new Scate2SW(this));
_local3.push(new Sleazoid2SW(this));
_local3.push(new Sleazoid2SW(this));
_spawnManager.waves = _local3;
}
override public function getNewMap():Map{
return (new Map2_2(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map2_3(_stage, _ui));
}
override public function get levelCompleteTime():int{
return (LEVEL_COMPLETE_TIME_PLUS);
}
override public function get nextId():int{
return (23);
}
}
}//package map.maps.planet2
Section 106
//Map2_3 (map.maps.planet2.Map2_3)
package map.maps.planet2 {
import flash.display.*;
import map.*;
import main.*;
import map.ui.*;
import map.maps.planet3.*;
public class Map2_3 extends IceMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_23");
public function Map2_3(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new GiantIcers1SW(this, 2));
_local3.push(new SmallBigFoot2SW(this));
_local3.push(new BigBigFoot1SW(this));
_local3.push(new BigBigFoot1SW(this, 9));
_local3.push(new Scate2SW(this, 3));
_local3.push(new Scate2SW(this));
_local3.push(new SmallBigFoot2SW(this));
_local3.push(new BigBigFoot1SW(this));
_local3.push(new BigBigFoot1SW(this, 7));
_local3.push(new Scate2SW(this, 2));
_local3.push(new SmallIcers2SW(this, 3));
_local3.push(new SmallIcers2SW(this));
_local3.push(new Sleazoid2SW(this, 5));
_local3.push(new Sleazoid2SW(this));
_local3.push(new SmallBigFoot2SW(this, 3));
_local3.push(new MediumIcers1SW(this));
_local3.push(new Scate2SW(this, 2));
_local3.push(new SmallBigFoot2SW(this, 5));
_local3.push(new MediumIcers1SW(this));
_local3.push(new MediumIcers1SW(this, 5));
_local3.push(new SmallIcers2SW(this));
_local3.push(new Scate2SW(this, 2));
_local3.push(new GiantIcers1SW(this, 2));
_local3.push(new Scate2SW(this));
_local3.push(new BigBigFoot1SW(this, 4));
_local3.push(new GiantIcers1SW(this, 2));
_local3.push(new GiantIcers1SW(this, 2));
_local3.push(new Scate2SW(this, 3));
_local3.push(new Sleazoid2SW(this));
_local3.push(new Scate2SW(this));
_local3.push(new BigBigFoot1SW(this, 4));
_local3.push(new BigBigFoot1SW(this));
_local3.push(new BigBigFoot1SW(this, 4));
_local3.push(new Scate2SW(this, 5));
_spawnManager.waves = _local3;
}
override public function getNewMap():Map{
return (new Map2_3(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map3_1(_stage, _ui));
}
override public function get nextId():int{
return (31);
}
}
}//package map.maps.planet2
Section 107
//MediumIcers1SW (map.maps.planet2.MediumIcers1SW)
package map.maps.planet2 {
import map.*;
import map.spawn.*;
import map.units.planet2.*;
public class MediumIcers1SW extends SpawnWave {
private static const COUNT:int = 1;
public function MediumIcers1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new MediumIcer(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet2
Section 108
//MortarBigBigFootSW (map.maps.planet2.MortarBigBigFootSW)
package map.maps.planet2 {
import map.*;
import map.spawn.*;
import map.units.planet2.*;
import map.items.weapons.*;
public class MortarBigBigFootSW extends SpawnWave {
private static const COUNT:int = 1;
public function MortarBigBigFootSW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local2:BigBigFoot;
var _local1:int;
while (_local1 < count) {
_local2 = new BigBigFoot(4);
_local2.dropItem = new MortarItem();
spawns.push(new Spawn(_map, _local2, Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet2
Section 109
//Scate2SW (map.maps.planet2.Scate2SW)
package map.maps.planet2 {
import map.*;
import map.spawn.*;
import map.units.planet2.*;
public class Scate2SW extends SpawnWave {
private static const COUNT:int = 2;
public function Scate2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new Scate(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet2
Section 110
//Sleazoid2SW (map.maps.planet2.Sleazoid2SW)
package map.maps.planet2 {
import map.*;
import map.spawn.*;
import map.units.planet2.*;
public class Sleazoid2SW extends SpawnWave {
private static const COUNT:int = 2;
public function Sleazoid2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new Sleazoid(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet2
Section 111
//SmallBigFoot2SW (map.maps.planet2.SmallBigFoot2SW)
package map.maps.planet2 {
import map.*;
import map.spawn.*;
import map.units.planet2.*;
public class SmallBigFoot2SW extends SpawnWave {
private static const COUNT:int = 2;
public function SmallBigFoot2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new SmallBigFoot(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet2
Section 112
//SmallIcers2SW (map.maps.planet2.SmallIcers2SW)
package map.maps.planet2 {
import map.*;
import map.spawn.*;
import map.units.planet2.*;
public class SmallIcers2SW extends SpawnWave {
private static const COUNT:int = 2;
public function SmallIcers2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new SmallIcer(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet2
Section 113
//BombsManager (map.maps.planet3.BombsManager)
package map.maps.planet3 {
import map.units.hero.*;
import map.*;
import map.units.unit.*;
public class BombsManager {
private var _bombs:Array;
private var _hero:Hero;
private var _bombsActivated:int;// = 0
public function BombsManager(){
_bombs = new Array();
super();
}
public function get complete():Boolean{
var _local1:int = _bombs.length;
return ((_bombsActivated == _local1));
}
public function addBomb(_arg1:Map, _arg2:int, _arg3:int):void{
var _local4:Detonator = new Detonator(_arg1);
_local4.x = _arg2;
_local4.y = _arg3;
_local4.addEventListener(UnitEvent.ACTIVATED, activateOne);
_arg1.addChild(_local4);
_bombs.push(_local4);
}
public function activateOne(_arg1:UnitEvent):void{
var _local2:Detonator = (_arg1.target as Detonator);
_local2.removeEventListener(UnitEvent.ACTIVATED, activateOne);
_bombsActivated++;
}
public function set hero(_arg1:Hero):void{
_hero = _arg1;
var _local2:int;
while (_local2 < _bombs.length) {
(_bombs[_local2] as Detonator).hero = _arg1;
_local2++;
};
}
public function tick(_arg1:Number):void{
if (_hero == null){
return;
};
var _local2:int;
while (_local2 < _bombs.length) {
(_bombs[_local2] as Detonator).tick(_arg1);
_local2++;
};
}
}
}//package map.maps.planet3
Section 114
//Detonator (map.maps.planet3.Detonator)
package map.maps.planet3 {
import flash.display.*;
import map.units.hero.*;
import map.*;
import map.units.unit.*;
import map.units.utils.*;
import main.*;
import map.ui.utils.*;
public class Detonator extends MovieClip {
private var _chargeTime:int;// = 0
private var _hero:Hero;
private var _activated:Boolean;// = false
private var _lastChargeSecond:int;// = 0
private var _state:int;// = 0
private var _map:Map;
private static const CHARGING:int = 1;
private static const CHARGING_RADIUS2:int = 8500;
private static const CHARGE_TIME:int = 24000;
private static const WAITING:int = 0;
private static const DONE:int = 2;
public function Detonator(_arg1:Map){
addFrameScript(0, frame1, 33, frame34, 34, frame35);
super();
_map = _arg1;
}
public function goDone():void{
_state = DONE;
gotoAndStop("done");
_activated = true;
dispatchEvent(new UnitEvent(UnitEvent.ACTIVATED));
}
public function goWaiting():void{
gotoAndStop("waiting");
}
public function get done():Boolean{
return ((_state == DONE));
}
function frame34(){
gotoAndPlay("charging");
}
function frame35(){
stop();
}
public function goCharging():void{
gotoAndPlay("charge");
}
public function set hero(_arg1:Hero):void{
_hero = _arg1;
}
public function tick(_arg1:Number):void{
if (_activated){
return;
};
if (MathUtils.distance2(_hero.x, _hero.y, x, y) < CHARGING_RADIUS2){
if (_state != CHARGING){
_state = CHARGING;
goCharging();
};
} else {
if (_state != WAITING){
_state = WAITING;
goWaiting();
};
};
if (_state == WAITING){
return;
};
if (_state == CHARGING){
if (_chargeTime > CHARGE_TIME){
goDone();
} else {
if (_chargeTime >= (_lastChargeSecond + Main.SECOND)){
new PopupText(_map, ((CHARGE_TIME - _chargeTime) / 1000).toString(), x, (y - 26), 0xFF00);
_lastChargeSecond = _chargeTime;
};
_chargeTime = (_chargeTime + Main.MS);
};
};
}
function frame1(){
stop();
}
}
}//package map.maps.planet3
Section 115
//GreatFireWisp1SW (map.maps.planet3.GreatFireWisp1SW)
package map.maps.planet3 {
import map.*;
import map.spawn.*;
import map.units.planet3.*;
public class GreatFireWisp1SW extends SpawnWave {
private static const COUNT:int = 1;
public function GreatFireWisp1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new GreatFireWisp(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet3
Section 116
//GreatGolem1SW (map.maps.planet3.GreatGolem1SW)
package map.maps.planet3 {
import map.*;
import map.spawn.*;
import map.units.planet3.*;
public class GreatGolem1SW extends SpawnWave {
private static const COUNT:int = 1;
public function GreatGolem1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new GreatGolem(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet3
Section 117
//GreatRayGolem3SW (map.maps.planet3.GreatRayGolem3SW)
package map.maps.planet3 {
import map.*;
import map.spawn.*;
import map.units.planet3.*;
public class GreatRayGolem3SW extends SpawnWave {
private static const COUNT:int = 1;
public function GreatRayGolem3SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new GreatRayGolem(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet3
Section 118
//IongunGolemSW (map.maps.planet3.IongunGolemSW)
package map.maps.planet3 {
import map.*;
import map.spawn.*;
import map.units.planet3.*;
import map.items.weapons.*;
public class IongunGolemSW extends SpawnWave {
private static const COUNT:int = 1;
public function IongunGolemSW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local2:GreatGolem;
var _local1:int;
while (_local1 < count) {
_local2 = new GreatGolem(8);
_local2.dropItem = new IongunItem();
spawns.push(new Spawn(_map, _local2, Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet3
Section 119
//IonShotgunGolemSW (map.maps.planet3.IonShotgunGolemSW)
package map.maps.planet3 {
import map.*;
import map.spawn.*;
import map.units.planet3.*;
import map.items.weapons.*;
public class IonShotgunGolemSW extends SpawnWave {
private static const COUNT:int = 1;
public function IonShotgunGolemSW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local2:GreatGolem;
var _local1:int;
while (_local1 < count) {
_local2 = new GreatGolem(8);
_local2.dropItem = new IonShotgunItem();
spawns.push(new Spawn(_map, _local2, Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet3
Section 120
//LavaBug4SW (map.maps.planet3.LavaBug4SW)
package map.maps.planet3 {
import map.*;
import map.spawn.*;
import map.units.planet3.*;
public class LavaBug4SW extends SpawnWave {
private static const COUNT:int = 4;
public function LavaBug4SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new LavaBug(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet3
Section 121
//LavaMap (map.maps.planet3.LavaMap)
package map.maps.planet3 {
import flash.display.*;
import map.*;
import map.ui.*;
import map.ui.titles.*;
public class LavaMap extends Map {
public function LavaMap(_arg1:Stage, _arg2:String, _arg3:MapUI, _arg4:int, _arg5:int, _arg6:int, _arg7:int){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
override public function get underlay():MovieClip{
return (new Episode3Underlay());
}
override public function get episodeTitle():EpisodeTitle{
var _local1:Episode3Title = new Episode3Title();
_local1.title = _title;
return (_local1);
}
}
}//package map.maps.planet3
Section 122
//Map3_1 (map.maps.planet3.Map3_1)
package map.maps.planet3 {
import flash.display.*;
import map.*;
import main.*;
import map.ui.*;
public class Map3_1 extends LavaMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_31");
public function Map3_1(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new LavaBug4SW(this));
_local3.push(new LavaBug4SW(this));
_local3.push(new SmallGolem2SW(this, 5));
_local3.push(new SmallGolem2SW(this, 2));
_local3.push(new SmallGolem2SW(this, 1));
_local3.push(new LavaBug4SW(this));
_local3.push(new MediumFireWisp2SW(this));
_local3.push(new MediumFireWisp2SW(this));
_local3.push(new LavaBug4SW(this));
_local3.push(new MediumFireWisp2SW(this));
_local3.push(new MediumFireWisp2SW(this, 8));
_local3.push(new LavaBug4SW(this));
_local3.push(new LavaBug4SW(this));
_local3.push(new MediumFireWisp2SW(this));
_local3.push(new LavaBug4SW(this, 5));
_local3.push(new SmallGolem2SW(this, 3));
_local3.push(new SmallGolem2SW(this, 2));
_local3.push(new LavaBug4SW(this));
_local3.push(new SmallGolem2SW(this, 4));
_local3.push(new LavaBug4SW(this, 5));
_local3.push(new MediumFireWisp2SW(this));
_local3.push(new LavaBug4SW(this, 5));
_local3.push(new MediumFireWisp2SW(this));
_local3.push(new LavaBug4SW(this, 5));
_local3.push(new MediumFireWisp2SW(this));
_local3.push(new LavaBug4SW(this, 5));
_local3.push(new LavaBug4SW(this));
_local3.push(new SmallGolem2SW(this, 4));
_local3.push(new MediumFireWisp2SW(this));
_local3.push(new LavaBug4SW(this));
_local3.push(new LavaBug4SW(this));
_local3.push(new SmallGolem2SW(this, 4));
_local3.push(new MediumFireWisp2SW(this));
_local3.push(new LavaBug4SW(this));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new LavaBug4SW(this));
_local3.push(new SmallGolem2SW(this));
_local3.push(new MediumGolem1SW(this));
_local3.push(new MediumGolem1SW(this));
_spawnManager.waves = _local3;
}
override public function getNewMap():Map{
return (new Map3_1(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map3_2(_stage, _ui));
}
override public function get nextId():int{
return (32);
}
}
}//package map.maps.planet3
Section 123
//Map3_2 (map.maps.planet3.Map3_2)
package map.maps.planet3 {
import flash.display.*;
import map.*;
import main.*;
import map.ui.*;
public class Map3_2 extends LavaMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_32");
public function Map3_2(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new SmallGolem2SW(this));
_local3.push(new SmallGolem2SW(this));
_local3.push(new MediumGolem1SW(this));
_local3.push(new MediumGolem1SW(this, 5));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new LavaBug4SW(this));
_local3.push(new MediumGolem1SW(this));
_local3.push(new MediumGolem1SW(this, 5));
_local3.push(new LavaBug4SW(this));
_local3.push(new MediumFireWisp2SW(this));
_local3.push(new LavaBug4SW(this));
_local3.push(new MediumFireWisp2SW(this));
_local3.push(new LavaBug4SW(this));
_local3.push(new GreatRayGolem3SW(this, 3));
_local3.push(new GreatRayGolem3SW(this));
_local3.push(new LavaBug4SW(this));
_local3.push(new GreatFireWisp1SW(this, 5));
_local3.push(new GreatRayGolem3SW(this, 2));
_local3.push(new GreatRayGolem3SW(this, 2));
_local3.push(new GreatRayGolem3SW(this, 2));
_local3.push(new LavaBug4SW(this, 2));
_local3.push(new GreatRayGolem3SW(this, 2));
_local3.push(new GreatRayGolem3SW(this, 2));
_local3.push(new LavaBug4SW(this, 2));
_local3.push(new LavaBug4SW(this, 2));
_local3.push(new LavaBug4SW(this, 2));
_local3.push(new GreatGolem1SW(this, 2));
_local3.push(new LavaBug4SW(this, 2));
_local3.push(new IongunGolemSW(this, 10));
_spawnManager.waves = _local3;
}
override public function getNewMap():Map{
return (new Map3_2(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map3_3(_stage, _ui));
}
override public function get levelCompleteTime():int{
return (LEVEL_COMPLETE_TIME_PLUS);
}
override public function get nextId():int{
return (33);
}
}
}//package map.maps.planet3
Section 124
//Map3_3 (map.maps.planet3.Map3_3)
package map.maps.planet3 {
import flash.display.*;
import map.*;
import main.*;
import map.ui.*;
public class Map3_3 extends LavaMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_33");
public function Map3_3(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new GreatFireWisp1SW(this));
_local3.push(new GreatFireWisp1SW(this));
_local3.push(new LavaBug4SW(this));
_local3.push(new MediumFireWisp2SW(this));
_local3.push(new LavaBug4SW(this));
_local3.push(new MediumGolem1SW(this));
_local3.push(new LavaBug4SW(this));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 5));
_local3.push(new LavaBug4SW(this, 2));
_local3.push(new LavaBug4SW(this, 2));
_local3.push(new LavaBug4SW(this, 2));
_local3.push(new GreatRayGolem3SW(this, 2));
_local3.push(new MediumGolem1SW(this, 2));
_local3.push(new LavaBug4SW(this, 2));
_local3.push(new LavaBug4SW(this, 2));
_local3.push(new LavaBug4SW(this, 2));
_local3.push(new MotherLavaBug1SW(this, 2));
_local3.push(new LavaBug4SW(this, 2));
_local3.push(new LavaBug4SW(this, 2));
_local3.push(new LavaBug4SW(this, 2));
_local3.push(new PlasmaMotherLavaBugSW(this, 10));
_spawnManager.waves = _local3;
}
override public function getNewMap():Map{
return (new Map3_3(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map3_4(_stage, _ui));
}
override public function get levelCompleteTime():int{
return (LEVEL_COMPLETE_TIME_PLUS);
}
override public function get nextId():int{
return (34);
}
}
}//package map.maps.planet3
Section 125
//Map3_4 (map.maps.planet3.Map3_4)
package map.maps.planet3 {
import flash.display.*;
import map.*;
import map.conditions.*;
import map.tutorial.*;
import main.*;
import map.ui.*;
import map.maps.planet4.*;
public class Map3_4 extends LavaMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_34");
public function Map3_4(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
_bombsManager.addBomb(this, 200, 200);
_bombsManager.addBomb(this, 1080, 200);
_bombsManager.addBomb(this, 200, 760);
_bombsManager.addBomb(this, 1080, 760);
_conditionsManager.push(new PlantBombsCondition(_bombsManager));
var _local3:Array = new Array();
_local3.push(new SmallGolem2SW(this, 20));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumFireWisp2SW(this, 3));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 5));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new GreatRayGolem3SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MotherLavaBug1SW(this, 3));
_local3.push(new SmallGolem2SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumFireWisp2SW(this, 5));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new GreatRayGolem3SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MotherLavaBug1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumFireWisp2SW(this, 5));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
if (Main.BUILD == Main.ARMOR_GAMES){
_local3.push(new IonShotgunGolemSW(this, 3));
};
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new GreatRayGolem3SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MotherLavaBug1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 5));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new GreatRayGolem3SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MotherLavaBug1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumGolem1SW(this, 5));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new GreatRayGolem3SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MotherLavaBug1SW(this, 3));
_local3.push(new MotherLavaBug1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumFireWisp2SW(this, 7));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 5));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new GreatRayGolem3SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MotherLavaBug1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 7));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumGolem1SW(this, 5));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new GreatRayGolem3SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MotherLavaBug1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumGolem1SW(this, 5));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new GreatRayGolem3SW(this, 7));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MotherLavaBug1SW(this, 3));
_local3.push(new MotherLavaBug1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumFireWisp2SW(this, 3));
_local3.push(new MediumGolem1SW(this, 5));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 5));
_local3.push(new GreatRayGolem3SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MotherLavaBug1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 5));
_local3.push(new GreatRayGolem3SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MotherLavaBug1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumFireWisp2SW(this, 3));
_local3.push(new MediumGolem1SW(this, 5));
_local3.push(new MotherLavaBug1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumFireWisp2SW(this, 3));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MediumGolem1SW(this, 3));
_local3.push(new GreatFireWisp1SW(this, 3));
_local3.push(new GreatRayGolem3SW(this, 5));
_local3.push(new LavaBug4SW(this, 3));
_local3.push(new MotherLavaBug1SW(this, 3));
_spawnManager.waves = _local3;
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_9"), 5));
}
override public function getNewMap():Map{
return (new Map3_4(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map4_1(_stage, _ui));
}
override public function get nextId():int{
return (41);
}
}
}//package map.maps.planet3
Section 126
//MediumFireWisp2SW (map.maps.planet3.MediumFireWisp2SW)
package map.maps.planet3 {
import map.*;
import map.spawn.*;
import map.units.planet3.*;
public class MediumFireWisp2SW extends SpawnWave {
private static const COUNT:int = 2;
public function MediumFireWisp2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new MediumFireWisp(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet3
Section 127
//MediumGolem1SW (map.maps.planet3.MediumGolem1SW)
package map.maps.planet3 {
import map.*;
import map.spawn.*;
import map.units.planet3.*;
public class MediumGolem1SW extends SpawnWave {
private static const COUNT:int = 1;
public function MediumGolem1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new MediumGolem(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet3
Section 128
//MotherLavaBug1SW (map.maps.planet3.MotherLavaBug1SW)
package map.maps.planet3 {
import map.*;
import map.spawn.*;
import map.units.planet3.*;
public class MotherLavaBug1SW extends SpawnWave {
private static const COUNT:int = 1;
public function MotherLavaBug1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new MotherLavaBug(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet3
Section 129
//PlasmaMotherLavaBugSW (map.maps.planet3.PlasmaMotherLavaBugSW)
package map.maps.planet3 {
import map.*;
import map.spawn.*;
import map.units.planet3.*;
import map.items.weapons.*;
public class PlasmaMotherLavaBugSW extends SpawnWave {
private static const COUNT:int = 1;
public function PlasmaMotherLavaBugSW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local2:MotherLavaBug;
var _local1:int;
while (_local1 < count) {
_local2 = new MotherLavaBug(2);
_local2.dropItem = new PlasmagunItem();
spawns.push(new Spawn(_map, _local2, Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet3
Section 130
//SmallGolem2SW (map.maps.planet3.SmallGolem2SW)
package map.maps.planet3 {
import map.*;
import map.spawn.*;
import map.units.planet3.*;
public class SmallGolem2SW extends SpawnWave {
private static const COUNT:int = 1;
public function SmallGolem2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new SmallGolem(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet3
Section 131
//BlueFlyer2SW (map.maps.planet4.BlueFlyer2SW)
package map.maps.planet4 {
import map.*;
import map.spawn.*;
import map.units.planet4.*;
public class BlueFlyer2SW extends SpawnWave {
private static const COUNT:int = 2;
public function BlueFlyer2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
allied = true;
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new BlueFlyer(), Math.floor((Math.random() * 4)), _map.heroes));
_local1++;
};
}
}
}//package map.maps.planet4
Section 132
//CannonHover1SW (map.maps.planet4.CannonHover1SW)
package map.maps.planet4 {
import map.*;
import map.spawn.*;
import map.units.planet4.*;
public class CannonHover1SW extends SpawnWave {
private static const COUNT:int = 1;
public function CannonHover1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new CannonHover(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet4
Section 133
//DualGunHover1SW (map.maps.planet4.DualGunHover1SW)
package map.maps.planet4 {
import map.*;
import map.spawn.*;
import map.units.planet4.*;
public class DualGunHover1SW extends SpawnWave {
private static const COUNT:int = 1;
public function DualGunHover1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new DualGunHover(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet4
Section 134
//LaserSplicer1SW (map.maps.planet4.LaserSplicer1SW)
package map.maps.planet4 {
import map.*;
import map.spawn.*;
import map.units.planet4.*;
import map.items.weapons.*;
public class LaserSplicer1SW extends SpawnWave {
private static const COUNT:int = 1;
public function LaserSplicer1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local2:Splicer;
var _local1:int;
while (_local1 < count) {
_local2 = new Splicer(8);
_local2.dropItem = new LaserItem();
spawns.push(new Spawn(_map, _local2, Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet4
Section 135
//Map4_1 (map.maps.planet4.Map4_1)
package map.maps.planet4 {
import flash.display.*;
import map.*;
import main.*;
import map.ui.*;
public class Map4_1 extends UrbanMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_41");
public function Map4_1(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new Splicer2SW(this));
_local3.push(new Splicer2SW(this));
_local3.push(new Splicer2SW(this));
_local3.push(new MechBot2SW(this, 5));
_local3.push(new MechBot2SW(this));
_local3.push(new MechBot2SW(this));
_local3.push(new MechBot2SW(this, 5));
_local3.push(new Splicer2SW(this));
_local3.push(new Splicer2SW(this, 4));
_local3.push(new Splicer2SW(this));
if (Main.BUILD == Main.ARMOR_GAMES){
_local3.push(new LaserSplicer1SW(this));
};
_local3.push(new Splicer2SW(this, 8));
_local3.push(new Splicer2SW(this));
_local3.push(new MechBot2SW(this, 5));
_local3.push(new Splicer2SW(this));
_local3.push(new Splicer2SW(this, 8));
_local3.push(new Splicer2SW(this));
_local3.push(new MechBot2SW(this, 5));
_local3.push(new MechBot2SW(this, 5));
_spawnManager.waves = _local3;
}
override public function getNewMap():Map{
return (new Map4_1(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map4_2(_stage, _ui));
}
override public function get nextId():int{
return (42);
}
}
}//package map.maps.planet4
Section 136
//Map4_2 (map.maps.planet4.Map4_2)
package map.maps.planet4 {
import flash.display.*;
import map.*;
import main.*;
import map.ui.*;
public class Map4_2 extends UrbanMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_42");
public function Map4_2(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new SawTank1SW(this));
_local3.push(new SawTank1SW(this));
_local3.push(new SawTank1SW(this));
_local3.push(new MechBot2SW(this, 8));
_local3.push(new MechBot2SW(this));
_local3.push(new MechBot2SW(this, 4));
_local3.push(new MechBot2SW(this));
_local3.push(new SawTank1SW(this));
_local3.push(new SawTank1SW(this));
_local3.push(new MechBot2SW(this, 8));
_local3.push(new MechBot2SW(this));
_local3.push(new MechBot2SW(this, 4));
_local3.push(new MechBot2SW(this));
_local3.push(new SawTank1SW(this));
_local3.push(new SawTank1SW(this));
_local3.push(new MechBot2SW(this, 5));
_local3.push(new MechBot2SW(this));
_local3.push(new SawTank1SW(this));
_local3.push(new MechBot2SW(this, 5));
_local3.push(new MechBot2SW(this));
_local3.push(new MechBot2SW(this, 4));
_local3.push(new MechBot2SW(this));
_local3.push(new Splicer2SW(this));
_local3.push(new MechBot2SW(this));
_local3.push(new MechBot2SW(this));
_local3.push(new RocketLauncherMechBoss1SW(this, 5));
_spawnManager.waves = _local3;
}
override public function getNewMap():Map{
return (new Map4_2(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map4_3(_stage, _ui));
}
override public function get nextId():int{
return (43);
}
}
}//package map.maps.planet4
Section 137
//Map4_3 (map.maps.planet4.Map4_3)
package map.maps.planet4 {
import flash.display.*;
import map.*;
import main.*;
import map.ui.*;
public class Map4_3 extends UrbanMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_43");
public function Map4_3(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new Splicer2SW(this, 8));
_local3.push(new Splicer2SW(this));
_local3.push(new RedFlyer2SW(this, 6));
_local3.push(new MechBot2SW(this));
_local3.push(new MechBot2SW(this, 8));
_local3.push(new MechBot2SW(this, 3));
_local3.push(new RedFlyer2SW(this, 3));
_local3.push(new SawTank1SW(this, 3));
_local3.push(new SawTank1SW(this, 3));
_local3.push(new MechBot2SW(this, 6));
_local3.push(new RedFlyer2SW(this, 3));
_local3.push(new MechBot2SW(this, 3));
_local3.push(new RedFlyer2SW(this, 3));
_local3.push(new MechBot2SW(this, 3));
_local3.push(new Splicer2SW(this, 5));
_local3.push(new RedFlyer2SW(this, 3));
_local3.push(new Splicer2SW(this, 3));
_local3.push(new RedFlyer2SW(this, 3));
_local3.push(new Splicer2SW(this, 3));
_local3.push(new RedFlyer2SW(this, 5));
_local3.push(new Splicer2SW(this, 3));
_local3.push(new RedFlyer2SW(this, 3));
_local3.push(new MechBot2SW(this));
_local3.push(new Splicer2SW(this, 5));
_local3.push(new RedFlyer2SW(this, 3));
_local3.push(new MechBot2SW(this, 3));
_local3.push(new RedFlyer2SW(this, 3));
_local3.push(new Splicer2SW(this, 5));
_local3.push(new MechBot2SW(this, 3));
_local3.push(new Splicer2SW(this, 3));
_local3.push(new Splicer2SW(this));
_spawnManager.waves = _local3;
}
override public function getNewMap():Map{
return (new Map4_3(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map4_4(_stage, _ui));
}
override public function get nextId():int{
return (44);
}
}
}//package map.maps.planet4
Section 138
//Map4_4 (map.maps.planet4.Map4_4)
package map.maps.planet4 {
import flash.display.*;
import map.*;
import map.tutorial.*;
import main.*;
import map.ui.*;
public class Map4_4 extends UrbanMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_44");
public function Map4_4(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new BlueFlyer2SW(this));
_local3.push(new BlueFlyer2SW(this));
_local3.push(new DualGunHover1SW(this, 7));
_local3.push(new SawTank1SW(this, 5));
_local3.push(new Splicer2SW(this));
_local3.push(new MechBot2SW(this, 4));
_local3.push(new RedFlyer2SW(this));
_local3.push(new MechBot2SW(this));
_local3.push(new RedFlyer2SW(this, 7));
_local3.push(new MechBot2SW(this, 3));
_local3.push(new MechBot2SW(this));
_local3.push(new RedFlyer2SW(this, 8));
_local3.push(new MechBot2SW(this));
_local3.push(new RedFlyer2SW(this));
_local3.push(new BlueFlyer2SW(this, 5));
_local3.push(new CannonHover1SW(this, 7));
_local3.push(new BlueFlyer2SW(this, 5));
_local3.push(new SawTank1SW(this, 5));
_local3.push(new Splicer2SW(this));
_local3.push(new RedFlyer2SW(this));
_local3.push(new MechBot2SW(this, 5));
_local3.push(new RedFlyer2SW(this, 5));
_local3.push(new RedFlyer2SW(this));
_local3.push(new RailGunCannonHover1SW(this, 5));
_local3.push(new RedFlyer2SW(this, 5));
_local3.push(new MechBot2SW(this));
_local3.push(new RedFlyer2SW(this, 7));
_local3.push(new MechBot2SW(this));
_local3.push(new RedFlyer2SW(this, 8));
_local3.push(new SawTank1SW(this));
_local3.push(new Splicer2SW(this));
_local3.push(new MechBot2SW(this, 4));
_local3.push(new MechBot2SW(this));
_local3.push(new RedFlyer2SW(this, 8));
_local3.push(new MechBot2SW(this));
_local3.push(new RedFlyer2SW(this));
_spawnManager.waves = _local3;
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_10"), 5));
}
override public function getNewMap():Map{
return (new Map4_4(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map4_5(_stage, _ui));
}
override public function get nextId():int{
return (45);
}
}
}//package map.maps.planet4
Section 139
//Map4_5 (map.maps.planet4.Map4_5)
package map.maps.planet4 {
import flash.display.*;
import map.*;
import main.*;
import map.ui.*;
import map.maps.theEnd.*;
public class Map4_5 extends UrbanMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = Main.bundle.getString("MISSION_45");
public function Map4_5(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new UltimateBoss1SW(this));
_local3.push(new RedFlyerBonus3SW(this));
_local3.push(new RedFlyerBonus3SW(this, 3));
_local3.push(new RedFlyerBonus3SW(this));
_local3.push(new RedFlyerBonus3SW(this, 3));
_local3.push(new RedFlyerBonus3SW(this));
_local3.push(new RedFlyerBonus3SW(this, 3));
_local3.push(new RedFlyerBonus3SW(this));
_local3.push(new RedFlyerBonus3SW(this, 3));
_spawnManager.waves = _local3;
}
override public function getNewMap():Map{
return (new Map4_5(_stage, _ui));
}
override public function getNextMap():Map{
return (new Map4_6(_stage, _ui));
}
override public function get nextId():int{
return (46);
}
}
}//package map.maps.planet4
Section 140
//MechBot2SW (map.maps.planet4.MechBot2SW)
package map.maps.planet4 {
import map.*;
import map.spawn.*;
import map.units.planet4.*;
public class MechBot2SW extends SpawnWave {
private static const COUNT:int = 2;
public function MechBot2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new MechBot(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet4
Section 141
//RailGunCannonHover1SW (map.maps.planet4.RailGunCannonHover1SW)
package map.maps.planet4 {
import map.*;
import map.spawn.*;
import map.units.planet4.*;
import map.items.weapons.*;
public class RailGunCannonHover1SW extends SpawnWave {
private static const COUNT:int = 1;
public function RailGunCannonHover1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local2:CannonHover;
var _local1:int;
while (_local1 < count) {
_local2 = new CannonHover(2);
_local2.dropItem = new RailgunItem();
spawns.push(new Spawn(_map, _local2, Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet4
Section 142
//RedFlyer2SW (map.maps.planet4.RedFlyer2SW)
package map.maps.planet4 {
import map.*;
import map.spawn.*;
import map.units.planet4.*;
public class RedFlyer2SW extends SpawnWave {
private static const COUNT:int = 2;
public function RedFlyer2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new RedFlyer(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet4
Section 143
//RedFlyerBonus3SW (map.maps.planet4.RedFlyerBonus3SW)
package map.maps.planet4 {
import map.*;
import map.spawn.*;
import map.items.impl.*;
import map.units.planet4.*;
public class RedFlyerBonus3SW extends SpawnWave {
private static const COUNT:int = 3;
public function RedFlyerBonus3SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:RedFlyer = new RedFlyer();
_local1.dropItem = new Shield();
var _local2:RedFlyer = new RedFlyer();
_local2.dropItem = new Medikit();
spawns.push(new Spawn(_map, new RedFlyer(), Math.floor((Math.random() * 4))));
spawns.push(new Spawn(_map, _local1, Math.floor((Math.random() * 4))));
spawns.push(new Spawn(_map, _local2, Math.floor((Math.random() * 4))));
}
}
}//package map.maps.planet4
Section 144
//RocketLauncherMechBoss1SW (map.maps.planet4.RocketLauncherMechBoss1SW)
package map.maps.planet4 {
import map.*;
import map.spawn.*;
import map.units.planet4.*;
import map.items.weapons.*;
public class RocketLauncherMechBoss1SW extends SpawnWave {
private static const COUNT:int = 1;
public function RocketLauncherMechBoss1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local2:MechBoss;
var _local1:int;
while (_local1 < count) {
_local2 = new MechBoss();
_local2.dropItem = new RocketLauncherItem();
spawns.push(new Spawn(_map, _local2, Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet4
Section 145
//SawTank1SW (map.maps.planet4.SawTank1SW)
package map.maps.planet4 {
import map.*;
import map.spawn.*;
import map.units.planet4.*;
public class SawTank1SW extends SpawnWave {
private static const COUNT:int = 1;
public function SawTank1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new SawTank(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet4
Section 146
//Splicer2SW (map.maps.planet4.Splicer2SW)
package map.maps.planet4 {
import map.*;
import map.spawn.*;
import map.units.planet4.*;
public class Splicer2SW extends SpawnWave {
private static const COUNT:int = 2;
public function Splicer2SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new Splicer(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet4
Section 147
//UltimateBoss1SW (map.maps.planet4.UltimateBoss1SW)
package map.maps.planet4 {
import map.*;
import map.spawn.*;
import map.units.planet4.*;
public class UltimateBoss1SW extends SpawnWave {
private static const COUNT:int = 1;
public function UltimateBoss1SW(_arg1:Map, _arg2:int=1){
super(_arg1, COUNT, _arg2);
}
override public function prepare():void{
var _local1:int;
while (_local1 < count) {
spawns.push(new Spawn(_map, new UltimateBoss(), Math.floor((Math.random() * 4))));
_local1++;
};
}
}
}//package map.maps.planet4
Section 148
//UrbanMap (map.maps.planet4.UrbanMap)
package map.maps.planet4 {
import flash.display.*;
import map.*;
import map.ui.*;
import map.ui.titles.*;
public class UrbanMap extends Map {
public function UrbanMap(_arg1:Stage, _arg2:String, _arg3:MapUI, _arg4:int, _arg5:int, _arg6:int, _arg7:int){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
override public function get underlay():MovieClip{
return (new Episode4Underlay());
}
override public function get episodeTitle():EpisodeTitle{
var _local1:Episode4Title = new Episode4Title();
_local1.title = _title;
return (_local1);
}
}
}//package map.maps.planet4
Section 149
//Map4_6 (map.maps.theEnd.Map4_6)
package map.maps.theEnd {
import flash.display.*;
import map.*;
import map.tutorial.*;
import main.*;
import map.ui.*;
import map.ui.titles.*;
import map.maps.planet1.*;
import map.maps.planet4.*;
public class Map4_6 extends DesertMap {
private static const HERO_X:int = 640;
private static const HERO_Y:int = 480;
private static const WIDTH:int = 0x0500;
private static const HEIGHT:int = 960;
private static const TITLE:String = "";
public function Map4_6(_arg1:Stage, _arg2:MapUI){
super(_arg1, TITLE, _arg2, WIDTH, HEIGHT, HERO_X, HERO_Y);
var _local3:Array = new Array();
_local3.push(new BlueFlyer2SW(this, 10));
_local3.push(new FunSpiderMe1SW(this, 15));
_local3.push(new FunSpiderMe1SW(this));
_local3.push(new PowerUpTutorialSpider3SW(this));
_local3.push(new FunSpiderMe1SW(this));
_local3.push(new PowerUpTutorialSpider3SW(this));
_local3.push(new TutorialSpider1SW(this));
_local3.push(new FunSpiderAndrey1SW(this, 5));
_local3.push(new FunSpiderAndrey1SW(this));
_local3.push(new PowerUpTutorialSpider3SW(this));
_local3.push(new FunSpiderAndrey1SW(this));
_local3.push(new PowerUpTutorialSpider3SW(this));
_local3.push(new FunSpiderMe1SW(this));
_local3.push(new PowerUpTutorialSpider3SW(this));
_local3.push(new FunSpiderMe1SW(this));
_spawnManager.waves = _local3;
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_11"), 5));
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_12"), 15));
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_13"), 25));
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_14"), 35));
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_15"), 45));
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_16"), 55));
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_17"), 65));
_tutorialManager.addTip(new TutorialTip(_stage, Main.bundle.getString("TIP_18"), 75));
}
override public function getNewMap():Map{
return (new Map4_6(_stage, _ui));
}
override public function getNextMap():Map{
return (null);
}
override public function get episodeTitle():EpisodeTitle{
var _local1:Episode1Title = new Episode1Title(0);
_local1.title = _title;
return (_local1);
}
override public function get nextId():int{
return (0);
}
}
}//package map.maps.theEnd
Section 150
//MapLoader (map.maps.MapLoader)
package map.maps {
import flash.display.*;
import map.*;
import map.ui.*;
import map.maps.planet3.*;
import map.maps.planet1.*;
import map.maps.planet4.*;
import map.maps.planet2.*;
import map.maps.theEnd.*;
public class MapLoader {
public static function getMapById(_arg1:Stage, _arg2:MapUI, _arg3:int):Map{
switch (_arg3){
case 10:
return (new Map1_0(_arg1, _arg2));
case 11:
return (new Map1_1(_arg1, _arg2));
case 12:
return (new Map1_2(_arg1, _arg2));
case 13:
return (new Map1_3(_arg1, _arg2));
case 14:
return (new Map1_4(_arg1, _arg2));
case 15:
return (new Map1_5(_arg1, _arg2));
case 21:
return (new Map2_1(_arg1, _arg2));
case 22:
return (new Map2_2(_arg1, _arg2));
case 23:
return (new Map2_3(_arg1, _arg2));
case 31:
return (new Map3_1(_arg1, _arg2));
case 32:
return (new Map3_2(_arg1, _arg2));
case 33:
return (new Map3_3(_arg1, _arg2));
case 34:
return (new Map3_4(_arg1, _arg2));
case 41:
return (new Map4_1(_arg1, _arg2));
case 42:
return (new Map4_2(_arg1, _arg2));
case 43:
return (new Map4_3(_arg1, _arg2));
case 44:
return (new Map4_4(_arg1, _arg2));
case 45:
return (new Map4_5(_arg1, _arg2));
case 46:
return (new Map4_6(_arg1, _arg2));
};
return (null);
}
}
}//package map.maps
Section 151
//AmmoPackPerk (map.perks.impl.AmmoPackPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class AmmoPackPerk extends Perk {
private static const REQUIRED_LEVEL:int = 9;
private static const MAX_LEVEL:int = 2;
private static const NAME:String = "AMMO_PACK";
public static const INCREMENT:int = 10;
public function AmmoPackPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), (("+" + INCREMENT.toString()) + Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"))), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 152
//AttackSpeedBoostPerk (map.perks.impl.AttackSpeedBoostPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class AttackSpeedBoostPerk extends Perk {
private static const REQUIRED_LEVEL:int = 2;
private static const MAX_LEVEL:int = 2;
private static const NAME:String = "ATTACK_SPEED_BOOST";
public static const INCREMENT:int = 10;
public function AttackSpeedBoostPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), (("+" + INCREMENT.toString()) + Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"))), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 153
//BonusMagnetPerk (map.perks.impl.BonusMagnetPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class BonusMagnetPerk extends Perk {
public static const MULTIPLIER:int = 2;
private static const REQUIRED_LEVEL:int = 4;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "BONUS_MAGNET";
public function BonusMagnetPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), MULTIPLIER.toString()), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 154
//BonusWardenPerk (map.perks.impl.BonusWardenPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class BonusWardenPerk extends Perk {
private static const REQUIRED_LEVEL:int = 4;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "BONUS_WARDEN";
public static const INCREMENT:int = 30;
public function BonusWardenPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), INCREMENT.toString()), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 155
//CombatDronePerk (map.perks.impl.CombatDronePerk)
package map.perks.impl {
import map.units.hero.*;
import main.*;
import map.perks.*;
import map.units.drones.*;
public class CombatDronePerk extends DronePerk {
private var _perkManager:PerkManager;
private static const REQUIRED_LEVEL:int = 3;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "COMBAT_DRONE";
public function CombatDronePerk(_arg1:PerkManager){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION")), REQUIRED_LEVEL, MAX_LEVEL);
_perkManager = _arg1;
}
override public function addDrone(_arg1:Hero):void{
drone = new CombatDrone(_arg1);
drone.addToMap(_arg1.map, _arg1.map.drones);
placeDrone(_arg1);
}
}
}//package map.perks.impl
Section 156
//CunningReloader (map.perks.impl.CunningReloader)
package map.perks.impl {
import main.*;
import map.perks.*;
public class CunningReloader extends Perk {
public static const STUN:int = 2000;
private static const REQUIRED_LEVEL:int = 4;
private static const MAX_LEVEL:int = 1;
public static const SPLASH2:int = 70000;
public static const DAMAGE:int = 30;
public static const IMPULSE:int = 8;
private static const NAME:String = "CUNNING_RELOADER";
public function CunningReloader(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), ((Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION")) + DAMAGE.toString()) + Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION_2"), (STUN / 1000).toString())), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 157
//DodgePerk (map.perks.impl.DodgePerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class DodgePerk extends Perk {
private static const REQUIRED_LEVEL:int = 1;
private static const MAX_LEVEL:int = 3;
private static const NAME:String = "DODGE";
public static const INCREMENT:int = 15;
public function DodgePerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), INCREMENT.toString()), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 158
//EnergyWeaponsMasterPerk (map.perks.impl.EnergyWeaponsMasterPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class EnergyWeaponsMasterPerk extends Perk {
private static const REQUIRED_LEVEL:int = 10;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "ENERGY_WEAPONS_MASTER";
public static const INCREMENT:int = 15;
public function EnergyWeaponsMasterPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), INCREMENT.toString()), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 159
//ExplosiveWeaponsMasterPerk (map.perks.impl.ExplosiveWeaponsMasterPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class ExplosiveWeaponsMasterPerk extends Perk {
private static const REQUIRED_LEVEL:int = 8;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "EXPLOSIVE_WEAPONS_MASTER";
public static const INCREMENT:int = 15;
public function ExplosiveWeaponsMasterPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), INCREMENT.toString()), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 160
//FastloaderPerk (map.perks.impl.FastloaderPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class FastloaderPerk extends Perk {
private static const REQUIRED_LEVEL:int = 4;
private static const MAX_LEVEL:int = 2;
private static const NAME:String = "FASTLOADER";
public static const INCREMENT:int = 30;
public function FastloaderPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), INCREMENT.toString()), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 161
//FirearmsMasterPerk (map.perks.impl.FirearmsMasterPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class FirearmsMasterPerk extends Perk {
private static const REQUIRED_LEVEL:int = 2;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "FIREARMS_MASTER";
public static const INCREMENT:int = 25;
public function FirearmsMasterPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), INCREMENT.toString()), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 162
//GreedPerk (map.perks.impl.GreedPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class GreedPerk extends Perk {
private static const REQUIRED_LEVEL:int = 2;
private static const MAX_LEVEL:int = 0;
private static const NAME:String = "GREED";
public static const INCREMENT:int = 1;
public function GreedPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), INCREMENT.toString()), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 163
//InsectsMasterPerk (map.perks.impl.InsectsMasterPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class InsectsMasterPerk extends Perk {
public static const MULTIPLIER:int = 2;
private static const REQUIRED_LEVEL:int = 6;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "INSECTS_MASTER";
public function InsectsMasterPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), MULTIPLIER.toString()), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 164
//MineLayerPerk (map.perks.impl.MineLayerPerk)
package map.perks.impl {
import map.units.hero.*;
import map.*;
import main.*;
import map.perks.*;
import flash.utils.*;
public class MineLayerPerk extends Perk {
private var mines:Array;
private var _map:Map;
private var _lastMineTick:int;
private var _hero:Hero;
private static const DELAY:int = 5000;
private static const REQUIRED_LEVEL:int = 10;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "MINE_LAYER";
public static const DAMAGE:int = 120;
public function MineLayerPerk(){
_lastMineTick = getTimer();
mines = new Array();
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), ((Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION")) + (DELAY / 1000).toString()) + Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION_2"), DAMAGE.toString())), REQUIRED_LEVEL, MAX_LEVEL);
}
public function set hero(_arg1:Hero):void{
_hero = _arg1;
}
private function layMine():void{
var _local1:Mine;
_local1 = new Mine(_map, _hero);
_local1.x = _hero.x;
_local1.y = _hero.y;
mines.push(_local1);
_map.addChildAt(_local1, 1);
}
public function set map(_arg1:Map):void{
_map = _arg1;
}
public function tick(_arg1:Number):void{
if (_map == null){
return;
};
if (_arg1 > (_lastMineTick + DELAY)){
layMine();
_lastMineTick = getTimer();
};
var _local2:int;
while (_local2 < mines.length) {
(mines[_local2] as Mine).tick(_arg1);
_local2++;
};
}
}
}//package map.perks.impl
Section 165
//MissilesMasterPerk (map.perks.impl.MissilesMasterPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class MissilesMasterPerk extends Perk {
private static const REQUIRED_LEVEL:int = 12;
private static const MAX_LEVEL:int = 2;
private static const NAME:String = "MISSILES_MASTER";
public static const MULTIPLIER_AT_LEVEL:Array = [1, 2, 3];
public function MissilesMasterPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION")), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 166
//RadioactiveBulletsPerk (map.perks.impl.RadioactiveBulletsPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class RadioactiveBulletsPerk extends Perk {
private static const REQUIRED_LEVEL:int = 2;
public static const IRRADIATE_TICK:int = 1000;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "RADIOACTIVE_BULLETS";
public static const IRRADIATE_DAMAGE_VARIATION:int = 3;
public static const DAMAGE:int = 1;
public static const IRRADIATE_DAMAGE:int = 1;
public function RadioactiveBulletsPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), ((IRRADIATE_DAMAGE.toString() + "-") + IRRADIATE_DAMAGE_VARIATION.toString())), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 167
//RepairDronePerk (map.perks.impl.RepairDronePerk)
package map.perks.impl {
import map.units.hero.*;
import main.*;
import map.perks.*;
import map.units.drones.*;
public class RepairDronePerk extends DronePerk {
private var _perkManager:PerkManager;
private static const REQUIRED_LEVEL:int = 3;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "REPAIR_DRONE";
public function RepairDronePerk(_arg1:PerkManager){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION")), REQUIRED_LEVEL, MAX_LEVEL);
_perkManager = _arg1;
}
override public function addDrone(_arg1:Hero):void{
drone = new RepairDrone(_arg1);
drone.addToMap(_arg1.map, _arg1.map.drones);
placeDrone(_arg1);
}
}
}//package map.perks.impl
Section 168
//RepairPerk (map.perks.impl.RepairPerk)
package map.perks.impl {
import map.units.hero.*;
import main.*;
import map.perks.*;
import map.items.impl.*;
public class RepairPerk extends Perk {
private static const REQUIRED_LEVEL:int = 2;
private static const MAX_LEVEL:int = 0;
private static const NAME:String = "REPAIR";
public function RepairPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION")), REQUIRED_LEVEL, MAX_LEVEL);
}
public function execute(_arg1:Hero):void{
_arg1.heal(_arg1.maxHp);
_arg1.pickItem(new Shield());
}
}
}//package map.perks.impl
Section 169
//RunnerPerk (map.perks.impl.RunnerPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class RunnerPerk extends Perk {
private static const REQUIRED_LEVEL:int = 2;
private static const MAX_LEVEL:int = 2;
private static const NAME:String = "RUNNER";
public static const INCREMENT:int = 10;
public function RunnerPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), INCREMENT.toString()), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 170
//ScintistPerk (map.perks.impl.ScintistPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class ScintistPerk extends Perk {
private static const REQUIRED_LEVEL:int = 2;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "SCINTIST";
public static const INCREMENT:int = 10;
public function ScintistPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), INCREMENT.toString()), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 171
//SharpshooterPerk (map.perks.impl.SharpshooterPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class SharpshooterPerk extends Perk {
public static const MULTIPLIER:int = 2;
private static const REQUIRED_LEVEL:int = 9;
private static const MAX_LEVEL:int = 2;
private static const NAME:String = "SHARPSHOOTER";
public function SharpshooterPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), (Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION")) + MULTIPLIER.toString()), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 172
//ShockDronePerk (map.perks.impl.ShockDronePerk)
package map.perks.impl {
import map.units.hero.*;
import main.*;
import map.perks.*;
import map.units.drones.*;
public class ShockDronePerk extends DronePerk {
private var _perkManager:PerkManager;
private static const REQUIRED_LEVEL:int = 3;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "SHOCK_DRONE";
public function ShockDronePerk(_arg1:PerkManager){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION")), REQUIRED_LEVEL, MAX_LEVEL);
_perkManager = _arg1;
}
override public function addDrone(_arg1:Hero):void{
drone = new ShockDrone(_arg1);
drone.addToMap(_arg1.map, _arg1.map.drones);
placeDrone(_arg1);
}
}
}//package map.perks.impl
Section 173
//SniperPerk (map.perks.impl.SniperPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class SniperPerk extends Perk {
private static const REQUIRED_LEVEL:int = 5;
private static const MAX_LEVEL:int = 3;
private static const NAME:String = "SNIPER";
public static const INCREMENT:int = 2;
public function SniperPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), INCREMENT.toString()), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 174
//TheBlackHolePerk (map.perks.impl.TheBlackHolePerk)
package map.perks.impl {
import map.units.hero.*;
import main.*;
import map.perks.*;
import map.items.impl.*;
public class TheBlackHolePerk extends Perk {
private static const REQUIRED_LEVEL:int = 15;
private static const MAX_LEVEL:int = 0;
private static const NAME:String = "THE_BLACK_HOLE";
public function TheBlackHolePerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION")), REQUIRED_LEVEL, MAX_LEVEL);
}
public function execute(_arg1:Hero):void{
_arg1.pickItem(new BlackHole());
}
}
}//package map.perks.impl
Section 175
//TheChosenOnePerk (map.perks.impl.TheChosenOnePerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class TheChosenOnePerk extends Perk {
private static const REQUIRED_LEVEL:int = 12;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "THE_CHOOSEN_ONE";
public static const INCREMENT:int = 7;
public function TheChosenOnePerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), INCREMENT.toString()), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 176
//UnstoppablePerk (map.perks.impl.UnstoppablePerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class UnstoppablePerk extends Perk {
private static const REQUIRED_LEVEL:int = 3;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "UNSTOPPABLE";
public function UnstoppablePerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION")), REQUIRED_LEVEL, MAX_LEVEL);
}
}
}//package map.perks.impl
Section 177
//WeaponFocusPerk (map.perks.impl.WeaponFocusPerk)
package map.perks.impl {
import main.*;
import map.perks.*;
public class WeaponFocusPerk extends Perk {
private var _type:int;// = 0
private static const REQUIRED_LEVEL:int = 8;
public static const AMMO_INCREMENT:int = 3;
private static const MAX_LEVEL:int = 1;
private static const NAME:String = "WEAPON_FOCUS";
public static const RELOADING_INCREMENT:int = 20;
public static const DAMAGE_INCREMENT:int = 20;
public function WeaponFocusPerk(){
super(Main.bundle.getString((("PERK_" + NAME) + "_TITLE")), ((Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION"), AMMO_INCREMENT.toString()) + DAMAGE_INCREMENT.toString()) + Main.bundle.getString((("PERK_" + NAME) + "_DESCRIPTION_2"), RELOADING_INCREMENT.toString())), REQUIRED_LEVEL, MAX_LEVEL);
}
public function get type():int{
return (_type);
}
public function set type(_arg1:int):void{
_type = _arg1;
}
}
}//package map.perks.impl
Section 178
//DronePerk (map.perks.DronePerk)
package map.perks {
import map.units.hero.*;
import map.weapons.*;
import map.units.drones.*;
public class DronePerk extends Perk {
protected var drone:Drone;
public function DronePerk(_arg1:String, _arg2:String, _arg3:int, _arg4:int){
super(_arg1, _arg2, _arg3, _arg4);
}
public function placeDrone(_arg1:Hero):void{
drone.x = (_arg1.x - (Math.random() * 50));
drone.y = (_arg1.y + (Math.random() * 50));
drone.rotation = (Math.random() * 360);
}
public function removeDrone():void{
if ((drone.weapon is ShellWeapon)){
(drone.weapon as ShellWeapon).removeBullets();
};
drone.removeFromMap();
}
public function addDrone(_arg1:Hero):void{
}
}
}//package map.perks
Section 179
//Mine (map.perks.Mine)
package map.perks {
import flash.display.*;
import map.units.hero.*;
import map.*;
import map.units.unit.*;
import map.units.utils.*;
import map.weapons.*;
import flash.utils.*;
public class Mine extends MovieClip {
private var _dead:Boolean;// = false
private var _dying:Boolean;// = false
private var _lastTick:int;
private var _bornTime:int;
private var _hero:Hero;
private var _dyingTime:int;
private var _map:Map;
public static const LIFE_TIME:int = 10000;
public static const DETECTION_RADIUS2:int = 400;
public static const DIE_TIME:int = 700;
public static const TICK:int = 500;
public function Mine(_arg1:Map, _arg2:Hero){
_bornTime = getTimer();
_lastTick = getTimer();
_dyingTime = getTimer();
addFrameScript(9, frame10, 13, frame14);
super();
_map = _arg1;
_hero = _arg2;
}
private function die():void{
_dead = true;
new Explosion(_map).explode(x, y, 1);
_map.removeChild(this);
var _local1:MineWeapon = new MineWeapon(_hero);
SplashWeapon.causeRadialDamage(_local1, x, y, false);
}
function frame10(){
gotoAndPlay("live");
}
public function tick(_arg1:Number):void{
if (!_dead){
if (((!(_dying)) && ((_arg1 > (_lastTick + TICK))))){
if ((((_arg1 > (_bornTime + LIFE_TIME))) || (detectCollision()))){
gotoAndPlay("die");
_dyingTime = getTimer();
_dying = true;
};
};
if (((_dying) && ((_arg1 > (_dyingTime + DIE_TIME))))){
die();
};
};
}
private function detectCollision():Boolean{
var _local3:Unit;
var _local1:Boolean;
var _local2:int;
while (_local2 < _map.mobs.units.length) {
_local3 = (_map.mobs.units[_local2] as Unit);
if (MathUtils.distance2(_local3.x, _local3.y, x, y) < DETECTION_RADIUS2){
_local1 = true;
break;
};
_local2++;
};
return (_local1);
}
function frame14(){
gotoAndPlay("die");
}
}
}//package map.perks
Section 180
//MineWeapon (map.perks.MineWeapon)
package map.perks {
import map.units.hero.*;
import map.units.unit.*;
import map.units.utils.*;
import flash.geom.*;
import map.weapons.*;
import map.perks.impl.*;
public class MineWeapon extends AbstractWeapon {
private var _hero:Hero;
public function MineWeapon(_arg1:Hero){
super({impulse:10, stun:200, splash2:2700}, _arg1);
_hero = _arg1;
}
override public function getDamage(_arg1:Angle=null, _arg2:Point=null, _arg3:Impulse=null):Damage{
var _local4:Damage = new Damage();
_local4.angle = _arg1;
_local4.point = _arg2;
_local4.impulse = _arg3;
_local4.value = MineLayerPerk.DAMAGE;
_local4.stunTime = stun;
_local4.irradiator = _owner.irradiator;
_local4.melee = false;
return (_local4);
}
}
}//package map.perks
Section 181
//Perk (map.perks.Perk)
package map.perks {
import main.*;
public class Perk {
protected var _level:int;// = 0
protected var _requiredLevel:int;// = 0
private var _name:String;
private var _description:String;
protected var _maxLevel:int;// = 0
public function Perk(_arg1:String, _arg2:String, _arg3:int, _arg4:int){
_requiredLevel = _arg3;
_maxLevel = _arg4;
_name = _arg1;
_description = _arg2;
}
public function get maxLevel():int{
return (_maxLevel);
}
public function get level():int{
return (_level);
}
public function get requiredLevel():int{
return (_requiredLevel);
}
public function set level(_arg1:int):void{
_level = _arg1;
}
public function get name():String{
return (_name);
}
public function levelUp():void{
if ((((_level < _maxLevel)) || ((_maxLevel == 0)))){
_level++;
if (Main.BUILD == Main.MOFUNZONE){
};
};
}
public function isAvailableNow():Boolean{
return ((((_maxLevel == 0)) || ((_level < _maxLevel))));
}
public function isNew(_arg1:int):Boolean{
return ((((_requiredLevel > 1)) && ((_requiredLevel == _arg1))));
}
public function isAvailable(_arg1:int):Boolean{
return ((((_maxLevel == 0)) || ((((_level < _maxLevel)) && ((_arg1 >= _requiredLevel))))));
}
public function isMy():Boolean{
return ((_level > 0));
}
public function isMaxLevel():Boolean{
return (((!((_maxLevel == 0))) && ((_level == _maxLevel))));
}
public function get description():String{
return (_description);
}
}
}//package map.perks
Section 182
//PerkManager (map.perks.PerkManager)
package map.perks {
import map.units.hero.*;
import map.*;
import map.perks.impl.*;
import flash.net.*;
public class PerkManager extends HeroManager {
private var _greedPerk:GreedPerk;
private var _theChosenOnePerk:TheChosenOnePerk;
private var _fastloaderPerk:FastloaderPerk;
private var _sniperPerk:SniperPerk;
private var currentDronePerk:DronePerk;
private var _explosiveWeaponMasterPerk:ExplosiveWeaponsMasterPerk;
private var _firearmsMasterPerk:FirearmsMasterPerk;
private var _repairPerk:RepairPerk;
private var _attackSpeedBustPerk:AttackSpeedBoostPerk;
private var _shockDronePerk:ShockDronePerk;
private var _perks:Array;
private var _mineLayerPerk:MineLayerPerk;
private var _sharpshooterPerk:SharpshooterPerk;
private var _bonusMagnetPerk:BonusMagnetPerk;
private var _combatDronePerk:CombatDronePerk;
private var _cunningReloader:CunningReloader;
private var _repairDronePerk:RepairDronePerk;
private var _insectsMasterPerk:InsectsMasterPerk;
private var _radioactiveBulletsPerk:RadioactiveBulletsPerk;
private var _unstoppablePerk:UnstoppablePerk;
private var _theBlackHolePerk:TheBlackHolePerk;
private var _weaponFocusPerk:WeaponFocusPerk;
private var _runnerPerk:RunnerPerk;
private var _dodgePerk:DodgePerk;
private var _energyWeaponMasterPerk:EnergyWeaponsMasterPerk;
private var _ammoPack:AmmoPackPerk;
private var _bonusWardenPerk:BonusWardenPerk;
private var _missilesMasterPerk:MissilesMasterPerk;
private var _scintistPerk:ScintistPerk;
public function PerkManager(_arg1:Hero){
_ammoPack = new AmmoPackPerk();
_attackSpeedBustPerk = new AttackSpeedBoostPerk();
_bonusMagnetPerk = new BonusMagnetPerk();
_bonusWardenPerk = new BonusWardenPerk();
_combatDronePerk = new CombatDronePerk((this as PerkManager));
_cunningReloader = new CunningReloader();
_energyWeaponMasterPerk = new EnergyWeaponsMasterPerk();
_dodgePerk = new DodgePerk();
_explosiveWeaponMasterPerk = new ExplosiveWeaponsMasterPerk();
_fastloaderPerk = new FastloaderPerk();
_firearmsMasterPerk = new FirearmsMasterPerk();
_greedPerk = new GreedPerk();
_insectsMasterPerk = new InsectsMasterPerk();
_mineLayerPerk = new MineLayerPerk();
_missilesMasterPerk = new MissilesMasterPerk();
_radioactiveBulletsPerk = new RadioactiveBulletsPerk();
_repairDronePerk = new RepairDronePerk((this as PerkManager));
_repairPerk = new RepairPerk();
_runnerPerk = new RunnerPerk();
_scintistPerk = new ScintistPerk();
_sharpshooterPerk = new SharpshooterPerk();
_shockDronePerk = new ShockDronePerk((this as PerkManager));
_sniperPerk = new SniperPerk();
_theBlackHolePerk = new TheBlackHolePerk();
_theChosenOnePerk = new TheChosenOnePerk();
_unstoppablePerk = new UnstoppablePerk();
_weaponFocusPerk = new WeaponFocusPerk();
_perks = [_ammoPack, _attackSpeedBustPerk, _bonusMagnetPerk, _bonusWardenPerk, _combatDronePerk, _cunningReloader, _energyWeaponMasterPerk, _dodgePerk, _explosiveWeaponMasterPerk, _fastloaderPerk, _firearmsMasterPerk, _greedPerk, _insectsMasterPerk, _mineLayerPerk, _missilesMasterPerk, _radioactiveBulletsPerk, _repairDronePerk, _repairPerk, _runnerPerk, _scintistPerk, _sharpshooterPerk, _shockDronePerk, _sniperPerk, _theBlackHolePerk, _theChosenOnePerk, _unstoppablePerk, _weaponFocusPerk];
super(_arg1);
_mineLayerPerk.hero = _arg1;
}
public function get attackSpeedBustPerk():AttackSpeedBoostPerk{
return (_attackSpeedBustPerk);
}
public function get theBlackHolePerk():TheBlackHolePerk{
return (_theBlackHolePerk);
}
public function get missilesMasterPerk():MissilesMasterPerk{
return (_missilesMasterPerk);
}
public function focusWeaponLevelUp():void{
weaponFocusPerk.levelUp();
weaponFocusPerk.type = _hero.weapon.type;
}
public function get ammoPack():AmmoPackPerk{
return (_ammoPack);
}
public function get bonusMagnetPerk():BonusMagnetPerk{
return (_bonusMagnetPerk);
}
public function get combatDronePerk():CombatDronePerk{
return (_combatDronePerk);
}
public function save():void{
var _local1:SharedObject = SharedObject.getLocal("game_data");
_local1.data.ammoPack = ammoPack.level;
_local1.data.attackSpeedBustPerk = attackSpeedBustPerk.level;
_local1.data.bonusMagnetPerk = bonusMagnetPerk.level;
_local1.data.bonusWardenPerk = bonusWardenPerk.level;
_local1.data.combatDronePerk = combatDronePerk.level;
_local1.data.cunningReloader = cunningReloader.level;
_local1.data.energyWeaponMasterPerk = energyWeaponMasterPerk.level;
_local1.data.evasionPerk = dodgePerk.level;
_local1.data.explosiveWeaponMasterPerk = explosiveWeaponMasterPerk.level;
_local1.data.fastloaderPerk = fastloaderPerk.level;
_local1.data.firearmsMasterPerk = firearmsMasterPerk.level;
_local1.data.greedPerk = greedPerk.level;
_local1.data.insectsMasterPerk = insectsMasterPerk.level;
_local1.data.mineLayerPerk = mineLayerPerk.level;
_local1.data.missilesMasterPerk = missilesMasterPerk.level;
_local1.data.radioactiveBulletsPerk = radioactiveBulletsPerk.level;
_local1.data.repairDronePerk = repairDronePerk.level;
_local1.data.repairPerk = repairPerk.level;
_local1.data.runnerPerk = runnerPerk.level;
_local1.data.scintistPerk = scintistPerk.level;
_local1.data.sharpshooterPerk = sharpshooterPerk.level;
_local1.data.shockDronePerk = shockDronePerk.level;
_local1.data.sniperPerk = sniperPerk.level;
_local1.data.theBlackHolePerk = theBlackHolePerk.level;
_local1.data.theChosenOnePerk = theChosenOnePerk.level;
_local1.data.unstoppablePerk = unstoppablePerk.level;
_local1.data.weaponFocusPerk = weaponFocusPerk.level;
_local1.flush();
}
public function get fastloaderPerk():FastloaderPerk{
return (_fastloaderPerk);
}
public function get cunningReloader():CunningReloader{
return (_cunningReloader);
}
public function get repairDronePerk():RepairDronePerk{
return (_repairDronePerk);
}
public function combatDroneLevelUp():void{
removeCurrentDrone();
combatDronePerk.levelUp();
currentDronePerk = combatDronePerk;
placeDrones();
}
public function tick(_arg1:Number):void{
if (mineLayerPerk.level != 0){
mineLayerPerk.tick(_arg1);
};
}
public function get greedPerk():GreedPerk{
return (_greedPerk);
}
public function get repairPerk():RepairPerk{
return (_repairPerk);
}
public function get firearmsMasterPerk():FirearmsMasterPerk{
return (_firearmsMasterPerk);
}
public function get scintistPerk():ScintistPerk{
return (_scintistPerk);
}
public function get sharpshooterPerk():SharpshooterPerk{
return (_sharpshooterPerk);
}
public function get sniperPerk():SniperPerk{
return (_sniperPerk);
}
public function get shockDronePerk():ShockDronePerk{
return (_shockDronePerk);
}
public function get unstoppablePerk():UnstoppablePerk{
return (_unstoppablePerk);
}
public function get explosiveWeaponMasterPerk():ExplosiveWeaponsMasterPerk{
return (_explosiveWeaponMasterPerk);
}
public function get bonusWardenPerk():BonusWardenPerk{
return (_bonusWardenPerk);
}
public function repairDroneLevelUp():void{
removeCurrentDrone();
repairDronePerk.levelUp();
currentDronePerk = repairDronePerk;
placeDrones();
}
public function get radioactiveBulletsPerk():RadioactiveBulletsPerk{
return (_radioactiveBulletsPerk);
}
public function get theChosenOnePerk():TheChosenOnePerk{
return (_theChosenOnePerk);
}
public function get runnerPerk():RunnerPerk{
return (_runnerPerk);
}
private function removeCurrentDrone():void{
if (currentDronePerk != null){
currentDronePerk.level = 0;
currentDronePerk.removeDrone();
};
}
public function getAvailableList():Array{
var _local1:int = _hero.level;
var _local2:Array = new Array();
var _local3:int;
while (_local3 < _perks.length) {
if ((((_perks[_local3] as Perk).isAvailable(_local1)) && ((_perks[_local3] as Perk).isNew(_local1)))){
_local2.push(_perks[_local3]);
};
_local3++;
};
_local3 = 0;
while (_local3 < _perks.length) {
if ((((_perks[_local3] as Perk).isAvailable(_local1)) && (!((_perks[_local3] as Perk).isNew(_local1))))){
_local2.push(_perks[_local3]);
};
_local3++;
};
return (_local2);
}
public function get energyWeaponMasterPerk():EnergyWeaponsMasterPerk{
return (_energyWeaponMasterPerk);
}
public function shockDroneLevelUp():void{
removeCurrentDrone();
shockDronePerk.levelUp();
currentDronePerk = shockDronePerk;
placeDrones();
}
public function load():void{
var _local1:SharedObject = SharedObject.getLocal("game_data");
ammoPack.level = _local1.data.ammoPack;
attackSpeedBustPerk.level = _local1.data.attackSpeedBustPerk;
bonusMagnetPerk.level = _local1.data.bonusMagnetPerk;
bonusWardenPerk.level = _local1.data.bonusWardenPerk;
combatDronePerk.level = _local1.data.combatDronePerk;
cunningReloader.level = _local1.data.cunningReloader;
energyWeaponMasterPerk.level = _local1.data.energyWeaponMasterPerk;
dodgePerk.level = _local1.data.evasionPerk;
explosiveWeaponMasterPerk.level = _local1.data.explosiveWeaponMasterPerk;
fastloaderPerk.level = _local1.data.fastloaderPerk;
firearmsMasterPerk.level = _local1.data.firearmsMasterPerk;
greedPerk.level = _local1.data.greedPerk;
insectsMasterPerk.level = _local1.data.insectsMasterPerk;
mineLayerPerk.level = _local1.data.mineLayerPerk;
missilesMasterPerk.level = _local1.data.missilesMasterPerk;
radioactiveBulletsPerk.level = _local1.data.radioactiveBulletsPerk;
repairDronePerk.level = _local1.data.repairDronePerk;
repairPerk.level = _local1.data.repairPerk;
runnerPerk.level = _local1.data.runnerPerk;
scintistPerk.level = _local1.data.scintistPerk;
sharpshooterPerk.level = _local1.data.sharpshooterPerk;
shockDronePerk.level = _local1.data.shockDronePerk;
sniperPerk.level = _local1.data.sniperPerk;
theBlackHolePerk.level = _local1.data.theBlackHolePerk;
theChosenOnePerk.level = _local1.data.theChosenOnePerk;
unstoppablePerk.level = _local1.data.unstoppablePerk;
weaponFocusPerk.level = _local1.data.weaponFocusPerk;
}
public function getMyList():Array{
var _local1:Array = new Array();
var _local2:int;
while (_local2 < _perks.length) {
if ((_perks[_local2] as Perk).isMy()){
_local1.push(_perks[_local2]);
};
_local2++;
};
return (_local1);
}
public function get weaponFocusPerk():WeaponFocusPerk{
return (_weaponFocusPerk);
}
override public function set map(_arg1:Map):void{
_map = _arg1;
_mineLayerPerk.map = _arg1;
}
public function blackHoleLevelUp():void{
theBlackHolePerk.execute(_hero);
}
public function get insectsMasterPerk():InsectsMasterPerk{
return (_insectsMasterPerk);
}
public function get mineLayerPerk():MineLayerPerk{
return (_mineLayerPerk);
}
public function placeDrones():void{
if (repairDronePerk.level > 0){
repairDronePerk.addDrone(_hero);
};
if (shockDronePerk.level > 0){
shockDronePerk.addDrone(_hero);
};
if (combatDronePerk.level > 0){
combatDronePerk.addDrone(_hero);
};
}
public function repairLevelUp():void{
repairPerk.levelUp();
repairPerk.execute(_hero);
}
public function get dodgePerk():DodgePerk{
return (_dodgePerk);
}
}
}//package map.perks
Section 183
//ShockWaveWeapon (map.perks.ShockWaveWeapon)
package map.perks {
import map.units.unit.*;
import map.units.utils.*;
import flash.geom.*;
import map.weapons.*;
import map.perks.impl.*;
public class ShockWaveWeapon extends AbstractWeapon {
public static const DAMAGE:int = 35;
public function ShockWaveWeapon(_arg1:Unit){
super({impulse:CunningReloader.IMPULSE, stun:CunningReloader.STUN, splash2:CunningReloader.SPLASH2}, _arg1);
}
override public function getDamage(_arg1:Angle=null, _arg2:Point=null, _arg3:Impulse=null):Damage{
var _local4:Damage = new Damage();
_local4.angle = _arg1;
_local4.point = _arg2;
_local4.impulse = _arg3;
_local4.value = CunningReloader.DAMAGE;
_local4.stunTime = stun;
_local4.irradiator = _owner.irradiator;
_local4.melee = false;
return (_local4);
}
}
}//package map.perks
Section 184
//Spawn (map.spawn.Spawn)
package map.spawn {
import map.*;
import map.units.unit.*;
import flash.geom.*;
import map.units.relations.*;
public class Spawn {
private var _unit:Unit;
private var _position:Point;
private var _site:int;
private var _time:int;
private var _side:Side;
private var _map:Map;
public static const SHIFT:int = 80;
public static const NORTH:int = 0;
public static const SOUTH:int = 3;
public static const EAST:int = 2;
public static const WEST:int = 1;
public function Spawn(_arg1:Map, _arg2:Unit, _arg3:int=1, _arg4:Side=null, _arg5:Point=null){
_map = _arg1;
_unit = _arg2;
_site = _arg3;
_side = _arg4;
_position = _arg5;
}
public function get unit():Unit{
return (_unit);
}
public function spawn():void{
if (_position != null){
_unit.x = _position.x;
_unit.y = _position.y;
} else {
switch (_site){
case SOUTH:
case NORTH:
_unit.x = (SHIFT + Math.round((Math.random() * (_map.width - (SHIFT * 2)))));
_unit.y = ((_site == NORTH)) ? -(SHIFT) : (_map.height + SHIFT);
break;
case WEST:
case EAST:
_unit.x = ((_site == WEST)) ? -(SHIFT) : (_map.width + SHIFT);
_unit.y = (SHIFT + Math.round((Math.random() * (_map.height - (SHIFT * 2)))));
break;
};
};
switch (_site){
case SOUTH:
_unit.rotation = 0;
break;
case NORTH:
_unit.rotation = 180;
break;
case WEST:
_unit.rotation = 90;
break;
case EAST:
_unit.rotation = -90;
break;
};
_unit.addToMap(_map, ((_side == null)) ? _map.mobs : _side);
}
public function get psi():Number{
return (_unit.psi);
}
}
}//package map.spawn
Section 185
//SpawnEvent (map.spawn.SpawnEvent)
package map.spawn {
import flash.events.*;
public class SpawnEvent extends Event {
public static const SPAWN:String = "spawn";
public function SpawnEvent(_arg1:String){
super(_arg1, true, false);
}
}
}//package map.spawn
Section 186
//SpawnManager (map.spawn.SpawnManager)
package map.spawn {
import flash.events.*;
import map.units.unit.*;
import map.ui.*;
import flash.utils.*;
public class SpawnManager extends EventDispatcher {
private var _aliveUnits:Array;
private var _totalEnemyUnitsCount:int;
private var _lastWaveId:int;// = -1
private var _enemyKills:int;// = 0
private var _waves:Array;
private var _nextWave:SpawnWave;
private var _nextWaveId:int;// = 0
private var _ui:ProgressUI;
private var _lastWaveTime:Number;
public static const LIMIT:int = 40;
public function SpawnManager(_arg1:ProgressUI){
_waves = new Array();
_aliveUnits = new Array();
super();
_ui = _arg1;
_lastWaveTime = getTimer();
updateProgress();
}
private function pushAliveUnits():void{
if (_nextWave.allied){
return;
};
var _local1:Array = _nextWave.units;
var _local2:int;
while (_local2 < _local1.length) {
_aliveUnits.push(_local1[_local2]);
_local2++;
};
}
public function updateProgress():void{
_ui.setProgress(((_enemyKills / _totalEnemyUnitsCount) * 100));
}
public function kill(_arg1:Unit):void{
if (_arg1.allied){
return;
};
_enemyKills++;
updateProgress();
spliceFromAlive(_arg1);
}
public function tick(_arg1:Number):void{
trace(((("kills: " + _enemyKills) + "/") + _totalEnemyUnitsCount));
if (complete){
trace("Level complete!");
return;
};
if (_nextWaveId == _waves.length){
return;
};
if (_nextWaveId != _lastWaveId){
_nextWave = _waves[_nextWaveId];
_nextWave.prepare();
_lastWaveId++;
};
if ((((_arg1 > (_lastWaveTime + (_nextWave.time * 1000)))) && (((spawnedPsi + _nextWave.psi) <= LIMIT)))){
_lastWaveTime = _arg1;
_nextWave.spawnWave();
pushAliveUnits();
_nextWave.clean();
_nextWave = null;
_nextWaveId++;
dispatchEvent(new SpawnEvent(SpawnEvent.SPAWN));
};
}
private function spliceFromAlive(_arg1:Unit):void{
var _local2:int;
while (_local2 < _aliveUnits.length) {
if (_aliveUnits[_local2] == _arg1){
_aliveUnits.splice(_local2, 1);
break;
};
_local2++;
};
}
private function get spawnedPsi():int{
var _local1:int;
var _local2:int;
while (_local2 < _aliveUnits.length) {
_local1 = (_local1 + (_aliveUnits[_local2] as Unit).psi);
_local2++;
};
return (_local1);
}
public function set waves(_arg1:Array):void{
var _local3:SpawnWave;
_waves = _arg1;
_totalEnemyUnitsCount = 0;
var _local2:int;
while (_local2 < _arg1.length) {
_local3 = (_arg1[_local2] as SpawnWave);
if (!_local3.allied){
_totalEnemyUnitsCount = (_totalEnemyUnitsCount + _local3.count);
};
_local2++;
};
trace((("Prepare yourself to kill " + _totalEnemyUnitsCount) + " units in this level"));
}
public function get complete():Boolean{
return ((_enemyKills == _totalEnemyUnitsCount));
}
}
}//package map.spawn
Section 187
//SpawnWave (map.spawn.SpawnWave)
package map.spawn {
import map.*;
import utils.*;
public class SpawnWave {
private var _allied:Boolean;// = false
private var _count:int;
private var _spawns:Array;
private var _time:int;
protected var _map:Map;
protected static const TIME:int = 1;
public function SpawnWave(_arg1:Map, _arg2:int, _arg3:int=1){
_spawns = new Array();
_time = _arg3;
_count = _arg2;
_map = _arg1;
}
public function prepare():void{
}
public function clean():void{
_spawns = null;
}
public function get allied():Boolean{
return (_allied);
}
public function get psi():Number{
var _local1:Number = 0;
var _local2:int;
while (_local2 < spawns.length) {
_local1 = (_local1 + (spawns[_local2] as Spawn).psi);
_local2++;
};
return (_local1);
}
public function get count():int{
return (_count);
}
public function spawnWave():void{
if ((spawns[0] as Spawn).unit.apperanceSound != null){
SoundManager.play((spawns[0] as Spawn).unit.apperanceSound);
};
var _local1:int;
while (_local1 < spawns.length) {
(spawns[_local1] as Spawn).spawn();
_local1++;
};
}
public function set allied(_arg1:Boolean):void{
_allied = _arg1;
}
public function get units():Array{
var _local1:Array = new Array();
var _local2:int;
while (_local2 < spawns.length) {
_local1.push((spawns[_local2] as Spawn).unit);
_local2++;
};
return (_local1);
}
public function get time():int{
return (_time);
}
public function get spawns():Array{
return (_spawns);
}
}
}//package map.spawn
Section 188
//Statistics (map.statistics.Statistics)
package map.statistics {
import map.perks.impl.*;
import flash.net.*;
public class Statistics {
private var _score:int;// = 0
private var _kills:int;// = 0
private var _miss:int;// = 0
private var _time:int;// = 0
private var _shots:int;// = 0
public function get shots():int{
return (_shots);
}
public function getFinalScore(_arg1:int):int{
return (((_score * (100 + (_arg1 * GreedPerk.INCREMENT))) / 100));
}
public function save():void{
var _local1:SharedObject = SharedObject.getLocal("game_data");
_local1.data.time = _time;
_local1.data.kills = _kills;
_local1.data.shots = _shots;
_local1.data.miss = _miss;
_local1.data.score = _score;
_local1.flush();
}
public function get time():int{
return (_time);
}
public function get score():int{
_score = (((500 + (_kills * 5)) + ((accuracy - 40) * 8)) - _time);
return (_score);
}
public function get kills():int{
return (_kills);
}
public function set time(_arg1:int):void{
_time = _arg1;
}
public function addKill():void{
_kills++;
}
public function set score(_arg1:int):void{
_score = _arg1;
}
public function set kills(_arg1:int):void{
_kills = _arg1;
}
public function load():void{
var _local1:SharedObject = SharedObject.getLocal("game_data");
_time = _local1.data.time;
_kills = _local1.data.kills;
_shots = _local1.data.shots;
_miss = _local1.data.miss;
_score = _local1.data.score;
}
public function set shots(_arg1:int):void{
_shots = _arg1;
}
public function set miss(_arg1:int):void{
_miss = _arg1;
}
public function get accuracy():int{
return (Math.round((((_shots - _miss) / _shots) * 100)));
}
public function addShot():void{
_shots++;
}
public function get miss():int{
return (_miss);
}
public function addMiss():void{
_miss++;
}
}
}//package map.statistics
Section 189
//StatisticsManager (map.statistics.StatisticsManager)
package map.statistics {
public class StatisticsManager {
private var _currentMapStatistics:Statistics;
private var _totalStatistics:Statistics;
public function StatisticsManager(){
_currentMapStatistics = new Statistics();
_totalStatistics = new Statistics();
super();
}
public function resetCurrent():void{
_currentMapStatistics = new Statistics();
}
public function getFinalScore(_arg1:int):int{
trace(("Score: " + _totalStatistics.score));
trace(("Greed Score: " + ((_arg1 * _totalStatistics.score) / 100).toString()));
trace(("Final Score: " + (_totalStatistics.score + ((_arg1 * _totalStatistics.score) / 100)).toString()));
return ((_totalStatistics.score + (((_arg1 * _totalStatistics.score) / 100) * 10)));
}
public function get total():Statistics{
return (_totalStatistics);
}
public function load():void{
_totalStatistics.load();
}
public function get current():Statistics{
return (_currentMapStatistics);
}
public function save():void{
_totalStatistics.save();
}
public function merge():void{
_totalStatistics.kills = (_totalStatistics.kills + _currentMapStatistics.kills);
_totalStatistics.miss = (_totalStatistics.miss + _currentMapStatistics.miss);
_totalStatistics.shots = (_totalStatistics.shots + _currentMapStatistics.shots);
_totalStatistics.time = (_totalStatistics.time + _currentMapStatistics.time);
}
}
}//package map.statistics
Section 190
//TutorialManager (map.tutorial.TutorialManager)
package map.tutorial {
import map.units.unit.*;
public class TutorialManager {
private var _tips:Array;
public function TutorialManager(){
_tips = new Array();
super();
}
private function removeTip(_arg1:UnitEvent):void{
var _local2:int;
while (_local2 < _tips.length) {
if ((_tips[_local2] as TutorialTip) == _arg1.target){
(_arg1.target as TutorialTip).removeEventListener(UnitEvent.REALLY_DEAD, removeTip);
_tips.splice(_local2, 1);
break;
};
_local2++;
};
}
public function clean():void{
var _local1:int = _tips.length;
var _local2:int;
while (_local2 < _local1) {
(_tips[0] as TutorialTip).extraDie();
_local2++;
};
}
public function addTip(_arg1:TutorialTip):void{
_tips.push(_arg1);
_arg1.addEventListener(UnitEvent.REALLY_DEAD, removeTip);
}
public function tick(_arg1:int):void{
var _local2:int;
while (_local2 < _tips.length) {
(_tips[_local2] as TutorialTip).tick(_arg1);
_local2++;
};
}
}
}//package map.tutorial
Section 191
//TutorialTip (map.tutorial.TutorialTip)
package map.tutorial {
import flash.display.*;
import map.units.unit.*;
import flash.text.*;
import map.utils.*;
import flash.utils.*;
public class TutorialTip extends DyingStageMovieClip {
private var _appearTime:int;// = 0
private var _text:TypingText;
public var text:TextField;
private var _textField:TextField;
private var _lifeTime:int;// = 3000
private var _state:int;// = 0
private var _fadeStartTime:int;// = 0
private var _createTime:int;
private var rec:MovieClip;
private static const BG_COLOR:int = 0x333333;
private static const FADE:int = 2;
private static const X:int = 100;
private static const Y:int = 496;
private static const WIDTH:int = 340;
private static const HEIGHT:int = 60;
private static const MARGIN:int = 1;
private static const LIFE_TIME:int = 3000;
private static const TEXT_COLOR:int = 0xFFFFFF;
private static const BORDER_COLOR:uint = 6736360;
private static const NONE:int = 0;
private static const SHIFT_Y:int = -20;
private static const SHOW:int = 1;
private static const ALPHA:Number = 0.9;
public function TutorialTip(_arg1:Stage, _arg2:String, _arg3:int=0, _arg4:int=3000){
_createTime = getTimer();
super(_arg1);
_text = new TypingText(_arg2);
rec = new MovieClip();
_textField = (getChildByName("text") as TextField);
_appearTime = _arg3;
}
override protected function die(_arg1:UnitEvent):void{
super.die(_arg1);
dispatchEvent(new UnitEvent(UnitEvent.REALLY_DEAD));
}
public function extraDie():void{
if (_state != NONE){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
};
}
private function layout():void{
rec.graphics.clear();
_textField.width = WIDTH;
_textField.height = HEIGHT;
_textField.y = ((SHIFT_Y - MARGIN) - _textField.height);
_textField.textColor = TEXT_COLOR;
var _local1:int = ((MARGIN + _textField.height) + MARGIN);
rec.graphics.beginFill(BG_COLOR, ALPHA);
rec.graphics.lineStyle(1, BORDER_COLOR, ALPHA, false, "normal", null, null, 3);
rec.graphics.drawRoundRect((_textField.x - MARGIN), (_textField.y - MARGIN), (_textField.width + (MARGIN * 2)), _local1, 12);
addChild(rec);
addChild(_textField);
}
public function show():void{
addEventListener(UnitEvent.DEAD, die);
x = X;
y = Y;
_stage.addChild(this);
_state = SHOW;
layout();
}
public function tick(_arg1:int):void{
if (_state == NONE){
if (((!((_appearTime == 0))) && ((_arg1 > (_createTime + (_appearTime * 1000)))))){
show();
};
};
if (_state == SHOW){
_text.tick(_arg1);
_textField.text = _text.result;
if (_text.isDone){
_state = FADE;
_fadeStartTime = getTimer();
};
};
if (_state == FADE){
if ((((_arg1 > (_fadeStartTime + _lifeTime))) && ((alpha > 0.1)))){
alpha = (alpha - 0.05);
} else {
if ((((_arg1 > (_fadeStartTime + _lifeTime))) && ((alpha <= 0.1)))){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
};
};
};
}
}
}//package map.tutorial
Section 192
//TypingText (map.tutorial.TypingText)
package map.tutorial {
import flash.utils.*;
public class TypingText {
private var _lastLetterTime:int;
private var _state:int;// = 1
private var _s:String;
private var _result:String;// = ""
private static const TYPE:int = 1;
private static const DONE:int = 2;
private static const LETTER_DELAY:int = 50;
public function TypingText(_arg1:String){
_lastLetterTime = getTimer();
super();
_s = _arg1;
}
public function tick(_arg1:int):void{
if (_state == DONE){
return;
};
if (_arg1 > (_lastLetterTime + LETTER_DELAY)){
_lastLetterTime = getTimer();
_result = (_result + _s.charAt(_result.length));
if (_result == _s){
_state = DONE;
};
};
}
public function get isDone():Boolean{
return ((_state == DONE));
}
public function get result():String{
return (_result);
}
}
}//package map.tutorial
Section 193
//PerkListMask (map.ui.levelUp.PerkListMask)
package map.ui.levelUp {
import com.moonmana.ui.*;
public class PerkListMask extends ScreenObject {
public function PerkListMask(){
super(107, 88);
}
}
}//package map.ui.levelUp
Section 194
//PerkMenuUI (map.ui.levelUp.PerkMenuUI)
package map.ui.levelUp {
import flash.display.*;
import flash.events.*;
import map.units.hero.*;
import map.units.unit.*;
import flash.text.*;
import main.*;
import map.perks.*;
import com.moonmana.ui.*;
import ui.buttons.*;
public class PerkMenuUI extends ScreenObject {
private var _msk:PerkListMask;
public var perkPointsMC:MovieClip;
public var myPerks:MovieClip;
public var perksHolder:MovieClip;
private var _state:int;// = 0
private var _perkManager:PerkManager;
private var _accept:MMButtonS;
private var _expManager:ExpManager;
private var _perkScrollBar:PerkScrollBar;
public var availablePerks:MovieClip;
private var _stage:Stage;
public static const MY_PERKS:int = 2;
public static const CLOSE:int = 0;
public static const AVAILABLE_HEIGHT:int = 175;
public static const AVAILABLE_PERKS:int = 1;
public function PerkMenuUI(_arg1:Stage, _arg2:PerkManager, _arg3:ExpManager){
_msk = new PerkListMask();
super(((Main.SCREEN_WIDTH - width) / 2), ((Main.SCREEN_HEIGHT - height) / 2));
_perkManager = _arg2;
_expManager = _arg3;
_stage = _arg1;
(getMC("availablePerks").getChildByName("text") as TextField).text = Main.bundle.getString("AVAILABLE_PERKS");
(getMC("myPerks").getChildByName("text") as TextField).text = Main.bundle.getString("MY_PERKS");
}
public function goAvailable(_arg1:MouseEvent=null):void{
var e = _arg1;
if (_state == AVAILABLE_PERKS){
return;
};
_state = AVAILABLE_PERKS;
gotoAndStop(_state);
try {
getMC("availablePerks").removeEventListener(MouseEvent.MOUSE_DOWN, goAvailable);
} catch(e:Error) {
};
getMC("myPerks").addEventListener(MouseEvent.MOUSE_DOWN, goMy);
refreshList(_perkManager.getAvailableList());
}
private function refreshAfterPick(_arg1:Event):void{
(_arg1.target as PerkUI).removeEventListener(UnitEvent.USE_PERK, refreshAfterPick);
switch (_state){
case AVAILABLE_PERKS:
refreshList(_perkManager.getAvailableList());
break;
case MY_PERKS:
refreshList(_perkManager.getMyList());
break;
};
}
private function preparePerksList(_arg1:Array):void{
var perk:PerkUI;
var a = _arg1;
var i:int;
while (i < a.length) {
perk = new PerkUI((a[i] as Perk), _perkManager, _expManager);
perk.y = (perk.height * i);
if (perk.available){
perk.addEventListener(UnitEvent.USE_PERK, refreshAfterPick);
};
(getMC("perksHolder").getChildByName("perksList") as PerksList).addChild(perk);
i = (i + 1);
};
_msk.place();
try {
removeChild(_msk);
} catch(e:Error) {
};
getMC("perksHolder").addChild(_msk);
getMC("perksHolder").mask = _msk;
removeScrollBar();
addScrollBar();
}
public function prepare():void{
_accept = new MMButtonS(166, 222);
_accept.place();
_accept.setLabel(Main.bundle.getString("ACCEPT"));
addChild(_accept);
}
private function refreshList(_arg1:Array):void{
setPerkPoints(_expManager.perkPoints);
clearPerksList();
preparePerksList(_arg1);
}
public function get acceptButton():MMButton{
return (_accept);
}
private function addScrollBar():void{
var _local1:PerksList = (getMC("perksHolder").getChildByName("perksList") as PerksList);
if (_perkScrollBar != null){
_perkScrollBar.reset();
};
if (_local1.height > AVAILABLE_HEIGHT){
_perkScrollBar = new PerkScrollBar(_stage, _local1);
addChild(_perkScrollBar);
};
}
private function removeScrollBar():void{
try {
removeChild(_perkScrollBar);
} catch(e:Error) {
};
}
public function goMy(_arg1:MouseEvent=null):void{
var e = _arg1;
if (_state == MY_PERKS){
return;
};
_state = MY_PERKS;
gotoAndStop(_state);
try {
getMC("myPerks").removeEventListener(MouseEvent.MOUSE_DOWN, goMy);
} catch(e:Error) {
};
getMC("availablePerks").addEventListener(MouseEvent.MOUSE_DOWN, goAvailable);
refreshList(_perkManager.getMyList());
}
private function clearPerksList():void{
var _local1:MovieClip = (getMC("perksHolder").getChildByName("perksList") as PerksList);
var _local2:int = _local1.numChildren;
var _local3:int;
while (_local3 < _local2) {
_local1.removeChildAt(0);
_local3++;
};
if (_perkScrollBar != null){
_perkScrollBar.removeEventListeners();
};
}
public function setPerkPoints(_arg1:int):void{
(getMC("perkPointsMC").getChildByName("text") as TextField).text = ((Main.bundle.getString("PERK_POINTS") + ": ") + _arg1.toString());
}
}
}//package map.ui.levelUp
Section 195
//PerkPopup (map.ui.levelUp.PerkPopup)
package map.ui.levelUp {
import flash.display.*;
import flash.text.*;
public dynamic class PerkPopup extends Popup {
public var currentLevel:TextField;
private var rec:MovieClip;
public var description:TextField;
public var title:TextField;
private static const BORDER_COLOR:uint = 6736360;
private static const ALPHA:Number = 0.9;
private static const BG_COLOR:int = 0x333333;
private static const SHIFT_Y:int = -20;
private static const MARGIN:int = 1;
public function PerkPopup(){
super(0, 0);
rec = new MovieClip();
addChild(rec);
}
public function layout():void{
removeChild(rec);
rec.graphics.clear();
var _local1:TextField = (getChildByName("title") as TextField);
var _local2:TextField = (getChildByName("currentLevel") as TextField);
var _local3:TextField = (getChildByName("description") as TextField);
_local3.x = (_local1.x + MARGIN);
_local2.x = (_local1.x + MARGIN);
_local3.y = ((SHIFT_Y - MARGIN) - _local3.height);
_local2.y = (((SHIFT_Y - MARGIN) - _local3.height) - _local2.height);
_local1.y = ((((SHIFT_Y - MARGIN) - _local3.height) - _local2.height) - _local1.height);
var _local4:int = ((((MARGIN + _local3.height) + _local2.height) + _local1.height) + MARGIN);
rec.graphics.beginFill(BG_COLOR, ALPHA);
rec.graphics.lineStyle(1, BORDER_COLOR, ALPHA, false, "normal", null, null, 3);
rec.graphics.drawRoundRect((_local1.x - MARGIN), (_local1.y - MARGIN), (_local1.width + (MARGIN * 2)), _local4, 12);
addChild(rec);
addChild(_local1);
addChild(_local2);
addChild(_local3);
}
public function setCurrentLevel(_arg1:String):void{
var _local2:TextField = (getChildByName("currentLevel") as TextField);
_local2.text = _arg1;
}
public function setDescription(_arg1:String):void{
var _local2:TextField = (getChildByName("description") as TextField);
_local2.text = _arg1;
_local2.autoSize = "left";
}
public function setTitle(_arg1:String):void{
var _local2:TextField = (getChildByName("title") as TextField);
_local2.text = _arg1;
_local2.autoSize = "left";
}
}
}//package map.ui.levelUp
Section 196
//PerkScrollBar (map.ui.levelUp.PerkScrollBar)
package map.ui.levelUp {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import com.moonmana.ui.*;
public class PerkScrollBar extends ScreenObject {
private var _perksList:PerksList;
private var _bounds:Rectangle;
private var _scrolling:Boolean;// = false
private var y0:Number;// = 0
private var _stage:Stage;
private static const LUFT:int = 158;
private static const Y0:Number = 45;
private static const X0:Number = 246;
public function PerkScrollBar(_arg1:Stage, _arg2:PerksList){
super(X0, Y0);
place();
_perksList = _arg2;
_perksList.place();
_bounds = new Rectangle(x, y, 0, LUFT);
y0 = _perksList.y;
_stage = _arg1;
addEventListener(MouseEvent.MOUSE_DOWN, startScroll);
addEventListener(Event.ENTER_FRAME, enterHandler);
}
private function stopScroll(_arg1:Event):void{
_stage.removeEventListener(MouseEvent.MOUSE_UP, stopScroll);
_scrolling = false;
stopDrag();
}
public function removeEventListeners():void{
_stage.removeEventListener(MouseEvent.MOUSE_UP, stopScroll);
}
private function startScroll(_arg1:Event):void{
_stage.addEventListener(MouseEvent.MOUSE_UP, stopScroll);
_scrolling = true;
startDrag(false, _bounds);
}
public function reset():void{
_perksList.place();
}
private function enterHandler(_arg1:Event):void{
if (_scrolling == true){
_perksList.y = (y0 + Math.round((((y - Y0) * (PerkMenuUI.AVAILABLE_HEIGHT - _perksList.height)) / LUFT)));
};
}
}
}//package map.ui.levelUp
Section 197
//PerksList (map.ui.levelUp.PerksList)
package map.ui.levelUp {
import com.moonmana.ui.*;
public class PerksList extends ScreenObject {
public function PerksList(){
super(0, 0);
}
}
}//package map.ui.levelUp
Section 198
//PerkUI (map.ui.levelUp.PerkUI)
package map.ui.levelUp {
import flash.display.*;
import flash.events.*;
import map.units.hero.*;
import map.units.unit.*;
import flash.text.*;
import main.*;
import map.perks.impl.*;
import map.perks.*;
import com.moonmana.ui.*;
public class PerkUI extends ScreenObject {
private var _perkManager:PerkManager;
public var text:TextField;
private var _popup:PerkPopup;
private var _expManager:ExpManager;
public var plus:SimpleButton;
private var _perk:Perk;
public function PerkUI(_arg1:Perk, _arg2:PerkManager, _arg3:ExpManager){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
super(0, 0);
_perk = _arg1;
_perkManager = _arg2;
_expManager = _arg3;
setName(_perk.name);
getButton("plus").addEventListener(MouseEvent.MOUSE_DOWN, pickPerk);
_popup = getPopup();
_popup.displace();
addEventListener(MouseEvent.MOUSE_OVER, showPopup);
addEventListener(MouseEvent.MOUSE_OUT, out);
}
function frame1(){
stop();
}
public function setName(_arg1:String):void{
getTextField("text").text = _arg1;
}
private function pickPerk(_arg1:MouseEvent=null):void{
(_arg1.target as SimpleButton).removeEventListener(MouseEvent.MOUSE_DOWN, pickPerk);
if (_expManager.perkPoints > 0){
_expManager.usePerk();
if ((_perk is ShockDronePerk)){
_perkManager.shockDroneLevelUp();
} else {
if ((_perk is CombatDronePerk)){
_perkManager.combatDroneLevelUp();
} else {
if ((_perk is RepairDronePerk)){
_perkManager.repairDroneLevelUp();
} else {
if ((_perk is WeaponFocusPerk)){
_perkManager.focusWeaponLevelUp();
} else {
if ((_perk is TheBlackHolePerk)){
_perkManager.blackHoleLevelUp();
} else {
if ((_perk is RepairPerk)){
_perkManager.repairLevelUp();
} else {
_perk.levelUp();
};
};
};
};
};
};
if (!available){
removeEventListener(MouseEvent.MOUSE_OUT, out);
};
hidePopup();
dispatchEvent(new UnitEvent(UnitEvent.USE_PERK));
};
}
private function hidePopup(_arg1:MouseEvent=null):void{
_popup.hide();
}
function frame2(){
stop();
}
private function out(_arg1:MouseEvent=null):void{
gotoAndStop(1);
hidePopup();
}
public function get available():Boolean{
return (_perk.isAvailableNow());
}
private function showPopup(_arg1:MouseEvent=null):void{
over();
_popup.show((parent.parent.parent as MovieClip));
}
function frame3(){
stop();
}
private function getPopup():PerkPopup{
var _local1:PerkPopup = new PerkPopup();
_local1.setTitle(_perk.name);
_local1.setCurrentLevel(((((Main.bundle.getString("LEVEL") + ": ") + _perk.level) + "/") + ((_perk.maxLevel == 0)) ? "-" : _perk.maxLevel));
_local1.setDescription(_perk.description);
_local1.layout();
_local1.cacheAsBitmap = true;
return (_local1);
}
private function over(_arg1:MouseEvent=null):void{
gotoAndStop((available) ? 2 : 3);
}
}
}//package map.ui.levelUp
Section 199
//Popup (map.ui.levelUp.Popup)
package map.ui.levelUp {
import flash.display.*;
import com.moonmana.ui.*;
public class Popup extends ScreenObject {
private var _shown:Boolean;// = false
private var _parentMC:MovieClip;
public function Popup(_arg1:int, _arg2:int){
super(_arg1, _arg2);
}
public function hide():void{
if (!_shown){
return;
};
_shown = false;
stopDrag();
_parentMC.removeChild(this);
}
public function show(_arg1:MovieClip):void{
if (!_shown){
_parentMC = _arg1;
_arg1.addChild(this);
startDrag(true);
_shown = true;
};
}
}
}//package map.ui.levelUp
Section 200
//NextLevelButton (map.ui.stats.NextLevelButton)
package map.ui.stats {
import flash.display.*;
import flash.text.*;
public dynamic class NextLevelButton extends SimpleButton {
public var text:TextField;
}
}//package map.ui.stats
Section 201
//StatisticsUI (map.ui.stats.StatisticsUI)
package map.ui.stats {
import flash.display.*;
import flash.events.*;
import map.*;
import flash.text.*;
import map.statistics.*;
import main.*;
import map.ui.*;
import com.moonmana.ui.*;
import com.moonmana.mmad.*;
import com.moonmana.sponsors.EliteGames.*;
import com.moonmana.sponsors.AG.*;
import com.moonmana.sponsors.Andkon.*;
import com.moonmana.sponsors.MoFunZone.*;
import ui.buttons.*;
public class StatisticsUI extends ScreenObject {
public var scoreLabel:TextField;
public var ammoLabel:TextField;
public var time:TextField;
private var _button:MMButtonB;
public var score:TextField;
private var _mainMenu:MMButtonB;
public var title:TextField;
public var ammo:TextField;
public var killsLabel:TextField;
public var mmAd:MovieClip;
public var timeLabel:TextField;
public var adBox:AdsContainer;
private var _mmad:MMAd;
public var kills:TextField;
private var _moreGames:MMButtonB;
public var gameSaved:MovieClip;
public var accuracy:TextField;
public var accuracyLabel:TextField;
public function StatisticsUI(_arg1:Map, _arg2:Boolean, _arg3:Boolean){
super(0, 0);
addChildAt(_arg1.underlay, 0);
getTextField("timeLabel").text = Main.bundle.getString("TIME");
getTextField("ammoLabel").text = Main.bundle.getString("AMMO");
getTextField("killsLabel").text = Main.bundle.getString("KILLS");
getTextField("accuracyLabel").text = Main.bundle.getString("ACCURACY");
getTextField("scoreLabel").text = Main.bundle.getString("SCORE");
_moreGames = new MMButtonB(21, 188);
_moreGames.place();
_moreGames.setLabel(Main.bundle.getString("MORE_GAMES"));
addChild(_moreGames);
_mainMenu = new MMButtonB(412, 426);
_mainMenu.place();
_mainMenu.setLabel(Main.bundle.getString("MAIN_MENU"));
addChild(_mainMenu);
_button = new MMButtonB(412, 392);
_button.place();
addChild(_button);
if (Main.BUILD == Main.ARMOR_GAMES){
_moreGames.addEventListener(MouseEvent.MOUSE_DOWN, ArmorGamesMC.goAG);
} else {
if (Main.BUILD == Main.ANDKON){
_moreGames.addEventListener(MouseEvent.MOUSE_DOWN, AndkonLogo.go);
} else {
if (Main.BUILD == Main.MOFUNZONE){
_moreGames.addEventListener(MouseEvent.MOUSE_DOWN, MoFunZoneSplash.go);
} else {
if (Main.BUILD == Main.ELITE_GAMES){
_moreGames.addEventListener(MouseEvent.MOUSE_DOWN, EliteGames.go);
} else {
_moreGames.addEventListener(MouseEvent.MOUSE_DOWN, MMAd.goMoonMana);
};
};
};
};
if (_arg2){
getTextField("title").text = Main.bundle.getString("GAME_OVER");
_button.setLabel(Main.bundle.getString("TRY_AGAIN"));
(getMC("gameSaved").getChildByName("text") as TextField).text = "";
} else {
if (_arg3){
getTextField("title").text = Main.bundle.getString("THE_END");
_button.setLabel(Main.bundle.getString("SUBMIT_SCORE"));
(getMC("gameSaved").getChildByName("text") as TextField).text = "";
} else {
getTextField("title").text = Main.bundle.getString("WELL_DONE");
_button.setLabel(Main.bundle.getString("NEXT_LEVEL"));
(getMC("gameSaved").getChildByName("text") as TextField).text = Main.bundle.getString("GAME_SAVED");
};
};
getTextField("title").cacheAsBitmap = true;
getMC("mmAd").buttonMode = true;
_mmad = new MMAd((getMC("mmAd").getChildByName("mmAdtxt") as TextField), getMC("mmAd"));
}
public function get button():MMButton{
return (_button);
}
public function clean():void{
_mmad.clean();
if (Main.BUILD == Main.ARMOR_GAMES){
_moreGames.removeEventListener(MouseEvent.MOUSE_DOWN, ArmorGamesMC.goAG);
} else {
if (Main.BUILD == Main.ANDKON){
_moreGames.removeEventListener(MouseEvent.MOUSE_DOWN, AndkonLogo.go);
} else {
if (Main.BUILD == Main.MOFUNZONE){
_moreGames.removeEventListener(MouseEvent.MOUSE_DOWN, MoFunZoneSplash.go);
} else {
if (Main.BUILD == Main.ELITE_GAMES){
_moreGames.removeEventListener(MouseEvent.MOUSE_DOWN, EliteGames.go);
} else {
_moreGames.removeEventListener(MouseEvent.MOUSE_DOWN, MMAd.goMoonMana);
};
};
};
};
removeChild(_button);
_button = null;
removeChild(_moreGames);
_moreGames = null;
removeChild(_mainMenu);
_mainMenu = null;
}
public function get mainMenuButton():MMButton{
return (_mainMenu);
}
public function getAdBox():MovieClip{
return ((getChildByName("adBox") as MovieClip));
}
public function fillStatistics(_arg1:Statistics):void{
getTextField("time").text = TimerUI.convert(_arg1.time);
getTextField("ammo").text = _arg1.shots.toString();
getTextField("kills").text = _arg1.kills.toString();
getTextField("accuracy").text = (_arg1.accuracy.toString() + "%");
getTextField("score").text = _arg1.score.toString();
}
}
}//package map.ui.stats
Section 202
//SubmitScoreButton (map.ui.stats.SubmitScoreButton)
package map.ui.stats {
import flash.display.*;
public dynamic class SubmitScoreButton extends SimpleButton {
}
}//package map.ui.stats
Section 203
//TryAgainButton (map.ui.stats.TryAgainButton)
package map.ui.stats {
import flash.display.*;
public dynamic class TryAgainButton extends SimpleButton {
}
}//package map.ui.stats
Section 204
//Episode1Title (map.ui.titles.Episode1Title)
package map.ui.titles {
import flash.text.*;
public class Episode1Title extends EpisodeTitle {
public var episode:TextField;
public var titleText:TextField;
public function Episode1Title(_arg1:int=1){
super(_arg1);
}
}
}//package map.ui.titles
Section 205
//Episode1Underlay (map.ui.titles.Episode1Underlay)
package map.ui.titles {
import flash.display.*;
public class Episode1Underlay extends MovieClip {
}
}//package map.ui.titles
Section 206
//Episode2Title (map.ui.titles.Episode2Title)
package map.ui.titles {
import flash.text.*;
public class Episode2Title extends EpisodeTitle {
public var episode:TextField;
public var titleText:TextField;
public function Episode2Title(){
super(2);
}
}
}//package map.ui.titles
Section 207
//Episode2Underlay (map.ui.titles.Episode2Underlay)
package map.ui.titles {
import flash.display.*;
public class Episode2Underlay extends MovieClip {
}
}//package map.ui.titles
Section 208
//Episode3Title (map.ui.titles.Episode3Title)
package map.ui.titles {
import flash.text.*;
public class Episode3Title extends EpisodeTitle {
public var episode:TextField;
public var titleText:TextField;
public function Episode3Title(){
super(3);
}
}
}//package map.ui.titles
Section 209
//Episode3Underlay (map.ui.titles.Episode3Underlay)
package map.ui.titles {
import flash.display.*;
public class Episode3Underlay extends MovieClip {
}
}//package map.ui.titles
Section 210
//Episode4Title (map.ui.titles.Episode4Title)
package map.ui.titles {
import flash.text.*;
public class Episode4Title extends EpisodeTitle {
public var episode:TextField;
public var titleText:TextField;
public function Episode4Title(){
super(4);
}
}
}//package map.ui.titles
Section 211
//Episode4Underlay (map.ui.titles.Episode4Underlay)
package map.ui.titles {
import flash.display.*;
public class Episode4Underlay extends MovieClip {
}
}//package map.ui.titles
Section 212
//EpisodeTitle (map.ui.titles.EpisodeTitle)
package map.ui.titles {
import flash.text.*;
import main.*;
import com.moonmana.ui.*;
public class EpisodeTitle extends ScreenObject {
public static const DELAY:int = 4000;
public function EpisodeTitle(_arg1:int){
super(0, 0);
if (_arg1 == 0){
getEpisode().text = Main.bundle.getString("THE_END_2");
} else {
getEpisode().text = (Main.bundle.getString("EPISODE") + _arg1.toString());
};
}
public function set title(_arg1:String):void{
getTitle().text = _arg1;
}
private function getTitle():TextField{
return (getTextField("titleText"));
}
private function getEpisode():TextField{
return (getTextField("episode"));
}
}
}//package map.ui.titles
Section 213
//PopupText (map.ui.utils.PopupText)
package map.ui.utils {
import map.*;
import flash.text.*;
import com.moonmana.ui.*;
import flash.utils.*;
public class PopupText extends ScreenObject {
public var text2:TextField;
public var text3:TextField;
public var text4:TextField;
public var text5:TextField;
public var text:TextField;
private var _state:int;// = 0
private var _startTime:int;// = 0
private var _map:Map;
private static const FADE_TIME:int = 500;
private static const FADING_STEP:Number = 0.01;
private static const FADING:int = 0;
private static const SHOW:int = 1;
private static const SHOW_TIME:int = 500;
public function PopupText(_arg1:Map, _arg2:String, _arg3:int, _arg4:int, _arg5:int=16724530, _arg6:Number=1){
super(_arg3, _arg4);
place();
_map = _arg1;
_map.addPopup(this);
_state = SHOW;
getTextField("text").text = _arg2;
getTextField("text").textColor = _arg5;
getTextField("text2").text = _arg2;
getTextField("text3").text = _arg2;
getTextField("text4").text = _arg2;
getTextField("text5").text = _arg2;
_startTime = getTimer();
cacheAsBitmap = true;
}
public function tick(_arg1:Number):void{
if ((((_state == SHOW)) && ((_arg1 < (_startTime + SHOW_TIME))))){
y = (y - 1);
} else {
if ((((_state == SHOW)) && ((_arg1 > (_startTime + SHOW_TIME))))){
_state = FADING;
} else {
if ((((_state == FADING)) && ((_arg1 < ((_startTime + SHOW_TIME) + FADE_TIME))))){
alpha = (alpha - FADING_STEP);
y = (y - 1);
} else {
if ((((_state == FADING)) && ((_arg1 > ((_startTime + SHOW_TIME) + FADE_TIME))))){
_map.removePopup(this);
};
};
};
};
}
}
}//package map.ui.utils
Section 214
//ExpUI (map.ui.ExpUI)
package map.ui {
import com.moonmana.ui.*;
public class ExpUI extends ScreenObject {
public function ExpUI(){
super(0, 0);
}
public function setProgress(_arg1:int):void{
gotoAndStop(Math.floor((_arg1 / 2)));
}
}
}//package map.ui
Section 215
//ItemsUI (map.ui.ItemsUI)
package map.ui {
import com.moonmana.ui.*;
public class ItemsUI extends ScreenObject {
private static const PADDING:int = 5;
private static const WIDTH:int = 16;
public function ItemsUI(){
super(205, 20);
}
public function redraw(_arg1:Array):void{
var _local3:ItemUI;
while (numChildren > 0) {
removeChildAt(0);
};
var _local2:int;
while (_local2 < _arg1.length) {
_local3 = new ItemUI(_arg1[_local2]);
_local3.x = (_local2 * (PADDING + WIDTH));
addChild(_local3);
_local2++;
};
}
}
}//package map.ui
Section 216
//ItemUI (map.ui.ItemUI)
package map.ui {
import map.items.*;
import com.moonmana.ui.*;
public class ItemUI extends ScreenObject {
public function ItemUI(_arg1:DurationItem){
var _local2:TimerSmallUI;
super(0, 0);
_arg1.x = 18;
_arg1.y = 0;
_arg1.scaleX = 0.5;
_arg1.scaleY = 0.5;
_arg1.gotoAndStop(1);
addChild(_arg1);
_local2 = new TimerSmallUI();
_local2.setTimeShort((_arg1 as DurationItem).timeLeft);
_local2.x = 6;
_local2.y = 7;
addChild(_local2);
}
}
}//package map.ui
Section 217
//LevelCompleteUI (map.ui.LevelCompleteUI)
package map.ui {
import main.*;
import com.moonmana.ui.*;
public class LevelCompleteUI extends ScreenObject {
public function LevelCompleteUI(){
addFrameScript(14, frame15);
super((Main.SCREEN_WIDTH / 2), (Main.SCREEN_HEIGHT / 2));
}
function frame15(){
stop();
}
}
}//package map.ui
Section 218
//LevelUI (map.ui.LevelUI)
package map.ui {
import flash.text.*;
import com.moonmana.ui.*;
public class LevelUI extends ScreenObject {
public var level:TextField;
public function LevelUI(){
super(0, 0);
}
public function setLevel(_arg1:int):void{
getTextField("level").text = _arg1.toString();
}
}
}//package map.ui
Section 219
//MapUI (map.ui.MapUI)
package map.ui {
import flash.display.*;
import map.units.hero.*;
import main.*;
import com.moonmana.ui.*;
import ui.buttons.*;
public class MapUI extends ScreenObject {
public var timer:TimerMainUI;
private var _tutorialButton:MMButtonTutorial;
public var levelLabel:LevelUI;
private var _levelUpButton:MMButtonB;
private var _itemsUI:ItemsUI;
private var _levelUpMC:MovieClip;
private var _menuButton:MMButtonXS;
private var _timerUI:TimerUI;
public var weapon:WeaponUI;
public var exp:ExpUI;
public var heroHp:HeroHpBar;
public var progress:ProgressUI;
public var levelUp:MovieClip;
public function MapUI(){
super(0, 0);
_itemsUI = new ItemsUI();
_itemsUI.place();
addChild(_itemsUI);
_timerUI = (getMC("timer") as TimerUI);
_levelUpMC = getMC("levelUp");
_levelUpButton = new MMButtonB(-113, -19);
_levelUpButton.setLabel(Main.bundle.getString("LEVEL_UP"));
_levelUpButton.place();
(_levelUpMC.getChildByName("levelUp") as MovieClip).addChild(_levelUpButton);
_menuButton = new MMButtonXS(2, 453);
_menuButton.setLabel(Main.bundle.getString("MENU"));
_menuButton.place();
addChild(_menuButton);
_levelUpMC.gotoAndStop(0);
}
public function get levelUpMC():MovieClip{
return (_levelUpMC);
}
public function get levelUpButton():MMButton{
return (_levelUpButton);
}
public function showLevelUpButton():void{
_levelUpMC.gotoAndPlay("show");
}
public function setSkipTutorialButton(_arg1:Boolean):void{
var b = _arg1;
if (b){
_tutorialButton = new MMButtonTutorial(537, 57);
_tutorialButton.place();
_tutorialButton.setLabel(Main.bundle.getString("SKIP_TUTORIAL"));
addChild(_tutorialButton);
} else {
try {
removeChild(_tutorialButton);
_tutorialButton = null;
} catch(e:Error) {
};
};
}
public function setExp(_arg1:int):void{
getTextField("exp").text = _arg1.toString();
}
public function getTimerUI():TimerUI{
return (_timerUI);
}
public function getItemsUI():ItemsUI{
return (_itemsUI);
}
public function getWeaponUI():WeaponUI{
return ((getMC("weapon") as WeaponUI));
}
public function hideLevelUpButton():void{
_levelUpMC.gotoAndPlay("hide");
}
public function get tutorialButton():MMButton{
return (_tutorialButton);
}
public function get menuButton():MMButton{
return (_menuButton);
}
public function getProgressUI():ProgressUI{
return ((getMC("progress") as ProgressUI));
}
}
}//package map.ui
Section 220
//ProgressUI (map.ui.ProgressUI)
package map.ui {
import com.moonmana.ui.*;
public class ProgressUI extends ScreenObject {
public function ProgressUI(){
addFrameScript(0, frame1);
super(0, 0);
}
function frame1(){
stop();
}
public function setProgress(_arg1:int):void{
gotoAndStop(Math.floor((_arg1 / 2)));
}
}
}//package map.ui
Section 221
//TimerMainUI (map.ui.TimerMainUI)
package map.ui {
import flash.text.*;
public class TimerMainUI extends TimerUI {
public var txt:TextField;
}
}//package map.ui
Section 222
//TimerSmallUI (map.ui.TimerSmallUI)
package map.ui {
import flash.text.*;
public class TimerSmallUI extends TimerUI {
public var txt:TextField;
}
}//package map.ui
Section 223
//TimerUI (map.ui.TimerUI)
package map.ui {
import com.moonmana.ui.*;
public class TimerUI extends ScreenObject {
private var _currentTime:int;// = 0
public function TimerUI(){
super(0, 0);
}
public function tickUp():void{
setTime((_currentTime + 1));
}
public function get currentTime():int{
return (_currentTime);
}
public function tickDown():void{
setTime((_currentTime - 1));
}
public function zero():void{
setTime(0);
}
public function setTimeShort(_arg1:int):void{
getTextField("txt").text = _arg1.toString();
}
public function setTime(_arg1:int):void{
_currentTime = _arg1;
getTextField("txt").text = convert(_arg1);
}
public static function convert(_arg1:int):String{
var _local2:int = ((_arg1 < 60)) ? _arg1 : (_arg1 % 60);
var _local3:int = Math.floor((_arg1 / 3600));
var _local4:String = ((_local3 < 10)) ? ("0" + _local3) : _local3.toString();
var _local5:int = Math.floor(((_arg1 - (_local3 * 3600)) / 60));
var _local6:String = ((_local5 < 10)) ? ("0" + _local5) : _local5.toString();
var _local7:String = (((((_local4 + ":") + _local6) + ":") + ((_local2 < 10)) ? "0" : "") + _local2);
return (_local7);
}
}
}//package map.ui
Section 224
//WeaponUI (map.ui.WeaponUI)
package map.ui {
import flash.display.*;
import flash.text.*;
import com.moonmana.ui.*;
public class WeaponUI extends ScreenObject {
public var bullets:MovieClip;
public var bulletsTxt:MovieClip;
public function WeaponUI(){
super(0, 0);
}
public function setBullets(_arg1:int):void{
if (_arg1 < 11){
getMC("bullets").gotoAndStop((11 - _arg1));
(getMC("bulletsTxt").getChildByName("txt") as TextField).text = "";
} else {
getMC("bullets").gotoAndStop(0);
(getMC("bulletsTxt").getChildByName("txt") as TextField).text = ("+" + (_arg1 - 10).toString());
};
}
}
}//package map.ui
Section 225
//CombatDrone (map.units.drones.CombatDrone)
package map.units.drones {
import map.units.hero.*;
import map.units.unit.markers.*;
import map.weapons.drones.*;
public class CombatDrone extends Drone implements Unstoppable {
public function CombatDrone(_arg1:Hero){
super(_arg1, {hp:10, speed2:8, range2:40000, sight2:42000, size2:0}, new DroneIongun(this));
}
override public function tick(_arg1:Number):void{
if (((!((_target == null))) && (!(isInSight(_target))))){
_target = null;
};
super.tick(_arg1);
}
}
}//package map.units.drones
Section 226
//Drone (map.units.drones.Drone)
package map.units.drones {
import map.units.hero.*;
import map.units.unit.*;
import map.units.utils.*;
import flash.geom.*;
import map.weapons.*;
public class Drone extends AIUnit {
private var _hero:Hero;
private static const HERO_SIGHT2:int = 17625;
public function Drone(_arg1:Hero, _arg2:Object, _arg3:AbstractWeapon){
super(_arg2, _arg3);
_hero = _arg1;
}
override protected function bum(_arg1:Number):void{
_targetPoint = getTargetPoint();
setTargetRotationToPoint(_targetPoint.x, _targetPoint.y);
if (_arg1 >= (_lastReactionTime + REACTION)){
_lastReactionTime = _arg1;
bumRotate();
};
move();
}
override protected function getTarget():Unit{
return (getNearestTarget());
}
override protected function getTargetPoint():Point{
return (new Point(_hero.x, _hero.y));
}
public function get hero():Hero{
return (_hero);
}
override protected function isInSight(_arg1:Unit):Boolean{
return ((((MathUtils.distance2(_arg1.x, _arg1.y, x, y) < sight2)) && ((MathUtils.distance2(_arg1.x, _arg1.y, _hero.x, _hero.y) < HERO_SIGHT2))));
}
override protected function accurateRotate():void{
_targetAngle.calculateRotation();
rotate();
rotate();
rotate();
rotate();
rotate();
rotate();
rotate();
rotate();
rotate();
rotate();
}
}
}//package map.units.drones
Section 227
//RepairDrone (map.units.drones.RepairDrone)
package map.units.drones {
import map.units.hero.*;
import map.units.unit.*;
import map.units.unit.markers.*;
import map.weapons.drones.*;
public class RepairDrone extends Drone implements Unstoppable {
public function RepairDrone(_arg1:Hero){
super(_arg1, {hp:10, speed2:7.2, range2:10000, sight2:12000, size2:0}, new DroneRepairKit(this));
}
override public function tick(_arg1:Number):void{
if (((!((_target == null))) && (((((!(isInSight(_target))) || ((_target.hp == _target.maxHp)))) || (_target.dead))))){
(_target == null);
};
super.tick(_arg1);
}
override protected function getTarget():Unit{
return (getNearestFriend());
}
}
}//package map.units.drones
Section 228
//ShockDrone (map.units.drones.ShockDrone)
package map.units.drones {
import map.units.hero.*;
import map.units.unit.*;
import map.units.utils.*;
import map.units.relations.*;
import map.units.unit.markers.*;
import map.weapons.drones.*;
public class ShockDrone extends Drone implements Unstoppable {
public function ShockDrone(_arg1:Hero){
super(_arg1, {hp:10, speed2:9, range2:5000, sight2:82000, size2:0}, new DroneShocker(this));
}
override protected function getNearestTarget():Unit{
var _local3:Side;
var _local4:int;
var _local5:Unit;
if (_side.enemies.length == 0){
return (null);
};
var _local1:Unit;
var _local2:int;
while (_local2 < _side.enemies.length) {
_local3 = _side.enemies[_local2];
_local4 = 0;
while (_local4 < _local3.units.length) {
if (((((((isInSight(_local3.units[_local4])) && (!((_local3.units[_local4] as Unit).stunned)))) && (!((_local3.units[_local4] as Unit).paralyzed)))) && (!((_local3.units[_local4] is Unstunnable))))){
if (_local1 == null){
_local1 = _local3.units[_local4];
} else {
_local5 = _local3.units[_local4];
if (MathUtils.distance2(x, y, _local5.x, _local5.y) < MathUtils.distance2(x, y, _local1.x, _local1.y)){
_local1 = _local5;
};
};
};
_local4++;
};
_local2++;
};
return (_local1);
}
override public function tick(_arg1:Number):void{
if (((!((_target == null))) && (((_target.stunned) || (_target.paralyzed))))){
_target = null;
};
super.tick(_arg1);
}
}
}//package map.units.drones
Section 229
//ExpManager (map.units.hero.ExpManager)
package map.units.hero {
import flash.display.*;
import flash.events.*;
import map.units.unit.*;
import map.ui.*;
import utils.*;
import flash.net.*;
public class ExpManager extends EventDispatcher {
private var _levelUI:LevelUI;
private var _experience:int;// = 0
private var _currentLevel:int;// = 1
private var _perkPoints:int;// = 0
private var _levelUpMC:MovieClip;
private var _expUI:ExpUI;
public function ExpManager(_arg1:MapUI){
if (_arg1 != null){
_expUI = (_arg1.getMC("exp") as ExpUI);
_expUI.setProgress(progress);
_levelUI = (_arg1.getMC("levelLabel") as LevelUI);
_levelUI.setLevel(_currentLevel);
_levelUpMC = _arg1.levelUpMC;
};
}
public function showLevelUp():void{
if (((!((_levelUpMC == null))) && ((_perkPoints > 0)))){
showLevelUpButton();
};
}
private function showLevelUpButton():void{
_levelUpMC.gotoAndPlay("show");
}
public function increaseExperience(_arg1:int):void{
_experience = (_experience + _arg1);
if (_experience >= nextLevelExp){
levelUp();
};
if (_expUI != null){
_expUI.setProgress(progress);
};
}
public function load():void{
var _local1:SharedObject = SharedObject.getLocal("game_data");
_perkPoints = _local1.data.perkPoints;
_experience = _local1.data.experience;
_currentLevel = _local1.data.currentLevel;
if (_levelUI != null){
_levelUI.setLevel(_currentLevel);
};
if (_expUI != null){
_expUI.setProgress(progress);
};
}
public function get level():int{
return (_currentLevel);
}
private function get progress():int{
return ((((_experience - prevLevelExp) / (nextLevelExp - prevLevelExp)) * 100));
}
private function get prevLevelExp():int{
if (_currentLevel == 1){
return (0);
};
return ((((_currentLevel - 1) * _currentLevel) * 500));
}
public function get perkPoints():int{
return (_perkPoints);
}
public function usePerk():void{
_perkPoints--;
}
private function get nextLevelExp():int{
return (((_currentLevel * (_currentLevel + 1)) * 500));
}
public function save():void{
var _local1:SharedObject = SharedObject.getLocal("game_data");
_local1.data.perkPoints = _perkPoints;
_local1.data.experience = _experience;
_local1.data.currentLevel = _currentLevel;
_local1.flush();
}
private function levelUp():void{
SoundManager.play(SoundManager.LEVEL_UP);
_currentLevel++;
_perkPoints++;
if (_levelUI != null){
_levelUI.setLevel(_currentLevel);
};
showLevelUp();
dispatchEvent(new UnitEvent(UnitEvent.LEVEL_UP));
}
}
}//package map.units.hero
Section 230
//Hero (map.units.hero.Hero)
package map.units.hero {
import flash.display.*;
import flash.events.*;
import map.*;
import map.units.unit.*;
import map.units.utils.*;
import map.statistics.*;
import main.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.units.relations.*;
import map.items.*;
import map.perks.impl.*;
import map.perks.*;
import map.units.unit.markers.*;
import map.items.impl.*;
import utils.*;
import flash.utils.*;
public class Hero extends Unit implements Mechanical {
private var _shield:ShieldEffect;
private var _statisticsManager:StatisticsManager;
public var body:MovieClip;
private var _lastHeadRotate:Number;// = 0
private var _ui:MapUI;
private var _lastItemCheck:Number;
private var _mouseDown:Boolean;// = false
private var _expManager:ExpManager;
private var _weaponManager:WeaponManager;
private var _stage:Stage;
private static const ITEM_CHECK_TICK:int = 200;
private static const HEAD_ROTATE_TIME:Number = 50;
private static const HALF_SIZE:int = 22;
public function Hero(_arg1:Stage, _arg2:MapUI=null){
super({hp:100, speed2:4, range2:40000, sight2:90000, size2:720, experience:0});
_ui = _arg2;
_expManager = new ExpManager(_ui);
_expManager.addEventListener(UnitEvent.LEVEL_UP, levelUp);
_itemManager = new ItemManager(this);
_perkManager = new PerkManager(this);
_weaponManager = new WeaponManager(this);
_statisticsManager = new StatisticsManager();
_hpBar = ((_ui)!=null) ? (_ui.getMC("heroHp") as HeroHpBar) : new AIUnitHpBar(this);
_hpBar.unit = this;
_hpBar.calculate();
_lastItemCheck = getTimer();
_state = MOVE;
stand();
_stage = _arg1;
}
override public function get level():int{
return (_expManager.level);
}
public function addMissilePack():void{
_weaponManager.setBonusWeapon(WeaponManager.BONUS_ROCKET_LAUNCHER);
}
public function get totalStatistics():Statistics{
return (_statisticsManager.total);
}
public function save():void{
_perkManager.save();
_weaponManager.save();
_expManager.save();
_statisticsManager.save();
}
public function place(_arg1:int, _arg2:int):void{
this.x = _arg1;
this.y = _arg2;
perkManager.placeDrones();
}
override public function causeDeath():void{
_hp = 0;
getBody().gotoAndPlay("death");
removeEventListeners();
_map.kill(this);
fadeWeapon();
_hpBar.calculate();
_mouseDown = false;
statistics.time = _ui.getTimerUI().currentTime;
dispatchEvent(new UnitEvent(UnitEvent.HERO_DEAD));
}
private function moveDown():void{
calculateTargetAngle();
rotate();
if (y >= (_map.height - HALF_SIZE)){
return;
};
var _local1:Number = (((Main.kh.isLeftDown) || (Main.kh.isRightDown))) ? (0.8 * speed) : speed;
y = (y + _local1);
}
public function get ui():MapUI{
return (_ui);
}
protected function getBody():MovieClip{
return ((getChildByName("body") as MovieClip));
}
override public function get weapon():AbstractWeapon{
return (_weaponManager.currentWeapon);
}
override public function tick(_arg1:Number):void{
super.tick(_arg1);
_weaponManager.tick(_arg1);
_itemManager.tick(_arg1);
_perkManager.tick(_arg1);
if (dead){
return;
};
if (_perkManager.unstoppablePerk.level == 0){
if (_arg1 > (_lastSlowDownCheck + SLOWDOWN_TICK)){
_lastSlowDownCheck = _arg1;
checkSlowDown();
};
};
if (Main.kh.arrowPressed){
tryMove();
if (_arg1 > (_lastItemCheck + ITEM_CHECK_TICK)){
_map.checkItemTake();
};
} else {
stand();
};
if (_mouseDown){
fire();
};
}
private function heroX():int{
if (x < (Main.SCREEN_WIDTH / 2)){
return (x);
};
if (x > (_map.width - (Main.SCREEN_WIDTH / 2))){
return ((Main.SCREEN_WIDTH - (_map.width - x)));
};
return ((Main.SCREEN_WIDTH / 2));
}
private function heroY():int{
if (y < (Main.SCREEN_HEIGHT / 2)){
return (y);
};
if (y > (_map.height - (Main.SCREEN_HEIGHT / 2))){
return ((Main.SCREEN_HEIGHT - (_map.height - y)));
};
return ((Main.SCREEN_HEIGHT / 2));
}
private function mouseUp(_arg1:MouseEvent):void{
_mouseDown = false;
}
public function get statistics():Statistics{
return (_statisticsManager.current);
}
private function rotateHeadOnEvent(_arg1:MouseEvent=null):void{
var _local3:int;
var _local4:int;
var _local2:Number = getTimer();
if (_local2 > (_lastHeadRotate + HEAD_ROTATE_TIME)){
_lastHeadRotate = _local2;
_local3 = _map.mouseX;
_local4 = _map.mouseY;
rotateHead(_local3, _local4);
};
}
public function shieldOn():void{
_shield = new ShieldEffect();
addChild(_shield);
}
private function tryMove():void{
if (_state != MOVE){
_state = MOVE;
getBody().play();
};
if (Main.kh.isDownDown){
moveDown();
};
if (Main.kh.isLeftDown){
moveLeft();
};
if (Main.kh.isUpDown){
moveUp();
};
if (Main.kh.isRightDown){
moveRight();
};
rotateHeadOnEvent();
}
private function calculateTargetRotation(_arg1:int, _arg2:int):void{
_targetAngle.targetX = _arg1;
_targetAngle.targetY = _arg2;
_targetAngle.objectX = x;
_targetAngle.objectY = y;
}
override public function fire():void{
_targetAngle.targetX = _map.mouseX;
_targetAngle.targetY = _map.mouseY;
_weaponManager.fire(_targetAngle, _itemManager.quadDamage);
}
override protected function fadeWeapon():void{
_weaponManager.fadeWeapons();
}
public function removeMissilePack():void{
_weaponManager.removeBonusWeapon();
}
public function get finalScore():int{
return (_statisticsManager.getFinalScore(_perkManager.greedPerk.level));
}
override public function causeDamage(_arg1:Damage):void{
if (_itemManager.shield){
return;
};
SoundManager.play(SoundManager.HIT);
super.causeDamage(_arg1);
}
public function addEventListeners():void{
_stage.addEventListener(MouseEvent.MOUSE_MOVE, rotateHeadOnEvent);
_stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
_stage.addEventListener(MouseEvent.MOUSE_UP, mouseUp);
}
override public function addToMap(_arg1:Map, _arg2:Side):void{
super.addToMap(_arg1, _arg2);
_itemManager.map = _arg1;
_perkManager.map = _arg1;
_weaponManager.map = _arg1;
}
private function moveRight():void{
calculateTargetAngle();
rotate();
if (x >= (_map.width - HALF_SIZE)){
return;
};
var _local1:Number = (((Main.kh.isUpDown) || (Main.kh.isDownDown))) ? (0.8 * speed) : speed;
x = (x + _local1);
}
public function increaseExperience(_arg1:int):void{
if (_perkManager.scintistPerk.level > 0){
_arg1 = (_arg1 * (((_perkManager.scintistPerk.level * ScintistPerk.INCREMENT) + 100) / 100));
};
_expManager.increaseExperience((_itemManager.doubleExp) ? (_arg1 * 2) : _arg1);
}
public function shieldOff():void{
removeChild(_shield);
_shield = null;
}
private function levelUp(_arg1:UnitEvent):void{
_expManager.removeEventListener(UnitEvent.LEVEL_UP, levelUp);
dispatchEvent(new UnitEvent(UnitEvent.LEVEL_UP));
}
public function reset():void{
heal(200);
_itemManager.reset();
getBody().gotoAndStop(1);
stand();
_statisticsManager.resetCurrent();
}
private function moveUp():void{
calculateTargetAngle();
rotate();
if (y <= HALF_SIZE){
return;
};
var _local1:Number = (((Main.kh.isLeftDown) || (Main.kh.isRightDown))) ? (0.8 * speed) : speed;
y = (y - _local1);
}
public function pickItem(_arg1:Item):void{
SoundManager.play(SoundManager.PICK_ITEM);
_itemManager.put(_arg1);
}
override public function reallyDie(_arg1:UnitEvent=null):void{
_reallyDead = true;
dispatchEvent(new UnitEvent(UnitEvent.REALLY_DEAD));
}
override public function stand():void{
if (_state != STAND){
_state = STAND;
getBody().stop();
getBody().addEventListener(UnitEvent.WALK, reallyStand);
};
}
public function get expManager():ExpManager{
return (_expManager);
}
public function rotateHead(_arg1:int, _arg2:int):void{
calculateTargetRotation(_arg1, _arg2);
_targetAngle.calculateRotation();
getHead().rotation = (_targetAngle.rotation - 180);
}
public function getHead():MovieClip{
return ((getChildByName("head") as MovieClip));
}
override protected function rotate():void{
if (((((getBody().rotation + 180) < (_targetAngle.rotation + 2))) && (((getBody().rotation + 180) > (_targetAngle.rotation - 2))))){
return;
};
if (Math.abs(((_targetAngle.rotation - getBody().rotation) - 180)) > 15){
getBody().rotation = (getBody().rotation + (MathUtils.compareAngles(_targetAngle.rotation, (getBody().rotation + 180)) * 5));
};
getBody().rotation = (getBody().rotation + (MathUtils.compareAngles(_targetAngle.rotation, (getBody().rotation + 180)) * 3));
}
private function mouseDown(_arg1:MouseEvent):void{
_mouseDown = true;
}
public function removeEventListeners():void{
_stage.removeEventListener(MouseEvent.MOUSE_MOVE, rotateHeadOnEvent);
_stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
_stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUp);
}
public function checkSlowDown():void{
var _local2:Unit;
var _local1:int;
while (_local1 < _map.mobs.units.length) {
_local2 = _map.mobs.units[_local1];
if ((((_local2 is Catcher)) && ((MathUtils.distance2(_local2.x, _local2.y, x, y) < 2500)))){
_slowdown = SLOWDOWN;
return;
};
_local1++;
};
_slowdown = 1;
}
public function load():void{
_perkManager.load();
_weaponManager.load();
_expManager.load();
_statisticsManager.load();
}
public function get weaponManager():WeaponManager{
return (_weaponManager);
}
override protected function reallyStand(_arg1:UnitEvent):void{
if (_state == STAND){
getBody().stop();
};
getBody().removeEventListener(UnitEvent.WALK, reallyStand);
}
override public function get footstepSound():Sound{
return (SoundManager.FOOTSTEP);
}
override public function pause():void{
getBody().stop();
getHead().stop();
}
override public function redraw():void{
x = heroX();
y = heroY();
}
private function moveLeft():void{
calculateTargetAngle();
rotate();
if (x <= HALF_SIZE){
return;
};
var _local1:Number = (((Main.kh.isUpDown) || (Main.kh.isDownDown))) ? (0.8 * speed) : speed;
x = (x - _local1);
}
public function mergeStatistics():void{
_statisticsManager.merge();
}
private function calculateTargetAngle():void{
if (((Main.kh.isLeftDown) && (Main.kh.isDownDown))){
_targetAngle.rotation = 45;
} else {
if (((Main.kh.isLeftDown) && (Main.kh.isUpDown))){
_targetAngle.rotation = 135;
} else {
if (((Main.kh.isRightDown) && (Main.kh.isUpDown))){
_targetAngle.rotation = 225;
} else {
if (((Main.kh.isRightDown) && (Main.kh.isDownDown))){
_targetAngle.rotation = 315;
} else {
if (Main.kh.isLeftDown){
_targetAngle.rotation = 90;
} else {
if (Main.kh.isRightDown){
_targetAngle.rotation = 270;
} else {
if (Main.kh.isUpDown){
_targetAngle.rotation = 180;
} else {
if (Main.kh.isDownDown){
_targetAngle.rotation = 0;
};
};
};
};
};
};
};
};
}
override public function unpause():void{
getBody().stop();
getHead().stop();
}
}
}//package map.units.hero
Section 231
//HeroHpBar (map.units.hero.HeroHpBar)
package map.units.hero {
import map.units.unit.*;
public class HeroHpBar extends HpBar {
public function HeroHpBar(){
show = true;
}
}
}//package map.units.hero
Section 232
//HeroManager (map.units.hero.HeroManager)
package map.units.hero {
import map.*;
public class HeroManager {
protected var _hero:Hero;
protected var _map:Map;
public function HeroManager(_arg1:Hero){
_hero = _arg1;
}
public function set map(_arg1:Map):void{
_map = _arg1;
}
}
}//package map.units.hero
Section 233
//BugClaws (map.units.planet1.weapons.BugClaws)
package map.units.planet1.weapons {
import map.units.unit.*;
import map.weapons.*;
public class BugClaws extends InstantWeapon {
public function BugClaws(_arg1:Unit){
super({damage:7, clipSize:1, reloading:0, bulletSpeed2:0, fireRate:600}, _arg1);
}
}
}//package map.units.planet1.weapons
Section 234
//BugSpit (map.units.planet1.weapons.BugSpit)
package map.units.planet1.weapons {
import map.units.unit.*;
import map.units.utils.*;
import map.weapons.*;
import map.weapons.bullets.*;
public class BugSpit extends ShellWeapon {
public function BugSpit(_arg1:Unit){
super({damage:4, clipSize:3, reloading:1400, bulletSpeed:10, fireRate:650, spread:250}, _arg1);
bulletYShift = 5;
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new BrownBugBullet(_arg1, _arg2, _arg3, _arg4));
}
}
}//package map.units.planet1.weapons
Section 235
//MantisSpit (map.units.planet1.weapons.MantisSpit)
package map.units.planet1.weapons {
import map.units.unit.*;
import map.units.utils.*;
import map.weapons.*;
import map.weapons.bullets.*;
public class MantisSpit extends ShellWeapon {
public function MantisSpit(_arg1:Unit){
super({damage:11, clipSize:2, reloading:700, bulletSpeed:8, fireRate:900, spread:0}, _arg1);
bulletYShift = 5;
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new MantisBullet(_arg1, _arg2, _arg3, _arg4));
}
}
}//package map.units.planet1.weapons
Section 236
//QueenBuggun (map.units.planet1.weapons.QueenBuggun)
package map.units.planet1.weapons {
import map.units.unit.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import utils.*;
public class QueenBuggun extends BugWeapon {
public function QueenBuggun(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:4, clipSize:24, reloading:3500, bulletSpeed:10, fireRate:460, spread:400, cloneCount:5, impulse:1}, _arg1, _arg2, _arg3);
bulletYShift = 41;
}
override protected function getSound():Sound{
var _local1:int = (Math.random() * 5);
switch (_local1){
case 0:
return (SoundManager.BUG1);
case 1:
return (SoundManager.BUG2);
case 2:
return (SoundManager.BUG3);
case 3:
return (SoundManager.BUG4);
case 4:
return (SoundManager.BUG5);
default:
return (SoundManager.BUG1);
};
}
}
}//package map.units.planet1.weapons
Section 237
//RedMantisSpit (map.units.planet1.weapons.RedMantisSpit)
package map.units.planet1.weapons {
import map.units.unit.*;
import map.units.utils.*;
import map.weapons.*;
import map.weapons.bullets.*;
public class RedMantisSpit extends ShellWeapon {
public function RedMantisSpit(_arg1:Unit){
super({damage:6, clipSize:2, reloading:1200, bulletSpeed:8, fireRate:1300, spread:0}, _arg1);
bulletYShift = 5;
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new RedMantisBullet(_arg1, _arg2, _arg3, _arg4));
}
}
}//package map.units.planet1.weapons
Section 238
//SmallSpiderClaws (map.units.planet1.weapons.SmallSpiderClaws)
package map.units.planet1.weapons {
import map.units.unit.*;
import map.weapons.*;
public class SmallSpiderClaws extends InstantWeapon {
public function SmallSpiderClaws(_arg1:Unit){
super({damage:14, fireRate:1000}, _arg1);
}
}
}//package map.units.planet1.weapons
Section 239
//SpiderClaws (map.units.planet1.weapons.SpiderClaws)
package map.units.planet1.weapons {
import map.units.unit.*;
import map.weapons.*;
public class SpiderClaws extends InstantWeapon {
public function SpiderClaws(_arg1:Unit){
super({damage:24, fireRate:1000}, _arg1);
}
}
}//package map.units.planet1.weapons
Section 240
//TutorialSpiderClaws (map.units.planet1.weapons.TutorialSpiderClaws)
package map.units.planet1.weapons {
import map.units.unit.*;
import map.weapons.*;
public class TutorialSpiderClaws extends InstantWeapon {
public function TutorialSpiderClaws(_arg1:Unit){
super({damage:1, fireRate:1000}, _arg1);
}
}
}//package map.units.planet1.weapons
Section 241
//Bug (map.units.planet1.Bug)
package map.units.planet1 {
import map.units.unit.*;
import flash.media.*;
import map.units.unit.markers.*;
import utils.*;
import map.units.planet1.weapons.*;
public class Bug extends AIUnit implements Insect {
public function Bug(_arg1:int=0){
addFrameScript(0, frame1, 4, frame5, 95, frame96);
super({hp:18, speed2:3.8, range2:20, sight2:250000, size2:150, experience:20, psi:2.1}, new BugClaws(this), _arg1);
}
function frame5(){
gotoAndPlay("move");
}
override public function get apperanceSound():Sound{
return (SoundManager.INSECT_MOVE_2);
}
override public function get deathSound():Sound{
return (SoundManager.SMALL_INSECT_DEATH);
}
function frame1(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame96(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.units.planet1
Section 242
//DesertSpider (map.units.planet1.DesertSpider)
package map.units.planet1 {
import map.units.unit.*;
import flash.media.*;
import map.weapons.*;
import map.units.unit.markers.*;
import utils.*;
public dynamic class DesertSpider extends AIUnit implements Berserk, Catcher, Insect {
public function DesertSpider(_arg1:Object, _arg2:AbstractWeapon, _arg3:int=0){
addFrameScript(0, frame1, 2, frame3, 33, frame34, 135, frame136, 152, frame153);
super(_arg1, _arg2, _arg3);
}
override public function get apperanceSound():Sound{
return (SoundManager.INSECT_MOVE_1);
}
function frame1(){
stop();
}
function frame3(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame136(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame153(){
gotoAndPlay("berserk");
}
override public function get deathSound():Sound{
return (SoundManager.SMALL_INSECT_DEATH);
}
function frame34(){
gotoAndPlay("move");
}
}
}//package map.units.planet1
Section 243
//FireBug (map.units.planet1.FireBug)
package map.units.planet1 {
import map.units.unit.*;
import flash.media.*;
import map.units.unit.markers.*;
import utils.*;
import map.units.planet1.weapons.*;
public class FireBug extends AIUnit implements Insect {
public function FireBug(_arg1:int=0){
addFrameScript(0, frame1, 1, frame2, 4, frame5, 95, frame96);
super({hp:34, speed2:3.6, range2:46000, sight2:250000, size2:150, experience:25, psi:2.3}, new BugSpit(this), _arg1);
}
override public function get apperanceSound():Sound{
return (SoundManager.INSECT_MOVE_3);
}
function frame1(){
stop();
}
function frame2(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame5(){
gotoAndPlay("move");
}
function frame96(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
override public function get deathSound():Sound{
return (SoundManager.SMALL_INSECT_DEATH);
}
}
}//package map.units.planet1
Section 244
//FunSpiderAndrey (map.units.planet1.FunSpiderAndrey)
package map.units.planet1 {
import map.units.unit.*;
import flash.media.*;
import map.units.unit.markers.*;
import utils.*;
import map.units.planet1.weapons.*;
public dynamic class FunSpiderAndrey extends AIUnit implements Berserk, Catcher, Insect {
public function FunSpiderAndrey(_arg1:int=0){
addFrameScript(0, frame1, 2, frame3, 33, frame34, 135, frame136, 152, frame153);
super({hp:40, speed2:1.9, range2:1000, sight2:250000, size2:400, experience:100, psi:8}, new TutorialSpiderClaws(this), _arg1);
}
override public function get apperanceSound():Sound{
return (SoundManager.INSECT_MOVE_1);
}
function frame1(){
stop();
}
function frame3(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame136(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame153(){
gotoAndPlay("berserk");
}
override public function get deathSound():Sound{
return (SoundManager.SMALL_INSECT_DEATH);
}
function frame34(){
gotoAndPlay("move");
}
}
}//package map.units.planet1
Section 245
//FunSpiderMe (map.units.planet1.FunSpiderMe)
package map.units.planet1 {
import map.units.unit.*;
import flash.media.*;
import map.units.unit.markers.*;
import utils.*;
import map.units.planet1.weapons.*;
public dynamic class FunSpiderMe extends AIUnit implements Berserk, Catcher, Insect {
public function FunSpiderMe(_arg1:int=0){
addFrameScript(0, frame1, 2, frame3, 33, frame34, 135, frame136, 152, frame153);
super({hp:100, speed2:1.9, range2:1000, sight2:250000, size2:400, experience:500, psi:8}, new TutorialSpiderClaws(this), _arg1);
}
override public function get apperanceSound():Sound{
return (SoundManager.INSECT_MOVE_1);
}
function frame1(){
stop();
}
function frame3(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame136(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame153(){
gotoAndPlay("berserk");
}
override public function get deathSound():Sound{
return (SoundManager.SMALL_INSECT_DEATH);
}
function frame34(){
gotoAndPlay("move");
}
}
}//package map.units.planet1
Section 246
//GiantDesertSpider (map.units.planet1.GiantDesertSpider)
package map.units.planet1 {
import flash.media.*;
import utils.*;
import map.units.planet1.weapons.*;
public dynamic class GiantDesertSpider extends DesertSpider {
public function GiantDesertSpider(_arg1:int=0){
super({hp:240, speed2:1.9, range2:1000, sight2:250000, size2:400, experience:65, psi:8}, new SpiderClaws(this), _arg1);
}
override public function get deathSound():Sound{
return (SoundManager.SPIDER_DEATH);
}
}
}//package map.units.planet1
Section 247
//GiantGreenSpider (map.units.planet1.GiantGreenSpider)
package map.units.planet1 {
import flash.media.*;
import utils.*;
import map.units.planet1.weapons.*;
public dynamic class GiantGreenSpider extends GreenSpider {
public function GiantGreenSpider(_arg1:int=0){
super({hp:150, speed2:1.6, range2:800, sight2:250000, size2:300, experience:50, psi:8}, new SpiderClaws(this), _arg1);
resize(0.8);
}
override public function get deathSound():Sound{
return (SoundManager.SPIDER_DEATH);
}
}
}//package map.units.planet1
Section 248
//GreenSpider (map.units.planet1.GreenSpider)
package map.units.planet1 {
import map.units.unit.*;
import flash.media.*;
import map.weapons.*;
import map.units.unit.markers.*;
import utils.*;
public dynamic class GreenSpider extends AIUnit implements Berserk, Catcher, Insect {
public function GreenSpider(_arg1:Object, _arg2:AbstractWeapon, _arg3:int=0){
addFrameScript(0, frame1, 2, frame3, 33, frame34, 135, frame136, 152, frame153);
super(_arg1, _arg2, _arg3);
}
override public function get apperanceSound():Sound{
return (SoundManager.INSECT_MOVE_2);
}
function frame1(){
stop();
}
function frame3(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame136(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame153(){
gotoAndPlay("berserk");
}
override public function get deathSound():Sound{
return (SoundManager.SMALL_INSECT_DEATH);
}
function frame34(){
gotoAndPlay("move");
}
}
}//package map.units.planet1
Section 249
//Mantis (map.units.planet1.Mantis)
package map.units.planet1 {
import map.units.unit.*;
import flash.media.*;
import map.units.unit.markers.*;
import utils.*;
import map.units.planet1.weapons.*;
public class Mantis extends MantisTypeAIUnit implements Insect {
public function Mantis(_arg1:int=0){
addFrameScript(0, frame1, 6, frame7, 9, frame10, 37, frame38, 52, frame53, 174, frame175);
super({hp:96, speed2:1.6, range2:60000, sight2:20000, size2:360, experience:40, psi:3.5}, new MantisSpit(this), _arg1);
setBaseScale(0.8);
}
function frame175(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
override public function get apperanceSound():Sound{
return (SoundManager.MANTIS_MOVE);
}
function frame1(){
stop();
}
function frame38(){
dispatchEvent(new UnitEvent(UnitEvent.ROTATE_FLY));
}
function frame7(){
dispatchEvent(new UnitEvent(UnitEvent.ROTATE_FLY));
}
override public function get deathSound():Sound{
return (((Math.random() > 0.5)) ? SoundManager.INSECT_DEATH : SoundManager.INSECT_DEATH_2);
}
function frame10(){
dispatchEvent(new UnitEvent(UnitEvent.FLY));
}
function frame53(){
stop();
}
}
}//package map.units.planet1
Section 250
//Queen (map.units.planet1.Queen)
package map.units.planet1 {
import flash.display.*;
import map.units.unit.*;
import map.units.utils.*;
import flash.geom.*;
import flash.media.*;
import map.units.unit.blood.*;
import map.units.unit.markers.*;
import utils.*;
import map.units.planet1.weapons.*;
import map.items.weapons.*;
public class Queen extends AIUnit implements Unstoppable, Unstunnable, Catcher, Walllike, ReverseBlooded, Insect {
public var head:MovieClip;
public function Queen(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 7, frame8);
super({hp:5000, speed2:0, range2:1000000, sight2:1000000, size2:3800, experience:1000, psi:15}, new QueenBuggun(this));
dropItem = new BugGunItem();
dropItem.dropShiftPoint = new Point(0, 150);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
private function getHead():MovieClip{
return ((getChildByName("head") as MovieClip));
}
protected function rotateHeadToTarget():void{
if (_target == null){
return;
};
setTargetRotationToPoint(_target.x, _target.y);
_targetAngle.calculateRotation();
getHead().rotation = (_targetAngle.rotation + 180);
}
protected function queenFire():void{
rotateHeadToTarget();
if ((((this is Unstoppable)) && ((MathUtils.distance2(x, y, _target.x, _target.y) < params["range2"])))){
fire();
};
}
override public function get deathSound():Sound{
return (SoundManager.QUEEN_DEATH);
}
override public function tick(_arg1:Number):void{
superTick(_arg1);
_weapon.tick(_arg1);
if ((((_target == null)) || (_target.dead))){
_target = getTarget();
};
if (_target != null){
_lastReactionTime = _arg1;
queenFire();
};
if (((!(dead)) && (_hpBar.show))){
_hpBar.redraw();
};
}
function frame3(){
stop();
}
}
}//package map.units.planet1
Section 251
//RedMantis (map.units.planet1.RedMantis)
package map.units.planet1 {
import map.units.unit.*;
import flash.media.*;
import map.units.unit.markers.*;
import utils.*;
import map.units.planet1.weapons.*;
public class RedMantis extends MantisTypeAIUnit implements Insect {
public function RedMantis(_arg1:int=0){
addFrameScript(0, frame1, 6, frame7, 9, frame10, 37, frame38, 52, frame53, 174, frame175);
super({hp:66, speed2:1.6, range2:60000, sight2:20000, size2:360, experience:32, psi:3}, new RedMantisSpit(this), _arg1);
setBaseScale(0.55);
}
function frame175(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
override public function get apperanceSound():Sound{
return (SoundManager.MANTIS_MOVE);
}
function frame1(){
stop();
}
function frame38(){
dispatchEvent(new UnitEvent(UnitEvent.ROTATE_FLY));
}
function frame7(){
dispatchEvent(new UnitEvent(UnitEvent.ROTATE_FLY));
}
override public function get deathSound():Sound{
return (((Math.random() > 0.5)) ? SoundManager.INSECT_DEATH : SoundManager.INSECT_DEATH_2);
}
function frame10(){
dispatchEvent(new UnitEvent(UnitEvent.FLY));
}
function frame53(){
stop();
}
}
}//package map.units.planet1
Section 252
//SmallDesertSpider (map.units.planet1.SmallDesertSpider)
package map.units.planet1 {
import map.units.planet1.weapons.*;
public dynamic class SmallDesertSpider extends DesertSpider {
public function SmallDesertSpider(_arg1:int=0){
super({hp:110, speed2:1.2, range2:400, sight2:250000, size2:250, experience:36, psi:5.5}, new SmallSpiderClaws(this), _arg1);
resize(0.6);
}
}
}//package map.units.planet1
Section 253
//SmallGreenSpider (map.units.planet1.SmallGreenSpider)
package map.units.planet1 {
import map.units.planet1.weapons.*;
public dynamic class SmallGreenSpider extends GreenSpider {
public function SmallGreenSpider(_arg1:int=0){
super({hp:85, speed2:1.1, range2:400, sight2:250000, size2:200, experience:30, psi:4.7}, new SmallSpiderClaws(this), _arg1);
resize(0.5);
}
}
}//package map.units.planet1
Section 254
//TutorialSpider (map.units.planet1.TutorialSpider)
package map.units.planet1 {
import map.units.planet1.weapons.*;
public dynamic class TutorialSpider extends GreenSpider {
public function TutorialSpider(_arg1:int=0){
super({hp:30, speed2:1.1, range2:400, sight2:450000, size2:250, experience:70, psi:4.7}, new TutorialSpiderClaws(this), _arg1);
resize(0.5);
}
}
}//package map.units.planet1
Section 255
//BigFootPunch (map.units.planet2.weapons.BigFootPunch)
package map.units.planet2.weapons {
import map.units.unit.*;
import map.weapons.*;
public class BigFootPunch extends InstantWeapon {
public function BigFootPunch(_arg1:Unit){
super({damage:19, fireRate:1000}, _arg1);
}
}
}//package map.units.planet2.weapons
Section 256
//BigFootStone (map.units.planet2.weapons.BigFootStone)
package map.units.planet2.weapons {
import map.units.unit.*;
import map.units.utils.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.bullets.*;
import utils.*;
public class BigFootStone extends PiercingWeapon {
public function BigFootStone(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:20, clipSize:5, reloading:2000, bulletSpeed:19, maxSpeed2:500, fireRate:1200, spread:50, shellsCount:1, impulse:4}, _arg1, _arg2, _arg3);
bulletYShift = 15;
}
override protected function getSound():Sound{
return (SoundManager.BIG_FOOT_STONE);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new BigFootBullet(_arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package map.units.planet2.weapons
Section 257
//GiantIcerPunch (map.units.planet2.weapons.GiantIcerPunch)
package map.units.planet2.weapons {
import map.units.unit.*;
import map.weapons.*;
public class GiantIcerPunch extends InstantWeapon {
public function GiantIcerPunch(_arg1:Unit){
super({damage:20, fireRate:1300}, _arg1);
}
}
}//package map.units.planet2.weapons
Section 258
//MediumIcerPunch (map.units.planet2.weapons.MediumIcerPunch)
package map.units.planet2.weapons {
import map.units.unit.*;
import map.weapons.*;
public class MediumIcerPunch extends InstantWeapon {
public function MediumIcerPunch(_arg1:Unit){
super({damage:16, fireRate:1400}, _arg1);
}
}
}//package map.units.planet2.weapons
Section 259
//ScateSpit (map.units.planet2.weapons.ScateSpit)
package map.units.planet2.weapons {
import map.units.unit.*;
import map.units.utils.*;
import map.weapons.*;
import map.weapons.bullets.*;
public class ScateSpit extends ShellWeapon {
public function ScateSpit(_arg1:Unit){
super({damage:6, clipSize:6, reloading:2200, bulletSpeed:9, fireRate:2200, spread:100, shellsCount:3, angleVariation:40}, _arg1);
bulletYShift = 5;
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new ScateBullet(_arg1, _arg2, _arg3, _arg4));
}
}
}//package map.units.planet2.weapons
Section 260
//SleazoidClaws (map.units.planet2.weapons.SleazoidClaws)
package map.units.planet2.weapons {
import map.units.unit.*;
import map.weapons.*;
public class SleazoidClaws extends InstantWeapon {
public function SleazoidClaws(_arg1:Unit){
super({damage:5, fireRate:250}, _arg1);
}
}
}//package map.units.planet2.weapons
Section 261
//SmallIcerPunch (map.units.planet2.weapons.SmallIcerPunch)
package map.units.planet2.weapons {
import map.units.unit.*;
import map.weapons.*;
public class SmallIcerPunch extends InstantWeapon {
public function SmallIcerPunch(_arg1:Unit){
super({damage:14, fireRate:1500}, _arg1);
}
}
}//package map.units.planet2.weapons
Section 262
//BigBigFoot (map.units.planet2.BigBigFoot)
package map.units.planet2 {
import map.units.planet2.weapons.*;
public class BigBigFoot extends BigFoot {
public function BigBigFoot(_arg1:int=0){
super({hp:270, speed2:1.6, range2:80000, sight2:250000, size2:680, experience:180, psi:5.5}, new BigFootStone(this), _arg1);
}
}
}//package map.units.planet2
Section 263
//BigFoot (map.units.planet2.BigFoot)
package map.units.planet2 {
import map.units.unit.*;
import flash.media.*;
import map.weapons.*;
import map.units.unit.markers.*;
import utils.*;
public class BigFoot extends AIUnit implements CoolBlooded, Catcher {
public function BigFoot(_arg1:Object, _arg2:AbstractWeapon, _arg3:int=0){
addFrameScript(15, frame16, 24, frame25, 49, frame50, 68, frame69, 119, frame120);
super(_arg1, _arg2, _arg3);
}
function frame25(){
dispatchEvent(new UnitEvent(UnitEvent.STEP));
}
function frame16(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame69(){
gotoAndPlay("berserk");
}
function frame50(){
gotoAndPlay("move");
}
function frame120(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
override public function get deathSound():Sound{
return (((Math.random() > 0.5)) ? SoundManager.BIG_FOOT_DEATH_1 : SoundManager.BIG_FOOT_DEATH_2);
}
}
}//package map.units.planet2
Section 264
//GiantIcer (map.units.planet2.GiantIcer)
package map.units.planet2 {
import map.units.planet2.weapons.*;
public class GiantIcer extends Icer {
public function GiantIcer(_arg1:int=0){
super({hp:220, speed2:2.5, range2:0, sight2:250000, size2:700, experience:100, psi:7.5}, new GiantIcerPunch(this), _arg1);
resize(0.85);
}
}
}//package map.units.planet2
Section 265
//Icer (map.units.planet2.Icer)
package map.units.planet2 {
import map.units.unit.*;
import flash.media.*;
import map.weapons.*;
import map.units.unit.markers.*;
import utils.*;
public class Icer extends AIUnit implements Catcher, Berserk, CoolBlooded {
public function Icer(_arg1:Object, _arg2:AbstractWeapon, _arg3:int=0){
addFrameScript(0, frame1, 1, frame2, 9, frame10, 32, frame33, 44, frame45, 65, frame66, 72, frame73, 82, frame83);
super(_arg1, _arg2, _arg3);
}
function frame1(){
stop();
}
function frame2(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame83(){
gotoAndPlay("berserk");
}
function frame73(){
dispatchEvent(new UnitEvent(UnitEvent.STEP));
}
override public function get deathSound():Sound{
return (SoundManager.ICER_DEATH);
}
function frame10(){
dispatchEvent(new UnitEvent(UnitEvent.STEP));
}
function frame33(){
gotoAndPlay("move");
}
function frame45(){
stop();
}
function frame66(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.units.planet2
Section 266
//MediumIcer (map.units.planet2.MediumIcer)
package map.units.planet2 {
import map.units.planet2.weapons.*;
public class MediumIcer extends Icer {
public function MediumIcer(_arg1:int=0){
super({hp:140, speed2:2.5, range2:0, sight2:250000, size2:400, experience:80, psi:7}, new MediumIcerPunch(this), _arg1);
resize(0.75);
}
}
}//package map.units.planet2
Section 267
//Scate (map.units.planet2.Scate)
package map.units.planet2 {
import map.units.unit.*;
import flash.media.*;
import map.units.unit.markers.*;
import utils.*;
import map.units.planet2.weapons.*;
public class Scate extends AIUnit implements BrownBlooded, Unstunnable, Unstoppable {
public function Scate(_arg1:int=0){
addFrameScript(0, frame1, 60, frame61, 78, frame79);
super({hp:170, speed2:3, range2:66000, sight2:80000, size2:360, experience:80, regeneration:3, psi:9}, new ScateSpit(this), _arg1);
}
function frame61(){
gotoAndPlay("move");
}
override public function get apperanceSound():Sound{
return (SoundManager.SCATE_MOVE);
}
override public function get deathSound():Sound{
return (SoundManager.SCATE_DEATH);
}
function frame1(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame79(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.units.planet2
Section 268
//Sleazoid (map.units.planet2.Sleazoid)
package map.units.planet2 {
import map.units.unit.*;
import flash.media.*;
import map.units.unit.markers.*;
import utils.*;
import map.units.planet2.weapons.*;
public class Sleazoid extends AIUnit implements Insect, Catcher {
public function Sleazoid(_arg1:int=0){
addFrameScript(1, frame2, 12, frame13, 134, frame135);
super({hp:76, speed2:6.2, range2:0, sight2:250000, size2:200, experience:25, psi:2.2, regeneration:2}, new SleazoidClaws(this), _arg1);
}
override public function get deathSound():Sound{
return (SoundManager.SLEAZOID_DEATH);
}
function frame2(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame135(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame13(){
gotoAndPlay("move");
}
}
}//package map.units.planet2
Section 269
//SmallBigFoot (map.units.planet2.SmallBigFoot)
package map.units.planet2 {
import map.units.unit.markers.*;
import map.units.planet2.weapons.*;
public class SmallBigFoot extends BigFoot implements Berserk {
public function SmallBigFoot(_arg1:int=0){
super({hp:170, speed2:1.6, range2:0, sight2:250000, size2:680, experience:60, psi:6.2}, new BigFootPunch(this), _arg1);
resize(0.7);
}
}
}//package map.units.planet2
Section 270
//SmallIcer (map.units.planet2.SmallIcer)
package map.units.planet2 {
import flash.media.*;
import utils.*;
import map.units.planet2.weapons.*;
public class SmallIcer extends Icer {
public function SmallIcer(_arg1:int=0){
super({hp:78, speed2:2, range2:0, sight2:250000, size2:250, experience:40, psi:5}, new SmallIcerPunch(this), _arg1);
resize(0.4);
}
override public function get deathSound():Sound{
return (SoundManager.ICER_SMALL_DEATH);
}
}
}//package map.units.planet2
Section 271
//FireWisp (map.units.planet3.abstract.FireWisp)
package map.units.planet3.abstract {
import map.units.unit.*;
import flash.media.*;
import map.weapons.*;
import map.units.unit.blood.*;
import utils.*;
public dynamic class FireWisp extends AIUnit implements PleusBlooded {
public function FireWisp(_arg1:Object, _arg2:AbstractWeapon, _arg3:int=0){
addFrameScript(89, frame90, 104, frame105);
super(_arg1, _arg2, _arg3);
}
function frame105(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
override public function get apperanceSound():Sound{
return (SoundManager.WISP_MOVE);
}
override public function get deathSound():Sound{
return (SoundManager.WISP_DEATH);
}
function frame90(){
gotoAndPlay("move");
}
}
}//package map.units.planet3.abstract
Section 272
//Golem (map.units.planet3.abstract.Golem)
package map.units.planet3.abstract {
import map.units.unit.*;
import flash.media.*;
import map.weapons.*;
import map.units.unit.blood.*;
import utils.*;
public class Golem extends AIUnit implements PleusBlooded {
public function Golem(_arg1:Object, _arg2:AbstractWeapon, _arg3:int=0){
addFrameScript(0, frame1, 2, frame3, 12, frame13, 32, frame33, 43, frame44, 68, frame69, 195, frame196);
super(_arg1, _arg2, _arg3);
}
function frame69(){
stop();
}
function frame196(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
override public function get apperanceSound():Sound{
return (SoundManager.GOLEM_MOVE);
}
function frame1(){
stop();
}
function frame3(){
gotoAndPlay("move");
}
override public function get deathSound():Sound{
return (SoundManager.GOLEM_DEATH);
}
function frame44(){
gotoAndPlay("move");
}
function frame33(){
dispatchEvent(new UnitEvent(UnitEvent.STEP));
}
function frame13(){
dispatchEvent(new UnitEvent(UnitEvent.STEP));
}
}
}//package map.units.planet3.abstract
Section 273
//RayGolem (map.units.planet3.abstract.RayGolem)
package map.units.planet3.abstract {
import map.units.unit.*;
import flash.media.*;
import map.weapons.*;
import map.units.unit.blood.*;
import utils.*;
public class RayGolem extends AIUnit implements PleusBlooded {
public function RayGolem(_arg1:Object, _arg2:AbstractWeapon, _arg3:int=0){
addFrameScript(28, frame29, 45, frame46, 166, frame167);
super(_arg1, _arg2, _arg3);
}
override public function get apperanceSound():Sound{
return (SoundManager.GOLEM_MOVE);
}
override public function get deathSound():Sound{
return (SoundManager.GOLEM_DEATH);
}
function frame29(){
gotoAndPlay("move");
}
function frame167(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame46(){
stop();
}
}
}//package map.units.planet3.abstract
Section 274
//Golem2Ray (map.units.planet3.weapons.Golem2Ray)
package map.units.planet3.weapons {
import map.units.unit.*;
import map.weapons.*;
public class Golem2Ray extends InstantWeapon {
public function Golem2Ray(_arg1:Unit){
super({damage:18, fireRate:1800}, _arg1);
}
}
}//package map.units.planet3.weapons
Section 275
//GreatGolemHand (map.units.planet3.weapons.GreatGolemHand)
package map.units.planet3.weapons {
import map.units.unit.*;
import map.weapons.*;
public class GreatGolemHand extends InstantWeapon {
public function GreatGolemHand(_arg1:Unit){
super({damage:100, fireRate:3000}, _arg1);
}
}
}//package map.units.planet3.weapons
Section 276
//LavaBugSpit (map.units.planet3.weapons.LavaBugSpit)
package map.units.planet3.weapons {
import map.units.unit.*;
import map.units.utils.*;
import map.weapons.*;
import map.weapons.bullets.*;
public class LavaBugSpit extends ShellWeapon {
public function LavaBugSpit(_arg1:Unit){
super({damage:2, clipSize:150, reloading:3000, bulletSpeed:9, fireRate:2100, shellsCount:5, angleVariation:30}, _arg1);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new LavaBugBullet(_arg1, _arg2, _arg3, _arg4));
}
}
}//package map.units.planet3.weapons
Section 277
//MediumGolemHand (map.units.planet3.weapons.MediumGolemHand)
package map.units.planet3.weapons {
import map.units.unit.*;
import map.weapons.*;
public class MediumGolemHand extends InstantWeapon {
public function MediumGolemHand(_arg1:Unit){
super({damage:50, fireRate:3000}, _arg1);
}
}
}//package map.units.planet3.weapons
Section 278
//MotherLavaBugSpit (map.units.planet3.weapons.MotherLavaBugSpit)
package map.units.planet3.weapons {
import map.units.unit.*;
import map.units.utils.*;
import map.weapons.*;
import map.weapons.bullets.*;
public class MotherLavaBugSpit extends ShellWeapon {
public function MotherLavaBugSpit(_arg1:Unit){
super({damage:13, clipSize:150, reloading:3000, bulletSpeed:15, fireRate:3200, shellsCount:15, angleVariation:360}, _arg1);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new LavaBugBullet(_arg1, _arg2, _arg3, _arg4));
}
}
}//package map.units.planet3.weapons
Section 279
//SmallGolemHand (map.units.planet3.weapons.SmallGolemHand)
package map.units.planet3.weapons {
import map.units.unit.*;
import map.weapons.*;
public class SmallGolemHand extends InstantWeapon {
public function SmallGolemHand(_arg1:Unit){
super({damage:33, fireRate:3000}, _arg1);
}
}
}//package map.units.planet3.weapons
Section 280
//WispTouch (map.units.planet3.weapons.WispTouch)
package map.units.planet3.weapons {
import map.units.unit.*;
import map.weapons.*;
public class WispTouch extends InstantWeapon {
public function WispTouch(_arg1:Unit){
super({damage:24, clipSize:1, reloading:0, bulletSpeed2:0, fireRate:1000}, _arg1);
}
}
}//package map.units.planet3.weapons
Section 281
//GreatFireWisp (map.units.planet3.GreatFireWisp)
package map.units.planet3 {
import map.units.planet3.weapons.*;
import map.units.planet3.abstract.*;
public class GreatFireWisp extends FireWisp {
public function GreatFireWisp(_arg1:int=0){
super({hp:260, speed2:5.5, range2:0, sight2:250000, size2:400, experience:270, psi:10}, new WispTouch(this), _arg1);
}
}
}//package map.units.planet3
Section 282
//GreatGolem (map.units.planet3.GreatGolem)
package map.units.planet3 {
import map.units.planet3.weapons.*;
import map.units.planet3.abstract.*;
public class GreatGolem extends Golem {
public function GreatGolem(_arg1:int=0){
super({hp:1000, speed2:2.8, range2:1000, sight2:250000, size2:2500, experience:400, psi:17}, new GreatGolemHand(this), _arg1);
resize(0.83);
}
}
}//package map.units.planet3
Section 283
//GreatRayGolem (map.units.planet3.GreatRayGolem)
package map.units.planet3 {
import map.units.planet3.weapons.*;
import map.units.planet3.abstract.*;
public class GreatRayGolem extends RayGolem {
public function GreatRayGolem(_arg1:int=0){
super({hp:630, speed2:2.5, range2:400, sight2:250000, size2:600, experience:190, psi:3}, new Golem2Ray(this), _arg1);
}
}
}//package map.units.planet3
Section 284
//LavaBug (map.units.planet3.LavaBug)
package map.units.planet3 {
import map.units.unit.*;
import flash.media.*;
import map.units.unit.blood.*;
import utils.*;
import map.units.planet3.weapons.*;
public class LavaBug extends AIUnit implements PleusBlooded {
public function LavaBug(_arg1:int=0){
addFrameScript(29, frame30, 79, frame80);
super({hp:80, speed2:3.5, range2:40000, sight2:250000, size2:400, experience:96, psi:2.5}, new LavaBugSpit(this), _arg1);
}
override public function get apperanceSound():Sound{
return (SoundManager.LAVA_BUG_MOVE);
}
override public function get deathSound():Sound{
return (SoundManager.LAVA_BUG_DEATH);
}
function frame30(){
gotoAndPlay("move");
}
function frame80(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.units.planet3
Section 285
//MediumFireWisp (map.units.planet3.MediumFireWisp)
package map.units.planet3 {
import map.units.planet3.weapons.*;
import map.units.planet3.abstract.*;
public class MediumFireWisp extends FireWisp {
public function MediumFireWisp(_arg1:int=0){
super({hp:80, speed2:5, range2:0, sight2:250000, size2:200, experience:150, psi:4.5}, new WispTouch(this), _arg1);
resize(0.5);
}
}
}//package map.units.planet3
Section 286
//MediumGolem (map.units.planet3.MediumGolem)
package map.units.planet3 {
import map.units.planet3.weapons.*;
import map.units.planet3.abstract.*;
public class MediumGolem extends Golem {
public function MediumGolem(_arg1:int=0){
super({hp:200, speed2:2.4, range2:700, sight2:250000, size2:600, experience:250, psi:13}, new MediumGolemHand(this), _arg1);
resize(0.5);
}
}
}//package map.units.planet3
Section 287
//MotherLavaBug (map.units.planet3.MotherLavaBug)
package map.units.planet3 {
import map.units.unit.*;
import flash.media.*;
import map.units.unit.blood.*;
import map.units.unit.markers.*;
import utils.*;
import map.units.planet3.weapons.*;
public class MotherLavaBug extends AIUnit implements Unstoppable, Unstunnable, PleusBlooded {
public function MotherLavaBug(_arg1:int=0){
addFrameScript(29, frame30, 59, frame60);
super({hp:1000, speed2:2, range2:160000, sight2:250000, size2:1000, experience:500, psi:34}, new MotherLavaBugSpit(this), _arg1);
}
override public function get apperanceSound():Sound{
return (SoundManager.LAVA_BUG_MOTHER_MOVE);
}
override public function get deathSound():Sound{
return (SoundManager.LAVA_BUG_MOTHER_DEATH);
}
function frame30(){
gotoAndPlay("move");
}
function frame60(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.units.planet3
Section 288
//SmallGolem (map.units.planet3.SmallGolem)
package map.units.planet3 {
import map.units.planet3.weapons.*;
import map.units.planet3.abstract.*;
public class SmallGolem extends Golem {
public function SmallGolem(_arg1:int=0){
super({hp:175, speed2:2, range2:0, sight2:250000, size2:400, experience:125, psi:6}, new SmallGolemHand(this), _arg1);
resize(0.34);
}
}
}//package map.units.planet3
Section 289
//HoverCannonHead (map.units.planet4.weapons.heads.HoverCannonHead)
package map.units.planet4.weapons.heads {
import map.weapons.hero.heads.*;
public class HoverCannonHead extends Head {
public function HoverCannonHead(){
addFrameScript(0, frame1);
super();
}
function frame1(){
stop();
}
}
}//package map.units.planet4.weapons.heads
Section 290
//HoverDualGunHead (map.units.planet4.weapons.heads.HoverDualGunHead)
package map.units.planet4.weapons.heads {
import map.weapons.hero.heads.*;
public class HoverDualGunHead extends Head {
public function HoverDualGunHead(){
addFrameScript(0, frame1);
super();
}
function frame1(){
stop();
}
}
}//package map.units.planet4.weapons.heads
Section 291
//UltimateBossCannonHead (map.units.planet4.weapons.heads.UltimateBossCannonHead)
package map.units.planet4.weapons.heads {
import map.weapons.hero.heads.*;
public class UltimateBossCannonHead extends Head {
public function UltimateBossCannonHead(){
addFrameScript(0, frame1);
super();
}
function frame1(){
stop();
}
}
}//package map.units.planet4.weapons.heads
Section 292
//FlyerGun (map.units.planet4.weapons.FlyerGun)
package map.units.planet4.weapons {
import map.units.unit.*;
import map.units.utils.*;
import flash.media.*;
import map.weapons.*;
import map.weapons.bullets.*;
import utils.*;
public class FlyerGun extends ShellWeapon implements Traceable {
public function FlyerGun(_arg1:Unit){
super({damage:3, clipSize:10, reloading:3000, bulletSpeed:30, fireRate:750}, _arg1);
bulletYShift = 11;
}
override protected function getSound():Sound{
return (SoundManager.SHOT1);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new SmallBullet(_arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package map.units.planet4.weapons
Section 293
//HoverCannon (map.units.planet4.weapons.HoverCannon)
package map.units.planet4.weapons {
import map.units.unit.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import utils.*;
import map.units.planet4.weapons.heads.*;
public class HoverCannon extends GrenadeWeapon implements HeadWeapon {
public function HoverCannon(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:20, clipSize:6, reloading:1800, bulletSpeed:20, fireRate:1000, spread:0, impulse:6, splash2:2500}, _arg1, _arg2, _arg3);
bulletYShift = 10;
}
override protected function getSound():Sound{
return (SoundManager.SHOTGUN);
}
override public function getNewHead():Head{
var _local1:Head = new HoverCannonHead();
_local1.name = "head";
return (_local1);
}
}
}//package map.units.planet4.weapons
Section 294
//HoverDualGun (map.units.planet4.weapons.HoverDualGun)
package map.units.planet4.weapons {
import map.units.unit.*;
import map.units.utils.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import map.weapons.bullets.*;
import utils.*;
import map.units.planet4.weapons.heads.*;
public class HoverDualGun extends ShellWeapon implements EnergyWeapon, HeadWeapon {
public function HoverDualGun(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:9, clipSize:50, reloading:2000, bulletSpeed:13, fireRate:200, spread:60}, _arg1, _arg2, _arg3);
bulletXShift = 10;
bulletYShift = 10;
twoMuzzle = true;
}
override protected function getSound():Sound{
return (SoundManager.LASER);
}
override public function getNewHead():Head{
var _local1:Head = new HoverDualGunHead();
_local1.name = "head";
return (_local1);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new IonBullet(_arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package map.units.planet4.weapons
Section 295
//MechBossRocketLauncher (map.units.planet4.weapons.MechBossRocketLauncher)
package map.units.planet4.weapons {
import map.units.unit.*;
import flash.media.*;
import map.weapons.*;
import utils.*;
public class MechBossRocketLauncher extends MissileWeapon implements HeadWeapon {
public function MechBossRocketLauncher(_arg1:Unit){
super({damage:6, clipSize:4, reloading:300, bulletSpeed:4, maxSpeed2:400, fireRate:100, shellsCount:2, angleVariation:10, spread:50, acceleration:1, ipmulse:4}, _arg1);
bulletXShift = 10;
bulletYShift = 16;
twoMuzzle = true;
}
override protected function getSound():Sound{
return (SoundManager.SHOT1);
}
}
}//package map.units.planet4.weapons
Section 296
//MechBotRocketLauncher (map.units.planet4.weapons.MechBotRocketLauncher)
package map.units.planet4.weapons {
import map.units.unit.*;
import flash.media.*;
import map.weapons.*;
import utils.*;
public class MechBotRocketLauncher extends MissileWeapon implements HeadWeapon {
public function MechBotRocketLauncher(_arg1:Unit){
super({damage:6, clipSize:2, reloading:1100, bulletSpeed:4, maxSpeed2:400, fireRate:100, angleVariation:10, spread:50, acceleration:1, ipmulse:4}, _arg1);
bulletXShift = 10;
bulletYShift = 16;
twoMuzzle = true;
}
override protected function getSound():Sound{
return (SoundManager.SHOT1);
}
}
}//package map.units.planet4.weapons
Section 297
//Saw (map.units.planet4.weapons.Saw)
package map.units.planet4.weapons {
import map.units.unit.*;
import map.weapons.*;
public class Saw extends InstantWeapon {
public function Saw(_arg1:Unit){
super({damage:10, fireRate:400}, _arg1);
}
}
}//package map.units.planet4.weapons
Section 298
//SplicerShocker (map.units.planet4.weapons.SplicerShocker)
package map.units.planet4.weapons {
import map.units.unit.*;
import map.weapons.*;
public class SplicerShocker extends InstantWeapon {
public function SplicerShocker(_arg1:Unit){
super({damage:21, fireRate:1000}, _arg1);
}
}
}//package map.units.planet4.weapons
Section 299
//UltimateBossRailgun (map.units.planet4.weapons.UltimateBossRailgun)
package map.units.planet4.weapons {
import map.units.unit.*;
import map.units.utils.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import map.weapons.bullets.*;
import utils.*;
import map.units.planet4.weapons.heads.*;
public class UltimateBossRailgun extends PiercingWeapon implements ProgrammTraceable, EnergyWeapon, HeadWeapon {
public function UltimateBossRailgun(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:20, clipSize:25, reloading:3000, bulletSpeed:1000, fireRate:2700, spread:0, impulse:5}, _arg1, _arg2, _arg3);
bulletYShift = 10;
traceParams = {alpha:0.8, color:39167, thinness:2, fadeStep:0.25};
}
override protected function getSound():Sound{
return (SoundManager.RAILGUN);
}
override public function getNewHead():Head{
var _local1:Head = new UltimateBossCannonHead();
_local1.name = "head";
return (_local1);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new DummyBullet(_arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package map.units.planet4.weapons
Section 300
//BlueFlyer (map.units.planet4.BlueFlyer)
package map.units.planet4 {
import map.units.unit.*;
import map.units.planet4.weapons.*;
public class BlueFlyer extends Flyer {
public function BlueFlyer(_arg1:int=0){
addFrameScript(1, frame2, 2, frame3, 4, frame5, 6, frame7, 7, frame8);
super({hp:200, speed2:1.6, range2:80000, sight2:300000, size2:680, experience:120, psi:4.5}, new FlyerGun(this), _arg1);
}
function frame2(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame3(){
gotoAndPlay("move");
}
override public function get allied():Boolean{
return (true);
}
function frame5(){
stop();
}
function frame7(){
gotoAndPlay("berserk");
}
function frame8(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.units.planet4
Section 301
//CannonHover (map.units.planet4.CannonHover)
package map.units.planet4 {
import map.units.planet4.weapons.*;
public class CannonHover extends Hover {
public function CannonHover(_arg1:int=0){
super({hp:3500, speed2:2.5, range2:180000, sight2:400000, size2:800, experience:1500, psi:19}, new HoverCannon(this), _arg1);
addChild(_weapon.getHead());
}
}
}//package map.units.planet4
Section 302
//DualGunHover (map.units.planet4.DualGunHover)
package map.units.planet4 {
import map.units.planet4.weapons.*;
public class DualGunHover extends Hover {
public function DualGunHover(_arg1:int=0){
super({hp:2800, speed2:1.6, range2:250000, sight2:400000, size2:800, experience:1200, psi:19}, new HoverDualGun(this), _arg1);
addChild(_weapon.getHead());
}
}
}//package map.units.planet4
Section 303
//Flyer (map.units.planet4.Flyer)
package map.units.planet4 {
import map.units.unit.*;
import map.weapons.*;
import map.units.unit.markers.*;
public class Flyer extends AIUnit implements Mechanical, Berserk, Unstoppable, Unstunnable {
public function Flyer(_arg1:Object, _arg2:AbstractWeapon, _arg3:int=0){
super(_arg1, _arg2, _arg3);
}
}
}//package map.units.planet4
Section 304
//Hover (map.units.planet4.Hover)
package map.units.planet4 {
import flash.display.*;
import map.units.unit.*;
import map.weapons.*;
import map.units.unit.markers.*;
public class Hover extends AIUnit implements Mechanical, Unstunnable, Headed {
public var body:MovieClip;
public function Hover(_arg1:Object, _arg2:AbstractWeapon, _arg3:int=0){
addFrameScript(1, frame2, 2, frame3, 3, frame4);
super(_arg1, _arg2, _arg3);
}
function frame2(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame3(){
gotoAndPlay("move");
}
function frame4(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.units.planet4
Section 305
//MechBoss (map.units.planet4.MechBoss)
package map.units.planet4 {
import map.units.unit.*;
import map.units.unit.markers.*;
import map.units.planet4.weapons.*;
public class MechBoss extends AIUnit implements Mechanical {
public function MechBoss(_arg1:int=0){
addFrameScript(1, frame2, 17, frame18, 24, frame25, 25, frame26);
super({hp:2000, speed2:3, range2:125000, sight2:160000, size2:360, experience:1200, psi:12}, new MechBossRocketLauncher(this), _arg1);
}
function frame25(){
stop();
}
function frame26(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame18(){
gotoAndPlay("move");
}
function frame2(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
}
}//package map.units.planet4
Section 306
//MechBot (map.units.planet4.MechBot)
package map.units.planet4 {
import map.units.unit.*;
import map.units.unit.markers.*;
import map.units.planet4.weapons.*;
public class MechBot extends AIUnit implements Mechanical {
public function MechBot(_arg1:int=0){
addFrameScript(1, frame2, 17, frame18, 24, frame25, 26, frame27);
super({hp:180, speed2:3, range2:105000, sight2:130000, size2:360, experience:350, psi:8}, new MechBotRocketLauncher(this), _arg1);
}
function frame25(){
stop();
}
function frame27(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame18(){
gotoAndPlay("move");
}
function frame2(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
}
}//package map.units.planet4
Section 307
//RedFlyer (map.units.planet4.RedFlyer)
package map.units.planet4 {
import map.units.unit.*;
import map.units.planet4.weapons.*;
public class RedFlyer extends Flyer {
public function RedFlyer(_arg1:int=0){
addFrameScript(1, frame2, 2, frame3, 4, frame5, 6, frame7, 7, frame8);
super({hp:150, speed2:1.6, range2:70000, sight2:270000, size2:700, experience:380, psi:6}, new FlyerGun(this), _arg1);
}
function frame5(){
stop();
}
function frame7(){
gotoAndPlay("berserk");
}
function frame8(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame2(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame3(){
gotoAndPlay("move");
}
}
}//package map.units.planet4
Section 308
//SawTank (map.units.planet4.SawTank)
package map.units.planet4 {
import map.units.unit.*;
import map.units.unit.markers.*;
import map.units.planet4.weapons.*;
public class SawTank extends AIUnit implements Mechanical, Unstunnable {
public function SawTank(_arg1:int=0){
addFrameScript(1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
super({hp:400, speed2:3, range2:5000, sight2:80000, size2:1000, experience:310, psi:7}, new Saw(this), _arg1);
resize(0.86);
}
function frame5(){
stop();
}
function frame6(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame2(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
stop();
}
function frame3(){
gotoAndStop("move");
}
function frame4(){
stop();
}
}
}//package map.units.planet4
Section 309
//Splicer (map.units.planet4.Splicer)
package map.units.planet4 {
import map.units.unit.*;
import map.units.unit.markers.*;
import map.units.planet4.weapons.*;
public class Splicer extends AIUnit implements Mechanical {
public function Splicer(_arg1:int=0){
addFrameScript(1, frame2, 2, frame3, 10, frame11, 11, frame12);
super({hp:300, speed2:4, range2:7000, sight2:80000, size2:500, experience:210, regeneration:8, psi:3}, new SplicerShocker(this), _arg1);
}
function frame12(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
function frame11(){
stop();
}
function frame2(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame3(){
gotoAndPlay("move");
}
}
}//package map.units.planet4
Section 310
//UltimateBoss (map.units.planet4.UltimateBoss)
package map.units.planet4 {
import map.units.unit.*;
import map.units.unit.markers.*;
import map.items.impl.*;
import map.units.planet4.weapons.*;
public class UltimateBoss extends AIUnit implements Mechanical, Unstunnable, Headed, BlackHoleImmune {
public function UltimateBoss(_arg1:int=0){
addFrameScript(0, frame1);
super({hp:24000, speed2:5, range2:160000, sight2:400000, size2:2500, experience:10000, regeneration:4, psi:21}, new UltimateBossRailgun(this), _arg1);
addChild(_weapon.getHead());
}
function frame1(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
}
}//package map.units.planet4
Section 311
//Side (map.units.relations.Side)
package map.units.relations {
import map.units.unit.*;
public class Side {
private var _units:Array;
private var _allies:Array;
private var _enemies:Array;
public function Side(){
_units = new Array();
_allies = new Array();
_enemies = new Array();
super();
_allies.push(this);
}
public function remove(_arg1:Unit):void{
var _local2:int;
while (_local2 < _units.length) {
if (_units[_local2] == _arg1){
_units.splice(_local2, 1);
break;
};
_local2++;
};
}
public function get units():Array{
return (_units);
}
public function get enemies():Array{
return (_enemies);
}
public function getEnemyUnits():Array{
var _local3:Side;
var _local4:int;
var _local1:Array = new Array();
var _local2:int;
while (_local2 < enemies.length) {
_local3 = (enemies[_local2] as Side);
_local4 = 0;
while (_local4 < _local3.units.length) {
_local1.push(_local3.units[_local4]);
_local4++;
};
_local2++;
};
return (_local1);
}
public function get allies():Array{
return (_allies);
}
}
}//package map.units.relations
Section 312
//Blood (map.units.unit.blood.Blood)
package map.units.unit.blood {
import map.*;
import map.units.unit.*;
import map.units.unit.markers.*;
import map.utils.*;
public class Blood extends DyingMapMovieClip {
private var _unit:Unit;
private static const COUNT_VARIATION:int = 5;
private static const ANGLE_VARIATION:int = 30;
private static const BASE_SIZE:int = 150;
private static const SIZE_VARIATION:int = 50;
private static const COUNT:int = 2;
private static const POSITION_VARIATION:int = 5;
public function Blood(_arg1:Unit, _arg2:Map){
super(_arg2);
_unit = _arg1;
}
public function bleed(_arg1:Damage):void{
var _local4:Blood;
var _local5:Number;
var _local2:int = (COUNT + (Math.random() * COUNT_VARIATION));
var _local3:int;
while (_local3 < _local2) {
_local4 = getBlood();
_local5 = ((((100 - (Math.random() * SIZE_VARIATION)) / 100) * (((_unit.size2 / BASE_SIZE) * 4) + 100)) / 100);
_local4.scaleX = _local5;
_local4.scaleY = _local5;
_local4.addEventListener(UnitEvent.DEAD, _local4.die);
_local4.rotation = ((((((((_unit is Mechanical)) || ((_unit is PleusBlooded)))) || ((_unit is ReverseBlooded)))) ? 180 : 0 + _arg1.angle.rotation) + ((((Math.random() > 0.5)) ? 1 : -1 * Math.random()) * ANGLE_VARIATION));
_local4.x = (_arg1.point.x + ((((Math.random() > 0.5)) ? 1 : -1 * Math.random()) * POSITION_VARIATION));
_local4.y = (_arg1.point.y + ((((Math.random() > 0.5)) ? 1 : -1 * Math.random()) * POSITION_VARIATION));
_map.addChild(_local4);
_local3++;
};
}
private function getBlood():Blood{
if ((_unit is Insect)){
return (new InsectBlood(_unit, _map));
};
if ((((_unit is Mechanical)) || ((_unit is PleusBlooded)))){
return (new SparkBlood(_unit, _map));
};
if ((_unit is CoolBlooded)){
return (new CoolBlood(_unit, _map));
};
if ((_unit is BrownBlooded)){
return (new BrownBlood(_unit, _map));
};
return (null);
}
}
}//package map.units.unit.blood
Section 313
//BrownBlood (map.units.unit.blood.BrownBlood)
package map.units.unit.blood {
import map.*;
import map.units.unit.*;
public class BrownBlood extends Blood {
public function BrownBlood(_arg1:Unit, _arg2:Map){
addFrameScript(8, frame9);
super(_arg1, _arg2);
}
function frame9(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.units.unit.blood
Section 314
//CoolBlood (map.units.unit.blood.CoolBlood)
package map.units.unit.blood {
import map.*;
import map.units.unit.*;
public class CoolBlood extends Blood {
public function CoolBlood(_arg1:Unit, _arg2:Map){
addFrameScript(8, frame9);
super(_arg1, _arg2);
}
function frame9(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.units.unit.blood
Section 315
//InsectBlood (map.units.unit.blood.InsectBlood)
package map.units.unit.blood {
import map.*;
import map.units.unit.*;
public class InsectBlood extends Blood {
public function InsectBlood(_arg1:Unit, _arg2:Map){
addFrameScript(8, frame9);
super(_arg1, _arg2);
}
function frame9(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.units.unit.blood
Section 316
//PleusBlooded (map.units.unit.blood.PleusBlooded)
package map.units.unit.blood {
public interface PleusBlooded {
}
}//package map.units.unit.blood
Section 317
//ReverseBlooded (map.units.unit.blood.ReverseBlooded)
package map.units.unit.blood {
public interface ReverseBlooded {
}
}//package map.units.unit.blood
Section 318
//SparkBlood (map.units.unit.blood.SparkBlood)
package map.units.unit.blood {
import map.*;
import map.units.unit.*;
public class SparkBlood extends Blood {
public function SparkBlood(_arg1:Unit, _arg2:Map){
addFrameScript(8, frame9);
super(_arg1, _arg2);
}
function frame9(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.units.unit.blood
Section 319
//Berserk (map.units.unit.markers.Berserk)
package map.units.unit.markers {
public interface Berserk {
}
}//package map.units.unit.markers
Section 320
//BrownBlooded (map.units.unit.markers.BrownBlooded)
package map.units.unit.markers {
public interface BrownBlooded extends Organic {
}
}//package map.units.unit.markers
Section 321
//Catcher (map.units.unit.markers.Catcher)
package map.units.unit.markers {
public interface Catcher {
}
}//package map.units.unit.markers
Section 322
//CoolBlooded (map.units.unit.markers.CoolBlooded)
package map.units.unit.markers {
public interface CoolBlooded extends Organic {
}
}//package map.units.unit.markers
Section 323
//Explosiable (map.units.unit.markers.Explosiable)
package map.units.unit.markers {
public interface Explosiable {
}
}//package map.units.unit.markers
Section 324
//Headed (map.units.unit.markers.Headed)
package map.units.unit.markers {
public interface Headed {
}
}//package map.units.unit.markers
Section 325
//Insect (map.units.unit.markers.Insect)
package map.units.unit.markers {
public interface Insect extends Organic {
}
}//package map.units.unit.markers
Section 326
//Mechanical (map.units.unit.markers.Mechanical)
package map.units.unit.markers {
public interface Mechanical extends Explosiable {
}
}//package map.units.unit.markers
Section 327
//Organic (map.units.unit.markers.Organic)
package map.units.unit.markers {
public interface Organic {
}
}//package map.units.unit.markers
Section 328
//Unstoppable (map.units.unit.markers.Unstoppable)
package map.units.unit.markers {
public interface Unstoppable {
}
}//package map.units.unit.markers
Section 329
//Unstunnable (map.units.unit.markers.Unstunnable)
package map.units.unit.markers {
public interface Unstunnable {
}
}//package map.units.unit.markers
Section 330
//Walllike (map.units.unit.markers.Walllike)
package map.units.unit.markers {
public interface Walllike {
}
}//package map.units.unit.markers
Section 331
//AIUnit (map.units.unit.AIUnit)
package map.units.unit {
import flash.events.*;
import map.units.utils.*;
import flash.geom.*;
import map.weapons.*;
import map.units.unit.markers.*;
import flash.utils.*;
public class AIUnit extends Unit implements LevelDependent {
protected var _targetPoint:Point;
protected var _lastReactionTime:Number;
protected var _target:Unit;
protected static const REACTION:int = 70;
protected static const BERSERK_DISTANCE:int = 40000;
public function AIUnit(_arg1:Object, _arg2:AbstractWeapon, _arg3:int=0){
super(_arg1, _arg3);
_hpBar = new AIUnitHpBar(this);
addEventListener(MouseEvent.MOUSE_OVER, showHp);
addEventListener(MouseEvent.MOUSE_OUT, hideHp);
_lastReactionTime = getTimer();
_weapon = _arg2;
goMove();
}
protected function setTargetRotationToPoint(_arg1:Number, _arg2:Number):void{
_targetAngle.targetX = _arg1;
_targetAngle.targetY = _arg2;
_targetAngle.objectX = x;
_targetAngle.objectY = y;
}
override public function fire():void{
if (_weapon.ready){
if (_state != ATTACK){
_state = ATTACK;
};
gotoAndPlay("attack");
};
if ((_weapon is InstantWeapon)){
_weapon.fire(_target);
} else {
_weapon.fire(this, _targetAngle);
};
}
protected function getTargetPoint():Point{
return (new Point(Math.abs((Math.random() * _map.width)), Math.abs((Math.random() * _map.height))));
}
protected function followOrFire():void{
setTargetRotation();
if (((((((melee) && ((MathUtils.distance2(x, y, _target.x, _target.y) > (params["size2"] + _target.params["size2"]))))) || (((!(melee)) && ((MathUtils.distance2(x, y, _target.x, _target.y) > params["range2"])))))) || ((this is Unstoppable)))){
accurateRotate();
move();
if ((((this is Unstoppable)) && ((MathUtils.distance2(x, y, _target.x, _target.y) < params["range2"])))){
fire();
};
} else {
if (((((melee) || (isRotated()))) || ((this is Headed)))){
fire();
} else {
accurateRotate();
};
};
}
protected function getTarget():Unit{
return (getNearestTarget());
}
protected function setTargetRotation():void{
if (_target == null){
return;
};
setTargetRotationToPoint(_target.x, _target.y);
}
public function goBerserk():void{
if (_state == BERSERK){
return;
};
_state = BERSERK;
gotoAndPlay("berserk");
}
protected function checkTargetRiched():Boolean{
if (_targetPoint == null){
return (true);
};
if ((((((((x < (_targetPoint.x + 50))) && ((x > (_targetPoint.x - 50))))) && ((y < (_targetPoint.y + 50))))) && ((y > (_targetPoint.y - 50))))){
_targetPoint = null;
return (true);
};
return (false);
}
protected function bumRotate():void{
if (checkTargetRiched()){
return;
};
_targetAngle.calculateRotation();
rotate();
}
public function move():void{
var _local2:Number;
var _local3:Boolean;
if (_paralyzed){
return;
};
if (((_stunned) && ((getTimer() < (_lastStunnedTime + _stunTime))))){
return;
};
unstun();
var _local1:Number = ((((((rotation + 180) > 0)) && (((rotation + 180) < 180)))) ? -1 : 1 * Math.abs((params["speed2"] * Math.sin(((rotation * Math.PI) / 180)))));
_local2 = ((((((rotation + 180) > 270)) || (((rotation + 180) < 90)))) ? 1 : -1 * Math.abs((params["speed2"] * Math.cos(((rotation * Math.PI) / 180)))));
_local3 = false;
if (_target != null){
_local3 = (((this is Berserk)) && ((((MathUtils.distance2(x, y, _target.x, _target.y) < BERSERK_DISTANCE)) || ((hp < (maxHp / 10))))));
};
x = (x + (_local3) ? (_local1 * 2.5) : _local1);
y = (y + (_local3) ? (_local2 * 2.5) : _local2);
rotate();
rotate();
rotate();
if (_local3){
goBerserk();
} else {
goMove();
};
}
protected function superTick(_arg1:Number):void{
super.tick(_arg1);
}
public function goMove():void{
if (_state == MOVE){
return;
};
_state = MOVE;
gotoAndPlay("move");
}
protected function bum(_arg1:Number):void{
if (_targetPoint == null){
_targetPoint = getTargetPoint();
};
setTargetRotationToPoint(_targetPoint.x, _targetPoint.y);
if (_arg1 >= (_lastReactionTime + REACTION)){
_lastReactionTime = _arg1;
bumRotate();
};
move();
}
override public function tick(_arg1:Number):void{
superTick(_arg1);
_weapon.tick(_arg1);
if ((((_target == null)) || (_target.dead))){
_target = getTarget();
};
if (_target == null){
bum(_arg1);
} else {
_lastReactionTime = _arg1;
followOrFire();
if ((this is Headed)){
_targetAngle.calculateRotation();
getChildByName("head").rotation = (_targetAngle.rotation - (rotation + 180));
};
};
if (((!(dead)) && (_hpBar.show))){
_hpBar.redraw();
};
}
protected function accurateRotate():void{
var _local2:int;
var _local1:Unit = getNearestFriend();
if (((((!((_local1 == null))) && ((MathUtils.distance2(_target.x, _target.y, x, y) > BERSERK_DISTANCE)))) && ((MathUtils.distance2(_local1.x, _local1.y, x, y) < ((_local1.params["size2"] / 2) + (params["size2"] / 2)))))){
_local2 = MathUtils.compareAngles((_local1.rotation + 180), (rotation + 180));
rotation = (rotation - (((Math.random() * 2) * ((_local2 == 0)) ? ((Math.random() > 0.5)) ? 1 : -1 : _local2) * 2.8));
} else {
_targetAngle.calculateRotation();
rotate();
rotate();
rotate();
};
}
protected function isRotated():Boolean{
_targetAngle.calculateRotation();
var _local1:Number = _targetAngle.rotation;
return (((((rotation + 180) < (_local1 + 5))) && (((rotation + 180) > (_local1 - 5)))));
}
}
}//package map.units.unit
Section 332
//AIUnitHpBar (map.units.unit.AIUnitHpBar)
package map.units.unit {
public class AIUnitHpBar extends HpBar {
public function AIUnitHpBar(_arg1:Unit){
super(_arg1);
}
override public function calculate():void{
gotoAndStop(Math.round((51 - ((_unit.hp / _unit.maxHp) * 50))));
}
}
}//package map.units.unit
Section 333
//Damage (map.units.unit.Damage)
package map.units.unit {
import map.units.utils.*;
import flash.geom.*;
public class Damage {
private var _critical:Boolean;// = false
private var _stunTime:int;// = 0
private var _point:Point;
private var _irradiator:Boolean;// = false
private var _angle:Angle;
private var _value:Number;// = 0
private var _melee:Boolean;// = true
private var _impulse:Impulse;
public function get impulse():Impulse{
return (_impulse);
}
public function set stunTime(_arg1:int):void{
_stunTime = _arg1;
}
public function get point():Point{
return (_point);
}
public function get angle():Angle{
return (_angle);
}
public function get critical():Boolean{
return (_critical);
}
public function set point(_arg1:Point):void{
_point = _arg1;
}
public function set irradiator(_arg1:Boolean):void{
_irradiator = _arg1;
}
public function get stunTime():int{
return (_stunTime);
}
public function set value(_arg1:Number):void{
_value = _arg1;
}
public function set angle(_arg1:Angle):void{
_angle = _arg1;
}
public function set melee(_arg1:Boolean):void{
_melee = _arg1;
}
public function set impulse(_arg1:Impulse):void{
_impulse = _arg1;
}
public function get melee():Boolean{
return (_melee);
}
public function get value():Number{
return (_value);
}
public function get irradiator():Boolean{
return (_irradiator);
}
public function set critical(_arg1:Boolean):void{
_critical = _arg1;
}
}
}//package map.units.unit
Section 334
//HpBar (map.units.unit.HpBar)
package map.units.unit {
import flash.display.*;
public class HpBar extends MovieClip {
protected var _unit:Unit;
private var _hp:int;
private var _maxHp:int;
private var _show:Boolean;
public function HpBar(_arg1:Unit=null){
_unit = _arg1;
}
public function set show(_arg1:Boolean):void{
_show = _arg1;
}
public function calculate():void{
gotoAndStop(Math.floor((101 - ((_unit.hp / _unit.maxHp) * 100))));
}
public function set unit(_arg1:Unit):void{
_unit = _arg1;
}
public function redraw():void{
x = _unit.x;
y = (_unit.y - 48);
}
public function get show():Boolean{
return (_show);
}
}
}//package map.units.unit
Section 335
//Impulse (map.units.unit.Impulse)
package map.units.unit {
import map.units.utils.*;
public class Impulse {
private var _vX:Number;
private var _unit:Unit;
private var _vY:Number;
private var _angle:Angle;
private var _duration:int;// = 0
public static const V:Number = 2.6;
private static const BASE_SIZE:int = 150;
public function Impulse(_arg1:Unit, _arg2:Angle, _arg3:int){
_duration = _arg3;
_angle = _arg2;
_unit = _arg1;
var _local4:Number = Math.cos((((_angle.rotation + 90) * Math.PI) / 180));
var _local5:Number = Math.sin((((_angle.rotation + 90) * Math.PI) / 180));
_vX = (((_local4 * V) * BASE_SIZE) / _unit.size2);
_vY = (((_local5 * V) * BASE_SIZE) / _unit.size2);
}
public function get finished():Boolean{
return ((_duration <= 0));
}
public function tick():void{
_unit.x = (_unit.x + _vX);
_unit.y = (_unit.y + _vY);
_duration--;
}
}
}//package map.units.unit
Section 336
//LevelDependent (map.units.unit.LevelDependent)
package map.units.unit {
public interface LevelDependent {
}
}//package map.units.unit
Section 337
//MantisTypeAIUnit (map.units.unit.MantisTypeAIUnit)
package map.units.unit {
import map.units.utils.*;
import flash.geom.*;
import map.weapons.*;
import map.units.unit.markers.*;
public class MantisTypeAIUnit extends AIUnit implements Unstunnable {
protected var _vX:Number;// = 0
protected var _vY:Number;// = 0
private var dir:int;// = 0
protected var _baseScale:Number;
private var angle:Number;// = 0
protected var _rotating:Boolean;// = false
private static const TARGET_ROTATE_STEPS:int = 6;
private static const ROTATE_STEPS:int = 10;
private static const RESIZE:Number = 0.1;
private static const CORRECTION:int = 3;
private static const STEPS:int = 38;
public function MantisTypeAIUnit(_arg1:Object, _arg2:AbstractWeapon, _arg3:int=0){
super(_arg1, _arg2, _arg3);
}
private function flyTick():void{
if (_paralyzed){
return;
};
if ((((Math.abs(((_targetPoint.x - x) - _vX)) <= (Math.abs(_vX) + CORRECTION))) && ((Math.abs(((_targetPoint.y - y) - _vY)) <= (Math.abs(_vY) + CORRECTION))))){
x = _targetPoint.x;
y = _targetPoint.y;
endFly();
} else {
x = (x + _vX);
y = (y + _vY);
};
}
override protected function followOrFire():void{
if (_state == ATTACK){
setTargetRotation();
_targetAngle.calculateRotation();
if ((((_weapon as ShellWeapon).reloaded) && ((Math.abs((_targetAngle.rotation - (rotation + 180))) < 45)))){
fire();
} else {
startFly();
};
} else {
bum(0);
};
}
private function startRotateToTarget(_arg1:UnitEvent=null):void{
setTargetRotation();
_targetAngle.calculateRotation();
dir = MathUtils.compareAngles(_targetAngle.rotation, (rotation + 180));
angle = (((dir > 0)) ? (_targetAngle.rotation - (rotation + 180)) : (-(_targetAngle.rotation) + (rotation + 180)) / TARGET_ROTATE_STEPS);
_rotating = true;
removeEventListener(UnitEvent.ROTATE_FLY, startRotateToTarget);
}
private function startFly():void{
if (_targetPoint == null){
_targetPoint = getTargetPoint();
};
setTargetRotationToPoint(_targetPoint.x, _targetPoint.y);
_state = MOVE;
gotoAndPlay("fly");
_map.addChild(this);
_vX = 0;
_vY = 0;
_targetAngle.calculateRotation();
addEventListener(UnitEvent.FLY, fly);
addEventListener(UnitEvent.ROTATE_FLY, startRotate);
}
private function fly(_arg1:UnitEvent):void{
if (this == null){
return;
};
removeEventListener(UnitEvent.FLY, fly);
var _local2:Number = (_targetPoint.x - x);
var _local3:Number = (_targetPoint.y - y);
_vX = (_local2 / STEPS);
_vY = (_local3 / STEPS);
resize((_baseScale + (_baseScale * RESIZE)));
}
private function tryRotate():void{
if (_rotating){
if (((((rotation + 180) < (_targetAngle.rotation + 5))) && (((rotation + 180) > (_targetAngle.rotation - 5))))){
_rotating = false;
return;
};
rotation = (rotation + (dir * angle));
};
}
override protected function getTargetPoint():Point{
var _local2:Point;
var _local3:Boolean;
var _local4:int;
var _local5:Unit;
var _local1:Boolean;
while (_local1) {
_local2 = new Point(Math.abs((Math.random() * _map.width)), Math.abs((Math.random() * _map.height)));
_local3 = false;
_local4 = 0;
while (_local4 < side.units.length) {
_local5 = side.units[_local4];
if (MathUtils.distance2(_local5.x, _local5.y, _local2.x, _local2.y) < _local5.size2){
_local3 = true;
break;
};
_local4++;
};
if (!_local3){
_local1 = false;
};
};
return (_local2);
}
override protected function bum(_arg1:Number):void{
tryRotate();
checkTargetRiched();
if (_state == MOVE){
if (_targetPoint == null){
endFly();
return;
};
flyTick();
} else {
startFly();
};
}
private function startRotate(_arg1:UnitEvent=null):void{
dir = MathUtils.compareAngles(_targetAngle.rotation, (rotation + 180));
angle = (((dir > 0)) ? (_targetAngle.rotation - (rotation + 180)) : (-(_targetAngle.rotation) + (rotation + 180)) / ROTATE_STEPS);
_rotating = true;
removeEventListener(UnitEvent.ROTATE_FLY, startRotate);
if (_target != null){
addEventListener(UnitEvent.ROTATE_FLY, startRotateToTarget);
};
}
protected function setBaseScale(_arg1:Number):void{
_baseScale = _arg1;
}
private function endFly():void{
_state = ATTACK;
gotoAndStop("attack");
resize((_baseScale - (_baseScale * RESIZE)));
}
}
}//package map.units.unit
Section 338
//TestUnit (map.units.unit.TestUnit)
package map.units.unit {
import map.units.unit.markers.*;
import map.units.planet1.weapons.*;
public class TestUnit extends AIUnit implements BrownBlooded {
public function TestUnit(_arg1:int=0){
super({hp:24, speed2:3.6, range2:0, sight2:250000, size2:150, experience:10, psi:5}, new BugClaws(this), _arg1);
}
}
}//package map.units.unit
Section 339
//Unit (map.units.unit.Unit)
package map.units.unit {
import utils.animations.*;
import flash.display.*;
import flash.events.*;
import map.*;
import map.units.utils.*;
import main.*;
import flash.media.*;
import map.weapons.*;
import map.units.relations.*;
import map.items.*;
import map.perks.impl.*;
import map.perks.*;
import map.ui.utils.*;
import map.units.unit.blood.*;
import map.units.unit.markers.*;
import map.items.impl.*;
import utils.debug.*;
import utils.*;
import flash.utils.*;
public dynamic class Unit extends MovieClip {
private var _dropItem:Item;
protected var _targetAngle:Angle;
protected var _psi:int;// = 0
protected var _stunTime:int;
protected var _lastSlowDownCheck:int;
protected var _perkManager:PerkManager;
protected var _side:Side;
protected var _weapon:AbstractWeapon;
protected var _lastStunnedTime:int;
protected var _stunned:Boolean;
protected var _reallyDead:Boolean;// = false
private var _lastRadiateTime:int;
protected var _itemManager:ItemManager;
protected var _slowdown:Number;// = 1
private var _level:int;// = 0
protected var _paralyzed:Boolean;// = false
protected var _state:int;
protected var _map:Map;
private var _params:Object;
protected var _hp:int;
protected var _lastRegenTime:int;
private var _impulse:Impulse;
private var _irradiated:Boolean;// = false
protected var _hpBar:HpBar;
protected var _weaponFaded:Boolean;// = false
private static const EXP_PER_LEVEL:int = 5;
public static const DAMAGE_PER_LEVEL:int = 10;
protected static const SLOWDOWN:Number = 0.75;
public static const ATTACK:int = 2;
private static const HP_PER_LEVEL:int = 10;
public static const MIN_SIZE:int = 13;
public static const MOVE:int = 1;
public static const DEATH:int = 3;
public static const STAND:int = 0;
protected static const SLOWDOWN_TICK:int = 360;
public static const BERSERK:int = 4;
public function Unit(_arg1:Object, _arg2:int=0){
_targetAngle = new Angle();
_params = {hp:0, speed2:0, range2:0, sight2:0, size2:0, experience:0};
super();
_level = _arg2;
_params = _arg1;
_hp = maxHp;
_lastSlowDownCheck = getTimer();
_lastRadiateTime = getTimer();
_lastRegenTime = getTimer();
if (Main.debug){
addChild(Debug.getCircle(_params["size2"]));
};
if (footstepSound != null){
addEventListener(UnitEvent.STEP, playFootstep);
};
}
public function get hp():int{
return (_hp);
}
public function get paralyzed():Boolean{
return (_paralyzed);
}
public function set hp(_arg1:int):void{
_hp = _arg1;
}
public function set paralyzed(_arg1:Boolean):void{
_paralyzed = _arg1;
}
public function get weapon():AbstractWeapon{
return (_weapon);
}
public function get exp():Object{
return ((_params["experience"] * ((this is LevelDependent)) ? (((_level * EXP_PER_LEVEL) + 100) / 100) : 1));
}
protected function killHpBar():void{
try {
removeEventListener(MouseEvent.MOUSE_OVER, showHp);
removeEventListener(MouseEvent.MOUSE_OUT, hideHp);
} catch(e:Error) {
};
if (((!((_hpBar == null))) && (_hpBar.show))){
try {
_map.removeChild(_hpBar);
} catch(e:Error) {
};
};
_hpBar = null;
}
public function removeFromMap():void{
_map.removeChild(this);
_side.remove(this);
}
public function get apperanceSound():Sound{
return (null);
}
public function get sight2():Object{
return (_params["sight2"]);
}
public function causeDamage(_arg1:Damage):void{
var _local3:int;
var _local4:String;
if ((((this is Organic)) && (_arg1.irradiator))){
_irradiated = true;
};
stun(_arg1.stunTime);
if (!(this is Walllike)){
_impulse = _arg1.impulse;
};
if (_perkManager != null){
_local3 = 0;
if (_arg1.melee){
_local3 = (Math.random() * 100);
if (_local3 < (_perkManager.dodgePerk.level * DodgePerk.INCREMENT)){
new PopupText(map, "Dodge!", x, (y - 20), 52223);
return;
};
};
_local3 = (Math.random() * 100);
if (_local3 < (_perkManager.theChosenOnePerk.level * TheChosenOnePerk.INCREMENT)){
new PopupText(map, "There is no spoon...", x, (y - 26), 0xFF00);
return;
};
};
if (_arg1.critical){
_local4 = (("Critical " + Math.round(_arg1.value).toString()) + "!");
new PopupText(map, _local4, x, (y - 26));
};
causeInstantDamage(_arg1.value);
var _local2:Blood = new Blood(this, _map);
_local2.bleed(_arg1);
}
public function fire():void{
}
public function set dropItem(_arg1:Item):void{
_dropItem = _arg1;
}
public function get speed():Number{
return ((((params["speed2"] * _slowdown) * ((_itemManager)!=null) ? (_itemManager.speedup) ? SpeedUp.SPEED_UP : 1 : 1) * ((_perkManager)!=null) ? (((_perkManager.runnerPerk.level * RunnerPerk.INCREMENT) + 100) / 100) : 1));
}
public function clean(_arg1:UnitEvent=null):void{
_weapon.removeEventListener(UnitEvent.DEAD, clean);
_weaponFaded = true;
if (footstepSound != null){
removeEventListener(UnitEvent.STEP, playFootstep);
};
dispatchEvent(new UnitEvent(UnitEvent.REALLY_DEAD));
}
public function get size2():int{
return (_params["size2"]);
}
public function get side():Side{
return (_side);
}
public function get map():Map{
return (_map);
}
public function set irradiated(_arg1:Boolean):void{
_irradiated = _arg1;
}
protected function rotate():void{
if (((((rotation + 180) < (_targetAngle.rotation + 5))) && (((rotation + 180) > (_targetAngle.rotation - 5))))){
return;
};
var _local1:Number = 3;
var _local2:int = MathUtils.compareAngles(_targetAngle.rotation, (rotation + 180));
rotation = (rotation + _local2);
}
public function get dead():Boolean{
return ((_hp <= 0));
}
public function causeClearDeath():void{
_hp = 0;
fadeWeapon();
_map.kill(this);
reallyDie();
}
protected function get melee():Boolean{
return ((_weapon is InstantWeapon));
}
public function get irradiator():Boolean{
return (((_perkManager == null)) ? false : (_perkManager.radioactiveBulletsPerk.level > 0));
}
public function get level():int{
return (_level);
}
public function get params():Object{
return (_params);
}
public function get allied():Boolean{
return (false);
}
public function causeDeath():void{
_hp = 0;
gotoAndPlay("death");
if (deathSound != null){
SoundManager.play(deathSound);
};
if ((this is Explosiable)){
_map.putAnimation(new ExplosionParticlesAnimation(_map, x, y));
_map.putAnimation(new ExplosionAnimation(_map, x, y));
new ExplosionTrace(_map, x, y);
};
_map.kill(this);
fadeWeapon();
killHpBar();
}
public function get maxHp():int{
return ((_params["hp"] * ((this is LevelDependent)) ? (((_level * HP_PER_LEVEL) + 100) / 100) : 1));
}
protected function playFootstep(_arg1:Event):void{
SoundManager.play(footstepSound);
}
public function get stunned():Boolean{
return (_stunned);
}
public function get regeneration():int{
return (((_params["regeneration"] == undefined)) ? 0 : _params["regeneration"]);
}
public function tick(_arg1:Number):void{
var _local2:int;
if (((!((regeneration == 0))) && ((_arg1 > (_lastRegenTime + Main.SECOND))))){
_lastRegenTime = _arg1;
heal(regeneration);
};
if (_impulse != null){
if (_impulse.finished){
(_impulse == null);
} else {
_impulse.tick();
};
};
if (((((_irradiated) && (!(dead)))) && ((_arg1 > (_lastRadiateTime + RadioactiveBulletsPerk.IRRADIATE_TICK))))){
_lastRadiateTime = _arg1;
_local2 = (RadioactiveBulletsPerk.IRRADIATE_DAMAGE + Math.floor((Math.random() * RadioactiveBulletsPerk.IRRADIATE_DAMAGE_VARIATION)));
causeInstantDamage(_local2);
};
}
public function get dropItem():Item{
return (_dropItem);
}
public function set side(_arg1:Side):void{
_side = _arg1;
}
public function get reallyDead():Boolean{
return (_reallyDead);
}
public function get weaponFaded():Boolean{
return (_weaponFaded);
}
protected function resize(_arg1:Number):void{
scaleX = _arg1;
scaleY = _arg1;
}
protected function fadeWeapon():void{
_weapon.addEventListener(UnitEvent.DEAD, clean);
_weapon.fade();
}
protected function stun(_arg1:int):void{
if ((this is Unstunnable)){
return;
};
_stunned = true;
stop();
_lastStunnedTime = getTimer();
_stunTime = _arg1;
}
public function set map(_arg1:Map):void{
_map = _arg1;
}
public function addToMap(_arg1:Map, _arg2:Side):void{
_map = _arg1;
_side = _arg2;
_side.units.push(this);
_map.addChild(this);
}
public function causeStun(_arg1:int):void{
if ((_hp + hp) >= maxHp){
_hp = maxHp;
} else {
_hp = (_hp + hp);
};
_hpBar.calculate();
}
public function get psi():int{
return (_params["psi"]);
}
private function causeInstantDamage(_arg1:int):void{
if (_hp > _arg1){
_hp = (_hp - _arg1);
_hpBar.calculate();
} else {
causeDeath();
};
}
protected function unstun():void{
_stunned = false;
play();
}
public function reallyDie(_arg1:UnitEvent=null):void{
killHpBar();
_reallyDead = true;
removeEventListener(UnitEvent.DEAD, reallyDie);
dispatchEvent(new UnitEvent(UnitEvent.REALLY_DEAD));
}
public function stand():void{
if (_state != STAND){
_state = STAND;
stop();
addEventListener(UnitEvent.WALK, reallyStand);
};
}
protected function getNearestTarget():Unit{
var _local3:Side;
var _local4:int;
var _local5:Unit;
if (_side.enemies.length == 0){
return (null);
};
var _local1:Unit;
var _local2:int;
while (_local2 < _side.enemies.length) {
_local3 = _side.enemies[_local2];
_local4 = 0;
while (_local4 < _local3.units.length) {
if (((!(_local3.units[_local4].dead)) && (isInSight(_local3.units[_local4])))){
if (_local1 == null){
_local1 = _local3.units[_local4];
} else {
_local5 = _local3.units[_local4];
if (MathUtils.distance2(x, y, _local5.x, _local5.y) < MathUtils.distance2(x, y, _local1.x, _local1.y)){
_local1 = _local5;
};
};
};
_local4++;
};
_local2++;
};
return (_local1);
}
public function get perkManager():PerkManager{
return (_perkManager);
}
protected function showHp(_arg1:Event):void{
_hpBar.calculate();
_hpBar.show = true;
_hpBar.redraw();
_map.addChild(_hpBar);
}
protected function getNearestFriend():Unit{
var _local3:Side;
var _local4:int;
var _local5:Unit;
if (_side.allies.length == 0){
return (null);
};
var _local1:Unit;
var _local2:int;
while (_local2 < _side.allies.length) {
_local3 = _side.allies[_local2];
_local4 = 0;
while (_local4 < _local3.units.length) {
if (((!(_local3.units[_local4].dead)) && (isInSight(_local3.units[_local4])))){
if (_local1 == null){
if (_local3.units[_local4] != this){
_local1 = _local3.units[_local4];
};
} else {
if (_local3.units[_local4] != this){
_local5 = _local3.units[_local4];
if (MathUtils.distance2(x, y, _local5.x, _local5.y) < MathUtils.distance2(x, y, _local1.x, _local1.y)){
_local1 = _local5;
};
};
};
};
_local4++;
};
_local2++;
};
return (_local1);
}
public function heal(_arg1:Number):void{
if ((_hp + _arg1) >= maxHp){
_hp = maxHp;
} else {
_hp = (_hp + _arg1);
};
_hpBar.calculate();
}
protected function hideHp(_arg1:Event):void{
_map.removeChild(_hpBar);
_hpBar.show = false;
}
protected function reallyStand(_arg1:UnitEvent):void{
if (_state == STAND){
stop();
};
removeEventListener(UnitEvent.WALK, reallyStand);
}
protected function isInSight(_arg1:Unit):Boolean{
return ((MathUtils.distance2(_arg1.x, _arg1.y, x, y) < sight2));
}
public function getEnemies():Array{
return (_side.getEnemyUnits());
}
public function get footstepSound():Sound{
return (null);
}
public function pause():void{
stop();
}
public function redraw():void{
}
public function get deathSound():Sound{
return (null);
}
public function unpause():void{
play();
}
}
}//package map.units.unit
Section 340
//UnitEvent (map.units.unit.UnitEvent)
package map.units.unit {
import flash.events.*;
public class UnitEvent extends Event {
public static const WALK:String = "walk";
public static const DEAD:String = "dead";
public static const HERO_DEAD:String = "herodead";
public static const USE_PERK:String = "usePerk";
public static const ROTATE_FLY:String = "rotateFly";
public static const ACTIVATED:String = "activated";
public static const FLY:String = "fly";
public static const LEVEL_UP:String = "levelUp";
public static const REALLY_DEAD:String = "reallyDead";
public static const STEP:String = "step";
public function UnitEvent(_arg1:String){
super(_arg1, true, false);
}
}
}//package map.units.unit
Section 341
//Angle (map.units.utils.Angle)
package map.units.utils {
public class Angle {
private var _objectY:Number;
private var _rotation:Number;
private var _targetX:Number;
private var _targetY:Number;
private var _objectX:Number;
public function Angle(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0){
_targetX = _arg3;
_targetY = _arg4;
_objectX = _arg1;
_objectY = _arg2;
}
public function get objectY():Number{
return (_objectY);
}
public function calculateRotation():void{
var _local1:Number = (targetX - objectX);
var _local2:Number = (objectY - targetY);
var _local3:Number = Math.atan((_local1 / ((_local2 == 0)) ? 0.0001 : _local2));
_rotation = ((((objectY < targetY)) ? ((objectX > targetX)) ? -180 : 180 : 0 + ((_local3 / Math.PI) * 180)) + 180);
}
public function set targetX(_arg1:Number):void{
_targetX = _arg1;
}
public function set targetY(_arg1:Number):void{
_targetY = _arg1;
}
public function get targetX():Number{
return (_targetX);
}
public function get targetY():Number{
return (_targetY);
}
public function set objectX(_arg1:Number):void{
_objectX = _arg1;
}
public function set objectY(_arg1:Number):void{
_objectY = _arg1;
}
public function get dY():Number{
return ((_targetY - _objectY));
}
public function rotationRad():Number{
return (((_rotation * Math.PI) / 180));
}
public function get objectX():Number{
return (_objectX);
}
public function get dX():Number{
return ((_targetX - _objectX));
}
public function set rotation(_arg1:Number):void{
_rotation = _arg1;
}
public function get rotation():Number{
return (_rotation);
}
}
}//package map.units.utils
Section 342
//MathUtils (map.units.utils.MathUtils)
package map.units.utils {
public class MathUtils {
public static function compareAngles(_arg1:Number, _arg2:Number):int{
var _local3:Number = 0;
if (_arg1 > _arg2){
_local3 = (_arg1 - _arg2);
if (_local3 > 180){
return (-1);
};
if (_local3 < 180){
return (1);
};
return (-1);
} else {
if (_arg1 < _arg2){
_local3 = (_arg2 - _arg1);
if (_local3 > 180){
return (1);
};
if (_local3 < 180){
return (-1);
};
return (1);
};
};
return (0);
}
public static function distance2(_arg1:int, _arg2:int, _arg3:int, _arg4:int):Number{
var _local5:Number = (_arg3 - _arg1);
var _local6:Number = (_arg2 - _arg4);
return (((_local5 * _local5) + (_local6 * _local6)));
}
}
}//package map.units.utils
Section 343
//DyingMapMovieClip (map.utils.DyingMapMovieClip)
package map.utils {
import flash.display.*;
import map.*;
import map.units.unit.*;
public class DyingMapMovieClip extends MovieClip {
protected var _map:Map;
public function DyingMapMovieClip(_arg1:Map){
_map = _arg1;
}
protected function die(_arg1:UnitEvent):void{
var _local2:DyingMapMovieClip = (_arg1.target as DyingMapMovieClip);
_local2.removeEventListener(UnitEvent.DEAD, _local2.die);
_map.removeChild(_local2);
_local2 = null;
}
}
}//package map.utils
Section 344
//DyingStageMovieClip (map.utils.DyingStageMovieClip)
package map.utils {
import flash.display.*;
import map.units.unit.*;
public class DyingStageMovieClip extends MovieClip {
protected var _stage:Stage;
public function DyingStageMovieClip(_arg1:Stage){
_stage = _arg1;
}
protected function die(_arg1:UnitEvent):void{
var _local2:DyingStageMovieClip = (_arg1.target as DyingStageMovieClip);
_local2.removeEventListener(UnitEvent.DEAD, _local2.die);
_stage.removeChild(_local2);
_local2 = null;
}
}
}//package map.utils
Section 345
//BigFootBullet (map.weapons.bullets.BigFootBullet)
package map.weapons.bullets {
import map.units.utils.*;
public class BigFootBullet extends Bullet {
private var _lastVxDirection:int;
private var _lastVyDirection:int;
public function BigFootBullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
}
}
}//package map.weapons.bullets
Section 346
//BrownBugBullet (map.weapons.bullets.BrownBugBullet)
package map.weapons.bullets {
import map.units.utils.*;
public class BrownBugBullet extends Bullet {
public function BrownBugBullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
}
}
}//package map.weapons.bullets
Section 347
//BugBullet (map.weapons.bullets.BugBullet)
package map.weapons.bullets {
import map.units.utils.*;
public class BugBullet extends Bullet {
private var _lastVxDirection:int;
private var _lastVyDirection:int;
public function BugBullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object){
super(_arg1, _arg2, _arg3, _arg4);
_lastVxDirection = Math.round(((Math.random() * 2) - 1));
_lastVyDirection = Math.round(((Math.random() * 2) - 1));
}
override public function tick():void{
super.tick();
vX = (vX + (((((_lastVxDirection < 0)) ? -1 : 1 * Math.random()) * spread) / 100));
vY = (vY + (((((_lastVyDirection < 0)) ? -1 : 1 * Math.random()) * spread) / 100));
_lastVxDirection = ((_lastVxDirection > 0)) ? -1 : 1;
_lastVyDirection = ((_lastVyDirection > 0)) ? -1 : 1;
rotate();
}
}
}//package map.weapons.bullets
Section 348
//Bullet (map.weapons.bullets.Bullet)
package map.weapons.bullets {
import flash.display.*;
import map.*;
import map.units.unit.*;
import map.units.utils.*;
public class Bullet extends MovieClip {
protected var _lastX:Number;
protected var _lastY:Number;
private var _spread:int;
protected var _map:Map;
private var _angleVariation:int;
private var _startSpeed:int;
private var _lbTrace:BulletTrace;
private var _vX:Number;
private var _vY:Number;
private var _maxSpeed2:int;
protected var _angle:Angle;
protected var _x0:int;
private var _fading:Boolean;// = false
private var _miss:Boolean;// = true
private var _acceleration:int;
protected var _y0:int;
private static const MAX_DISTANCE:int = 620000;
private static const TRACE_LENGTH:int = 0x0101;
public function Bullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace=null){
_x0 = _arg2;
_y0 = _arg3;
_spread = _arg4["spread"];
_angleVariation = ((_arg4["angleVariation"] == undefined)) ? 0 : _arg4["angleVariation"];
_acceleration = ((_arg4["acceleration"] == undefined)) ? 0 : _arg4["acceleration"];
_maxSpeed2 = _arg4["maxSpeed2"];
_startSpeed = _arg4["bulletSpeed"];
x = _arg2;
y = _arg3;
_angle = new Angle(_arg1.objectX, _arg1.objectY, _arg1.targetX, _arg1.targetY);
_angle.calculateRotation();
if (_angleVariation != 0){
_angle.rotation = (_angle.rotation + ((((Math.random() > 0.5)) ? 1 : -1 * Math.random()) * _angleVariation));
};
if (_arg5 != null){
_lbTrace = _arg5;
};
var _local6:Number = Math.cos((((_angle.rotation + 90) * Math.PI) / 180));
var _local7:Number = Math.sin((((_angle.rotation + 90) * Math.PI) / 180));
vX = (_local6 * _startSpeed);
vY = (_local7 * _startSpeed);
calculateVariation();
rotate();
}
private function die(_arg1:UnitEvent):void{
lbTrace.removeEventListener(UnitEvent.DEAD, die);
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
protected function get lastX():int{
return (_lastX);
}
protected function get lastY():int{
return (_lastY);
}
public function get boomeranged():Boolean{
return ((((_acceleration < 0)) && ((speed2 > ((_startSpeed * _startSpeed) + 10)))));
}
public function get vX():Number{
return (_vX);
}
public function get vY():Number{
return (_vY);
}
public function tick():void{
if (!_fading){
_lastX = x;
_lastY = y;
x = (x + _vX);
y = (y + _vY);
if (((!((_acceleration == 0))) && ((speed2 < _maxSpeed2)))){
_vX = (_vX + (_acceleration * Math.cos((((_angle.rotation + 90) * Math.PI) / 180))));
_vY = (_vY + (_acceleration * Math.sin((((_angle.rotation + 90) * Math.PI) / 180))));
};
leaveTrace();
} else {
if (_lbTrace != null){
_lbTrace.tick();
};
};
}
public function set map(_arg1:Map):void{
_map = _arg1;
}
public function get fading():Boolean{
return (_fading);
}
public function leaveMCTrace(_arg1:int, _arg2:int):void{
var _local3:int;
var _local4:int;
var _local5:Number;
if ((((_x0 == _arg1)) && ((_y0 == _arg2)))){
_lbTrace.alpha = 0;
} else {
_lbTrace.alpha = 1;
_lbTrace.x = _arg1;
_lbTrace.y = _arg2;
_lbTrace.rotation = (_angle.rotation - 180);
_local3 = MathUtils.distance2(_x0, _y0, _arg1, _arg2);
_local4 = (TRACE_LENGTH * TRACE_LENGTH);
if (_local3 < _local4){
_local5 = Math.sqrt((_local3 / _local4));
_lbTrace.scaleY = _local5;
_lbTrace.scaleX = _local5;
} else {
_lbTrace.scaleY = 1;
_lbTrace.scaleX = 1;
};
};
}
public function set vX(_arg1:Number):void{
_vX = _arg1;
}
public function set vY(_arg1:Number):void{
_vY = _arg1;
}
public function get speed2():int{
return (((_vX * _vX) + (_vY * _vY)));
}
public function calculateVariation():void{
if (_spread != 0){
_vX = (_vX + (((((Math.random() * 2) - 1) * Math.random()) * spread) / 100));
_vY = (_vY + (((((Math.random() * 2) - 1) * Math.random()) * spread) / 100));
};
}
public function leaveTrace():void{
if (((((!((_lbTrace == null))) && (!((x == lastX))))) && (!((y == lastY))))){
if ((_lbTrace is BulletTraceProgramm)){
(_lbTrace as BulletTraceProgramm).draw(lastX, lastY, x, y);
_lbTrace.cacheAsBitmap = true;
} else {
leaveMCTrace(x, y);
};
};
}
public function get angle():Angle{
return (_angle);
}
public function get outOfDistance():Boolean{
return ((MathUtils.distance2(x, y, _x0, _y0) > MAX_DISTANCE));
}
public function set lbTrace(_arg1:BulletTrace):void{
_lbTrace = _arg1;
}
public function rotate():void{
_angle.objectX = x;
_angle.objectY = y;
_angle.targetX = (x + _vX);
_angle.targetY = (y + _vY);
_angle.calculateRotation();
rotation = (_angle.rotation - 180);
}
public function get lbTrace():BulletTrace{
return (_lbTrace);
}
protected function get spread():int{
return (_spread);
}
public function set miss(_arg1:Boolean):void{
_miss = _arg1;
}
public function get miss():Boolean{
return (_miss);
}
public function setFade():void{
_fading = true;
lbTrace.addEventListener(UnitEvent.DEAD, die);
}
}
}//package map.weapons.bullets
Section 349
//BulletTrace (map.weapons.bullets.BulletTrace)
package map.weapons.bullets {
import flash.display.*;
import map.units.unit.*;
public class BulletTrace extends MovieClip {
protected var _thinness2:Number;// = 0
protected var _color:Number;// = 0xAAAAAA
protected var _fadeStep:Number;// = 0.07
protected var _color2:Number;// = 0
protected var _thinness:Number;// = 1
protected var _alpha2:Number;// = 0
protected var _alpha:Number;// = 0.6
public function BulletTrace(_arg1:Object=null, _arg2:Object=null){
if (_arg1 != null){
_fadeStep = _arg1["fadeStep"];
_thinness = _arg1["thinness"];
_color = _arg1["color"];
_alpha = _arg1["alpha"];
};
if (_arg2 != null){
_thinness2 = _arg2["thinness"];
_color2 = _arg2["color"];
_alpha2 = _arg2["alpha"];
};
}
private function die():void{
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
public function tick():void{
if (alpha <= 0.1){
die();
return;
};
alpha = (alpha - _fadeStep);
}
}
}//package map.weapons.bullets
Section 350
//BulletTraceMC (map.weapons.bullets.BulletTraceMC)
package map.weapons.bullets {
public class BulletTraceMC extends BulletTrace {
public function BulletTraceMC(_arg1:Object=null){
super(_arg1);
alpha = _alpha;
cacheAsBitmap = true;
}
}
}//package map.weapons.bullets
Section 351
//BulletTraceProgramm (map.weapons.bullets.BulletTraceProgramm)
package map.weapons.bullets {
public class BulletTraceProgramm extends BulletTrace {
public function BulletTraceProgramm(_arg1:Object=null, _arg2:Object=null){
super(_arg1, _arg2);
}
public function draw(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{
graphics.lineStyle(_thinness, _color, _alpha);
graphics.moveTo(_arg1, _arg2);
graphics.lineTo(_arg3, _arg4);
if (_thinness2 != 0){
graphics.lineStyle(_thinness2, _color2, _alpha2);
graphics.moveTo(_arg1, _arg2);
graphics.lineTo(_arg3, _arg4);
};
}
}
}//package map.weapons.bullets
Section 352
//DummyBullet (map.weapons.bullets.DummyBullet)
package map.weapons.bullets {
import map.units.utils.*;
public class DummyBullet extends Bullet {
public function DummyBullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
}
}
}//package map.weapons.bullets
Section 353
//IonBullet (map.weapons.bullets.IonBullet)
package map.weapons.bullets {
import map.units.utils.*;
public class IonBullet extends Bullet {
public function IonBullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
}
}
}//package map.weapons.bullets
Section 354
//LavaBugBullet (map.weapons.bullets.LavaBugBullet)
package map.weapons.bullets {
import map.units.utils.*;
public class LavaBugBullet extends Bullet {
public function LavaBugBullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
}
}
}//package map.weapons.bullets
Section 355
//LocustBullet (map.weapons.bullets.LocustBullet)
package map.weapons.bullets {
import map.units.utils.*;
public class LocustBullet extends Bullet {
public function LocustBullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object){
super(_arg1, _arg2, _arg3, _arg4);
}
}
}//package map.weapons.bullets
Section 356
//MantisBullet (map.weapons.bullets.MantisBullet)
package map.weapons.bullets {
import map.units.utils.*;
public class MantisBullet extends Bullet {
public function MantisBullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
}
}
}//package map.weapons.bullets
Section 357
//MissileBullet (map.weapons.bullets.MissileBullet)
package map.weapons.bullets {
import map.units.utils.*;
public class MissileBullet extends Bullet {
private var _lastVxDirection:int;
private var _lastVyDirection:int;
public function MissileBullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
_lastVxDirection = Math.round(((Math.random() * 2) - 1));
_lastVyDirection = Math.round(((Math.random() * 2) - 1));
}
override public function tick():void{
super.tick();
vX = (vX + (((((_lastVxDirection < 0)) ? -1 : 1 * Math.random()) * spread) / 100));
vY = (vY + (((((_lastVyDirection < 0)) ? -1 : 1 * Math.random()) * spread) / 100));
_lastVxDirection = ((_lastVxDirection > 0)) ? -1 : 1;
_lastVyDirection = ((_lastVyDirection > 0)) ? -1 : 1;
var _local1:Smoke = new Smoke(this, _map);
_local1.emit();
}
}
}//package map.weapons.bullets
Section 358
//MortarBullet (map.weapons.bullets.MortarBullet)
package map.weapons.bullets {
import map.units.utils.*;
public class MortarBullet extends Bullet {
private var _targetX:int;
private var _targetY:int;
public function MortarBullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object){
super(_arg1, _arg2, _arg3, _arg4, null);
targetX = _arg1.targetX;
targetY = _arg1.targetY;
}
override public function tick():void{
super.tick();
var _local1:int = Math.sqrt(distance2);
var _local2:int = Math.sqrt(needDistance2);
var _local3:Number = (((_local1 < (_local2 / 4))) ? (_local1 / _local2) : ((_local2 - _local1) / _local2) / 1.8);
scaleX = (0.6 + _local3);
scaleY = (0.6 + _local3);
}
private function get needDistance2():int{
return ((((_targetX - _x0) * (_targetX - _x0)) + ((_targetY - _y0) * (_targetY - _y0))));
}
public function set targetX(_arg1:int):void{
_targetX = _arg1;
}
public function get targetY():int{
return (_targetY);
}
public function get targetX():int{
return (_targetX);
}
public function set targetY(_arg1:int):void{
_targetY = _arg1;
}
private function get distance2():int{
return ((((x - _x0) * (x - _x0)) + ((y - _y0) * (y - _y0))));
}
}
}//package map.weapons.bullets
Section 359
//PlasmaBullet (map.weapons.bullets.PlasmaBullet)
package map.weapons.bullets {
import map.units.utils.*;
public class PlasmaBullet extends Bullet {
public function PlasmaBullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
}
}
}//package map.weapons.bullets
Section 360
//RedMantisBullet (map.weapons.bullets.RedMantisBullet)
package map.weapons.bullets {
import map.units.utils.*;
public class RedMantisBullet extends Bullet {
public function RedMantisBullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
}
}
}//package map.weapons.bullets
Section 361
//ScateBullet (map.weapons.bullets.ScateBullet)
package map.weapons.bullets {
import map.units.utils.*;
public class ScateBullet extends Bullet {
public function ScateBullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
}
}
}//package map.weapons.bullets
Section 362
//SmallBullet (map.weapons.bullets.SmallBullet)
package map.weapons.bullets {
import map.units.utils.*;
public class SmallBullet extends Bullet {
public function SmallBullet(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
}
}
}//package map.weapons.bullets
Section 363
//Smoke (map.weapons.bullets.Smoke)
package map.weapons.bullets {
import flash.display.*;
import map.*;
import map.units.unit.*;
public class Smoke extends MovieClip {
private var _bullet:Bullet;
private var _map:Map;
private static const POSITION_VARIATION:int = 5;
private static const SIZE_VARIATION:int = 50;
private static const BASE_SIZE:int = 150;
private static const ANGLE_VARIATION:int = 30;
private static const COUNT:int = 1;
public function Smoke(_arg1:Bullet, _arg2:Map){
addFrameScript(14, frame15);
_bullet = _arg1;
_map = _arg2;
}
public function die(_arg1:UnitEvent):void{
var _local2:Smoke = (_arg1.target as Smoke);
_local2.removeEventListener(UnitEvent.DEAD, _local2.die);
_map.removeChild(_local2);
_local2 = null;
}
public function emit():void{
var _local3:Smoke;
var _local1:int = COUNT;
var _local2:int;
while (_local2 < _local1) {
_local3 = new Smoke(_bullet, _map);
_local3.addEventListener(UnitEvent.DEAD, _local3.die);
_local3.x = (_bullet.x + ((((Math.random() > 0.5)) ? 1 : -1 * Math.random()) * POSITION_VARIATION));
_local3.y = (_bullet.y + ((((Math.random() > 0.5)) ? 1 : -1 * Math.random()) * POSITION_VARIATION));
_map.addChild(_local3);
_local2++;
};
}
function frame15(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
stop();
}
}
}//package map.weapons.bullets
Section 364
//DroneIongun (map.weapons.drones.DroneIongun)
package map.weapons.drones {
import map.units.utils.*;
import map.weapons.*;
import map.weapons.bullets.*;
import map.units.drones.*;
public class DroneIongun extends ShellWeapon implements EnergyWeapon {
public function DroneIongun(_arg1:Drone){
super({damage:1, clipSize:50, reloading:250, bulletSpeed:10, fireRate:250, spread:0}, _arg1);
}
override protected function get damageValue():Number{
var _local1:int = _params["damage"];
_local1 = (_local1 + (_owner as Drone).hero.level);
return (_local1);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new IonBullet(_arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package map.weapons.drones
Section 365
//DroneRepairKit (map.weapons.drones.DroneRepairKit)
package map.weapons.drones {
import map.units.unit.*;
import map.units.utils.*;
import map.weapons.*;
import map.units.drones.*;
public class DroneRepairKit extends RepairWeapon {
public function DroneRepairKit(_arg1:Drone){
super({heal:3, fireRate:9000}, _arg1);
}
override protected function get heal():Number{
var _local1:int = _params["heal"];
_local1 = (_local1 + ((_owner as Drone).hero.level / 2));
return (_local1);
}
private function removeSplash(_arg1:UnitEvent):void{
var _local2:RepairSplash = (_arg1.target as RepairSplash);
_local2.removeEventListener(UnitEvent.DEAD, removeSplash);
_owner.removeChild(_local2);
}
override public function fire(_arg1:Unit=null, _arg2:Angle=null, _arg3:Boolean=false):void{
var _local4:RepairSplash;
if (ready){
playShotSound();
_local4 = new RepairSplash();
_owner.addChild(_local4);
_local4.addEventListener(UnitEvent.DEAD, removeSplash);
};
super.fire(_arg1, _arg2, _arg3);
}
}
}//package map.weapons.drones
Section 366
//DroneShocker (map.weapons.drones.DroneShocker)
package map.weapons.drones {
import map.units.unit.*;
import map.units.utils.*;
import map.weapons.*;
import map.units.drones.*;
public class DroneShocker extends InstantWeapon {
public function DroneShocker(_arg1:Drone){
super({stun:3000, fireRate:1000}, _arg1);
}
private function removeRay(_arg1:UnitEvent):void{
var _local2:ShockRayShort = (_arg1.target as ShockRayShort);
_local2.removeEventListener(UnitEvent.DEAD, removeRay);
_owner.map.removeChild(_local2);
}
override public function fire(_arg1:Unit=null, _arg2:Angle=null, _arg3:Boolean=false):void{
var _local4:ShockRayShort;
if (ready){
playShotSound();
_local4 = new ShockRayShort();
_owner.map.addChild(_local4);
_local4.x = _arg1.x;
_local4.y = _arg1.y;
_arg2 = new Angle(_owner.x, _owner.y, _arg1.x, _arg1.y);
_arg2.calculateRotation();
_local4.rotation = (_arg2.rotation + 180);
_local4.addEventListener(UnitEvent.DEAD, removeRay);
};
super.fire(_arg1, _arg2, _arg3);
}
}
}//package map.weapons.drones
Section 367
//RepairSplash (map.weapons.drones.RepairSplash)
package map.weapons.drones {
import flash.display.*;
import map.units.unit.*;
public class RepairSplash extends MovieClip {
public function RepairSplash(){
addFrameScript(9, frame10);
super();
}
function frame10(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.weapons.drones
Section 368
//ShockRayShort (map.weapons.drones.ShockRayShort)
package map.weapons.drones {
import flash.display.*;
import map.units.unit.*;
public class ShockRayShort extends MovieClip {
public function ShockRayShort(){
addFrameScript(9, frame10);
super();
}
function frame10(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.weapons.drones
Section 369
//BugHead (map.weapons.hero.heads.BugHead)
package map.weapons.hero.heads {
public class BugHead extends Head {
public function BugHead(){
addFrameScript(0, frame1);
super();
}
function frame1(){
stop();
}
}
}//package map.weapons.hero.heads
Section 370
//GunHead (map.weapons.hero.heads.GunHead)
package map.weapons.hero.heads {
public class GunHead extends Head {
public function GunHead(){
addFrameScript(0, frame1);
super();
}
function frame1(){
stop();
}
}
}//package map.weapons.hero.heads
Section 371
//Head (map.weapons.hero.heads.Head)
package map.weapons.hero.heads {
import main.*;
import com.moonmana.ui.*;
public class Head extends ScreenObject {
public function Head(){
super((Main.SCREEN_WIDTH - 32), 27);
}
public function fire1():void{
gotoAndPlay("fire1");
}
public function fire2():void{
gotoAndPlay("fire2");
}
public function wait():void{
gotoAndPlay("wait");
}
public function fire():void{
gotoAndPlay("fire");
}
}
}//package map.weapons.hero.heads
Section 372
//IongunHead (map.weapons.hero.heads.IongunHead)
package map.weapons.hero.heads {
public class IongunHead extends Head {
public function IongunHead(){
addFrameScript(0, frame1, 5, frame6, 10, frame11);
super();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package map.weapons.hero.heads
Section 373
//IonShotgunHead (map.weapons.hero.heads.IonShotgunHead)
package map.weapons.hero.heads {
public class IonShotgunHead extends Head {
public function IonShotgunHead(){
addFrameScript(0, frame1, 5, frame6);
super();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package map.weapons.hero.heads
Section 374
//LaserHead (map.weapons.hero.heads.LaserHead)
package map.weapons.hero.heads {
public class LaserHead extends Head {
public function LaserHead(){
addFrameScript(0, frame1, 4, frame5, 8, frame9);
super();
}
function frame5(){
stop();
}
function frame1(){
stop();
}
function frame9(){
stop();
}
}
}//package map.weapons.hero.heads
Section 375
//LocustgunHead (map.weapons.hero.heads.LocustgunHead)
package map.weapons.hero.heads {
public class LocustgunHead extends Head {
public function LocustgunHead(){
addFrameScript(0, frame1);
super();
}
function frame1(){
stop();
}
}
}//package map.weapons.hero.heads
Section 376
//MachinegunHead (map.weapons.hero.heads.MachinegunHead)
package map.weapons.hero.heads {
public class MachinegunHead extends Head {
public function MachinegunHead(){
addFrameScript(0, frame1, 4, frame5, 8, frame9);
super();
}
function frame5(){
stop();
}
function frame1(){
stop();
}
function frame9(){
stop();
}
}
}//package map.weapons.hero.heads
Section 377
//MortarHead (map.weapons.hero.heads.MortarHead)
package map.weapons.hero.heads {
public class MortarHead extends Head {
public function MortarHead(){
addFrameScript(0, frame1);
super();
}
function frame1(){
stop();
}
}
}//package map.weapons.hero.heads
Section 378
//PlasmagunHead (map.weapons.hero.heads.PlasmagunHead)
package map.weapons.hero.heads {
public class PlasmagunHead extends Head {
public function PlasmagunHead(){
addFrameScript(0, frame1);
super();
}
function frame1(){
stop();
}
}
}//package map.weapons.hero.heads
Section 379
//RailgunHead (map.weapons.hero.heads.RailgunHead)
package map.weapons.hero.heads {
public class RailgunHead extends Head {
public function RailgunHead(){
addFrameScript(0, frame1);
super();
}
function frame1(){
stop();
}
}
}//package map.weapons.hero.heads
Section 380
//RocketHead (map.weapons.hero.heads.RocketHead)
package map.weapons.hero.heads {
public class RocketHead extends Head {
public function RocketHead(){
addFrameScript(0, frame1);
super();
}
function frame1(){
stop();
}
}
}//package map.weapons.hero.heads
Section 381
//ShotgunHead (map.weapons.hero.heads.ShotgunHead)
package map.weapons.hero.heads {
public class ShotgunHead extends Head {
public function ShotgunHead(){
addFrameScript(0, frame1);
super();
}
function frame1(){
stop();
}
}
}//package map.weapons.hero.heads
Section 382
//BonusRocketLauncher (map.weapons.hero.BonusRocketLauncher)
package map.weapons.hero {
import map.units.unit.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
public class BonusRocketLauncher extends MissileWeapon {
public function BonusRocketLauncher(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:100, clipSize:500, reloading:0, bulletSpeed:4, maxSpeed2:400, fireRate:1400, spread:190, acceleration:1, shellsCount:3, impulse:4}, _arg1, _arg2, _arg3);
traceParams = {alpha:0.6, color:0xFFFFFF, thinness:3, fadeStep:0.13};
_type = WeaponManager.BONUS_ROCKET_LAUNCHER;
}
}
}//package map.weapons.hero
Section 383
//Buggun (map.weapons.hero.Buggun)
package map.weapons.hero {
import map.units.unit.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import utils.*;
public class Buggun extends BugWeapon implements HeadWeapon {
public function Buggun(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:16, clipSize:50, reloading:700, bulletSpeed:10, fireRate:200, spread:400, cloneCount:5, impulse:1}, _arg1, _arg2, _arg3);
bulletYShift = 17;
_type = WeaponManager.BUGGUN;
}
override protected function getSound():Sound{
var _local1:int = (Math.random() * 5);
switch (_local1){
case 0:
return (SoundManager.BUG1);
case 1:
return (SoundManager.BUG2);
case 2:
return (SoundManager.BUG3);
case 3:
return (SoundManager.BUG4);
case 4:
return (SoundManager.BUG5);
default:
return (SoundManager.BUG1);
};
}
override public function getNewHead():Head{
var _local1:Head = new BugHead();
_local1.name = "head";
return (_local1);
}
}
}//package map.weapons.hero
Section 384
//Gun (map.weapons.hero.Gun)
package map.weapons.hero {
import map.units.unit.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import utils.*;
public class Gun extends ShellWeapon implements Traceable, Firearms, HeadWeapon {
public function Gun(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:16, clipSize:20, reloading:2500, bulletSpeed:55, fireRate:500, spread:0, impulse:3}, _arg1, _arg2, _arg3);
bulletYShift = 10;
_type = WeaponManager.GUN;
}
override protected function getSound():Sound{
return (SoundManager.SHOT1);
}
override public function getNewHead():Head{
var _local1:Head = new GunHead();
_local1.name = "head";
return (_local1);
}
}
}//package map.weapons.hero
Section 385
//Iongun (map.weapons.hero.Iongun)
package map.weapons.hero {
import map.units.unit.*;
import map.units.utils.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import map.weapons.bullets.*;
import utils.*;
public class Iongun extends ShellWeapon implements EnergyWeapon, HeadWeapon {
public function Iongun(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:18, clipSize:50, reloading:1000, bulletSpeed:10, fireRate:150, spread:60, impulse:1}, _arg1, _arg2, _arg3);
bulletXShift = 10;
bulletYShift = 10;
twoMuzzle = true;
_type = WeaponManager.IONGUN;
}
override protected function getSound():Sound{
return (SoundManager.LASER);
}
override public function getNewHead():Head{
var _local1:Head = new IongunHead();
_local1.name = "head";
return (_local1);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new IonBullet(_arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package map.weapons.hero
Section 386
//IonShotgun (map.weapons.hero.IonShotgun)
package map.weapons.hero {
import map.units.unit.*;
import map.units.utils.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import map.weapons.bullets.*;
import utils.*;
public class IonShotgun extends ShellWeapon implements EnergyWeapon, HeadWeapon {
public function IonShotgun(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:20, clipSize:36, reloading:3000, bulletSpeed:15, fireRate:1000, spread:1200, shellsCount:6, impulse:2}, _arg1, _arg2, _arg3);
bulletYShift = 16;
_type = WeaponManager.ION_SHOTGUN;
}
override protected function getSound():Sound{
return (SoundManager.LASER);
}
override public function getNewHead():Head{
var _local1:Head = new IonShotgunHead();
_local1.name = "head";
return (_local1);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new IonBullet(_arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package map.weapons.hero
Section 387
//Laser (map.weapons.hero.Laser)
package map.weapons.hero {
import map.units.unit.*;
import map.units.utils.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import map.weapons.bullets.*;
import utils.*;
public class Laser extends PiercingWeapon implements ProgrammTraceable, EnergyWeapon, HeadWeapon {
public function Laser(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:90, clipSize:8, reloading:3000, bulletSpeed:1000, fireRate:1000, spread:0, impulse:4}, _arg1, _arg2, _arg3);
_twoMuzzle = true;
bulletYShift = 12;
bulletXShift = 8;
traceParams = {alpha:0.9, color:0xFF9800, thinness:3, fadeStep:0.2};
traceParams2 = {alpha:0.9, color:0xFFFFFF, thinness:1};
_type = WeaponManager.LASER;
}
override protected function getSound():Sound{
return (SoundManager.LASER);
}
override public function getNewHead():Head{
var _local1:Head = new LaserHead();
_local1.name = "head";
return (_local1);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new DummyBullet(_arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package map.weapons.hero
Section 388
//Locustgun (map.weapons.hero.Locustgun)
package map.weapons.hero {
import map.units.unit.*;
import map.units.utils.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import map.weapons.bullets.*;
import utils.*;
public class Locustgun extends BugWeapon implements HeadWeapon {
public function Locustgun(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:16, clipSize:25, reloading:3000, bulletSpeed:24, fireRate:190, spread:900, impulse:1}, _arg1, _arg2, _arg3);
bulletYShift = 17;
_type = WeaponManager.LOCUST_GUN;
}
override protected function getSound():Sound{
var _local1:int = (Math.random() * 5);
switch (_local1){
case 0:
return (SoundManager.BUG1);
case 1:
return (SoundManager.BUG2);
case 2:
return (SoundManager.BUG3);
case 3:
return (SoundManager.BUG4);
case 4:
return (SoundManager.BUG5);
default:
return (SoundManager.BUG1);
};
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new MantisBullet(_arg1, _arg2, _arg3, _arg4));
}
override public function getNewHead():Head{
var _local1:Head = new LocustgunHead();
_local1.name = "head";
return (_local1);
}
}
}//package map.weapons.hero
Section 389
//Machinegun (map.weapons.hero.Machinegun)
package map.weapons.hero {
import map.units.unit.*;
import map.units.utils.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import map.weapons.bullets.*;
import utils.*;
public class Machinegun extends ShellWeapon implements Traceable, Firearms, HeadWeapon {
public function Machinegun(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:12, clipSize:90, reloading:2500, bulletSpeed:50, fireRate:150, spread:300, impulse:1, stun:125}, _arg1, _arg2, _arg3);
traceParams = {alpha:1};
bulletXShift = 10;
bulletYShift = 16;
twoMuzzle = true;
_type = WeaponManager.MACHINEGUN;
}
override protected function getSound():Sound{
return (SoundManager.SHOT1);
}
override public function getNewHead():Head{
var _local1:Head = new MachinegunHead();
_local1.name = "head";
return (_local1);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new SmallBullet(_arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package map.weapons.hero
Section 390
//Mortar (map.weapons.hero.Mortar)
package map.weapons.hero {
import map.units.unit.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import utils.*;
public class Mortar extends GrenadeWeapon implements HeadWeapon {
public function Mortar(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:85, clipSize:8, reloading:2650, bulletSpeed:12, fireRate:1200, spread:0, impulse:6, splash2:2750}, _arg1, _arg2, _arg3);
_type = WeaponManager.MORTAR;
}
override protected function getSound():Sound{
return (SoundManager.MORTAR_FIRE);
}
override public function getNewHead():Head{
var _local1:Head = new MortarHead();
_local1.name = "head";
return (_local1);
}
}
}//package map.weapons.hero
Section 391
//Plasmagun (map.weapons.hero.Plasmagun)
package map.weapons.hero {
import map.units.unit.*;
import map.units.utils.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import map.weapons.bullets.*;
import utils.*;
public class Plasmagun extends ShellWeapon implements EnergyWeapon, HeadWeapon {
public function Plasmagun(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:25, clipSize:36, reloading:3000, bulletSpeed:1, fireRate:200, spread:0, acceleration:1, maxSpeed2:160, impulse:4}, _arg1, _arg2, _arg3);
_type = WeaponManager.PLASMAGUN;
}
override protected function getSound():Sound{
return (SoundManager.PLASMA);
}
override public function getNewHead():Head{
var _local1:Head = new PlasmagunHead();
_local1.name = "head";
return (_local1);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new PlasmaBullet(_arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package map.weapons.hero
Section 392
//Railgun (map.weapons.hero.Railgun)
package map.weapons.hero {
import map.units.unit.*;
import map.units.utils.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import map.weapons.bullets.*;
import utils.*;
public class Railgun extends PiercingWeapon implements ProgrammTraceable, EnergyWeapon, HeadWeapon {
public function Railgun(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:300, clipSize:25, reloading:3000, bulletSpeed:1000, fireRate:1000, spread:0, impulse:5}, _arg1, _arg2, _arg3);
bulletYShift = 10;
traceParams = {alpha:0.9, color:39167, thinness:5, fadeStep:0.2};
traceParams2 = {alpha:0.9, color:0xFFFFFF, thinness:2};
_type = WeaponManager.RAILGUN;
}
override protected function getSound():Sound{
return (SoundManager.RAILGUN);
}
override public function getNewHead():Head{
var _local1:Head = new RailgunHead();
_local1.name = "head";
return (_local1);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new DummyBullet(_arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package map.weapons.hero
Section 393
//RocketLauncher (map.weapons.hero.RocketLauncher)
package map.weapons.hero {
import map.units.unit.*;
import map.weapons.*;
import map.ui.*;
import map.perks.impl.*;
import map.perks.*;
import map.weapons.hero.heads.*;
public class RocketLauncher extends MissileWeapon implements HeadWeapon {
public function RocketLauncher(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:100, clipSize:12, reloading:2000, bulletSpeed:5, maxSpeed2:400, fireRate:1000, spread:50, acceleration:1, shellsCount:1, impulse:4}, _arg1, _arg2, _arg3);
bulletYShift = 15;
_type = WeaponManager.ROCKET_LAUNCHER;
}
override public function getNewHead():Head{
var _local1:Head = new RocketHead();
_local1.name = "head";
return (_local1);
}
override public function get shellsCount():int{
return (((_params["shellsCount"] == undefined)) ? 1 : ((_perkManager == null)) ? _params["shellsCount"] : MissilesMasterPerk.MULTIPLIER_AT_LEVEL[_perkManager.missilesMasterPerk.level]);
}
}
}//package map.weapons.hero
Section 394
//Shotgun (map.weapons.hero.Shotgun)
package map.weapons.hero {
import map.units.unit.*;
import map.units.utils.*;
import flash.media.*;
import map.weapons.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import map.weapons.bullets.*;
import utils.*;
public class Shotgun extends ShellWeapon implements Traceable, Firearms, HeadWeapon {
public function Shotgun(_arg1:Unit, _arg2:WeaponUI=null, _arg3:PerkManager=null){
super({damage:7, clipSize:64, reloading:2200, bulletSpeed:80, fireRate:1000, spread:1400, shellsCount:8, impulse:1}, _arg1, _arg2, _arg3);
bulletYShift = 16;
_type = WeaponManager.SHOTGUN;
}
override protected function getSound():Sound{
return (SoundManager.SHOTGUN);
}
override public function getNewHead():Head{
var _local1:Head = new ShotgunHead();
_local1.name = "head";
return (_local1);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new SmallBullet(_arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package map.weapons.hero
Section 395
//AbstractWeapon (map.weapons.AbstractWeapon)
package map.weapons {
import flash.events.*;
import map.units.unit.*;
import map.units.utils.*;
import flash.geom.*;
import flash.media.*;
import map.ui.*;
import map.perks.impl.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import map.items.impl.*;
import utils.*;
import flash.utils.*;
public class AbstractWeapon extends EventDispatcher {
protected var _type:int;// = 0
protected var _perkManager:PerkManager;
protected var _params:Object;
protected var _quad:Boolean;// = false
protected var _owner:Unit;
protected var _lastFireTime:Number;// = 0
private var _head:Head;
protected var _weaponPowerUp:Boolean;
protected var _ui:WeaponUI;
protected var _favoriteType:int;// = 0
protected var _fading:Boolean;// = false
protected var _disabled:Boolean;// = false
private static const CRITICAL_BASE:int = 2;
protected static const STUN_TIME:int = 100;
private static const DAMAGE_VARIATION:int = 25;
private static const CRITICAL_QUALITY:int = 2;
public function AbstractWeapon(_arg1:Object, _arg2:Unit, _arg3:WeaponUI=null, _arg4:PerkManager=null){
_params = {damage:5, clipSize:1, reloadingTime:1000, bulletSpeed:0, fireRate:350, spread:0, acceleration:1, impulse:0};
super();
_params = _arg1;
_ui = _arg3;
_owner = _arg2;
_perkManager = _arg4;
}
public function enable():void{
_disabled = false;
}
public function set weaponPowerUp(_arg1:Boolean):void{
_weaponPowerUp = _arg1;
}
public function get shellsCount():int{
return (((_params["shellsCount"] == undefined)) ? 1 : _params["shellsCount"]);
}
protected function get reloadingTime():Number{
var _local1:int = (_params["reloading"] / (_weaponPowerUp) ? WeaponPowerUp.RELOADING : 1);
return (((_perkManager == null)) ? _local1 : (((((100 - (_perkManager.fastloaderPerk.level * FastloaderPerk.INCREMENT)) / 100) * (100 - WeaponFocusPerk.RELOADING_INCREMENT)) / 100) * _params["reloading"]));
}
public function tick(_arg1:Number):void{
}
public function get ready():Boolean{
return (((!(_disabled)) && ((getTimer() > (_lastFireTime + fireRate)))));
}
private function set ui(_arg1:WeaponUI):void{
_ui = _arg1;
}
public function get splash2():Number{
return (((_params["splash2"] == undefined)) ? 0 : _params["splash2"]);
}
public function get cloneCount():int{
return (((_params["cloneCount"] == undefined)) ? 0 : ((((_perkManager == null)) || ((_perkManager.insectsMasterPerk.level == 0)))) ? _params["cloneCount"] : ((_perkManager.insectsMasterPerk.level * InsectsMasterPerk.MULTIPLIER) * _params["cloneCount"]));
}
private function get criticalChance():int{
return ((CRITICAL_BASE + ((_perkManager)!=null) ? (_perkManager.sniperPerk.level * SniperPerk.INCREMENT) : 0));
}
protected function get fireRate():Number{
return ((((_perkManager == null)) ? (_params["fireRate"] / (_weaponPowerUp) ? WeaponPowerUp.FIRE_RATE : 1) : (((100 - (_perkManager.attackSpeedBustPerk.level * AttackSpeedBoostPerk.INCREMENT)) * _params["fireRate"]) / 100) / (_weaponPowerUp) ? WeaponPowerUp.FIRE_RATE : 1));
}
protected function get stun():Number{
return (((_params["stun"] == undefined)) ? STUN_TIME : _params["stun"]);
}
public function get type():int{
return (_type);
}
protected function get damageValue():Number{
return (_params["damage"]);
}
public function fire(_arg1:Unit=null, _arg2:Angle=null, _arg3:Boolean=false):void{
}
public function getHead():Head{
if (((HeadWeapon) && ((_head == null)))){
_head = getNewHead();
};
return (_head);
}
protected function getSound():Sound{
return (null);
}
protected function playShotSound():void{
if (getSound() != null){
SoundManager.play(getSound());
};
}
protected function get bulletSpeed():Number{
return (_params["bulletSpeed"]);
}
private function isFavorite():Boolean{
return (((((((!((_type == 0))) && (!((_perkManager == null))))) && (!((_perkManager.weaponFocusPerk.level == 0))))) && ((_type == _perkManager.weaponFocusPerk.type))));
}
public function disable():void{
_disabled = true;
}
public function getNewHead():Head{
return (null);
}
public function getDamage(_arg1:Angle=null, _arg2:Point=null, _arg3:Impulse=null):Damage{
var _local8:int;
var _local9:int;
var _local4:Number = damageValue;
_local4 = (_local4 * (((((((Math.random() * 2) < 1)) ? -1 : 1 * Math.random()) * DAMAGE_VARIATION) + 100) / 100));
if (_perkManager != null){
if ((((_perkManager.energyWeaponMasterPerk.level > 0)) && ((this is EnergyWeapon)))){
_local4 = (_local4 * ((100 + (EnergyWeaponsMasterPerk.INCREMENT * _perkManager.energyWeaponMasterPerk.level)) / 100));
};
if ((((_perkManager.explosiveWeaponMasterPerk.level > 0)) && ((this is ExplosiveWeapon)))){
_local4 = (_local4 * ((100 + (ExplosiveWeaponsMasterPerk.INCREMENT * _perkManager.explosiveWeaponMasterPerk.level)) / 100));
};
if ((((_perkManager.firearmsMasterPerk.level > 0)) && ((this is Firearms)))){
_local4 = (_local4 * ((100 + (FirearmsMasterPerk.INCREMENT * _perkManager.firearmsMasterPerk.level)) / 100));
};
if (isFavorite()){
_local4 = (_local4 * ((100 + WeaponFocusPerk.DAMAGE_INCREMENT) / 100));
};
};
if ((_owner is LevelDependent)){
_local4 = (_local4 * ((100 + (_owner.level * Unit.DAMAGE_PER_LEVEL)) / 100));
};
var _local5:int = (Math.random() * 100);
var _local6:Boolean;
if (_local5 < criticalChance){
_local6 = true;
_local8 = CRITICAL_QUALITY;
if (_perkManager != null){
_local9 = 1;
while (_local9 <= _perkManager.sharpshooterPerk.level) {
_local8 = (_local8 * SharpshooterPerk.MULTIPLIER);
_local9++;
};
};
_local4 = (_local4 * _local8);
};
var _local7:Damage = new Damage();
_local7.melee = (this is InstantWeapon);
_local7.stunTime = stun;
_local7.value = (_quad) ? (_local4 * 4) : _local4;
_local7.angle = _arg1;
_local7.point = _arg2;
_local7.impulse = _arg3;
_local7.irradiator = _owner.irradiator;
_local7.critical = _local6;
return (_local7);
}
protected function get clipSize():Number{
return ((((_perkManager == null)) ? _params["clipSize"] : ((((_perkManager.ammoPack.level * AmmoPackPerk.INCREMENT) + 100) * _params["clipSize"]) / 100) + (isFavorite()) ? WeaponFocusPerk.AMMO_INCREMENT : 0));
}
protected function get spread():Number{
return (_params["spread"]);
}
public function get impulse():Number{
return (((_params["impulse"] == undefined)) ? 0 : _params["impulse"]);
}
protected function get heal():Number{
return (_params["heal"]);
}
public function get owner():Unit{
return (_owner);
}
public function fade():void{
_fading = true;
if ((this is InstantWeapon)){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
};
}
}
}//package map.weapons
Section 396
//BugWeapon (map.weapons.BugWeapon)
package map.weapons {
import map.units.unit.*;
import map.units.utils.*;
import map.ui.*;
import map.perks.*;
import map.weapons.bullets.*;
public class BugWeapon extends ShellWeapon {
public function BugWeapon(_arg1:Object, _arg2:Unit, _arg3:WeaponUI=null, _arg4:PerkManager=null){
super(_arg1, _arg2, _arg3, _arg4);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new BugBullet(_arg1, _arg2, _arg3, _arg4));
}
}
}//package map.weapons
Section 397
//DummyWeapon (map.weapons.DummyWeapon)
package map.weapons {
public class DummyWeapon extends AbstractWeapon {
public function DummyWeapon(){
super({}, null);
}
override public function tick(_arg1:Number):void{
}
}
}//package map.weapons
Section 398
//EnergyWeapon (map.weapons.EnergyWeapon)
package map.weapons {
public interface EnergyWeapon {
}
}//package map.weapons
Section 399
//Explosion (map.weapons.Explosion)
package map.weapons {
import flash.display.*;
import flash.events.*;
import map.*;
import map.units.unit.*;
import utils.*;
public class Explosion extends MovieClip {
private var _map:Map;
public static const RANDOM:int = 0;
public function Explosion(_arg1:Map){
addFrameScript(22, frame23);
_map = _arg1;
}
private function removeExplosion(_arg1:Event):void{
var _local2:Explosion = (_arg1.target as Explosion);
_map.removeChild(_local2);
_local2.removeEventListener(UnitEvent.DEAD, removeExplosion);
_local2 = null;
}
public function explode(_arg1:int, _arg2:int, _arg3:int=1):void{
SoundManager.play(SoundManager.MORTAR_EXPLOSION);
var _local4:Number = ((_arg3 == 0)) ? ((Math.random() / 2) + 0.2) : _arg3;
scaleX = _local4;
scaleY = _local4;
x = (_arg1 - (width / 2));
y = (_arg2 - (height / 2));
_map.addChild(this);
addEventListener(UnitEvent.DEAD, removeExplosion);
}
function frame23(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.weapons
Section 400
//ExplosiveWeapon (map.weapons.ExplosiveWeapon)
package map.weapons {
public interface ExplosiveWeapon {
}
}//package map.weapons
Section 401
//Firearms (map.weapons.Firearms)
package map.weapons {
public interface Firearms {
}
}//package map.weapons
Section 402
//GrenadeWeapon (map.weapons.GrenadeWeapon)
package map.weapons {
import map.units.unit.*;
import map.units.utils.*;
import map.ui.*;
import map.perks.*;
import map.weapons.bullets.*;
public class GrenadeWeapon extends ShellWeapon implements ExplosiveWeapon {
public function GrenadeWeapon(_arg1:Object, _arg2:Unit, _arg3:WeaponUI=null, _arg4:PerkManager=null){
super(_arg1, _arg2, _arg3, _arg4);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new MortarBullet(_arg1, _arg2, _arg3, _arg4));
}
private function checkReachTarget(_arg1:Bullet):Boolean{
var _local2:MortarBullet = (_arg1 as MortarBullet);
if ((((Math.abs((_local2.x - _local2.targetX)) <= bulletSpeed)) && ((Math.abs((_local2.y - _local2.targetY)) <= bulletSpeed)))){
new Explosion(_owner.map).explode(_local2.targetX, _local2.targetY);
SplashWeapon.causeRadialDamage(this, _local2.targetX, _local2.targetY);
destroyBullet(_arg1);
return (true);
};
return (false);
}
override public function tick(_arg1:Number):void{
var _local2:int;
super.reloadTick(_arg1);
if (_arg1 > (_lastTick + BULLET_TICK)){
_lastTick = _arg1;
_local2 = 0;
while (_local2 < _bulletsOnAir.length) {
if ((((this is ProgrammTraceable)) && ((_bulletsOnAir[_local2] as Bullet).fading))){
_bulletsOnAir[_local2].tick();
} else {
if (checkReachTarget(_bulletsOnAir[_local2])){
_local2--;
} else {
_bulletsOnAir[_local2].tick();
};
};
_local2++;
};
if (((_fading) && ((_bulletsOnAir.length == 0)))){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
};
};
}
}
}//package map.weapons
Section 403
//HeadWeapon (map.weapons.HeadWeapon)
package map.weapons {
public interface HeadWeapon {
}
}//package map.weapons
Section 404
//InstantWeapon (map.weapons.InstantWeapon)
package map.weapons {
import map.units.unit.*;
import map.units.utils.*;
import flash.geom.*;
import map.ui.*;
import map.perks.*;
import flash.utils.*;
public class InstantWeapon extends AbstractWeapon {
public function InstantWeapon(_arg1:Object, _arg2:Unit, _arg3:WeaponUI=null, _arg4:PerkManager=null){
super(_arg1, _arg2, _arg3);
}
override public function fire(_arg1:Unit=null, _arg2:Angle=null, _arg3:Boolean=false):void{
var _local4:Point;
var _local5:Impulse;
if (ready){
playShotSound();
_arg2 = new Angle(_owner.x, _owner.y, _arg1.x, _arg1.y);
_arg2.calculateRotation();
_local4 = new Point(_arg1.x, _arg1.y);
_local5 = new Impulse(_arg1, _arg2, impulse);
_arg1.causeDamage(getDamage(_arg2, _local4, _local5));
_lastFireTime = getTimer();
};
}
}
}//package map.weapons
Section 405
//MissileWeapon (map.weapons.MissileWeapon)
package map.weapons {
import map.units.unit.*;
import map.units.utils.*;
import flash.media.*;
import map.ui.*;
import map.perks.*;
import map.weapons.bullets.*;
import utils.*;
public class MissileWeapon extends ShellWeapon implements ExplosiveWeapon {
public function MissileWeapon(_arg1:Object, _arg2:Unit, _arg3:WeaponUI=null, _arg4:PerkManager=null){
super(_arg1, _arg2, _arg3, _arg4);
}
override protected function getSound():Sound{
return (SoundManager.MISSILE_FLIGHT);
}
override protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new MissileBullet(_arg1, _arg2, _arg3, _arg4, _arg5));
}
}
}//package map.weapons
Section 406
//PiercingWeapon (map.weapons.PiercingWeapon)
package map.weapons {
import map.units.unit.*;
import map.ui.*;
import map.perks.*;
import map.weapons.bullets.*;
public class PiercingWeapon extends ShellWeapon {
private var _piercedUnits:Array;
public function PiercingWeapon(_arg1:Object, _arg2:Unit, _arg3:WeaponUI=null, _arg4:PerkManager=null){
_piercedUnits = new Array();
super(_arg1, _arg2, _arg3, _arg4);
}
private function isPierced(_arg1:Unit):Boolean{
var _local2:int;
while (_local2 < _piercedUnits.length) {
if (_arg1 == _piercedUnits[_local2]){
return (true);
};
_local2++;
};
return (false);
}
public function pierce(_arg1:Unit):void{
_piercedUnits.push(_arg1);
}
override protected function checkCollision(_arg1:Bullet):Boolean{
var _local3:Unit;
var _local2:Array = _owner.getEnemies();
var _local4:int;
while (_local4 < _local2.length) {
_local3 = (_local2[_local4] as Unit);
if (isPierced(_local3)){
} else {
if (emulateSteps(_arg1, _local3)){
return (true);
};
};
_local4++;
};
return (false);
}
override protected function executeCollision(_arg1:Unit, _arg2:int, _arg3:int, _arg4:Bullet):void{
if (isPierced(_arg1)){
return;
};
if ((this is Traceable)){
_arg4.leaveMCTrace(_arg2, _arg3);
};
causeDamage(_arg1, _arg2, _arg3, _arg4);
clone(_arg1);
explode(_arg2, _arg3);
pierce(_arg1);
_arg4.miss = false;
}
public function clearPierced():void{
_piercedUnits = new Array();
}
}
}//package map.weapons
Section 407
//ProgrammTraceable (map.weapons.ProgrammTraceable)
package map.weapons {
public interface ProgrammTraceable {
}
}//package map.weapons
Section 408
//RepairWeapon (map.weapons.RepairWeapon)
package map.weapons {
import map.units.unit.*;
import map.units.utils.*;
import map.ui.*;
import flash.utils.*;
public class RepairWeapon extends InstantWeapon {
public function RepairWeapon(_arg1:Object, _arg2:Unit, _arg3:WeaponUI=null){
super(_arg1, _arg2, _arg3);
}
override public function fire(_arg1:Unit=null, _arg2:Angle=null, _arg3:Boolean=false):void{
if (ready){
_arg1.heal(heal);
_lastFireTime = getTimer();
};
}
}
}//package map.weapons
Section 409
//ShellWeapon (map.weapons.ShellWeapon)
package map.weapons {
import map.units.hero.*;
import map.units.unit.*;
import map.units.utils.*;
import flash.geom.*;
import main.*;
import map.ui.*;
import map.perks.*;
import map.weapons.bullets.*;
import utils.*;
import flash.utils.*;
public class ShellWeapon extends AbstractWeapon {
protected var _traceParams2:Object;
protected var _bulletYShift:int;// = 0
protected var _twoMuzzle:Boolean;// = false
protected var _bulletsLeft:int;
protected var _lastTick:Number;
protected var _bulletsOnAir:Array;
protected var _bulletXShift:int;// = 0
protected var _lastMuzzle:int;// = -1
protected var _fadingBullets:Array;
protected var BULLET_TICK:int;// = 30
protected var _traceParams:Object;
private var _currentReloadingTime:Number;// = 0
public function ShellWeapon(_arg1:Object, _arg2:Unit, _arg3:WeaponUI=null, _arg4:PerkManager=null){
_traceParams = {alpha:0.6, color:0xAAAAAA, thinness:2, fadeStep:0.07};
_traceParams2 = {alpha:0, color:0, thinness:0};
super(_arg1, _arg2, _arg3, _arg4);
_bulletsLeft = clipSize;
if (_ui != null){
_ui.setBullets(_bulletsLeft);
};
_currentReloadingTime = reloadingTime;
_lastTick = getTimer();
_bulletsOnAir = new Array();
_fadingBullets = new Array();
}
protected function emulateSteps(_arg1:Bullet, _arg2:Unit):Boolean{
var _local5:int;
var _local6:int;
var _local3:int = (1 + Math.floor((Math.sqrt(_arg1.speed2) / Unit.MIN_SIZE)));
var _local4:int;
while (_local4 <= _local3) {
_local5 = (_arg1.x + ((_local4 == 0)) ? 0 : ((_arg1.vX / _local3) * _local4));
_local6 = (_arg1.y + ((_local4 == 0)) ? 0 : ((_arg1.vY / _local3) * _local4));
if (MathUtils.distance2(_local5, _local6, _arg2.x, _arg2.y) < _arg2.params["size2"]){
executeCollision(_arg2, _local5, _local6, _arg1);
return (true);
};
_local4++;
};
return (false);
}
protected function executeCollision(_arg1:Unit, _arg2:int, _arg3:int, _arg4:Bullet):void{
if ((this is Traceable)){
_arg4.leaveMCTrace(_arg2, _arg3);
};
causeDamage(_arg1, _arg2, _arg3, _arg4);
clone(_arg1);
explode(_arg2, _arg3);
destroyBullet(_arg4);
}
protected function causeDamage(_arg1:Unit, _arg2:int, _arg3:int, _arg4:Bullet):void{
var _local5:Point = new Point(_arg2, _arg3);
var _local6:Impulse = new Impulse(_arg1, _arg4.angle, impulse);
_arg1.causeDamage(getDamage(_arg4.angle, _local5, _local6));
_arg4.miss = false;
}
private function checkOutOfDistance(_arg1:Bullet):Boolean{
if (((_arg1.outOfDistance) || (_arg1.boomeranged))){
if ((((_owner is Hero)) && (_arg1.miss))){
(_owner as Hero).statistics.addMiss();
};
destroyBullet(_arg1);
return (true);
};
return (false);
}
private function generateRandomBullet(_arg1:int, _arg2:int):void{
var _local3:BulletTrace = generateTrace();
var _local4:Angle = new Angle(_arg1, _arg2, (_arg1 + ((((Math.random() * 2) - 1) * Math.random()) * 100)), (_arg2 + ((((Math.random() * 2) - 1) * Math.random()) * 100)));
var _local5:Bullet = getShell(_local4, _arg1, _arg2, _params, _local3);
_owner.map.addChild(_local5);
_bulletsOnAir.push(_local5);
}
public function removeBullets():void{
var _local1:int;
while (_local1 < _bulletsOnAir.length) {
destroyBullet(_bulletsOnAir[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < _fadingBullets.length) {
(_fadingBullets[_local1] as Bullet).dispatchEvent(new UnitEvent(UnitEvent.DEAD));
_local1++;
};
}
private function generateTrace():BulletTrace{
var _local1:BulletTrace;
if ((this is ProgrammTraceable)){
_local1 = new BulletTraceProgramm(_traceParams, _traceParams2);
} else {
if ((this is Traceable)){
_local1 = new BulletTraceMC(_traceParams);
};
};
if (_local1 != null){
_owner.map.addChild(_local1);
};
return (_local1);
}
private function blastWave():void{
new ShockWave(_owner.map).explode(_owner.x, _owner.y, 0.65);
var _local1:ShockWaveWeapon = new ShockWaveWeapon(_owner);
SplashWeapon.causeRadialDamage(_local1, _owner.x, _owner.y);
}
protected function getShell(_arg1:Angle, _arg2:int, _arg3:int, _arg4:Object, _arg5:BulletTrace):Bullet{
return (new Bullet(_arg1, _arg2, _arg3, _arg4, _arg5));
}
public function set traceParams2(_arg1:Object):void{
_traceParams2 = _arg1;
}
public function set twoMuzzle(_arg1:Boolean):void{
_twoMuzzle = _arg1;
}
public function set traceParams(_arg1:Object):void{
_traceParams = _arg1;
}
private function removeTrace(_arg1:UnitEvent):void{
var e = _arg1;
var b:Bullet = (e.target as Bullet);
b.removeEventListener(UnitEvent.DEAD, removeTrace);
var i:int;
while (i < _fadingBullets.length) {
if (_fadingBullets[i] == b){
_fadingBullets.splice(i, 1);
break;
};
i = (i + 1);
};
try {
_owner.map.removeChild(b.lbTrace);
} catch(errObject:Error) {
};
b.lbTrace = null;
b = null;
}
protected function checkCollision(_arg1:Bullet):Boolean{
var _local3:Unit;
var _local2:Array = _owner.getEnemies();
var _local4:int;
while (_local4 < _local2.length) {
_local3 = (_local2[_local4] as Unit);
if (emulateSteps(_arg1, _local3)){
return (true);
};
_local4++;
};
return (false);
}
protected function destroyBullet(_arg1:Bullet):void{
removeBullet(_arg1);
if ((((this is ProgrammTraceable)) || ((this is Traceable)))){
_arg1.setFade();
_fadingBullets.push(_arg1);
_arg1.addEventListener(UnitEvent.DEAD, removeTrace);
} else {
_arg1 = null;
};
}
protected function reloadTick(_arg1:Number):void{
if (!reloaded){
_currentReloadingTime = (_currentReloadingTime + Main.MS);
if (ready){
_bulletsLeft = clipSize;
if (_ui != null){
_ui.setBullets(_bulletsLeft);
};
};
};
if (((reloaded) && ((_bulletsLeft == 0)))){
_bulletsLeft = clipSize;
};
}
private function removeBullet(_arg1:Bullet):void{
var bullet = _arg1;
try {
_owner.map.removeChild(bullet);
} catch(errObject:Error) {
};
var i:int;
while (i < _bulletsOnAir.length) {
if (_bulletsOnAir[i] == bullet){
_bulletsOnAir.splice(i, 1);
break;
};
i = (i + 1);
};
}
public function set bulletXShift(_arg1:int):void{
_bulletXShift = _arg1;
}
protected function reload():void{
if ((_owner is Hero)){
SoundManager.play(SoundManager.RELOAD);
};
if (((!((_perkManager == null))) && (!((_perkManager.cunningReloader.level == 0))))){
blastWave();
};
_currentReloadingTime = 0;
}
override public function get ready():Boolean{
return (((((!(_disabled)) && (reloaded))) && ((getTimer() > (_lastFireTime + fireRate)))));
}
public function set bulletYShift(_arg1:int):void{
_bulletYShift = _arg1;
}
protected function explode(_arg1:int, _arg2:int):void{
if ((this is ExplosiveWeapon)){
if ((this is MissileWeapon)){
SoundManager.play(SoundManager.MORTAR_EXPLOSION);
};
new Explosion(_owner.map).explode(_arg1, _arg2, Explosion.RANDOM);
};
}
protected function clone(_arg1:Unit):void{
var _local2:int;
if (((_arg1.dead) && (!((cloneCount == 0))))){
_local2 = 0;
while (_local2 < cloneCount) {
generateRandomBullet(_arg1.x, _arg1.y);
if ((_owner is Hero)){
(_owner as Hero).statistics.addShot();
};
_local2++;
};
};
}
override public function tick(_arg1:Number):void{
var _local2:int;
reloadTick(_arg1);
if (_arg1 > (_lastTick + BULLET_TICK)){
_lastTick = _arg1;
_local2 = 0;
while (_local2 < _bulletsOnAir.length) {
if ((((this is ProgrammTraceable)) && ((_bulletsOnAir[_local2] as Bullet).fading))){
_bulletsOnAir[_local2].tick();
} else {
if (checkOutOfDistance(_bulletsOnAir[_local2])){
_local2--;
} else {
if (checkCollision(_bulletsOnAir[_local2])){
_local2--;
} else {
_bulletsOnAir[_local2].tick();
};
};
};
_local2++;
};
_local2 = 0;
while (_local2 < _fadingBullets.length) {
_fadingBullets[_local2].tick();
_local2++;
};
if (((((_fading) && ((_bulletsOnAir.length == 0)))) && ((_fadingBullets.length == 0)))){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
};
};
}
override public function fire(_arg1:Unit=null, _arg2:Angle=null, _arg3:Boolean=false):void{
var _local4:int;
var _local5:BulletTrace;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:Bullet;
var _local10:Number;
var _local11:Number;
var _local12:int;
var _local13:int;
var _local14:Number;
var _local15:Number;
var _local16:int;
var _local17:int;
_quad = _arg3;
if (ready){
playShotSound();
if ((this is PiercingWeapon)){
(this as PiercingWeapon).clearPierced();
};
_local4 = 0;
while (_local4 < shellsCount) {
_arg2.objectX = _owner.x;
_arg2.objectY = _owner.y;
_arg2.calculateRotation();
_local5 = generateTrace();
_local6 = 0;
_local7 = 0;
if (_bulletXShift != 0){
_local10 = Math.cos((((_arg2.rotation + 180) * Math.PI) / 180));
_local11 = Math.sin((((_arg2.rotation + 180) * Math.PI) / 180));
if (_lastMuzzle == -1){
_local8 = 1;
} else {
_local8 = -1;
};
_lastMuzzle = _local8;
_local12 = ((_local10 * _bulletXShift) * _local8);
_local13 = ((_local11 * _bulletXShift) * _local8);
_local6 = (_local6 + _local12);
_local7 = (_local7 + _local13);
};
if (getHead() != null){
if (_twoMuzzle){
if (_local8 == 1){
getHead().fire1();
};
if (_local8 == -1){
getHead().fire2();
};
} else {
getHead().fire();
};
};
if (_bulletYShift != 0){
_local14 = Math.cos((((_arg2.rotation + 90) * Math.PI) / 180));
_local15 = Math.sin((((_arg2.rotation + 90) * Math.PI) / 180));
_local16 = (_local14 * _bulletYShift);
_local17 = (_local15 * _bulletYShift);
_local6 = (_local6 + _local16);
_local7 = (_local7 + _local17);
};
_local9 = getShell(_arg2, (_arg2.objectX + _local6), (_arg2.objectY + _local7), _params, _local5);
_local9.map = _owner.map;
_owner.map.addChild(_local9);
_bulletsOnAir.push(_local9);
_bulletsLeft--;
if (_ui != null){
_ui.setBullets(_bulletsLeft);
};
_lastFireTime = getTimer();
if ((_owner is Hero)){
(_owner as Hero).statistics.addShot();
};
if (_bulletsLeft == 0){
reload();
break;
};
_local4++;
};
};
}
public function get reloaded():Boolean{
return ((_currentReloadingTime >= reloadingTime));
}
private static function swapUnits(_arg1:Array, _arg2:int, _arg3:int):void{
var _local4:Unit = _arg1[_arg2];
_arg1[_arg2] = _arg1[_arg3];
_arg1[_arg3] = _local4;
}
}
}//package map.weapons
Section 410
//ShockWave (map.weapons.ShockWave)
package map.weapons {
import map.*;
import map.units.unit.*;
public class ShockWave extends Explosion {
public function ShockWave(_arg1:Map){
addFrameScript(26, frame27);
super(_arg1);
}
function frame27(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package map.weapons
Section 411
//SplashWeapon (map.weapons.SplashWeapon)
package map.weapons {
import map.units.hero.*;
import map.units.unit.*;
import map.units.utils.*;
import flash.geom.*;
import main.*;
import utils.debug.*;
public class SplashWeapon {
public static function causeRadialDamage(_arg1:AbstractWeapon, _arg2:int, _arg3:int, _arg4:Boolean=true):void{
var _local8:Unit;
var _local9:Angle;
var _local10:Point;
var _local11:Impulse;
var _local5:Array = _arg1.owner.getEnemies();
var _local6:Boolean;
var _local7:int;
while (_local7 < _local5.length) {
_local8 = (_local5[_local7] as Unit);
if (MathUtils.distance2(_arg2, _arg3, _local8.x, _local8.y) < (_local8.params["size2"] + _arg1.splash2)){
if (Main.debug){
Debug.drawLine(_arg1.owner.map, _arg2, _arg3, _local8.x, _local8.y);
};
_local6 = false;
_local9 = new Angle(_arg2, _arg3, _local8.x, _local8.y);
_local9.calculateRotation();
_local10 = new Point(_local8.x, _local8.y);
_local11 = new Impulse(_local8, _local9, _arg1.impulse);
_local8.causeDamage(_arg1.getDamage(_local9, _local10, _local11));
};
_local7++;
};
if (((((_arg4) && ((_arg1.owner is Hero)))) && (_local6))){
(_arg1.owner as Hero).statistics.addMiss();
};
}
}
}//package map.weapons
Section 412
//Traceable (map.weapons.Traceable)
package map.weapons {
public interface Traceable {
}
}//package map.weapons
Section 413
//WeaponManager (map.weapons.WeaponManager)
package map.weapons {
import map.units.hero.*;
import map.units.utils.*;
import map.ui.*;
import map.perks.*;
import map.weapons.hero.heads.*;
import map.weapons.hero.*;
import flash.net.*;
public class WeaponManager extends HeroManager {
private var _gun:Boolean;// = false
private var _locustGun:Boolean;// = false
private var group1:Array;
private var group2:Array;
private var group3:Array;
private var group4:Array;
private var _weapons:Array;
private var _railgun:Boolean;// = false
private var _mortar:Boolean;// = false
private var _rocketLauncher:Boolean;// = false
private var _frozen:Boolean;// = false
private var _plasmagun:Boolean;// = false
private var _shotgun:Boolean;// = false
private var _laser:Boolean;// = false
private var _machinegun:Boolean;// = false
private var _iongun:Boolean;// = false
private var _bonusWeapon:AbstractWeapon;
private var _prevBonusWeapons:Array;
private var _buggun:Boolean;// = false
private var _positions:Array;
private var _currentWeapon:AbstractWeapon;
private var _ionShotgun:Boolean;// = false
public static const ARMAGEDDON:int = 1;
public static const SAW:int = 12;
public static const BUGGUN:int = 3;
public static const RAILGUN:int = 10;
public static const ION_SHOTGUN:int = 15;
public static const MORTAR:int = 8;
public static const MACHINEGUN:int = 7;
public static const PLASMAGUN:int = 9;
public static const GUN:int = 5;
public static const GAUSSGUN:int = 4;
public static const SHOTGUN:int = 13;
public static const BONUS_ROCKET_LAUNCHER:int = 2;
public static const ROCKET_LAUNCHER:int = 14;
public static const NONE:int = 0;
public static const LASER:int = 17;
public static const LOCUST_GUN:int = 16;
public static const IONGUN:int = 6;
public function WeaponManager(_arg1:Hero){
_positions = [[GUN, 0, 0], [SHOTGUN, 1, 0], [MACHINEGUN, 1, 1], [LOCUST_GUN, 1, 2], [BUGGUN, 2, 0], [IONGUN, 2, 1], [PLASMAGUN, 2, 2], [ION_SHOTGUN, 2, 3], [MORTAR, 3, 0], [LASER, 3, 1], [ROCKET_LAUNCHER, 3, 2], [RAILGUN, 3, 3]];
group1 = new Array(1);
group2 = new Array(2);
group3 = new Array(3);
group4 = new Array(3);
_weapons = [group1, group2, group3, group4];
_prevBonusWeapons = new Array();
super(_arg1);
pickWeapon(GUN);
}
public function save():void{
var _local1:SharedObject = SharedObject.getLocal("game_data");
_local1.data.gun = _gun;
_local1.data.ionShotgun = _ionShotgun;
_local1.data.locustGun = _locustGun;
_local1.data.laser = _laser;
_local1.data.shotgun = _shotgun;
_local1.data.machinegun = _machinegun;
_local1.data.buggun = _buggun;
_local1.data.iongun = _iongun;
_local1.data.plasmagun = _plasmagun;
_local1.data.rocketLauncher = _rocketLauncher;
_local1.data.railgun = _railgun;
_local1.data.mortar = _mortar;
_local1.flush();
}
public function setWeaponPowerUp(_arg1:Boolean):void{
var _local2:int;
while (_local2 < _positions.length) {
if (_weapons[_positions[_local2][1]][_positions[_local2][2]] != undefined){
(_weapons[_positions[_local2][1]][_positions[_local2][2]] as AbstractWeapon).weaponPowerUp = _arg1;
};
_local2++;
};
}
public function get bonusWeapon():AbstractWeapon{
return (_bonusWeapon);
}
public function pickWeapon(_arg1:int):void{
var _local2:int;
while (_local2 < _positions.length) {
if (_positions[_local2][0] == _arg1){
if (_weapons[_positions[_local2][1]][_positions[_local2][2]] == undefined){
_weapons[_positions[_local2][1]][_positions[_local2][2]] = getWeapon(_arg1, _hero);
switch (_arg1){
case GUN:
_gun = true;
break;
case ION_SHOTGUN:
_ionShotgun = true;
break;
case LASER:
_laser = true;
break;
case LOCUST_GUN:
_locustGun = true;
break;
case SHOTGUN:
_shotgun = true;
break;
case MACHINEGUN:
_machinegun = true;
break;
case BUGGUN:
_buggun = true;
break;
case IONGUN:
_iongun = true;
break;
case PLASMAGUN:
_plasmagun = true;
break;
case ROCKET_LAUNCHER:
_rocketLauncher = true;
break;
case RAILGUN:
_railgun = true;
break;
case MORTAR:
_mortar = true;
break;
};
};
_currentWeapon = _weapons[_positions[_local2][1]][_positions[_local2][2]];
changeHead();
break;
};
_local2++;
};
}
private function getPrevWeapon(_arg1:int, _arg2:int):AbstractWeapon{
var _local3:int;
var _local4:int;
if (_arg2 == 0){
if (_arg1 == 0){
_local4 = (_weapons.length - 1);
} else {
_local4 = (_arg1 - 1);
};
_local3 = ((_weapons[_local4] as Array).length - 1);
} else {
_local3 = (_arg2 - 1);
_local4 = _arg1;
};
if (_weapons[_local4][_local3] == undefined){
return (getPrevWeapon(_local4, _local3));
};
return (_weapons[_local4][_local3]);
}
public function tick(_arg1:Number):void{
var _local3:int;
if (_frozen){
return;
};
var _local2:int;
while (_local2 < _weapons.length) {
_local3 = 0;
while (_local3 < _weapons[_local2].length) {
if (_weapons[_local2][_local3] != undefined){
_weapons[_local2][_local3].tick(_arg1);
};
_local3++;
};
_local2++;
};
if (_bonusWeapon != null){
_bonusWeapon.tick(_arg1);
};
_local3 = 0;
while (_local3 < _prevBonusWeapons.length) {
_prevBonusWeapons[_local3].tick(_arg1);
_local3++;
};
}
public function demoMode():void{
pickWeapon(SHOTGUN);
pickWeapon(MACHINEGUN);
pickWeapon(BUGGUN);
pickWeapon(IONGUN);
pickWeapon(PLASMAGUN);
pickWeapon(ROCKET_LAUNCHER);
pickWeapon(MORTAR);
pickWeapon(RAILGUN);
}
public function prevWeapon():AbstractWeapon{
var _local1:AbstractWeapon;
var _local3:int;
var _local2:int;
while (_local2 < _weapons.length) {
_local3 = 0;
while (_local3 < _weapons[_local2].length) {
if (_weapons[_local2][_local3] == _currentWeapon){
_local1 = getPrevWeapon(_local2, _local3);
break;
};
_local3++;
};
_local2++;
};
changeWeapon(_local1);
return (_local1);
}
private function changeHead():void{
var _local1:int;
while (_local1 < _hero.numChildren) {
if (_hero.getChildAt(_local1).name == "head"){
_hero.removeChildAt(_local1);
};
_local1++;
};
_local1 = 0;
while (_local1 < _hero.ui.numChildren) {
if (_hero.ui.getChildAt(_local1).name == "head"){
_hero.ui.removeChildAt(_local1);
};
_local1++;
};
if (_currentWeapon.getHead() == null){
trace("head is null");
};
var _local2:Head = _currentWeapon.getHead();
_hero.addChild(_local2);
var _local3:Head = _currentWeapon.getNewHead();
_local3.place();
_local3.scaleX = 0.7;
_local3.scaleY = 0.7;
_hero.ui.addChild(_local3);
}
public function fadeWeapons():void{
var _local1:int;
while (_local1 < _positions.length) {
if (_weapons[_positions[_local1][1]][_positions[_local1][2]] != undefined){
(_weapons[_positions[_local1][1]][_positions[_local1][2]] as AbstractWeapon).fade();
};
_local1++;
};
}
public function fire(_arg1:Angle, _arg2:Boolean):void{
if (((!((_bonusWeapon == null))) && (_bonusWeapon.ready))){
_bonusWeapon.fire(null, _arg1, _arg2);
};
if (_currentWeapon.ready){
_hero.getHead().gotoAndStop("fire");
_currentWeapon.fire(null, _arg1, _arg2);
};
}
public function set bonusWeapon(_arg1:AbstractWeapon):void{
_bonusWeapon = _arg1;
}
private function clearWeapons():void{
_weapons = [group1, group2, group3, group4];
group1 = new Array(1);
group2 = new Array(2);
group3 = new Array(3);
group4 = new Array(3);
}
public function freezeUnFreeze():void{
_frozen = !(_frozen);
}
private function hasWeapon(_arg1:int):Boolean{
switch (_arg1){
case GUN:
return (_gun);
case ION_SHOTGUN:
return (_ionShotgun);
case LASER:
return (_laser);
case LOCUST_GUN:
return (_locustGun);
case SHOTGUN:
return (_shotgun);
case MACHINEGUN:
return (_machinegun);
case BUGGUN:
return (_buggun);
case IONGUN:
return (_iongun);
case PLASMAGUN:
return (_plasmagun);
case ROCKET_LAUNCHER:
return (_rocketLauncher);
case RAILGUN:
return (_railgun);
case MORTAR:
return (_mortar);
};
return (false);
}
public function setBonusWeapon(_arg1:int):void{
if ((((_bonusWeapon == null)) || (!((_bonusWeapon.type == _arg1))))){
_bonusWeapon = getWeapon(_arg1, _hero);
};
_bonusWeapon.enable();
}
public function load():void{
var _local1:SharedObject = SharedObject.getLocal("game_data");
clearWeapons();
if (_local1.data.gun){
pickWeapon(GUN);
};
if (_local1.data.ionShotgun){
pickWeapon(ION_SHOTGUN);
};
if (_local1.data.locustGun){
pickWeapon(LOCUST_GUN);
};
if (_local1.data.laser){
pickWeapon(LASER);
};
if (_local1.data.shotgun){
pickWeapon(SHOTGUN);
};
if (_local1.data.machinegun){
pickWeapon(MACHINEGUN);
};
if (_local1.data.buggun){
pickWeapon(BUGGUN);
};
if (_local1.data.mortar){
pickWeapon(MORTAR);
};
if (_local1.data.iongun){
pickWeapon(IONGUN);
};
if (_local1.data.plasmagun){
pickWeapon(PLASMAGUN);
};
if (_local1.data.rocketLauncher){
pickWeapon(ROCKET_LAUNCHER);
};
if (_local1.data.railgun){
pickWeapon(RAILGUN);
};
}
public function nextWeapon():AbstractWeapon{
var _local1:AbstractWeapon;
var _local3:int;
var _local2:int;
while (_local2 < _weapons.length) {
_local3 = 0;
while (_local3 < _weapons[_local2].length) {
if (_weapons[_local2][_local3] == _currentWeapon){
_local1 = getNextWeapon(_local2, _local3);
break;
};
_local3++;
};
_local2++;
};
changeWeapon(_local1);
return (_local1);
}
public function changeWeapon(_arg1:AbstractWeapon):void{
_currentWeapon = _arg1;
pickWeapon(_currentWeapon.type);
}
private function getNextWeapon(_arg1:int, _arg2:int):AbstractWeapon{
var _local3:int;
var _local4:int;
if (_arg2 == ((_weapons[_arg1] as Array).length - 1)){
_local3 = 0;
if (_arg1 == (_weapons.length - 1)){
_local4 = 0;
} else {
_local4 = (_arg1 + 1);
};
} else {
_local3 = (_arg2 + 1);
_local4 = _arg1;
};
if (_weapons[_local4][_local3] == undefined){
return (getNextWeapon(_local4, _local3));
};
return (_weapons[_local4][_local3]);
}
public function get currentWeapon():AbstractWeapon{
return (_currentWeapon);
}
public function removeBonusWeapon():void{
_bonusWeapon.disable();
}
public static function getWeapon(_arg1:int, _arg2:Hero=null):AbstractWeapon{
var _local3:WeaponUI = (((!((_arg2 == null))) && (!((_arg2.ui == null))))) ? _arg2.ui.getWeaponUI() : null;
var _local4:PerkManager = ((_arg2)!=null) ? _arg2.perkManager : null;
switch (_arg1){
case NONE:
return (new DummyWeapon());
case ROCKET_LAUNCHER:
return (new RocketLauncher(_arg2, _local3, _local4));
case BUGGUN:
return (new Buggun(_arg2, _local3, _local4));
case BONUS_ROCKET_LAUNCHER:
return (new BonusRocketLauncher(_arg2));
case GUN:
return (new Gun(_arg2, _local3, _local4));
case ION_SHOTGUN:
return (new IonShotgun(_arg2, _local3, _local4));
case LASER:
return (new Laser(_arg2, _local3, _local4));
case LOCUST_GUN:
return (new Locustgun(_arg2, _local3, _local4));
case IONGUN:
return (new Iongun(_arg2, _local3, _local4));
case MACHINEGUN:
return (new Machinegun(_arg2, _local3, _local4));
case MORTAR:
return (new Mortar(_arg2, _local3, _local4));
case PLASMAGUN:
return (new Plasmagun(_arg2, _local3, _local4));
case RAILGUN:
return (new Railgun(_arg2, _local3, _local4));
case SHOTGUN:
return (new Shotgun(_arg2, _local3, _local4));
default:
return (null);
};
}
}
}//package map.weapons
Section 414
//Map (map.Map)
package map {
import utils.animations.*;
import flash.display.*;
import flash.events.*;
import map.units.hero.*;
import map.units.unit.*;
import map.units.utils.*;
import map.conditions.*;
import map.tutorial.*;
import main.*;
import map.ui.*;
import map.units.relations.*;
import map.items.*;
import map.spawn.*;
import map.maps.planet3.*;
import com.moonmana.ui.*;
import map.ui.utils.*;
import map.ui.titles.*;
import flash.utils.*;
public dynamic class Map extends ScreenObject implements AnimationContainer {
private var _lastSecondTick:int;
protected var _spawnManager:SpawnManager;
private var _state:int;// = 0
protected var _isTutorialMap:Boolean;// = false
private var _itemSpawner:ItemSpawner;
private var _finishTime:int;// = 0
private var _hx:int;// = 640
private var _hy:int;// = 480
protected var _tutorialManager:TutorialManager;
protected var _ui:MapUI;
protected var _bombsManager:BombsManager;
private var _heroes:Side;
private var _startTime:int;
private var _mobs:Side;
protected var _conditionsManager:ConditionsManager;
protected var _hero:Hero;
private var _popups:Array;
private var animator:Animator;
protected var _title:String;
private var _h:int;
protected var _skipLevelCondition:SkipLevelCondition;
private var _fadingUnits:Array;
private var _w:int;
private var _drones:Side;
protected var _stage:Stage;
protected static const LEVEL_COMPLETE_TIME_PLUS:int = 7500;
private static const LEVEL_COMPLETE_TIME:int = 5000;
public static const PRE_FIGHT:int = 0;
public static const FIGHT:int = 1;
private static const PRE_FIGHT_TIME:int = 1000;
private static const Y:int = 0;
public static const LEVEL_COMPLETE:int = 2;
private static const X:int = 0;
public function Map(_arg1:Stage, _arg2:String, _arg3:MapUI, _arg4:int, _arg5:int, _arg6:int, _arg7:int){
_mobs = new Side();
_heroes = new Side();
_drones = new Side();
_tutorialManager = new TutorialManager();
_skipLevelCondition = new SkipLevelCondition();
_fadingUnits = new Array();
_popups = new Array();
_startTime = getTimer();
animator = new Animator();
super(X, Y);
_stage = _arg1;
_title = _arg2;
_w = _arg4;
_h = _arg5;
_hx = _arg6;
_hy = _arg7;
_ui = _arg3;
_itemSpawner = new ItemSpawner();
_spawnManager = new SpawnManager(_arg3.getProgressUI());
_spawnManager.addEventListener(SpawnEvent.SPAWN, layout);
_conditionsManager = new ConditionsManager();
_conditionsManager.push(new KillemAllCondition(_spawnManager));
_conditionsManager.push(_skipLevelCondition);
_bombsManager = new BombsManager();
_mobs.enemies.push(_heroes);
_heroes.enemies.push(_mobs);
_drones.enemies.push(_mobs);
_drones.allies.push(_heroes);
_lastSecondTick = getTimer();
_ui.getTimerUI().zero();
_ui.setSkipTutorialButton(_isTutorialMap);
if (_isTutorialMap){
_ui.tutorialButton.addEventListener(MouseEvent.CLICK, skipTutorial);
};
}
public function get finishTime():int{
return (_finishTime);
}
public function get hero():Hero{
return (_hero);
}
public function get isLast():Boolean{
return ((nextId == 0));
}
public function skipTutorial(_arg1:Event):void{
_ui.tutorialButton.removeEventListener(MouseEvent.CLICK, skipTutorial);
skipMap();
}
public function pause():void{
var _local1:int;
while (_local1 < _mobs.units.length) {
(_mobs.units[_local1] as Unit).pause();
_local1++;
};
_local1 = 0;
while (_local1 < _drones.units.length) {
(_drones.units[_local1] as Unit).pause();
_local1++;
};
_local1 = 0;
while (_local1 < _heroes.units.length) {
(_heroes.units[_local1] as Unit).pause();
_local1++;
};
_local1 = 0;
while (_local1 < _fadingUnits.length) {
(_fadingUnits[_local1] as Unit).pause();
_local1++;
};
}
public function removePopup(_arg1:PopupText):void{
var _local2:int;
while (_local2 < _popups.length) {
if (_popups[_local2] == _arg1){
_popups.splice(_local2, 1);
break;
};
_local2++;
};
removeChild(_arg1);
}
public function addPopup(_arg1:PopupText):void{
addChild(_arg1);
_popups.push(_arg1);
}
private function redraw():void{
var _local2:AIUnit;
x = currentMapX();
y = currentMapY();
var _local1:int;
while (_local1 < _mobs.units.length) {
_local2 = _mobs.units[_local1];
_local2.redraw();
_local1++;
};
}
public function get nextId():int{
return (0);
}
public function get isTutorialMap():Boolean{
return (_isTutorialMap);
}
public function get state():int{
return (_state);
}
public function getNewMap():Map{
return (null);
}
private function currentMapX():int{
if (_hero == null){
return (0);
};
if (_hero.x < (Main.SCREEN_WIDTH / 2)){
return (0);
};
if (_hero.x > (width - (Main.SCREEN_WIDTH / 2))){
return ((-(width) + Main.SCREEN_WIDTH));
};
return ((-(_hero.x) + (Main.SCREEN_WIDTH / 2)));
}
public function tick(_arg1:Number):void{
animator.tick();
_tutorialManager.tick(_arg1);
if ((((_state == PRE_FIGHT)) && ((_arg1 >= (_startTime + PRE_FIGHT_TIME))))){
_state = FIGHT;
} else {
if ((((_state == FIGHT)) && (_conditionsManager.done()))){
_state = LEVEL_COMPLETE;
_finishTime = getTimer();
_hero.statistics.time = _ui.getTimerUI().currentTime;
};
};
var _local2:int;
while (_local2 < _mobs.units.length) {
(_mobs.units[_local2] as Unit).tick(_arg1);
_local2++;
};
_local2 = 0;
while (_local2 < _drones.units.length) {
(_drones.units[_local2] as Unit).tick(_arg1);
_local2++;
};
_local2 = 0;
while (_local2 < _heroes.units.length) {
(_heroes.units[_local2] as Unit).tick(_arg1);
_local2++;
};
_local2 = 0;
while (_local2 < _fadingUnits.length) {
(_fadingUnits[_local2] as Unit).weapon.tick(_arg1);
_local2++;
};
_local2 = 0;
while (_local2 < _popups.length) {
(_popups[_local2] as PopupText).tick(_arg1);
_local2++;
};
redraw();
if (_hero != null){
_hero.tick(_arg1);
};
if (_arg1 >= (_lastSecondTick + Main.SECOND)){
if (_state != LEVEL_COMPLETE){
_ui.getTimerUI().tickUp();
};
_lastSecondTick = _arg1;
_spawnManager.tick(_arg1);
};
_itemSpawner.tick(_arg1);
_bombsManager.tick(_arg1);
}
public function placeHero(_arg1:Hero):void{
_hero = _arg1;
_itemSpawner.hero = _hero;
_bombsManager.hero = _hero;
_hero.addToMap(this, heroes);
_hero.place(_hx, _hy);
}
private function currentMapY():int{
if (_hero == null){
return (0);
};
if (_hero.y < (Main.SCREEN_HEIGHT / 2)){
return (0);
};
if (_hero.y > (height - (Main.SCREEN_HEIGHT / 2))){
return ((-(height) + Main.SCREEN_HEIGHT));
};
return ((-(_hero.y) + (Main.SCREEN_HEIGHT / 2)));
}
public function removeCorpse(_arg1:UnitEvent):void{
var _local2:Unit = (_arg1.target as Unit);
if (!_local2.reallyDead){
return;
};
if (!_local2.weaponFaded){
_local2.stop();
return;
};
_local2.removeEventListener(UnitEvent.REALLY_DEAD, removeCorpse);
var _local3:int;
while (_local3 < _fadingUnits.length) {
if (_fadingUnits[_local3] == _local2){
_fadingUnits.splice(_local3, 1);
break;
};
_local3++;
};
removeChild(_local2);
_local2 = null;
}
public function get heroes():Side{
return (_heroes);
}
override public function get height():Number{
return (_h);
}
public function layout(_arg1:Event=null):void{
var _local2:int;
while (_local2 < _heroes.units.length) {
addChild(_heroes.units[_local2]);
_local2++;
};
_local2 = 0;
while (_local2 < _drones.units.length) {
addChild(_drones.units[_local2]);
_local2++;
};
}
public function get episodeTitle():EpisodeTitle{
return (null);
}
public function putAnimation(_arg1:Animation):void{
animator.put(_arg1);
}
override public function get width():Number{
return (_w);
}
public function clean():void{
var _local1:int = _mobs.units.length;
var _local2:int;
while (_local2 < _local1) {
(_mobs.units[_local2] as Unit).clean();
_local2++;
};
_hero.stand();
_spawnManager.removeEventListener(SpawnEvent.SPAWN, layout);
_tutorialManager.clean();
}
public function get levelCompleteTime():int{
return (LEVEL_COMPLETE_TIME);
}
public function getNextMap():Map{
return (null);
}
public function removeItem(_arg1:UnitEvent=null):void{
var _local2:Item = (_arg1.target as Item);
_local2.removeEventListener(UnitEvent.REALLY_DEAD, removeItem);
removeChild(_local2);
_itemSpawner.removeItem(_local2);
}
public function get underlay():MovieClip{
return (null);
}
public function get drones():Side{
return (_drones);
}
public function skipMap(_arg1:Event=null):void{
_skipLevelCondition.skipped = true;
}
public function checkItemTake():void{
var item:Item;
var i:int;
while (i < _itemSpawner.items.length) {
item = (_itemSpawner.items[i] as Item);
if (MathUtils.distance2(_hero.x, _hero.y, item.x, item.y) < ((_hero.params["size2"] / 2) + Item.SIZE)){
try {
item.removeEventListener(UnitEvent.REALLY_DEAD, removeItem);
removeChild(item);
_hero.pickItem(item);
_itemSpawner.items[i].take();
_itemSpawner.removeItemAt(i);
} catch(e:Error) {
};
};
i = (i + 1);
};
}
public function appocalipso():void{
while (_mobs.units[0] != null) {
(_mobs.units[0] as Unit).causeDeath();
};
}
public function kill(_arg1:Unit):void{
if (!(_arg1 is Hero)){
_spawnManager.kill(_arg1);
};
var _local2:Boolean;
var _local3:int;
while (_local3 < _arg1.side.units.length) {
if (_arg1.side.units[_local3] == _arg1){
_arg1.side.units.splice(_local3, 1);
break;
};
_local3++;
};
_fadingUnits.push(_arg1);
_hero.increaseExperience((_arg1.exp as int));
_hero.statistics.addKill();
addChildAt(_arg1, 1);
_arg1.addEventListener(UnitEvent.REALLY_DEAD, removeCorpse);
_arg1.addEventListener(UnitEvent.DEAD, _arg1.reallyDie);
_itemSpawner.spawn(_arg1, this);
}
public function get mobs():Side{
return (_mobs);
}
public function unpause():void{
var _local1:int;
while (_local1 < _mobs.units.length) {
(_mobs.units[_local1] as Unit).unpause();
_local1++;
};
_local1 = 0;
while (_local1 < _drones.units.length) {
(_drones.units[_local1] as Unit).unpause();
_local1++;
};
_local1 = 0;
while (_local1 < _heroes.units.length) {
(_heroes.units[_local1] as Unit).unpause();
_local1++;
};
_local1 = 0;
while (_local1 < _fadingUnits.length) {
(_fadingUnits[_local1] as Unit).unpause();
_local1++;
};
}
}
}//package map
Section 415
//MapMask (map.MapMask)
package map {
import main.*;
import com.moonmana.ui.*;
public class MapMask extends ScreenObject {
public function MapMask(){
super((Main.SCREEN_WIDTH / 2), (Main.SCREEN_HEIGHT / 2));
}
}
}//package map
Section 416
//CheckTextAnimationPre_34 (Mecharon_fla.CheckTextAnimationPre_34)
package Mecharon_fla {
import flash.display.*;
public dynamic class CheckTextAnimationPre_34 extends MovieClip {
public var preee:MovieClip;
public function CheckTextAnimationPre_34(){
addFrameScript(189, frame190);
}
function frame190(){
stop();
}
}
}//package Mecharon_fla
Section 417
//EELogoAni_40 (Mecharon_fla.EELogoAni_40)
package Mecharon_fla {
import flash.display.*;
public dynamic class EELogoAni_40 extends MovieClip {
public function EELogoAni_40(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package Mecharon_fla
Section 418
//LevelUpPlace_229 (Mecharon_fla.LevelUpPlace_229)
package Mecharon_fla {
import flash.display.*;
public dynamic class LevelUpPlace_229 extends MovieClip {
public var levelUp:MovieClip;
public function LevelUpPlace_229(){
addFrameScript(0, frame1, 29, frame30, 63, frame64);
}
function frame1(){
stop();
}
function frame30(){
stop();
}
function frame64(){
stop();
}
}
}//package Mecharon_fla
Section 419
//PreloaderAni_36 (Mecharon_fla.PreloaderAni_36)
package Mecharon_fla {
import flash.display.*;
public dynamic class PreloaderAni_36 extends MovieClip {
public function PreloaderAni_36(){
addFrameScript(99, frame100);
}
function frame100(){
stop();
}
}
}//package Mecharon_fla
Section 420
//Robot_189 (Mecharon_fla.Robot_189)
package Mecharon_fla {
import flash.display.*;
import map.units.unit.*;
public dynamic class Robot_189 extends MovieClip {
public function Robot_189(){
addFrameScript(0, frame1, 4, frame5, 11, frame12, 15, frame16, 129, frame130);
}
function frame130(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
stop();
}
function frame16(){
gotoAndPlay("move");
}
function frame1(){
dispatchEvent(new UnitEvent(UnitEvent.WALK));
}
function frame5(){
dispatchEvent(new UnitEvent(UnitEvent.STEP));
}
function frame12(){
dispatchEvent(new UnitEvent(UnitEvent.STEP));
}
}
}//package Mecharon_fla
Section 421
//Ad (mochi.Ad)
package mochi {
import flash.display.*;
public dynamic class Ad extends MovieClip {
}
}//package mochi
Section 422
//MochiAd (mochi.MochiAd)
package mochi {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.7");
}
public static function showClickAwayAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
var sendHostProgress:Boolean;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
var idx:Number = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var clip:Object;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
var DEFAULTS:Object = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
var depth:Number = options.depth;
delete options.depth;
var mc:MovieClip = createEmptyMovieClip(clip, "_mochiad", depth);
var wh:Array = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
var lv:URLVariables = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local6:Array;
var _local3:Object = _arg2.getBounds(_arg2.root);
var _local4:Number = 0;
var _local5:Number = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array = _arg2.split(".");
var _local4:Number = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var w:Number;
var h:Number;
var chk:MovieClip;
var complete:Boolean;
var unloaded:Boolean;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
var fn:Function = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
var wh:Array = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
var bar_color:Number = options.color;
delete options.color;
var bar_background:Number = options.background;
delete options.background;
var bar_outline:Number = options.outline;
delete options.outline;
var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1);
var backing:Object = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2);
var inside:Object = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3);
var outline:Object = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
var f:Function = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
var _local1:Object = this.parent.parent.root;
var _local2:Object = this.parent._mochiad_ctr;
var _local3:Number = (getTimer() - this.started);
var _local4:Boolean;
var _local5:Number = _local1.loaderInfo.bytesTotal;
var _local6:Number = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
var _local7:Number = ((100 * _local6) / _local5);
var _local8:Number = ((100 * _local3) / chk.ad_msec);
var _local9:Object = this._mochiad_bar._inside;
var _local10:Number = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var mc = _arg1;
var f:Function = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package mochi
Section 423
//MochiBot (mochi.MochiBot)
package mochi {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package mochi
Section 424
//MochiDigits (mochi.MochiDigits)
package mochi {
public final class MochiDigits {
private var Sibling:MochiDigits;
private var Fragment:Number;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function reencode():void{
var _local1:uint = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function toString():String{
var _local1:String = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function get value():Number{
return (Number(this.toString()));
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
}
}//package mochi
Section 425
//MochiScores (mochi.MochiScores)
package mochi {
import flash.display.*;
import flash.text.*;
public class MochiScores {
private static var boardID:String;
public static var onErrorHandler:Object;
public static var onCloseHandler:Object;
public static function showLeaderboard(_arg1:Object=null):void{
var n:Number;
var options = _arg1;
if (options != null){
if (options.clip != null){
if ((options.clip is Sprite)){
MochiServices.setContainer(options.clip);
};
delete options.clip;
} else {
MochiServices.setContainer();
};
MochiServices.stayOnTop();
if (options.name != null){
if ((options.name is TextField)){
if (options.name.text.length > 0){
options.name = options.name.text;
};
};
};
if (options.score != null){
if ((options.score is TextField)){
if (options.score.text.length > 0){
options.score = options.score.text;
};
} else {
if ((options.score is MochiDigits)){
options.score = options.score.value;
};
};
n = Number(options.score);
if (isNaN(n)){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(n) != n){
trace((("WARNING: Submitted score '" + options.score) + "' will be truncated"));
};
options.score = n;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.play();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onClose.");
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
public static function closeLeaderboard():void{
MochiServices.send("scores_closeLeaderboard");
}
public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2);
}
public static function requestList(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_requestList", null, _arg1, _arg2);
}
public static function scoresArrayToObjects(_arg1:Object):Object{
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
var _local7:String;
var _local8:String;
var _local2:Object = {};
for (_local7 in _arg1) {
if (typeof(_arg1[_local7]) == "object"){
if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){
_local2[_local7] = [];
_local5 = _arg1[_local7];
_local4 = 0;
while (_local4 < _local5.rows.length) {
_local6 = {};
_local3 = 0;
while (_local3 < _local5.cols.length) {
_local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3];
_local3++;
};
_local2[_local7].push(_local6);
_local4++;
};
} else {
_local2[_local7] = {};
for (_local8 in _arg1[_local7]) {
_local2[_local7][_local8] = _arg1[_local7][_local8];
};
};
} else {
_local2[_local7] = _arg1[_local7];
};
};
return (_local2);
}
public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{
_arg1 = Number(_arg1);
if (isNaN(_arg1)){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(_arg1) != _arg1){
trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated"));
};
_arg1 = Number(_arg1);
};
};
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function onClose(_arg1:Object=null):void{
if (_arg1 != null){
if (_arg1.error != null){
if (_arg1.error == true){
if (onErrorHandler != null){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
};
};
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(_arg1:String):void{
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
}
}//package mochi
Section 426
//MochiServices (mochi.MochiServices)
package mochi {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _listenChannel:LocalConnection;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _startTime:Number;
private static var _connecting:Boolean = false;
public static var onError:Object;
private static var _listenChannelName:String = "__ms_";
private static var _servicesURL:String = "http://www.mochiads.com/static/lib/services/services.swf";
public static var netup:Boolean = true;
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
onError("NotConnected");
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
};
if (_clip != null){
if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){
_clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_clip._nextcallbackID++;
};
};
}
public static function get connected():Boolean{
return (_connected);
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (_clip != null){
if (_clip._queue != null){
while (_clip._queue.length > 0) {
_local2 = _clip._queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _clip._callbacks[_local2.callbackID];
};
delete _clip._callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local4:int;
var _local14:Loader;
var _local3:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
var _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
var _local6:Array = [0, 64, 0, 0, 0];
var _local7:MovieClip = new MovieClip();
var _local8:LocalConnection = new LocalConnection();
var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime()));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
var _local10:ByteArray = new ByteArray();
var _local11:ByteArray = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
var _local12:uint = ((_local3.length + _local11.length) + 4);
var _local13:uint = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function get childClip():Object{
return (_clip);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var avm1Click:DisplayObject;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
var vars:Object = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
var s = "?";
var i:Number = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://x.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
var _local2:Rectangle = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_listenChannel.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
};
return (_local2);
}
public static function getVersion():String{
return ("1.43");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
if (_clip.parent != null){
Sprite(_clip.parent).removeChild(_clip);
};
}
private static function onStatus(_arg1:StatusEvent):void{
switch (_arg1.level){
case "error":
_connected = false;
_listenChannel.connect(_listenChannelName);
break;
};
}
public static function get id():String{
return (_id);
}
private static function urlOptions(_arg1:Object):Object{
var _local4:Array;
var _local5:Number;
var _local6:Array;
var _local2:Object = {};
var _local3:String = _arg1.loaderInfo.parameters.mochiad_options;
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_arg1 != null){
if ((_arg1 is Sprite)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is Sprite)){
Sprite(_container).addChild(_clip);
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
private static function initComChannels():void{
if (!_connected){
_sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_listenChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_clip.onReceive = function (_arg1:Object):void{
var methodName:String;
var pkg = _arg1;
var cb:String = pkg.callbackID;
var cblst:Object = this.client._callbacks[cb];
if (!cblst){
return;
};
var method:* = cblst.callbackMethod;
methodName = "";
var obj:Object = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete this.client._callbacks[cb];
};
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
trace("connected!");
_connecting = false;
_connected = true;
while (_clip._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function listen():void{
_listenChannel = new LocalConnection();
_listenChannel.client = _clip;
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
_listenChannel.allowDomain("*", "localhost");
_listenChannel.allowInsecureDomain("*", "localhost");
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var id = _arg1;
var clip = _arg2;
var clipname:String = ("_mochiservices_com_" + id);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(clip).servicesURL != undefined){
_servicesURL = urlOptions(clip).servicesURL;
};
MochiServices.allowDomains(_servicesURL);
_clip = createEmptyMovieClip(clip, clipname, 10336, false);
_loader = new Loader();
_timer = new Timer(1000, 0);
_startTime = getTimer();
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
var f:Function = function (_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor((Math.random() * 99999))));
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
var req:URLRequest = new URLRequest(_servicesURL);
var vars:URLVariables = new URLVariables();
vars.listenLC = _listenChannelName;
vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options;
req.data = vars;
_loader.load(req);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_clip._nextcallbackID = 0;
_clip._callbacks = {};
listen();
return (_clip);
}
public static function get clip():Object{
return (_container);
}
public static function bringToTop(_arg1:Event):void{
var e = _arg1;
if (MochiServices.clip != null){
if (MochiServices.childClip != null){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
};
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
if ((clip is DisplayObject)){
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{
var parent = _arg1;
var name = _arg2;
var depth = _arg3;
var doAdd = _arg4;
var mc:MovieClip = new MovieClip();
if (doAdd){
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
};
try {
parent[name] = mc;
} catch(e:Error) {
throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
mc["_name"] = name;
return (mc);
}
public static function connectWait(_arg1:TimerEvent):void{
if ((getTimer() - _startTime) > 10000){
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_timer.stop();
};
}
}
}//package mochi
Section 427
//BigFootDeath1Snd (sounds.deaths.BigFootDeath1Snd)
package sounds.deaths {
import flash.media.*;
public class BigFootDeath1Snd extends Sound {
}
}//package sounds.deaths
Section 428
//BigFootDeath2Snd (sounds.deaths.BigFootDeath2Snd)
package sounds.deaths {
import flash.media.*;
public class BigFootDeath2Snd extends Sound {
}
}//package sounds.deaths
Section 429
//GolemDeathSnd (sounds.deaths.GolemDeathSnd)
package sounds.deaths {
import flash.media.*;
public class GolemDeathSnd extends Sound {
}
}//package sounds.deaths
Section 430
//IcerDeathSnd (sounds.deaths.IcerDeathSnd)
package sounds.deaths {
import flash.media.*;
public class IcerDeathSnd extends Sound {
}
}//package sounds.deaths
Section 431
//IcerSmallDeathSnd (sounds.deaths.IcerSmallDeathSnd)
package sounds.deaths {
import flash.media.*;
public class IcerSmallDeathSnd extends Sound {
}
}//package sounds.deaths
Section 432
//InsectDeath2Snd (sounds.deaths.InsectDeath2Snd)
package sounds.deaths {
import flash.media.*;
public class InsectDeath2Snd extends Sound {
}
}//package sounds.deaths
Section 433
//InsectDeathSnd (sounds.deaths.InsectDeathSnd)
package sounds.deaths {
import flash.media.*;
public class InsectDeathSnd extends Sound {
}
}//package sounds.deaths
Section 434
//LavaBugDeathSnd (sounds.deaths.LavaBugDeathSnd)
package sounds.deaths {
import flash.media.*;
public class LavaBugDeathSnd extends Sound {
}
}//package sounds.deaths
Section 435
//LavaBugMotherDeathSnd (sounds.deaths.LavaBugMotherDeathSnd)
package sounds.deaths {
import flash.media.*;
public class LavaBugMotherDeathSnd extends Sound {
}
}//package sounds.deaths
Section 436
//QueenDeathSnd (sounds.deaths.QueenDeathSnd)
package sounds.deaths {
import flash.media.*;
public class QueenDeathSnd extends Sound {
}
}//package sounds.deaths
Section 437
//ScateDeathSnd (sounds.deaths.ScateDeathSnd)
package sounds.deaths {
import flash.media.*;
public class ScateDeathSnd extends Sound {
}
}//package sounds.deaths
Section 438
//SleazoidDeathSnd (sounds.deaths.SleazoidDeathSnd)
package sounds.deaths {
import flash.media.*;
public class SleazoidDeathSnd extends Sound {
}
}//package sounds.deaths
Section 439
//SmallInsectDeathSnd (sounds.deaths.SmallInsectDeathSnd)
package sounds.deaths {
import flash.media.*;
public class SmallInsectDeathSnd extends Sound {
}
}//package sounds.deaths
Section 440
//SpiderDeathSnd (sounds.deaths.SpiderDeathSnd)
package sounds.deaths {
import flash.media.*;
public class SpiderDeathSnd extends Sound {
}
}//package sounds.deaths
Section 441
//WispDeathSnd (sounds.deaths.WispDeathSnd)
package sounds.deaths {
import flash.media.*;
public class WispDeathSnd extends Sound {
}
}//package sounds.deaths
Section 442
//BigFootMoveSnd (sounds.movement.BigFootMoveSnd)
package sounds.movement {
import flash.media.*;
public class BigFootMoveSnd extends Sound {
}
}//package sounds.movement
Section 443
//FootstepSnd (sounds.movement.FootstepSnd)
package sounds.movement {
import flash.media.*;
public class FootstepSnd extends Sound {
}
}//package sounds.movement
Section 444
//GolemMoveSnd (sounds.movement.GolemMoveSnd)
package sounds.movement {
import flash.media.*;
public class GolemMoveSnd extends Sound {
}
}//package sounds.movement
Section 445
//GolemStepSnd (sounds.movement.GolemStepSnd)
package sounds.movement {
import flash.media.*;
public class GolemStepSnd extends Sound {
}
}//package sounds.movement
Section 446
//HoverMoveSnd (sounds.movement.HoverMoveSnd)
package sounds.movement {
import flash.media.*;
public class HoverMoveSnd extends Sound {
}
}//package sounds.movement
Section 447
//IcerMoveSnd (sounds.movement.IcerMoveSnd)
package sounds.movement {
import flash.media.*;
public class IcerMoveSnd extends Sound {
}
}//package sounds.movement
Section 448
//InsectMove1Snd (sounds.movement.InsectMove1Snd)
package sounds.movement {
import flash.media.*;
public class InsectMove1Snd extends Sound {
}
}//package sounds.movement
Section 449
//InsectMove2Snd (sounds.movement.InsectMove2Snd)
package sounds.movement {
import flash.media.*;
public class InsectMove2Snd extends Sound {
}
}//package sounds.movement
Section 450
//InsectMove3Snd (sounds.movement.InsectMove3Snd)
package sounds.movement {
import flash.media.*;
public class InsectMove3Snd extends Sound {
}
}//package sounds.movement
Section 451
//LavaBugMotherMoveSnd (sounds.movement.LavaBugMotherMoveSnd)
package sounds.movement {
import flash.media.*;
public class LavaBugMotherMoveSnd extends Sound {
}
}//package sounds.movement
Section 452
//LavaBugMoveSnd (sounds.movement.LavaBugMoveSnd)
package sounds.movement {
import flash.media.*;
public class LavaBugMoveSnd extends Sound {
}
}//package sounds.movement
Section 453
//MantisMoveSnd (sounds.movement.MantisMoveSnd)
package sounds.movement {
import flash.media.*;
public class MantisMoveSnd extends Sound {
}
}//package sounds.movement
Section 454
//ScateMoveSnd (sounds.movement.ScateMoveSnd)
package sounds.movement {
import flash.media.*;
public class ScateMoveSnd extends Sound {
}
}//package sounds.movement
Section 455
//TechMoveSnd (sounds.movement.TechMoveSnd)
package sounds.movement {
import flash.media.*;
public class TechMoveSnd extends Sound {
}
}//package sounds.movement
Section 456
//WispMoveSnd (sounds.movement.WispMoveSnd)
package sounds.movement {
import flash.media.*;
public class WispMoveSnd extends Sound {
}
}//package sounds.movement
Section 457
//BigFootStoneThrowSnd (sounds.BigFootStoneThrowSnd)
package sounds {
import flash.media.*;
public class BigFootStoneThrowSnd extends Sound {
}
}//package sounds
Section 458
//Bug1Snd (sounds.Bug1Snd)
package sounds {
import flash.media.*;
public class Bug1Snd extends Sound {
}
}//package sounds
Section 459
//Bug2Snd (sounds.Bug2Snd)
package sounds {
import flash.media.*;
public class Bug2Snd extends Sound {
}
}//package sounds
Section 460
//Bug3Snd (sounds.Bug3Snd)
package sounds {
import flash.media.*;
public class Bug3Snd extends Sound {
}
}//package sounds
Section 461
//Bug4Snd (sounds.Bug4Snd)
package sounds {
import flash.media.*;
public class Bug4Snd extends Sound {
}
}//package sounds
Section 462
//Bug5Snd (sounds.Bug5Snd)
package sounds {
import flash.media.*;
public class Bug5Snd extends Sound {
}
}//package sounds
Section 463
//EpicExplosionSnd (sounds.EpicExplosionSnd)
package sounds {
import flash.media.*;
public class EpicExplosionSnd extends Sound {
}
}//package sounds
Section 464
//GetBonusSnd (sounds.GetBonusSnd)
package sounds {
import flash.media.*;
public class GetBonusSnd extends Sound {
}
}//package sounds
Section 465
//HitSnd (sounds.HitSnd)
package sounds {
import flash.media.*;
public class HitSnd extends Sound {
}
}//package sounds
Section 466
//IntroMusicSnd (sounds.IntroMusicSnd)
package sounds {
import flash.media.*;
public class IntroMusicSnd extends Sound {
}
}//package sounds
Section 467
//LaserSnd (sounds.LaserSnd)
package sounds {
import flash.media.*;
public class LaserSnd extends Sound {
}
}//package sounds
Section 468
//LevelUpSnd (sounds.LevelUpSnd)
package sounds {
import flash.media.*;
public class LevelUpSnd extends Sound {
}
}//package sounds
Section 469
//MenuSnd (sounds.MenuSnd)
package sounds {
import flash.media.*;
public class MenuSnd extends Sound {
}
}//package sounds
Section 470
//MissileFlightSnd (sounds.MissileFlightSnd)
package sounds {
import flash.media.*;
public class MissileFlightSnd extends Sound {
}
}//package sounds
Section 471
//MortarExplosionSnd (sounds.MortarExplosionSnd)
package sounds {
import flash.media.*;
public class MortarExplosionSnd extends Sound {
}
}//package sounds
Section 472
//MortarFireSnd (sounds.MortarFireSnd)
package sounds {
import flash.media.*;
public class MortarFireSnd extends Sound {
}
}//package sounds
Section 473
//MusicSnd (sounds.MusicSnd)
package sounds {
import flash.media.*;
public class MusicSnd extends Sound {
}
}//package sounds
Section 474
//PlasmaSnd (sounds.PlasmaSnd)
package sounds {
import flash.media.*;
public class PlasmaSnd extends Sound {
}
}//package sounds
Section 475
//RailgunSnd (sounds.RailgunSnd)
package sounds {
import flash.media.*;
public class RailgunSnd extends Sound {
}
}//package sounds
Section 476
//ReloadSnd (sounds.ReloadSnd)
package sounds {
import flash.media.*;
public class ReloadSnd extends Sound {
}
}//package sounds
Section 477
//Shot1Snd (sounds.Shot1Snd)
package sounds {
import flash.media.*;
public class Shot1Snd extends Sound {
}
}//package sounds
Section 478
//ShotgunSnd (sounds.ShotgunSnd)
package sounds {
import flash.media.*;
public class ShotgunSnd extends Sound {
}
}//package sounds
Section 479
//MMButtonB (ui.buttons.MMButtonB)
package ui.buttons {
import flash.text.*;
import com.moonmana.ui.*;
public class MMButtonB extends MMButton {
public var label:TextField;
public function MMButtonB(_arg1:int, _arg2:int){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
super(_arg1, _arg2);
}
function frame2(){
stop();
}
function frame1(){
stop();
}
function frame3(){
stop();
}
}
}//package ui.buttons
Section 480
//MMButtonS (ui.buttons.MMButtonS)
package ui.buttons {
import flash.text.*;
import com.moonmana.ui.*;
public class MMButtonS extends MMButton {
public var label:TextField;
public function MMButtonS(_arg1:int, _arg2:int){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
super(_arg1, _arg2);
}
function frame2(){
stop();
}
function frame1(){
stop();
}
function frame3(){
stop();
}
}
}//package ui.buttons
Section 481
//MMButtonTutorial (ui.buttons.MMButtonTutorial)
package ui.buttons {
import flash.text.*;
import com.moonmana.ui.*;
public class MMButtonTutorial extends MMButton {
public var label:TextField;
public function MMButtonTutorial(_arg1:int, _arg2:int){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
super(_arg1, _arg2);
}
function frame2(){
stop();
}
function frame1(){
stop();
}
function frame3(){
stop();
}
}
}//package ui.buttons
Section 482
//MMButtonXS (ui.buttons.MMButtonXS)
package ui.buttons {
import flash.text.*;
import com.moonmana.ui.*;
public class MMButtonXS extends MMButton {
public var label:TextField;
public function MMButtonXS(_arg1:int, _arg2:int){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
super(_arg1, _arg2);
}
function frame2(){
stop();
}
function frame1(){
stop();
}
function frame3(){
stop();
}
}
}//package ui.buttons
Section 483
//CursorAttack (ui.cursors.CursorAttack)
package ui.cursors {
import flash.display.*;
public class CursorAttack extends MovieClip {
}
}//package ui.cursors
Section 484
//EEButton (ui.menus.EEButton)
package ui.menus {
import flash.display.*;
public class EEButton extends SimpleButton {
public function EEButton(_arg1:DisplayObject=null, _arg2:DisplayObject=null, _arg3:DisplayObject=null, _arg4:DisplayObject=null){
super(_arg1, _arg2, _arg3, _arg4);
}
}
}//package ui.menus
Section 485
//EscMenu (ui.menus.EscMenu)
package ui.menus {
import flash.events.*;
import main.*;
import ui.buttons.*;
public class EscMenu extends Menu {
private var Y:int;
private var _mainMenuButton:MMButtonB;
private var _soundsButton:MMButtonB;
private var X:int;
private var _resumeButton:MMButtonB;
private var _musicButton:MMButtonB;
private static const BUTTONS_X:int = 20;
public function EscMenu(_arg1:Navigator){
X = ((Main.SCREEN_WIDTH / 2) - (width / 2));
Y = ((Main.SCREEN_HEIGHT / 2) - (height / 2));
super(_arg1, X, Y);
}
private function switchSounds(_arg1:Event):void{
Main.options.switchEffects();
updateSoundsLabel();
}
private function updateSoundsLabel():void{
_soundsButton.setLabel((Main.options.effects) ? Main.bundle.getString("SOUNDS_ON") : Main.bundle.getString("SOUNDS_OFF"));
}
override public function unbindEvents():void{
_resumeButton.removeEventListener(MouseEvent.CLICK, _navigator.esc);
_mainMenuButton.removeEventListener(MouseEvent.CLICK, _navigator.goMainMenuEsc);
_soundsButton.removeEventListener(MouseEvent.CLICK, switchSounds);
_musicButton.removeEventListener(MouseEvent.CLICK, switchMusic);
}
private function switchMusic(_arg1:Event):void{
Main.options.switchMusic();
updateMusicLabel();
}
override public function bindEvents():void{
_resumeButton = new MMButtonB(BUTTONS_X, 8);
_soundsButton = new MMButtonB(BUTTONS_X, 43);
_musicButton = new MMButtonB(BUTTONS_X, 78);
_mainMenuButton = new MMButtonB(BUTTONS_X, 112);
_resumeButton.place();
_soundsButton.place();
_musicButton.place();
_mainMenuButton.place();
addChild(_resumeButton);
addChild(_soundsButton);
addChild(_musicButton);
addChild(_mainMenuButton);
_resumeButton.setLabel(Main.bundle.getString("RESUME_GAME"));
updateMusicLabel();
updateSoundsLabel();
_mainMenuButton.setLabel(Main.bundle.getString("MAIN_MENU"));
_soundsButton.addEventListener(MouseEvent.CLICK, switchSounds);
_musicButton.addEventListener(MouseEvent.CLICK, switchMusic);
_resumeButton.addEventListener(MouseEvent.CLICK, _navigator.esc);
_mainMenuButton.addEventListener(MouseEvent.CLICK, _navigator.goMainMenuEsc);
}
private function updateMusicLabel():void{
_musicButton.setLabel((Main.options.music) ? Main.bundle.getString("MUSIC_ON") : Main.bundle.getString("MUSIC_OFF"));
}
}
}//package ui.menus
Section 486
//Eventable (ui.menus.Eventable)
package ui.menus {
public interface Eventable {
function bindEvents():void;
}
}//package ui.menus
Section 487
//MainMenu (ui.menus.MainMenu)
package ui.menus {
import flash.display.*;
import flash.events.*;
import main.*;
import mochi.*;
import com.moonmana.mmad.*;
import com.moonmana.sponsors.EliteGames.*;
import utils.*;
import com.moonmana.sponsors.AG.*;
import com.moonmana.sponsors.Andkon.*;
import com.moonmana.sponsors.MoFunZone.*;
import utils.local.*;
import ui.buttons.*;
public class MainMenu extends Menu {
private var _highscores:MMButtonB;
private var _flags:FlagSelector;
private var _moreGames:MMButtonB;
private var _newGame:MMButtonB;
private var _loadGame:MMButtonB;
private var _ee:SimpleButton;
private static const X:int = 0;
private static const Y:int = 0;
public function MainMenu(_arg1:Navigator){
super(_arg1, X, Y);
}
override public function go():void{
super.go();
SoundManager.playMusic(SoundManager.MENU);
}
private function hideScoreBoard(_arg1:Event=null):void{
_navigator.stage.addChild(this);
}
override public function unbindEvents():void{
_newGame.removeEventListener(MouseEvent.CLICK, _navigator.goIntro);
_loadGame.removeEventListener(MouseEvent.CLICK, _navigator.loadGame);
if (Main.BUILD == Main.ARMOR_GAMES){
_moreGames.removeEventListener(MouseEvent.CLICK, ArmorGamesMC.goAG);
} else {
if (Main.BUILD == Main.ANDKON){
_moreGames.removeEventListener(MouseEvent.CLICK, AndkonLogo.go);
} else {
if (Main.BUILD == Main.MOFUNZONE){
_moreGames.removeEventListener(MouseEvent.CLICK, MoFunZoneSplash.go);
} else {
if (Main.BUILD == Main.ELITE_GAMES){
_moreGames.removeEventListener(MouseEvent.CLICK, EliteGames.go);
} else {
_moreGames.removeEventListener(MouseEvent.CLICK, MMAd.goMoonMana);
};
};
};
};
if (Main.BUILD != Main.MOFUNZONE){
_highscores.removeEventListener(MouseEvent.CLICK, showScoreboard);
};
if (Main.BUILD == Main.ARMOR_GAMES){
_ee.removeEventListener(MouseEvent.CLICK, ArmorGamesMC.goAG);
} else {
if (Main.BUILD == Main.ANDKON){
_ee.removeEventListener(MouseEvent.CLICK, AndkonLogo.go);
} else {
if (Main.BUILD == Main.MOFUNZONE){
_ee.removeEventListener(MouseEvent.CLICK, MoFunZoneSplash.go);
} else {
if (Main.BUILD == Main.ELITE_GAMES){
_ee.removeEventListener(MouseEvent.CLICK, EliteGames.go);
} else {
_ee.removeEventListener(MouseEvent.CLICK, MMAd.goMoonMana);
};
};
};
};
}
private function showScoreboard(_arg1:Event):void{
if (Main.BUILD == Main.ARMOR_GAMES){
AGScores.show(this, hideScoreBoard);
} else {
_navigator.stage.removeChild(this);
MochiScores.showLeaderboard({boardID:"dcfc886f78167630", onClose:hideScoreBoard});
};
}
public function translate():void{
_newGame.setLabel(Main.bundle.getString("NEW_GAME"));
_loadGame.setLabel(Main.bundle.getString("LOAD_GAME"));
_moreGames.setLabel(Main.bundle.getString("MORE_GAMES"));
_highscores.setLabel(Main.bundle.getString("HIGHSCORES"));
}
override public function bindEvents():void{
_newGame = new MMButtonB(23, 217);
_loadGame = new MMButtonB(23, 251);
_moreGames = new MMButtonB(447, 251);
_highscores = new MMButtonB(447, 217);
if (Main.BUILD == Main.ARMOR_GAMES){
_ee = new AGButton();
_ee.x = 490;
_ee.y = 364;
} else {
if (Main.BUILD == Main.MOFUNZONE){
_ee = new MoFunZoneBtn();
_ee.x = 516;
_ee.y = 380;
} else {
if (Main.BUILD == Main.ANDKON){
_ee = new AndkonLogoButton();
_ee.x = 542;
_ee.y = 386;
_ee.scaleX = 0.35;
_ee.scaleY = 0.35;
} else {
if (Main.BUILD == Main.ELITE_GAMES){
_ee = new EliteGamesBtn();
_ee.x = 410;
_ee.y = 366;
_ee.scaleX = 0.9;
_ee.scaleY = 0.9;
} else {
_ee = new EEButton();
_ee.x = 531;
_ee.y = 406;
};
};
};
};
_newGame.setLabel(Main.bundle.getString("NEW_GAME"));
_loadGame.setLabel(Main.bundle.getString("LOAD_GAME"));
_moreGames.setLabel(Main.bundle.getString("MORE_GAMES"));
_highscores.setLabel(Main.bundle.getString("HIGHSCORES"));
_newGame.place();
_loadGame.place();
_moreGames.place();
_highscores.place();
addChild(_newGame);
addChild(_moreGames);
addChild(_loadGame);
addChild(_highscores);
addChild(_ee);
_newGame.addEventListener(MouseEvent.CLICK, _navigator.goIntro);
_loadGame.addEventListener(MouseEvent.CLICK, _navigator.loadGame);
if (Main.BUILD == Main.ARMOR_GAMES){
_moreGames.addEventListener(MouseEvent.CLICK, ArmorGamesMC.goAG);
} else {
if (Main.BUILD == Main.MOFUNZONE){
_moreGames.addEventListener(MouseEvent.CLICK, MoFunZoneSplash.go);
} else {
if (Main.BUILD == Main.ANDKON){
_moreGames.addEventListener(MouseEvent.CLICK, AndkonLogo.go);
} else {
if (Main.BUILD == Main.ELITE_GAMES){
_moreGames.addEventListener(MouseEvent.CLICK, EliteGames.go);
} else {
_moreGames.addEventListener(MouseEvent.CLICK, MMAd.goMoonMana);
};
};
};
};
if (Main.BUILD != Main.MOFUNZONE){
_highscores.addEventListener(MouseEvent.CLICK, showScoreboard);
};
if (Main.BUILD == Main.ARMOR_GAMES){
_ee.addEventListener(MouseEvent.CLICK, ArmorGamesMC.goAG);
} else {
if (Main.BUILD == Main.ANDKON){
_ee.addEventListener(MouseEvent.CLICK, AndkonLogo.go);
} else {
if (Main.BUILD == Main.MOFUNZONE){
_ee.addEventListener(MouseEvent.CLICK, MoFunZoneSplash.go);
} else {
if (Main.BUILD == Main.ELITE_GAMES){
_ee.addEventListener(MouseEvent.CLICK, EliteGames.go);
} else {
_ee.addEventListener(MouseEvent.CLICK, MMAd.goMoonMana);
};
};
};
};
_flags = new FlagSelector(this);
_flags.place();
addChild(_flags);
}
override public function close():void{
super.close();
_flags.clean();
SoundManager.stopMusic();
}
}
}//package ui.menus
Section 488
//Menu (ui.menus.Menu)
package ui.menus {
import main.*;
import com.moonmana.ui.*;
public class Menu extends ScreenObject implements Eventable {
protected var _navigator:Navigator;
public function Menu(_arg1:Navigator, _arg2:int, _arg3:int){
super(_arg2, _arg3);
_navigator = _arg1;
bindEvents();
}
public function close():void{
unbindEvents();
_navigator.stage.removeChild(this);
}
public function go():void{
_navigator.stage.addChild(this);
place();
}
public function bindEvents():void{
}
public function unbindEvents():void{
}
}
}//package ui.menus
Section 489
//Animation (utils.animations.Animation)
package utils.animations {
import flash.display.*;
public class Animation extends MovieClip {
protected var parentMC:MovieClip;
public function Animation(_arg1:MovieClip){
parentMC = _arg1;
}
public function onComplete():void{
}
protected function clear():void{
}
public function tick():Boolean{
return (true);
}
}
}//package utils.animations
Section 490
//AnimationContainer (utils.animations.AnimationContainer)
package utils.animations {
public interface AnimationContainer {
function putAnimation(_arg1:Animation):void;
}
}//package utils.animations
Section 491
//Animator (utils.animations.Animator)
package utils.animations {
public class Animator {
private var anims:Array;
public function Animator(){
anims = new Array();
super();
}
public function tick():void{
var _local2:Animation;
var _local1:int = anims.length;
var _local3:uint;
while (_local3 < _local1) {
_local2 = (anims[_local3] as Animation);
if (!_local2.tick()){
anims.splice(_local3, 1);
_local3--;
_local1--;
_local2.onComplete();
};
_local3++;
};
}
public function put(_arg1:Animation):void{
anims.push(_arg1);
}
}
}//package utils.animations
Section 492
//ExplosionAnimation (utils.animations.ExplosionAnimation)
package utils.animations {
import flash.display.*;
import flash.events.*;
import utils.events.*;
public class ExplosionAnimation extends Animation {
private var booms:Array;
private var posX:int;
private var step:int;// = 0
private var generated:int;// = 0
private var finished:int;// = 0
private var posY:int;
private var count:int;// = 0
private var prevStep:int;// = 0
private static const MIN_SIZE_VARIATION:int = 50;
private static const DELAY:int = 4;
private static const POS_VARIATION:int = 10;
private static const BOOMS_COUNT_VARIATION:int = 1;
private static const BOOMS_COUNT:int = 5;
private static const MAX_SIZE_VARIATION:int = 100;
public function ExplosionAnimation(_arg1:MovieClip, _arg2:int, _arg3:int){
booms = new Array();
super(_arg1);
posX = _arg2;
posY = _arg3;
count = (BOOMS_COUNT + ((Math.random() * BOOMS_COUNT_VARIATION) * ((((Math.random() * 2) - 2) < 0)) ? -1 : 1));
finished = 0;
}
private function generateExplosion():ExplosionFire{
var _local2:int;
var _local1:ExplosionFire = new ExplosionFire();
_local2 = ((Math.random() * (MAX_SIZE_VARIATION - MIN_SIZE_VARIATION)) + MIN_SIZE_VARIATION);
var _local3:int = ((Math.random() * POS_VARIATION) * ((((Math.random() * 2) - 1) < 0)) ? -1 : 1);
var _local4:int = ((Math.random() * POS_VARIATION) * ((((Math.random() * 2) - 1) < 0)) ? -1 : 1);
_local1.x = (this.posX + _local3);
_local1.y = (this.posY + _local4);
_local1.width = (_local1.width * (_local2 / 100));
_local1.height = (_local1.height * (_local2 / 100));
_local1.addEventListener(AnimationEvent.ANIMATION_FINISHED, oneFinished);
booms.push(_local1);
return (_local1);
}
private function oneFinished(_arg1:Event):void{
(_arg1.target as ExplosionFire).removeEventListener(AnimationEvent.ANIMATION_FINISHED, oneFinished);
finished++;
}
override protected function clear():void{
var _local1:int = booms.length;
var _local2:uint;
while (_local2 < _local1) {
parentMC.removeChild(booms[_local2]);
_local2++;
};
}
override public function tick():Boolean{
if (finished >= count){
clear();
return (false);
};
step++;
if ((((generated < count)) && ((step >= prevStep)))){
prevStep = step;
parentMC.addChild(generateExplosion());
generated++;
};
return (true);
}
}
}//package utils.animations
Section 493
//ExplosionFire (utils.animations.ExplosionFire)
package utils.animations {
import flash.display.*;
import utils.events.*;
public dynamic class ExplosionFire extends MovieClip {
public function ExplosionFire(){
addFrameScript(14, frame15);
super();
}
function frame15(){
dispatchEvent(new AnimationEvent(AnimationEvent.ANIMATION_FINISHED));
stop();
}
}
}//package utils.animations
Section 494
//ExplosionParticle (utils.animations.ExplosionParticle)
package utils.animations {
import flash.display.*;
public dynamic class ExplosionParticle extends MovieClip {
private var _rotationSpeed:int;
private var _speedX:int;
private var _speedY:int;
public function set speedY(_arg1:int):void{
_speedY = _arg1;
}
public function get rotationSpeed():int{
return (_rotationSpeed);
}
public function get speedY():int{
return (_speedY);
}
public function get speedX():int{
return (_speedX);
}
public function set rotationSpeed(_arg1:int):void{
_rotationSpeed = _arg1;
}
public function set speedX(_arg1:int):void{
_speedX = _arg1;
}
}
}//package utils.animations
Section 495
//ExplosionParticlesAnimation (utils.animations.ExplosionParticlesAnimation)
package utils.animations {
import flash.display.*;
public class ExplosionParticlesAnimation extends Animation {
protected var particlesCount:int;// = 3
private var life:int;// = 0
private var particles:Array;
private var lastSmoke:int;// = 0
private static const SMOKE_LIFE_TIME:int = 13;
private static const MAX_ROTATION_SPEED:int = 180;
private static const MIN_START_SPEED_X:int = -13;
private static const MAX_START_SPEED_X:int = 13;
private static const MAX_START_SPEED_Y:int = 13;
private static const PARTICLES_COUNT:int = 3;
private static const MIN_ROTATION_SPEED:int = -180;
private static const MAX_SIZE_VARIATION:int = 130;
private static const ROTATION_FRICTION:int = 2;
private static const SPEED_VARIATION:int = 4;
private static const LIFE_TIME:int = 17;
private static const MIN_SIZE_VARIATION:int = 70;
private static const SMOKE_DELAY:int = 2;
private static const GRAVITY:int = 0;
private static const MIN_START_SPEED_Y:int = -13;
private static const PARTICLES_COUNT_VARIATION:int = 1;
public function ExplosionParticlesAnimation(_arg1:MovieClip, _arg2:int, _arg3:int, _arg4:int=3){
var _local10:int;
var _local12:ExplosionParticle;
particles = new Array();
super(_arg1);
this.particlesCount = _arg4;
var _local5:int = (_arg4 + ((Math.random() * PARTICLES_COUNT_VARIATION) * ((Math.random() > 0.5)) ? -1 : 1));
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
_local10 = 1;
var _local11:uint;
while (_local11 < _local5) {
_local12 = new ExplosionParticle();
_local6 = ((Math.random() * (MAX_START_SPEED_X - MIN_START_SPEED_X)) + MIN_START_SPEED_X);
_local7 = ((Math.random() * (MAX_START_SPEED_Y - MIN_START_SPEED_Y)) + MIN_START_SPEED_Y);
_local9 = ((Math.random() * (MAX_ROTATION_SPEED - MIN_ROTATION_SPEED)) + MIN_ROTATION_SPEED);
_local10 = ((Math.random() * (MAX_SIZE_VARIATION - MIN_SIZE_VARIATION)) + MIN_SIZE_VARIATION);
_local12.speedX = _local6;
_local12.speedY = _local7;
_local12.rotationSpeed = _local9;
_local12.x = _arg2;
_local12.y = _arg3;
_local12.rotation = (Math.random() * 360);
_local12.width = (_local12.width * (_local10 / 100));
_local12.height = (_local12.height * (_local10 / 100));
particles.push(_local12);
parentMC.addChild(_local12);
_local11++;
};
life = 0;
}
override protected function clear():void{
var _local1:int = particles.length;
var _local2:uint;
while (_local2 < _local1) {
parentMC.removeChild(particles[_local2]);
_local2++;
};
}
private function updateSpeeds():void{
var _local3:ExplosionParticle;
var _local1:int = particles.length;
var _local2:uint;
while (_local2 < _local1) {
_local3 = (particles[_local2] as ExplosionParticle);
if (((((((((_local3.x - _local3.speedX) < 0)) || (((_local3.x + _local3.speedX) > parentMC.width)))) || (((_local3.y - _local3.speedY) < 0)))) || (((_local3.y + _local3.speedY) > parentMC.height)))){
parentMC.removeChild(particles[_local2]);
particles.splice(_local2, 1);
_local2--;
_local1--;
} else {
_local3.speedY = (_local3.speedY + GRAVITY);
_local3.x = (_local3.x + _local3.speedX);
_local3.y = (_local3.y + _local3.speedY);
if (_local3.rotationSpeed != 0){
if (_local3.rotationSpeed > 0){
_local3.rotationSpeed = (((_local3.rotationSpeed - ROTATION_FRICTION))<0) ? 0 : (_local3.rotationSpeed - ROTATION_FRICTION);
} else {
_local3.rotationSpeed = (((_local3.rotationSpeed + ROTATION_FRICTION))>0) ? 0 : (_local3.rotationSpeed + ROTATION_FRICTION);
};
};
_local3.rotation = (_local3.rotation + _local3.rotationSpeed);
};
_local2++;
};
}
private function emitSmoke():void{
var _local3:ExplosionParticle;
var _local1:int = particles.length;
var _local2:uint;
while (_local2 < _local1) {
_local3 = (particles[_local2] as ExplosionParticle);
if ((((((((_local3.x >= 0)) && ((_local3.x < parentMC.width)))) && ((_local3.y >= 0)))) && ((_local3.y < parentMC.height)))){
(parentMC as AnimationContainer).putAnimation(new SmokeAnimation(parentMC, _local3.x, _local3.y));
};
_local2++;
};
}
override public function tick():Boolean{
if (life >= LIFE_TIME){
clear();
return (false);
};
life++;
lastSmoke++;
if ((((life <= SMOKE_LIFE_TIME)) && ((lastSmoke >= SMOKE_DELAY)))){
emitSmoke();
lastSmoke = 0;
};
updateSpeeds();
return (true);
}
}
}//package utils.animations
Section 496
//ExplosionSmoke (utils.animations.ExplosionSmoke)
package utils.animations {
import flash.display.*;
import utils.events.*;
public dynamic class ExplosionSmoke extends MovieClip {
public function ExplosionSmoke(){
addFrameScript(16, frame17);
super();
}
function frame17(){
dispatchEvent(new AnimationEvent(AnimationEvent.ANIMATION_FINISHED));
stop();
}
}
}//package utils.animations
Section 497
//ExplosionTrace (utils.animations.ExplosionTrace)
package utils.animations {
import map.*;
import map.units.unit.*;
import map.utils.*;
public class ExplosionTrace extends DyingMapMovieClip {
public function ExplosionTrace(_arg1:Map, _arg2:Number, _arg3:Number){
addFrameScript(185, frame186);
super(_arg1);
addEventListener(UnitEvent.DEAD, die);
rotation = (Math.random() * 360);
this.x = _arg2;
this.y = _arg3;
_map.addChildAt(this, 2);
}
function frame186(){
dispatchEvent(new UnitEvent(UnitEvent.DEAD));
}
}
}//package utils.animations
Section 498
//SmokeAnimation (utils.animations.SmokeAnimation)
package utils.animations {
import flash.display.*;
import flash.events.*;
import utils.events.*;
public class SmokeAnimation extends Animation {
private var finished:Boolean;// = false
private var life:int;// = 0
private var es:ExplosionSmoke;
private static const MAX_SIZE_VARIATION:int = 80;
private static const MIN_SIZE_VARIATION:int = 30;
private static const LIFE_TIME:int = 30;
public function SmokeAnimation(_arg1:MovieClip, _arg2:int, _arg3:int){
var _local4:int;
super(_arg1);
es = new ExplosionSmoke();
_local4 = ((Math.random() * (MAX_SIZE_VARIATION - MIN_SIZE_VARIATION)) + MIN_SIZE_VARIATION);
es.x = _arg2;
es.y = _arg3;
es.width = (es.width * (_local4 / 100));
es.height = (es.height * (_local4 / 100));
_arg1.addChild(es);
es.addEventListener(AnimationEvent.ANIMATION_FINISHED, finish);
}
override protected function clear():void{
parentMC.removeChild(es);
}
private function finish(_arg1:Event):void{
finished = true;
es.removeEventListener(AnimationEvent.ANIMATION_FINISHED, finish);
}
override public function tick():Boolean{
if (finished){
clear();
return (false);
};
return (true);
}
}
}//package utils.animations
Section 499
//Console (utils.debug.Console)
package utils.debug {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import com.moonmana.ui.*;
import main.*;
public class Console extends ScreenObject {
private var _showen:Boolean;// = false
private var isKeyDown:Boolean;// = false
private var _enter:Boolean;// = false
public var console:MovieClip;
public function Console(){
addFrameScript(0, frame1, 6, frame7);
super(0, -20);
place();
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
addEventListener(Event.ENTER_FRAME, handleKeys);
(getMC("console").getChildByName("txt") as TextField).text = "";
}
public function isOn():Boolean{
return (_showen);
}
public function hide():void{
_showen = false;
gotoAndPlay("hide");
}
function frame1(){
stop();
stop();
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 13){
_enter = true;
};
}
private function keyUpHandler(_arg1:KeyboardEvent):void{
isKeyDown = false;
if (_arg1.keyCode == 13){
_enter = false;
};
}
function frame7(){
stop();
}
private function submit():void{
var _local1:TextField = (getMC("console").getChildByName("txt") as TextField);
var _local2:String = _local1.text.substring(0, (_local1.text.length - 1));
_local1.text = "";
if (_local2 == "bug"){
} else {
if (_local2 == "armageddon"){
} else {
if (_local2 == "debug"){
Main.debug = !(Main.debug);
};
};
};
}
private function handleKeys(_arg1:Event):void{
if (((_enter) && (!(isKeyDown)))){
isKeyDown = true;
submit();
};
}
public function show():void{
_showen = true;
gotoAndPlay("show");
}
public function showHide():void{
if (_showen){
hide();
} else {
show();
};
}
}
}//package utils.debug
Section 500
//Debug (utils.debug.Debug)
package utils.debug {
import flash.display.*;
public class Debug {
public static function drawLine(_arg1:MovieClip, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{
var _local6:MovieClip = new MovieClip();
_local6.graphics.lineStyle(2, 0xFF0000);
_local6.graphics.moveTo(_arg2, _arg3);
_local6.graphics.lineTo(_arg4, _arg5);
_arg1.addChild(_local6);
}
public static function getCircle(_arg1:int):MovieClip{
var _local2:MovieClip = new MovieClip();
_local2.graphics.lineStyle(2, 0xFF00);
_local2.graphics.drawCircle(0, 0, Math.sqrt(_arg1));
return (_local2);
}
}
}//package utils.debug
Section 501
//FPSBox (utils.debug.FPSBox)
package utils.debug {
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
public class FPSBox extends TextField {
private var frame:uint;// = 0
public function FPSBox():void{
textColor = 0xFF0000;
autoSize = "left";
addEventListener("enterFrame", everyFrame, false, 0, true);
}
private function everyFrame(_arg1:Event):void{
frame++;
var _local2:Number = (getTimer() / 1000);
text = (((Number((frame / _local2)).toPrecision(5) + " FPS, ") + Number((System.totalMemory / 1000000)).toPrecision(3)) + " MB");
}
public function deconstruct():void{
removeEventListener("enterFrame", everyFrame);
delete ??getglobalscope
[this];
}
public static function traceMemory(_arg1:String):void{
trace((((_arg1 + ": ") + Number((System.totalMemory / 1000000)).toPrecision(3)) + " MB"));
}
}
}//package utils.debug
Section 502
//AnimationEvent (utils.events.AnimationEvent)
package utils.events {
import flash.events.*;
public class AnimationEvent extends Event {
public static const ANIMATION_FINISHED:String = "animationFinished";
public function AnimationEvent(_arg1:String){
super(_arg1, true, false);
}
}
}//package utils.events
Section 503
//StageEvent (utils.events.StageEvent)
package utils.events {
import flash.events.*;
public class StageEvent extends Event {
public static const LOADING_FINISHED:String = "loadingFinished";
public function StageEvent(_arg1:String){
super(_arg1, true, false);
}
}
}//package utils.events
Section 504
//BrFlag (utils.local.BrFlag)
package utils.local {
public class BrFlag extends Flag {
public function BrFlag(){
addFrameScript(0, frame1, 1, frame2);
super();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package utils.local
Section 505
//DeFlag (utils.local.DeFlag)
package utils.local {
public class DeFlag extends Flag {
public function DeFlag(){
addFrameScript(0, frame1, 1, frame2);
super();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package utils.local
Section 506
//DuFlag (utils.local.DuFlag)
package utils.local {
public class DuFlag extends Flag {
public function DuFlag(){
addFrameScript(0, frame1, 1, frame2);
super();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package utils.local
Section 507
//EnFlag (utils.local.EnFlag)
package utils.local {
public class EnFlag extends Flag {
public function EnFlag(){
addFrameScript(0, frame1, 1, frame2);
super();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package utils.local
Section 508
//Flag (utils.local.Flag)
package utils.local {
import flash.display.*;
import flash.events.*;
public class Flag extends MovieClip {
public function Flag(){
addEventListener(MouseEvent.MOUSE_OVER, over);
addEventListener(MouseEvent.MOUSE_OUT, out);
buttonMode = true;
gotoAndStop(1);
}
public function clean():void{
removeEventListener(MouseEvent.MOUSE_OVER, over);
removeEventListener(MouseEvent.MOUSE_OUT, out);
}
private function over(_arg1:MouseEvent):void{
gotoAndStop(2);
}
private function out(_arg1:MouseEvent):void{
gotoAndStop(1);
}
}
}//package utils.local
Section 509
//FlagSelector (utils.local.FlagSelector)
package utils.local {
import flash.events.*;
import main.*;
import com.moonmana.ui.*;
import ui.menus.*;
public class FlagSelector extends ScreenObject {
public var de:DeFlag;
public var ru:RuFlag;
public var en:EnFlag;
public var it:ItFlag;
public var br:BrFlag;
public var du:DuFlag;
private var _mainMenu:MainMenu;
public function FlagSelector(_arg1:MainMenu){
super(6, 421);
_mainMenu = _arg1;
getMC("en").addEventListener(MouseEvent.CLICK, translateEn);
getMC("de").addEventListener(MouseEvent.CLICK, translateDe);
getMC("it").addEventListener(MouseEvent.CLICK, translateIt);
getMC("ru").addEventListener(MouseEvent.CLICK, translateRu);
getMC("br").addEventListener(MouseEvent.CLICK, translateBr);
getMC("du").addEventListener(MouseEvent.CLICK, translateDu);
}
private function translateBr(_arg1:MouseEvent):void{
Main.options.setLanguage(Options.LANGUAGE_BR);
_mainMenu.translate();
}
private function translateDe(_arg1:MouseEvent):void{
Main.options.setLanguage(Options.LANGUAGE_DE);
_mainMenu.translate();
}
private function translateRu(_arg1:MouseEvent):void{
Main.options.setLanguage(Options.LANGUAGE_RU);
_mainMenu.translate();
}
private function translateIt(_arg1:MouseEvent):void{
Main.options.setLanguage(Options.LANGUAGE_IT);
_mainMenu.translate();
}
public function clean():void{
(getMC("en") as Flag).clean();
(getMC("it") as Flag).clean();
(getMC("ru") as Flag).clean();
(getMC("br") as Flag).clean();
(getMC("du") as Flag).clean();
getMC("en").removeEventListener(MouseEvent.CLICK, translateEn);
getMC("it").removeEventListener(MouseEvent.CLICK, translateIt);
getMC("ru").removeEventListener(MouseEvent.CLICK, translateRu);
getMC("br").removeEventListener(MouseEvent.CLICK, translateBr);
getMC("du").removeEventListener(MouseEvent.CLICK, translateDu);
}
private function translateEn(_arg1:MouseEvent):void{
Main.options.setLanguage(Options.LANGUAGE_EN);
_mainMenu.translate();
}
private function translateDu(_arg1:MouseEvent):void{
Main.options.setLanguage(Options.LANGUAGE_DU);
_mainMenu.translate();
}
}
}//package utils.local
Section 510
//ItFlag (utils.local.ItFlag)
package utils.local {
public class ItFlag extends Flag {
public function ItFlag(){
addFrameScript(0, frame1, 1, frame2);
super();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package utils.local
Section 511
//RuFlag (utils.local.RuFlag)
package utils.local {
public class RuFlag extends Flag {
public function RuFlag(){
addFrameScript(0, frame1, 1, frame2);
super();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package utils.local
Section 512
//SoundManager (utils.SoundManager)
package utils {
import flash.events.*;
import main.*;
import flash.media.*;
import sounds.*;
import sounds.deaths.*;
import sounds.movement.*;
public class SoundManager {
public static var LAVA_BUG_MOTHER_MOVE:LavaBugMoveSnd;
public static var ICER_SMALL_DEATH:IcerSmallDeathSnd;
public static var MUSIC:MusicSnd;
public static var LAVA_BUG_DEATH:LavaBugDeathSnd;
public static var HOVER_MOVE:HoverMoveSnd;
public static var GOLEM_STEP:GolemStepSnd;
public static var GOLEM_MOVE:GolemMoveSnd;
private static var music:SoundChannel;
public static var MANTIS_MOVE:MantisMoveSnd;
private static var currentMusic:Sound;
public static var BIG_FOOT_DEATH_1:BigFootDeath1Snd;
public static var BIG_FOOT_DEATH_2:BigFootDeath2Snd;
public static var FOOTSTEP:FootstepSnd;
public static var EPIC_EXPLOSION:EpicExplosionSnd;
public static var INSECT_DEATH:InsectDeathSnd;
public static var PLASMA:PlasmaSnd;
public static var RAILGUN:RailgunSnd;
public static var INTRO_MUSIC:IntroMusicSnd;
public static var LAVA_BUG_MOVE:LavaBugMoveSnd;
public static var ICER_DEATH:IcerDeathSnd;
public static var BUG1:Bug1Snd;
public static var BUG2:Bug2Snd;
public static var MENU:MenuSnd;
public static var BUG4:Bug4Snd;
public static var BUG5:Bug5Snd;
public static var LAVA_BUG_MOTHER_DEATH:LavaBugMotherDeathSnd;
public static var BIG_FOOT_MOVE:BigFootMoveSnd;
public static var LEVEL_UP:LevelUpSnd;
public static var BUG3:Bug3Snd;
public static var GOLEM_DEATH:GolemDeathSnd;
public static var PICK_ITEM:GetBonusSnd;
public static var HIT:HitSnd;
public static var SHOT1:Shot1Snd;
public static var WISP_MOVE:WispMoveSnd;
public static var INSECT_MOVE_2:InsectMove2Snd;
public static var INSECT_MOVE_3:InsectMove3Snd;
public static var SPIDER_DEATH:SpiderDeathSnd;
public static var INSECT_MOVE_1:InsectMove1Snd;
public static var SMALL_INSECT_DEATH:SmallInsectDeathSnd;
public static var RELOAD:ReloadSnd;
public static var MORTAR_FIRE:MortarFireSnd;
public static var LASER:LaserSnd;
public static var INSECT_DEATH_2:InsectDeath2Snd;
public static var MISSILE_FLIGHT:MissileFlightSnd;
public static var MORTAR_EXPLOSION:MortarExplosionSnd;
public static var SCATE_MOVE:ScateMoveSnd;
public static var ICER_MOVE:IcerMoveSnd;
public static var WISP_DEATH:WispDeathSnd;
public static var TECH_MOVE:TechMoveSnd;
public static var QUEEN_DEATH:QueenDeathSnd;
public static var SLEAZOID_DEATH:SleazoidDeathSnd;
public static var SHOTGUN:ShotgunSnd;
public static var BIG_FOOT_STONE:BigFootStoneThrowSnd;
public static var SCATE_DEATH:ScateDeathSnd;
public static function play(_arg1:Sound):void{
if (Main.options.effects){
_arg1.play();
};
}
public static function playMusic(_arg1:Sound=null):void{
stopMusic();
if (Main.options.music){
if (_arg1 == null){
currentMusic = MUSIC;
} else {
currentMusic = _arg1;
};
music = currentMusic.play(0, 0);
music.addEventListener(Event.SOUND_COMPLETE, playSoundTrack);
};
}
public static function stopMusic():void{
if (music != null){
music.stop();
};
}
public static function loadSounds():void{
MUSIC = new MusicSnd();
SHOT1 = new Shot1Snd();
SHOTGUN = new ShotgunSnd();
RAILGUN = new RailgunSnd();
LASER = new LaserSnd();
BUG1 = new Bug1Snd();
BUG2 = new Bug2Snd();
BUG3 = new Bug3Snd();
BUG4 = new Bug4Snd();
BUG5 = new Bug5Snd();
HIT = new HitSnd();
PICK_ITEM = new GetBonusSnd();
LEVEL_UP = new LevelUpSnd();
MENU = new MenuSnd();
MISSILE_FLIGHT = new MissileFlightSnd();
MORTAR_EXPLOSION = new MortarExplosionSnd();
MORTAR_FIRE = new MortarFireSnd();
PLASMA = new PlasmaSnd();
RELOAD = new ReloadSnd();
BIG_FOOT_STONE = new BigFootStoneThrowSnd();
EPIC_EXPLOSION = new EpicExplosionSnd();
BIG_FOOT_DEATH_1 = new BigFootDeath1Snd();
BIG_FOOT_DEATH_2 = new BigFootDeath2Snd();
LAVA_BUG_DEATH = new LavaBugDeathSnd();
LAVA_BUG_MOTHER_DEATH = new LavaBugMotherDeathSnd();
GOLEM_DEATH = new GolemDeathSnd();
ICER_DEATH = new IcerDeathSnd();
ICER_SMALL_DEATH = new IcerSmallDeathSnd();
INSECT_DEATH = new InsectDeathSnd();
SMALL_INSECT_DEATH = new SmallInsectDeathSnd();
INSECT_DEATH_2 = new InsectDeath2Snd();
QUEEN_DEATH = new QueenDeathSnd();
SCATE_DEATH = new ScateDeathSnd();
SLEAZOID_DEATH = new SleazoidDeathSnd();
WISP_DEATH = new WispDeathSnd();
SPIDER_DEATH = new SpiderDeathSnd();
INTRO_MUSIC = new IntroMusicSnd();
FOOTSTEP = new FootstepSnd();
BIG_FOOT_MOVE = new BigFootMoveSnd();
HOVER_MOVE = new HoverMoveSnd();
ICER_MOVE = new IcerMoveSnd();
INSECT_MOVE_1 = new InsectMove1Snd();
INSECT_MOVE_2 = new InsectMove2Snd();
INSECT_MOVE_3 = new InsectMove3Snd();
LAVA_BUG_MOVE = new LavaBugMoveSnd();
MANTIS_MOVE = new MantisMoveSnd();
TECH_MOVE = new TechMoveSnd();
LAVA_BUG_MOTHER_MOVE = new LavaBugMoveSnd();
GOLEM_MOVE = new GolemMoveSnd();
GOLEM_STEP = new GolemStepSnd();
SCATE_MOVE = new ScateMoveSnd();
WISP_MOVE = new WispMoveSnd();
}
private static function playSoundTrack(_arg1:Event=null):void{
music.stop();
music.removeEventListener(Event.SOUND_COMPLETE, playSoundTrack);
music = currentMusic.play(0, 0);
music.addEventListener(Event.SOUND_COMPLETE, playSoundTrack);
}
}
}//package utils