Section 1
//NewgroundsAPIAsset_API_Conencted_4 (APIConnector_fla.NewgroundsAPIAsset_API_Conencted_4)
package APIConnector_fla {
import flash.display.*;
import com.newgrounds.components.*;
public dynamic class NewgroundsAPIAsset_API_Conencted_4 extends MovieClip {
public function NewgroundsAPIAsset_API_Conencted_4(){
addFrameScript(36, this.frame37);
}
function frame37(){
APIConnector(parent).clear();
}
}
}//package APIConnector_fla
Section 2
//NewgroundsAPIAsset_ConnectingAPI_2 (APIConnector_fla.NewgroundsAPIAsset_ConnectingAPI_2)
package APIConnector_fla {
import flash.display.*;
public dynamic class NewgroundsAPIAsset_ConnectingAPI_2 extends MovieClip {
public function NewgroundsAPIAsset_ConnectingAPI_2(){
addFrameScript(9, this.frame10);
}
function frame10(){
stop();
}
}
}//package APIConnector_fla
Section 3
//NewgroundsAPIAsset_Connection_Error_7 (APIConnector_fla.NewgroundsAPIAsset_Connection_Error_7)
package APIConnector_fla {
import flash.display.*;
import com.newgrounds.components.*;
public dynamic class NewgroundsAPIAsset_Connection_Error_7 extends MovieClip {
public function NewgroundsAPIAsset_Connection_Error_7(){
addFrameScript(9, this.frame10, 20, this.frame21);
}
function frame10(){
stop();
}
function frame21(){
APIConnector(parent).clear();
}
}
}//package APIConnector_fla
Section 4
//NewgroundsAPIAsset_Load_Indicator_3 (APIConnector_fla.NewgroundsAPIAsset_Load_Indicator_3)
package APIConnector_fla {
import flash.display.*;
import flash.events.*;
public dynamic class NewgroundsAPIAsset_Load_Indicator_3 extends MovieClip {
public function NewgroundsAPIAsset_Load_Indicator_3(){
addFrameScript(0, this.frame1);
}
public function onEnterFrame(_arg1:Event):void{
if (((visible) && (stage))){
rotation = (rotation + 30);
} else {
removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
};
}
function frame1(){
addEventListener(Event.ENTER_FRAME, this.onEnterFrame);
}
}
}//package APIConnector_fla
Section 5
//NewgroundsAPIAsset_Login_Warning_5 (APIConnector_fla.NewgroundsAPIAsset_Login_Warning_5)
package APIConnector_fla {
import flash.display.*;
import com.newgrounds.components.*;
public dynamic class NewgroundsAPIAsset_Login_Warning_5 extends MovieClip {
public function NewgroundsAPIAsset_Login_Warning_5(){
addFrameScript(9, this.frame10, 20, this.frame21);
}
function frame10(){
stop();
}
function frame21(){
APIConnector(parent).clear();
}
}
}//package APIConnector_fla
Section 6
//MD5 (com.adobe.crypto.MD5)
package com.adobe.crypto {
import flash.utils.*;
import com.adobe.utils.*;
public class MD5 {
public static var digest:ByteArray;
public static function hash(_arg1:String):String{
var _local2:ByteArray = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (hashBinary(_local2));
}
public static function hashBytes(_arg1:ByteArray):String{
return (hashBinary(_arg1));
}
public static function hashBinary(_arg1:ByteArray):String{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local2 = 1732584193;
var _local3 = -271733879;
var _local4 = -1732584194;
var _local5 = 271733878;
var _local10:Array = createBlocks(_arg1);
var _local11:int = _local10.length;
var _local12:int;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 1))], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 3))], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 5))], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 7))], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 9))], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 11))], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 13))], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 15))], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 6))], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 0))], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 10))], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 4))], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 14))], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 8))], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 2))], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 12))], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 8))], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 14))], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 4))], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 10))], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 0))], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 6))], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 12))], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 2))], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 7))], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 5))], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 3))], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 1))], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 15))], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 13))], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 11))], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 9))], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
digest = new ByteArray();
digest.writeInt(_local2);
digest.writeInt(_local3);
digest.writeInt(_local4);
digest.writeInt(_local5);
digest.position = 0;
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function createBlocks(_arg1:ByteArray):Array{
var _local2:Array = new Array();
var _local3:int = (_arg1.length * 8);
var _local4 = 0xFF;
var _local5:int;
while (_local5 < _local3) {
_local2[int((_local5 >> 5))] = (_local2[int((_local5 >> 5))] | ((_arg1[(_local5 / 8)] & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[int((_local3 >> 5))] = (_local2[int((_local3 >> 5))] | (128 << (_local3 % 32)));
_local2[int(((((_local3 + 64) >>> 9) << 4) + 14))] = _local3;
return (_local2);
}
}
}//package com.adobe.crypto
Section 7
//PNGEncoder (com.adobe.images.PNGEncoder)
package com.adobe.images {
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class PNGEncoder {
private static var crcTable:Array;
private static var crcTableComputed:Boolean = false;
public static function encode(_arg1:BitmapData):ByteArray{
var _local6:uint;
var _local7:int;
var _local2:ByteArray = new ByteArray();
_local2.writeUnsignedInt(2303741511);
_local2.writeUnsignedInt(218765834);
var _local3:ByteArray = new ByteArray();
_local3.writeInt(_arg1.width);
_local3.writeInt(_arg1.height);
_local3.writeUnsignedInt(134610944);
_local3.writeByte(0);
writeChunk(_local2, 1229472850, _local3);
var _local4:ByteArray = new ByteArray();
var _local5:int;
while (_local5 < _arg1.height) {
_local4.writeByte(0);
if (!_arg1.transparent){
_local7 = 0;
while (_local7 < _arg1.width) {
_local6 = _arg1.getPixel(_local7, _local5);
_local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | 0xFF)));
_local7++;
};
} else {
_local7 = 0;
while (_local7 < _arg1.width) {
_local6 = _arg1.getPixel32(_local7, _local5);
_local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | (_local6 >>> 24))));
_local7++;
};
};
_local5++;
};
_local4.compress();
writeChunk(_local2, 1229209940, _local4);
writeChunk(_local2, 1229278788, null);
return (_local2);
}
private static function writeChunk(_arg1:ByteArray, _arg2:uint, _arg3:ByteArray):void{
var _local8:uint;
var _local9:uint;
var _local10:uint;
if (!crcTableComputed){
crcTableComputed = true;
crcTable = [];
_local9 = 0;
while (_local9 < 0x0100) {
_local8 = _local9;
_local10 = 0;
while (_local10 < 8) {
if ((_local8 & 1)){
_local8 = uint((uint(3988292384) ^ uint((_local8 >>> 1))));
} else {
_local8 = uint((_local8 >>> 1));
};
_local10++;
};
crcTable[_local9] = _local8;
_local9++;
};
};
var _local4:uint;
if (_arg3 != null){
_local4 = _arg3.length;
};
_arg1.writeUnsignedInt(_local4);
var _local5:uint = _arg1.position;
_arg1.writeUnsignedInt(_arg2);
if (_arg3 != null){
_arg1.writeBytes(_arg3);
};
var _local6:uint = _arg1.position;
_arg1.position = _local5;
_local8 = 4294967295;
var _local7:int;
while (_local7 < (_local6 - _local5)) {
_local8 = uint((crcTable[((_local8 ^ _arg1.readUnsignedByte()) & uint(0xFF))] ^ uint((_local8 >>> 8))));
_local7++;
};
_local8 = uint((_local8 ^ uint(4294967295)));
_arg1.position = _local6;
_arg1.writeUnsignedInt(_local8);
}
}
}//package com.adobe.images
Section 8
//JSON (com.adobe.serialization.json.JSON)
package com.adobe.serialization.json {
public class JSON {
public static function encode(_arg1:Object):String{
var _local2:JSONEncoder = new JSONEncoder(_arg1);
return (_local2.getString());
}
public static function decode(_arg1:String){
var _local2:JSONDecoder = new JSONDecoder(_arg1);
return (_local2.getValue());
}
}
}//package com.adobe.serialization.json
Section 9
//JSONDecoder (com.adobe.serialization.json.JSONDecoder)
package com.adobe.serialization.json {
public class JSONDecoder {
private var value;
private var tokenizer:JSONTokenizer;
private var token:JSONToken;
public function JSONDecoder(_arg1:String){
this.tokenizer = new JSONTokenizer(_arg1);
this.nextToken();
this.value = this.parseValue();
}
public function getValue(){
return (this.value);
}
private function nextToken():JSONToken{
return ((this.token = this.tokenizer.getNextToken()));
}
private function parseArray():Array{
var _local1:Array = new Array();
this.nextToken();
if (this.token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
while (true) {
_local1.push(this.parseValue());
this.nextToken();
if (this.token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
if (this.token.type == JSONTokenType.COMMA){
this.nextToken();
} else {
this.tokenizer.parseError(("Expecting ] or , but found " + this.token.value));
};
};
return (null);
}
private function parseObject():Object{
var _local2:String;
var _local1:Object = new Object();
this.nextToken();
if (this.token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
while (true) {
if (this.token.type == JSONTokenType.STRING){
_local2 = String(this.token.value);
this.nextToken();
if (this.token.type == JSONTokenType.COLON){
this.nextToken();
_local1[_local2] = this.parseValue();
this.nextToken();
if (this.token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
if (this.token.type == JSONTokenType.COMMA){
this.nextToken();
} else {
this.tokenizer.parseError(("Expecting } or , but found " + this.token.value));
};
} else {
this.tokenizer.parseError(("Expecting : but found " + this.token.value));
};
} else {
this.tokenizer.parseError(("Expecting string but found " + this.token.value));
};
};
return (null);
}
private function parseValue():Object{
if (this.token == null){
this.tokenizer.parseError("Unexpected end of input");
};
switch (this.token.type){
case JSONTokenType.LEFT_BRACE:
return (this.parseObject());
case JSONTokenType.LEFT_BRACKET:
return (this.parseArray());
case JSONTokenType.STRING:
case JSONTokenType.NUMBER:
case JSONTokenType.TRUE:
case JSONTokenType.FALSE:
case JSONTokenType.NULL:
return (this.token.value);
default:
this.tokenizer.parseError(("Unexpected " + this.token.value));
};
return (null);
}
}
}//package com.adobe.serialization.json
Section 10
//JSONEncoder (com.adobe.serialization.json.JSONEncoder)
package com.adobe.serialization.json {
import flash.utils.*;
public class JSONEncoder {
private var jsonString:String;
public function JSONEncoder(_arg1){
this.jsonString = this.convertToString(_arg1);
}
public function getString():String{
return (this.jsonString);
}
private function convertToString(_arg1):String{
if ((_arg1 is String)){
return (this.escapeString((_arg1 as String)));
};
if ((_arg1 is Number)){
return ((isFinite((_arg1 as Number))) ? _arg1.toString() : "null");
} else {
if ((_arg1 is Boolean)){
return ((_arg1) ? "true" : "false");
} else {
if ((_arg1 is Array)){
return (this.arrayToString((_arg1 as Array)));
};
if ((((_arg1 is Object)) && (!((_arg1 == null))))){
return (this.objectToString(_arg1));
};
};
};
return ("null");
}
private function escapeString(_arg1:String):String{
var _local3:String;
var _local6:String;
var _local7:String;
var _local2 = "";
var _local4:Number = _arg1.length;
var _local5:int;
while (_local5 < _local4) {
_local3 = _arg1.charAt(_local5);
switch (_local3){
case "\"":
_local2 = (_local2 + "\\\"");
break;
case "\\":
_local2 = (_local2 + "\\\\");
break;
case "\b":
_local2 = (_local2 + "\\b");
break;
case "\f":
_local2 = (_local2 + "\\f");
break;
case "\n":
_local2 = (_local2 + "\\n");
break;
case "\r":
_local2 = (_local2 + "\\r");
break;
case "\t":
_local2 = (_local2 + "\\t");
break;
default:
if (_local3 < " "){
_local6 = _local3.charCodeAt(0).toString(16);
_local7 = ((_local6.length == 2)) ? "00" : "000";
_local2 = (_local2 + (("\\u" + _local7) + _local6));
} else {
_local2 = (_local2 + _local3);
};
};
_local5++;
};
return ((("\"" + _local2) + "\""));
}
private function arrayToString(_arg1:Array):String{
var _local2 = "";
var _local3:int;
while (_local3 < _arg1.length) {
if (_local2.length > 0){
_local2 = (_local2 + ",");
};
_local2 = (_local2 + this.convertToString(_arg1[_local3]));
_local3++;
};
return ((("[" + _local2) + "]"));
}
private function objectToString(_arg1:Object):String{
var value:Object;
var key:String;
var v:XML;
var o = _arg1;
var s = "";
var classInfo:XML = describeType(o);
if (classInfo.@name.toString() == "Object"){
for (key in o) {
value = o[key];
if ((value is Function)){
} else {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((this.escapeString(key) + ":") + this.convertToString(value)));
};
};
} else {
for each (v in classInfo..*.(((name() == "variable")) || ((name() == "accessor")))) {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((this.escapeString(v.@name.toString()) + ":") + this.convertToString(o[v.@name])));
};
};
return ((("{" + s) + "}"));
}
}
}//package com.adobe.serialization.json
Section 11
//JSONParseError (com.adobe.serialization.json.JSONParseError)
package com.adobe.serialization.json {
public class JSONParseError extends Error {
private var _location:int;
private var _text:String;
public function JSONParseError(_arg1:String="", _arg2:int=0, _arg3:String=""){
super(_arg1);
name = "JSONParseError";
this._location = _arg2;
this._text = _arg3;
}
public function get location():int{
return (this._location);
}
public function get text():String{
return (this._text);
}
}
}//package com.adobe.serialization.json
Section 12
//JSONToken (com.adobe.serialization.json.JSONToken)
package com.adobe.serialization.json {
public class JSONToken {
private var _type:int;
private var _value:Object;
public function JSONToken(_arg1:int=-1, _arg2:Object=null){
this._type = _arg1;
this._value = _arg2;
}
public function get type():int{
return (this._type);
}
public function set type(_arg1:int):void{
this._type = _arg1;
}
public function get value():Object{
return (this._value);
}
public function set value(_arg1:Object):void{
this._value = _arg1;
}
}
}//package com.adobe.serialization.json
Section 13
//JSONTokenizer (com.adobe.serialization.json.JSONTokenizer)
package com.adobe.serialization.json {
public class JSONTokenizer {
private var obj:Object;
private var jsonString:String;
private var loc:int;
private var ch:String;
public function JSONTokenizer(_arg1:String){
this.jsonString = _arg1;
this.loc = 0;
this.nextChar();
}
public function getNextToken():JSONToken{
var _local2:String;
var _local3:String;
var _local4:String;
var _local1:JSONToken = new JSONToken();
this.skipIgnored();
switch (this.ch){
case "{":
_local1.type = JSONTokenType.LEFT_BRACE;
_local1.value = "{";
this.nextChar();
break;
case "}":
_local1.type = JSONTokenType.RIGHT_BRACE;
_local1.value = "}";
this.nextChar();
break;
case "[":
_local1.type = JSONTokenType.LEFT_BRACKET;
_local1.value = "[";
this.nextChar();
break;
case "]":
_local1.type = JSONTokenType.RIGHT_BRACKET;
_local1.value = "]";
this.nextChar();
break;
case ",":
_local1.type = JSONTokenType.COMMA;
_local1.value = ",";
this.nextChar();
break;
case ":":
_local1.type = JSONTokenType.COLON;
_local1.value = ":";
this.nextChar();
break;
case "t":
_local2 = ((("t" + this.nextChar()) + this.nextChar()) + this.nextChar());
if (_local2 == "true"){
_local1.type = JSONTokenType.TRUE;
_local1.value = true;
this.nextChar();
} else {
this.parseError(("Expecting 'true' but found " + _local2));
};
break;
case "f":
_local3 = (((("f" + this.nextChar()) + this.nextChar()) + this.nextChar()) + this.nextChar());
if (_local3 == "false"){
_local1.type = JSONTokenType.FALSE;
_local1.value = false;
this.nextChar();
} else {
this.parseError(("Expecting 'false' but found " + _local3));
};
break;
case "n":
_local4 = ((("n" + this.nextChar()) + this.nextChar()) + this.nextChar());
if (_local4 == "null"){
_local1.type = JSONTokenType.NULL;
_local1.value = null;
this.nextChar();
} else {
this.parseError(("Expecting 'null' but found " + _local4));
};
break;
case "\"":
_local1 = this.readString();
break;
default:
if (((this.isDigit(this.ch)) || ((this.ch == "-")))){
_local1 = this.readNumber();
} else {
if (this.ch == ""){
return (null);
};
this.parseError((("Unexpected " + this.ch) + " encountered"));
};
};
return (_local1);
}
private function readString():JSONToken{
var _local3:String;
var _local4:int;
var _local1:JSONToken = new JSONToken();
_local1.type = JSONTokenType.STRING;
var _local2 = "";
this.nextChar();
while (((!((this.ch == "\""))) && (!((this.ch == ""))))) {
if (this.ch == "\\"){
this.nextChar();
switch (this.ch){
case "\"":
_local2 = (_local2 + "\"");
break;
case "/":
_local2 = (_local2 + "/");
break;
case "\\":
_local2 = (_local2 + "\\");
break;
case "b":
_local2 = (_local2 + "\b");
break;
case "f":
_local2 = (_local2 + "\f");
break;
case "n":
_local2 = (_local2 + "\n");
break;
case "r":
_local2 = (_local2 + "\r");
break;
case "t":
_local2 = (_local2 + "\t");
break;
case "u":
_local3 = "";
_local4 = 0;
while (_local4 < 4) {
if (!this.isHexDigit(this.nextChar())){
this.parseError((" Excepted a hex digit, but found: " + this.ch));
};
_local3 = (_local3 + this.ch);
_local4++;
};
_local2 = (_local2 + String.fromCharCode(parseInt(_local3, 16)));
break;
default:
_local2 = (_local2 + ("\\" + this.ch));
};
} else {
_local2 = (_local2 + this.ch);
};
this.nextChar();
};
if (this.ch == ""){
this.parseError("Unterminated string literal");
};
this.nextChar();
_local1.value = _local2;
return (_local1);
}
private function readNumber():JSONToken{
var _local1:JSONToken = new JSONToken();
_local1.type = JSONTokenType.NUMBER;
var _local2 = "";
if (this.ch == "-"){
_local2 = (_local2 + "-");
this.nextChar();
};
if (!this.isDigit(this.ch)){
this.parseError("Expecting a digit");
};
if (this.ch == "0"){
_local2 = (_local2 + this.ch);
this.nextChar();
if (this.isDigit(this.ch)){
this.parseError("A digit cannot immediately follow 0");
};
} else {
while (this.isDigit(this.ch)) {
_local2 = (_local2 + this.ch);
this.nextChar();
};
};
if (this.ch == "."){
_local2 = (_local2 + ".");
this.nextChar();
if (!this.isDigit(this.ch)){
this.parseError("Expecting a digit");
};
while (this.isDigit(this.ch)) {
_local2 = (_local2 + this.ch);
this.nextChar();
};
};
if ((((this.ch == "e")) || ((this.ch == "E")))){
_local2 = (_local2 + "e");
this.nextChar();
if ((((this.ch == "+")) || ((this.ch == "-")))){
_local2 = (_local2 + this.ch);
this.nextChar();
};
if (!this.isDigit(this.ch)){
this.parseError("Scientific notation number needs exponent value");
};
while (this.isDigit(this.ch)) {
_local2 = (_local2 + this.ch);
this.nextChar();
};
};
var _local3:Number = Number(_local2);
if (((isFinite(_local3)) && (!(isNaN(_local3))))){
_local1.value = _local3;
return (_local1);
};
this.parseError((("Number " + _local3) + " is not valid!"));
return (null);
}
private function nextChar():String{
return ((this.ch = this.jsonString.charAt(this.loc++)));
}
private function skipIgnored():void{
var _local1:int;
do {
_local1 = this.loc;
this.skipWhite();
this.skipComments();
} while (_local1 != this.loc);
}
private function skipComments():void{
if (this.ch == "/"){
this.nextChar();
switch (this.ch){
case "/":
do {
this.nextChar();
} while (((!((this.ch == "\n"))) && (!((this.ch == "")))));
this.nextChar();
break;
case "*":
this.nextChar();
while (true) {
if (this.ch == "*"){
this.nextChar();
if (this.ch == "/"){
this.nextChar();
break;
};
} else {
this.nextChar();
};
if (this.ch == ""){
this.parseError("Multi-line comment not closed");
};
};
break;
default:
this.parseError((("Unexpected " + this.ch) + " encountered (expecting '/' or '*' )"));
};
};
}
private function skipWhite():void{
while (this.isWhiteSpace(this.ch)) {
this.nextChar();
};
}
private function isWhiteSpace(_arg1:String):Boolean{
return ((((((((_arg1 == " ")) || ((_arg1 == "\t")))) || ((_arg1 == "\n")))) || ((_arg1 == "\r"))));
}
private function isDigit(_arg1:String):Boolean{
return ((((_arg1 >= "0")) && ((_arg1 <= "9"))));
}
private function isHexDigit(_arg1:String):Boolean{
var _local2:String = _arg1.toUpperCase();
return (((this.isDigit(_arg1)) || ((((_local2 >= "A")) && ((_local2 <= "F"))))));
}
public function parseError(_arg1:String):void{
throw (new JSONParseError(_arg1, this.loc, this.jsonString));
}
}
}//package com.adobe.serialization.json
Section 14
//JSONTokenType (com.adobe.serialization.json.JSONTokenType)
package com.adobe.serialization.json {
public class JSONTokenType {
public static const UNKNOWN:int = -1;
public static const COMMA:int = 0;
public static const LEFT_BRACE:int = 1;
public static const RIGHT_BRACE:int = 2;
public static const LEFT_BRACKET:int = 3;
public static const RIGHT_BRACKET:int = 4;
public static const COLON:int = 6;
public static const TRUE:int = 7;
public static const FALSE:int = 8;
public static const NULL:int = 9;
public static const STRING:int = 10;
public static const NUMBER:int = 11;
}
}//package com.adobe.serialization.json
Section 15
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local4:int;
var _local5:int;
var _local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
}
}//package com.adobe.utils
Section 16
//APIConnector (com.newgrounds.components.APIConnector)
package com.newgrounds.components {
import com.newgrounds.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class APIConnector extends MovieClip {
public var errorDialog:MovieClip;
public var background:MovieClip;
public var viewLatestButton:SimpleButton;
public var closeButton:SimpleButton;
public var viewAuthorizedButton:SimpleButton;
private var _initialized:Boolean;
private var _movieId:String;
private var _encryptionKey:String;
private var _movieVersion:String;
private var _showConnectingPopup:Boolean;// = true
private var _useErrorPopup:Boolean;// = true
private var _medalPopup:MedalPopup;
private var _popDelay:Timer;
public function APIConnector(){
this._popDelay = new Timer(3000, 1);
super();
addFrameScript(0, this.frame1, 6, this.frame7, 7, this.frame8);
if (((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")))){
return;
};
this.useErrorPopup = true;
this.useMedalPopup = true;
this._popDelay.addEventListener(TimerEvent.TIMER, this.errorTimerHandler);
addEventListener(Event.ENTER_FRAME, this.enterFrameHandler);
if (stage){
addEventListener(Event.RENDER, this.renderHandler);
stage.invalidate();
} else {
this.clear();
};
}
public function get movieId():String{
return (this._movieId);
}
public function set movieId(_arg1:String):void{
this._movieId = _arg1;
}
public function get encryptionKey():String{
return (this._encryptionKey);
}
public function set encryptionKey(_arg1:String):void{
this._encryptionKey = _arg1;
}
public function get movieVersion():String{
return (this._movieVersion);
}
public function set movieVersion(_arg1:String):void{
this._movieVersion = _arg1;
}
public function get debugMode():Boolean{
return (API.debugMode);
}
public function set debugMode(_arg1:Boolean):void{
API.debugMode = true;
}
public function get useMedalPopup():Boolean{
return (!((this._medalPopup == null)));
}
public function set useMedalPopup(_arg1:Boolean):void{
if (((_arg1) && (!(this._medalPopup)))){
this._medalPopup = new MedalPopup();
addChild(this._medalPopup);
} else {
if (((!(_arg1)) && (this._medalPopup))){
removeChild(this._medalPopup);
this._medalPopup = null;
};
};
}
public function get useErrorPopup():Boolean{
return (this._useErrorPopup);
}
public function set useErrorPopup(_arg1:Boolean):void{
this._useErrorPopup = _arg1;
API.addEventListener(APIEvent.API_CONNECTED, this.movieConnectedHandler);
if (this._useErrorPopup){
API.addEventListener(APIEvent.NEW_VERSION_AVAILABLE, this.newVersionAvailableHandler);
API.addEventListener(APIEvent.HOST_BLOCKED, this.hostBlockedHandler);
} else {
API.removeEventListener(APIEvent.NEW_VERSION_AVAILABLE, this.newVersionAvailableHandler);
API.removeEventListener(APIEvent.HOST_BLOCKED, this.hostBlockedHandler);
};
}
public function get showConnectingPopup():Boolean{
return (this._showConnectingPopup);
}
public function set showConnectingPopup(_arg1:Boolean):void{
this._showConnectingPopup = _arg1;
if (((!(_arg1)) && ((((currentLabel == "connecting")) || ((currentLabel == "connected")))))){
this.clear();
};
}
public function clear():void{
gotoAndStop("idle");
}
public function connect():void{
API.setVersion(this._movieVersion);
API.connect(root.loaderInfo, this._movieId, this._encryptionKey);
visible = true;
if (this.showConnectingPopup){
gotoAndStop("connecting");
};
}
private function renderHandler(_arg1:Event):void{
removeEventListener(Event.RENDER, this.renderHandler);
this.clear();
this.connect();
}
private function movieConnectedHandler(_arg1:APIEvent):void{
if (_arg1.success){
if (((((((API.isPublishedHost()) && (API.IsCompatible()))) && (!(API.hasUserSession())))) && (!(API.debugMode)))){
gotoAndStop("no_login");
this._popDelay.start();
visible = true;
} else {
if (this.showConnectingPopup){
gotoAndStop("connected");
};
};
} else {
gotoAndStop("no_connect");
this._popDelay.start();
visible = true;
};
}
private function newVersionAvailableHandler(_arg1:APIEvent):void{
gotoAndStop("new_version");
visible = true;
this.centerOnStage();
}
private function hostBlockedHandler(_arg1:APIEvent):void{
gotoAndStop("bad_host");
visible = true;
this.centerOnStage();
}
private function closeButtonClickHandler(_arg1:Event):void{
this.clear();
}
private function officialVersionClickHandler(_arg1:Event):void{
API.loadOfficialVersion();
}
private function enterFrameHandler(_arg1:Event):void{
this.forceAlwaysOnTop();
}
private function initButtons():void{
if (this.viewLatestButton){
this.viewLatestButton.addEventListener(MouseEvent.CLICK, this.officialVersionClickHandler);
};
if (this.viewAuthorizedButton){
this.viewAuthorizedButton.addEventListener(MouseEvent.CLICK, this.officialVersionClickHandler);
};
if (this.closeButton){
this.closeButton.addEventListener(MouseEvent.CLICK, this.closeButtonClickHandler);
};
}
private function forceAlwaysOnTop():void{
var myIndex:uint;
var topIndex:uint;
if (((parent) && (visible))){
try {
myIndex = parent.getChildIndex(this);
topIndex = (parent.numChildren - 1);
if (myIndex != topIndex){
parent.setChildIndex(this, topIndex);
};
} catch(e:Error) {
};
};
}
private function centerOnStage():void{
if (stage){
x = (stage.stageWidth / 2);
y = (stage.stageHeight / 2);
};
}
private function errorTimerHandler(_arg1:TimerEvent):void{
if (this.errorDialog){
this.errorDialog.gotoAndPlay("closeme");
} else {
this.clear();
};
}
function frame1(){
stop();
}
function frame7(){
this.initButtons();
}
function frame8(){
this.initButtons();
}
}
}//package com.newgrounds.components
Section 17
//FlashAd (com.newgrounds.components.FlashAd)
package com.newgrounds.components {
import com.newgrounds.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class FlashAd extends Sprite {
public var background:MovieClip;
private var _showBackground:Boolean;
private var _adURLLoader:URLLoader;
private var _adRect:Sprite;
private var _mask:Shape;
private var _ad:Loader;
private static const DEBUG_AD_URL:String = "http://www.ngads.com/adtest.php";
private static const REMOVED_FROM_STAGE:String = "removedFromStage";
private static var _adResetTime:uint = 0;
private static var _adURL:URLRequest;
public function FlashAd(_arg1:Boolean=true){
if (((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")))){
return;
};
this._adRect = new Sprite();
this._adRect.graphics.beginFill(0);
this._adRect.graphics.moveTo(0, 0);
this._adRect.graphics.lineTo(300, 0);
this._adRect.graphics.lineTo(300, 250);
this._adRect.graphics.lineTo(0, 250);
this._adRect.graphics.lineTo(0, 0);
this._adRect.graphics.endFill();
this._mask = new Shape();
this._mask.graphics.beginFill(0);
this._mask.graphics.moveTo(0, 0);
this._mask.graphics.lineTo(300, 0);
this._mask.graphics.lineTo(300, 250);
this._mask.graphics.lineTo(0, 250);
this._mask.graphics.lineTo(0, 0);
this._mask.graphics.endFill();
addChild(this._adRect);
this._adRect.addChild(this._mask);
this._adRect.visible = false;
x = Math.round(x);
y = Math.round(y);
scaleX = 1;
scaleY = 1;
if (this.background){
if (this.background.ngLinkButton){
this.background.ngLinkButton.addEventListener(MouseEvent.CLICK, this.linkClickHandler);
};
if (this.background.loadingClip){
this.background.loadingClip.visible = false;
};
};
if (API.isFlashVersion(9, 0, 28)){
addEventListener(REMOVED_FROM_STAGE, this.onRemovedFromStage);
};
if (API.adsApproved){
this.loadAdFeed(API.adFeedURL);
} else {
API.addEventListener(APIEvent.ADS_APPROVED, this.onAdsApproved, false, 0, true);
};
this.showBackground = _arg1;
}
public function get showBackground():Boolean{
return (this._showBackground);
}
public function set showBackground(_arg1:Boolean):void{
this._showBackground = _arg1;
if (this.background){
this.background.visible = _arg1;
this._adRect.mask = (_arg1) ? this.background.adMask : null;
};
}
public function removeAd():void{
removeEventListener(REMOVED_FROM_STAGE, this.onRemovedFromStage);
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = false;
};
if (this._adURLLoader){
try {
this._adURLLoader.close();
} catch(e:Error) {
};
};
if (this._adRect){
this._adRect.visible = false;
};
if (this._ad){
trace("[NewgroundsAPI] :: Ad removed");
try {
this._ad.close();
} catch(e:Error) {
};
try {
Object(this._ad).unloadAndStop(true);
} catch(e:Error) {
_ad.unload();
};
if (this._ad.parent){
this._ad.parent.removeChild(this._ad);
};
};
this._ad = null;
}
private function onAdsApproved(_arg1:APIEvent):void{
API.removeEventListener(APIEvent.ADS_APPROVED, this.onAdsApproved, false);
if (_arg1.success){
this.loadAdFeed(API.adFeedURL);
} else {
trace("[NewgroundsAPI] :: No ad feed URL supplied to Newgrounds API ad!");
};
}
private function loadAdFeed(_arg1:String):void{
var adFeedURL = _arg1;
this._adURLLoader = new URLLoader();
this._adURLLoader.addEventListener(Event.COMPLETE, this.onAdFeedLoaded);
this._adURLLoader.addEventListener(IOErrorEvent.IO_ERROR, this.onAdError);
this._adURLLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onAdError);
if (!adFeedURL){
trace("[Newgrounds API] :: Invalid feed URL!");
return;
};
if (this.hasAdElapsed){
if (adFeedURL.indexOf("?") > -1){
_adURL = new URLRequest(((adFeedURL + "&random=") + Math.random()));
} else {
_adURL = new URLRequest(((adFeedURL + "?random=") + Math.random()));
};
};
try {
this._adURLLoader.load(_adURL);
} catch(e:Error) {
onAdError(null);
};
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = true;
};
}
private function loadAd(_arg1:String):void{
if (this._ad){
this.removeAd();
};
this._ad = new Loader();
this._ad.contentLoaderInfo.addEventListener(Event.COMPLETE, this.onAdLoaded);
this._ad.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.onAdError);
this._ad.load(new URLRequest(_arg1), new LoaderContext(false, new ApplicationDomain(null)));
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = true;
};
}
private function onAdFeedLoaded(_arg1:Event):void{
var _local2:URLLoader = URLLoader(_arg1.target);
if (((_local2.data) && (!((_local2.data == ""))))){
this.loadAd((_local2.data as String));
} else {
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, false, new APIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad")));
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = false;
};
};
}
private function onAdFeedError(_arg1:Event):void{
trace("[NewgroundsAPI] :: Unable to load ad feed!");
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = false;
};
}
private function onAdError(_arg1:Event):void{
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, false, new APIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad")));
this.removeAd();
}
private function onAdLoaded(_arg1:Event):void{
this._adRect.addChild(this._ad);
this._ad.mask = this._mask;
this._adRect.visible = true;
if (this.background){
if (this._showBackground){
this._adRect.mask = this.background.adMask;
};
if (this.background.loadingClip){
this.background.loadingClip.visible = false;
};
};
trace("[NewgroundsAPI] :: Ad loaded!");
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, true));
}
private function onRemovedFromStage(_arg1:Event):void{
this.removeAd();
}
private function get hasAdElapsed():Boolean{
if (getTimer() >= _adResetTime){
_adResetTime = (getTimer() + ((1000 * 60) * 5));
return (true);
};
return (false);
}
private function linkClickHandler(_arg1:MouseEvent):void{
API.loadNewgrounds();
}
}
}//package com.newgrounds.components
Section 18
//MedalPopup (com.newgrounds.components.MedalPopup)
package com.newgrounds.components {
import com.newgrounds.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
public class MedalPopup extends MovieClip {
public var medalNameText:TextField;
public var medalValueText:TextField;
public var medalContainer:Sprite;
private var _initialized:Boolean;
private var _medal:Medal;
private var _medalIcon:Bitmap;
private var _medalQueue:Array;
private var _popDelay:Timer;
public function MedalPopup(){
this._medalQueue = [];
this._popDelay = new Timer(3000, 1);
super();
addFrameScript(0, this.frame1, 9, this.frame10, 18, this.frame19);
if (((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")))){
return;
};
visible = false;
addEventListener(Event.ENTER_FRAME, this.enterFrameHandler);
stop();
API.addEventListener(APIEvent.MEDAL_UNLOCKED, this.onMedalUnlocked, false, 0, true);
this._popDelay.addEventListener(TimerEvent.TIMER, this.timerHandler);
}
public function get popupTime():Number{
return ((this._popDelay.delay / 1000));
}
public function set popupTime(_arg1:Number):void{
if (isNaN(_arg1)){
_arg1 = 3;
};
this._popDelay.delay = (_arg1 * 1000);
}
private function enterFrameHandler(_arg1:Event):void{
var myIndex:uint;
var topIndex:uint;
var event = _arg1;
if (((this._medalQueue.length) && (!(visible)))){
this._medal = this._medalQueue.pop();
this._popDelay.start();
gotoAndPlay("medal_show");
visible = true;
};
if (((visible) && (parent))){
try {
myIndex = parent.getChildIndex(this);
topIndex = (parent.numChildren - 1);
if (myIndex != topIndex){
parent.setChildIndex(this, topIndex);
};
} catch(error:Error) {
};
};
}
private function onMedalUnlocked(_arg1:APIEvent):void{
if (((((_arg1.success) && (_arg1.data))) && ((_arg1.data is Medal)))){
this._medalQueue.push(Medal(_arg1.data));
};
}
private function showMedalInfo():void{
if (!this._medal){
return;
};
if (this.medalContainer){
this._medalIcon = this._medal.createIconBitmap();
this.medalContainer.addChild(this._medalIcon);
};
if (this.medalNameText){
this.medalNameText.text = this._medal.name;
};
if (this.medalValueText){
this.medalValueText.text = (this._medal.value.toString() + "pts");
};
this._popDelay.start();
stop();
}
private function timerHandler(_arg1:TimerEvent):void{
if (((this._medalIcon) && (this._medalIcon.parent))){
this._medalIcon.parent.removeChild(this._medalIcon);
this._medalIcon = null;
};
gotoAndPlay("medal_hide");
this._popDelay.stop();
}
function frame1(){
stop();
}
function frame10(){
this.showMedalInfo();
stop();
}
function frame19(){
stop();
visible = false;
}
}
}//package com.newgrounds.components
Section 19
//API (com.newgrounds.API)
package com.newgrounds {
import flash.display.*;
import flash.events.*;
import com.newgrounds.components.*;
import flash.utils.*;
import com.adobe.serialization.json.*;
import flash.net.*;
import com.adobe.images.*;
import com.adobe.crypto.*;
import flash.system.*;
public class API {
public static const VERSION:String = "2.9";
private static const GATEWAY_URL:String = "http://www.ngads.com/gateway_v2.php";
private static const AD_TERMS_URL:String = "http://www.newgrounds.com/wiki/flashads/terms/";
private static const COMMANDS_WIKI_URL:String = "http://www.newgrounds.com/wiki/flashapi/commands/";
private static var do_echo:Boolean = false;
private static var _debug:Boolean = true;
private static var _connected:Boolean = false;
private static var _isMetadataLoaded:Boolean = false;
private static var _preloadComplete:Boolean = false;
private static var _adsApproved:Boolean = false;
private static var _saveGroupId:uint;
private static var _saveFileId:uint;
private static var _trackerId:uint;
private static var _movieId:String;
private static var _encryptionKey:String;
private static var _url:String;
private static var _host:String;
private static var connected:Boolean;
private static var version:String;
private static var ad_url:String;
private static var publisher_id:uint;
private static var session_id:String;
private static var user_email:String;
private static var user_name:String;
private static var user_id:uint;
private static var userpage_format:String;
private static var _medals:Array;
private static var timeoutTimer:Timer = new Timer(8000, 1);
private static var _userpageFormat:String;
private static var _scoreboards:Array = new Array();
private static var _bridge:Bridge;
private static var _saveFile:SaveFile;
private static var _imageFilePath:String;
private static var _saveFilePath:String;
private static var _saveGroups:Array = [];
private static var root:DisplayObject;
private static var _eventDispatcher:EventDispatcher = new EventDispatcher();
private static var score_page_counts:Object = new Object();
private static var compression_radix:String = "/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X";
private static var compressor:BaseN = new BaseN(compression_radix);
public static var errors:Dictionary = APIError.init_codes();
private static var sharedObjects:Dictionary = new Dictionary();
private static var _preloadAssets:Array = [];
public static var periods:Object = getPeriodAliases();
private static var period_aliases:Object = {t:{name:"Today", alias:"TODAY"}, p:{name:"Yesterday", alias:"YESTERDAY"}, w:{name:"This Week", alias:"THIS_WEEK"}, m:{name:"This Month", alias:"THIS_MONTH"}, y:{name:"This Year", alias:"THIS_YEAR"}, a:{name:"All-Time", alias:"ALL_TIME"}};
private static var secureCommand:String;
public static function get adFeedURL():String{
return (ad_url);
}
public static function get preloadComplete():Boolean{
return (_preloadComplete);
}
private static function assertConnected():Boolean{
if (!_connected){
return (false);
};
return (true);
}
public static function setVersion(_arg1:String):void{
if (((_arg1) && (!((_arg1 == ""))))){
version = _arg1;
};
}
public static function setUserEmail(_arg1:String):void{
user_email = _arg1;
}
public static function get debugMode():Boolean{
return (_debug);
}
public static function set debugMode(_arg1:Boolean):void{
_debug = _arg1;
}
public static function getTrackerID():uint{
return (_trackerId);
}
public static function getUserID():uint{
return (user_id);
}
public static function getUserName():String{
return (user_name);
}
public static function isConnected():Boolean{
return (_connected);
}
public static function getOfficialURL():String{
var _local1:String = ((((((GATEWAY_URL + "?tracker_id=") + _movieId) + "&command_id=") + getCommandID("loadOfficalVersion")) + "&seed=") + Math.random());
if (debugMode){
_local1 = (_local1 + "&debug=1");
};
return (_local1);
}
public static function get adsApproved():Boolean{
return (_adsApproved);
}
public static function hasUserSession():Boolean{
return (((((!((session_id == null))) && (!((session_id == ""))))) && (!((publisher_id == 0)))));
}
public static function isNewgrounds():Boolean{
return ((((publisher_id == 1)) || ((getHost().toLowerCase().indexOf("ungrounded.net") > -1))));
}
public static function IsCompatible():Boolean{
return (!((publisher_id == 0)));
}
public static function hasUserEmail():Boolean{
return (((!((user_email == null))) && (!((user_email == "")))));
}
public static function connectionTimeOut(_arg1:Event=null):void{
dispatchEvent(new APIEvent(APIEvent.API_CONNECTED, false, new APIError("CONNECTION_FAILED", "Connection to NewgroundsAPI gateway timed out.")));
}
public static function connect(_arg1:LoaderInfo, _arg2:String, _arg3:String=null):void{
var loaderInfo = _arg1;
var m_id = _arg2;
var encrypt_key = _arg3;
if (!loaderInfo){
fatalError("Null loaderInfo paremeter passed in to connectMovie!", "");
return;
};
try {
if (loaderInfo.loader){
loaderInfo = loaderInfo.loader.loaderInfo;
};
} catch(error:Error) {
};
_url = loaderInfo.url;
_host = _url;
if ((((_host.indexOf("http://") > -1)) || ((_host.indexOf("https://") > -1)))){
_host = _host.split("/")[2].toLowerCase();
} else {
_host = "localhost";
};
var flashVars:Object = loaderInfo.parameters;
if (isPublishedHost()){
debugMode = false;
};
if (((!(debugMode)) && (flashVars))){
if (flashVars.NewgroundsAPI_UserName){
user_name = flashVars.NewgroundsAPI_UserName;
};
if (flashVars.NewgroundsAPI_UserID){
user_id = flashVars.NewgroundsAPI_UserID;
};
if (flashVars.NewgroundsAPI_PublisherID){
publisher_id = flashVars.NewgroundsAPI_PublisherID;
} else {
publisher_id = 1;
};
if (flashVars.NewgroundsAPI_UserpageFormat){
_userpageFormat = flashVars.NewgroundsAPI_UserpageFormat;
};
if (flashVars.NewgroundsAPI_SessionID){
session_id = flashVars.NewgroundsAPI_SessionID;
};
if (flashVars.NewgroundsAPI_SaveGroupID){
_saveGroupId = flashVars.NewgroundsAPI_SaveGroupID;
};
if (flashVars.NewgroundsAPI_SaveFileID){
_saveFileId = flashVars.NewgroundsAPI_SaveFileID;
};
if (flashVars.NewgroundsAPI_SandboxID){
_bridge = new Bridge(flashVars.NewgroundsAPI_SandboxID);
};
} else {
publisher_id = 1;
session_id = "D3bu64p1U53R";
user_id = 10;
user_name = "API-Debugger";
};
if (connected){
fatalError("NewgroundsAPI.connect() - connection already in progress", "connect");
return;
};
timeoutTimer.start();
if (!m_id){
fatalError("NewgroundsAPI.connectMovie() - missing required movieId parameter", "connectMovie");
};
_movieId = String(m_id);
_trackerId = uint(_movieId.substring(0, _movieId.indexOf(":")));
_encryptionKey = encrypt_key;
connected = true;
sendCommand("connectMovie", {host:getHost(), movie_version:version});
}
private static function getHost():String{
return (_host);
}
public static function isPublishedHost():Boolean{
return (((!((getHost() == "localhost"))) && ((getHost().indexOf("file://") == -1))));
}
public static function loadUserPage(_arg1:uint=0, _arg2:String=null):Boolean{
var _local3:String;
if ((((_arg1 == 0)) && ((_arg2 == null)))){
if (hasUserSession()){
_arg1 = user_id;
_arg2 = user_name;
} else {
return (false);
};
};
if (publisher_id == 1){
_local3 = (("http://" + _arg2.toLowerCase()) + ".newgrounds.com");
navigateToURL(new URLRequest(_local3), "_blank");
return (true);
};
if (userpage_format){
_local3 = userpage_format;
_local3 = _local3.split(":user_id:").join(_arg1.toString());
_local3 = _local3.split(":user_name:").join(escape(_arg2));
navigateToURL(new URLRequest(_local3), "_blank");
return (true);
};
return (false);
}
public static function loadNewgrounds():void{
sendCommand("loadNewgrounds", {host:getHost()}, true);
}
public static function loadOfficialVersion():void{
navigateToURL(new URLRequest(getOfficialURL()));
}
public static function loadMySite():void{
sendCommand("loadMySite", {host:getHost()}, true);
}
public static function loadCustomLink(_arg1:String):void{
sendCommand("loadCustomLink", {host:getHost(), link:_arg1}, true);
}
public static function logCustomEvent(_arg1:String):void{
sendCommand("logCustomEvent", {host:getHost(), event:_arg1});
}
public static function getScoreBoardByName(_arg1:String):ScoreBoard{
var _local2:ScoreBoard;
for each (_local2 in _scoreboards) {
if (_local2.name == _arg1){
return (_local2);
};
};
return (null);
}
public static function getScoreBoardById(_arg1:uint):ScoreBoard{
var _local2:ScoreBoard;
for each (_local2 in _scoreboards) {
if (_local2.id == _arg1){
return (_local2);
};
};
return (null);
}
public static function postScore(_arg1:String, _arg2:uint, _arg3:String=""):void{
if (((!(_arg1)) || ((_arg1 == "")))){
sendError({command_id:getCommandID("postScore")}, new APIError("MISSING_PARAM", "missing required parameter(s)"));
return;
};
if (_arg3 == null){
_arg3 = "";
};
sendSecureCommand("postScore", {user_name:user_name, board:_arg1, value:_arg2, publisher_id:publisher_id, tag:_arg3});
}
public static function loadScores(_arg1:ScoreBoard, _arg2:String=null):void{
var _local3 = "loadScores";
if (!_arg1.id){
sendError({command_id:getCommandID(_local3)}, new APIError("MISSING_PARAM", "missing required ScoreBoard instance"));
return;
};
var _local4:Object = {};
_local4.publisher_id = publisher_id;
_local4.period = _arg1.period;
_local4.board = _arg1.id;
_local4.num_results = _arg1.num_results;
_local4.page = _arg1.page;
if (((!(_arg2)) || ((_arg2 == "")))){
_local4.tag = _arg1.tag;
} else {
_local4.tag = _arg2;
};
sendCommand(_local3, _local4);
}
public static function loadScoresInRange(_arg1:String, _arg2:String="All-Time", _arg3:uint=1, _arg4:uint=10):void{
if (((!(_arg1)) || ((_arg1 == "")))){
sendError({command_id:getCommandID("postScore")}, new APIError("MISSING_PARAM", "missing required parameter(s)"));
return;
};
var _local5:ScoreBoard = getScoreBoardByName(_arg1);
if (_local5){
_local5.loadScoresInRange(_arg2, _arg3, _arg4);
} else {
sendWarning((("loadScoresInRange: Scoreboard " + _arg1) + " could not be found."));
};
}
private static function populateMedals(_arg1:Array):void{
var _local2:uint;
var _local3:Object;
if (_medals === null){
_medals = new Array();
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = _arg1[_local2];
_medals.push(Medal.createFromObject(_local3));
_local2++;
};
};
sendMessage("Medals loaded!");
}
private static function populateSaveGroups(_arg1:Array):void{
var _local3:SaveGroup;
_saveGroups = [];
var _local2:uint;
while (_local2 < _arg1.length) {
_local3 = SaveGroup.createFromObject(_arg1[_local2]);
_saveGroups.push(_local3);
_local2++;
};
}
private static function populateScoreBoards(_arg1:Array):void{
_scoreboards = [];
var _local2:uint;
while (_local2 < _arg1.length) {
_scoreboards.push(new ScoreBoard(_arg1[_local2].id, _arg1[_local2].name, ""));
_local2++;
};
}
public static function get medals():Array{
return ((_medals) ? _medals.concat() : []);
}
public static function getMedalById(_arg1:uint):Medal{
var _local2:Medal;
for each (_local2 in _medals) {
if (_local2.id == _arg1){
return (_local2);
};
};
return (null);
}
public static function getMedalByName(_arg1:String):Medal{
var _local2:Medal;
for each (_local2 in _medals) {
if (_local2.name == _arg1){
return (_local2);
};
};
return (null);
}
public static function unlockMedal(_arg1:String):void{
var _local3:Object;
var _local4:Object;
if (((!(_arg1)) || ((_arg1 == "")))){
sendError({command_id:getCommandID("unlockMedal")}, new APIError("MISSING_PARAM", "missing required medal name"));
return;
};
var _local2:Medal = getMedalByName(_arg1);
if (!_local2){
sendMessage(("No medal with name: " + _arg1));
return;
};
if (((hasUserSession()) || (debugMode))){
sendMessage((("Attempting to unlock '" + _local2.name) + "'"));
if (_local2.unlocked){
sendWarning((("Medal '" + _local2.name) + "' is already unlocked!"));
return;
};
_local3 = new Object();
_local3.medal_id = _local2.id;
sendSecureCommand("unlockMedal", _local3);
} else {
sendMessage(("Locally unlocking " + _local2.name));
if (_local2.unlocked){
sendWarning((("Medal '" + _local2.name) + "' is already unlocked!"));
return;
};
_local2.unlocked = true;
_local4 = loadLocal("medals_unlocked");
if (!_local4){
_local4 = new Object();
};
_local4[_local2.id.toString()] = true;
saveLocal("medals_unlocked", _local4);
callListener(APIEvent.MEDAL_UNLOCKED, true, _local2);
};
}
public static function loadMedals():void{
if (_medals){
dispatchEvent(new APIEvent(APIEvent.MEDALS_LOADED, true, medals));
return;
};
var _local1:Object = new Object();
if (hasUserSession()){
_local1.publisher_id = publisher_id;
_local1.user_id = user_id;
};
sendCommand("getMedals", _local1);
}
public static function saveLocal(_arg1:String, _arg2:Object, _arg3:uint=0):void{
var sharedObj:SharedObject;
var save_id = _arg1;
var save_data = _arg2;
var size_allocation = _arg3;
try {
if (!sharedObjects[save_id]){
sharedObjects[save_id] = SharedObject.getLocal(((("ng_ap_secure_" + _trackerId) + "_") + save_id));
};
sharedObj = sharedObjects[save_id];
sharedObj.data[save_id] = encodeData(save_data);
sharedObj.flush();
} catch(e:Error) {
sendWarning(("saveLocal ERROR: " + e));
};
}
public static function loadLocal(_arg1:String):Object{
var sharedObj:SharedObject;
var save_id = _arg1;
try {
if (!sharedObjects[save_id]){
sharedObjects[save_id] = SharedObject.getLocal(((("ng_ap_secure_" + _trackerId) + "_") + save_id));
};
sharedObj = sharedObjects[save_id];
if (((((sharedObj) && (sharedObj.data))) && (sharedObj.data[save_id]))){
return (decodeData(sharedObj.data[save_id]));
} else {
return (null);
};
} catch(e:Error) {
sendWarning(("loadLocal ERROR: " + e));
};
return (null);
}
public static function encodeData(_arg1:Object):String{
return (compressHex(RC4.encrypt(JSON.encode(_arg1), _encryptionKey)));
}
public static function decodeData(_arg1:String){
return (JSON.decode(RC4.decrypt(uncompressHex(_arg1), _encryptionKey)));
}
private static function compressHex(_arg1:String):String{
var _local2:uint = (_arg1.length % 6);
var _local3 = "";
var _local4:uint;
while (_local4 < _arg1.length) {
_local3 = (_local3 + compressor.encode(uint(("0x" + _arg1.substr(_local4, 6))), 4));
_local4 = (_local4 + 6);
};
return ((_local2.toString() + _local3));
}
private static function uncompressHex(_arg1:String):String{
var _local4:uint;
var _local6:String;
var _local7:uint;
var _local8:String;
var _local2:uint = uint(_arg1.charAt(0));
var _local3 = "";
var _local5:uint = 1;
while (_local5 < _arg1.length) {
_local6 = _arg1.substr(_local5, 4);
_local7 = uint(compressor.decode(_local6));
_local8 = _local7.toString(16);
if ((_local5 + 4) < _arg1.length){
_local4 = 6;
} else {
_local4 = _local2;
};
while (_local8.length < _local4) {
_local8 = ("0" + _local8);
};
_local3 = (_local3 + _local8);
_local5 = (_local5 + 4);
};
return (_local3);
}
public static function getSaveGroupById(_arg1:uint):SaveGroup{
if (((!(_saveGroups)) || ((_saveGroups.length < 1)))){
sendWarning("No save groups found");
return (null);
};
var _local2:uint;
while (_local2 < _saveGroups.length) {
if (_saveGroups[_local2].id == _arg1){
return (_saveGroups[_local2]);
};
_local2++;
};
return (null);
}
public static function getSaveGroupByName(_arg1:String):SaveGroup{
if (((!(_saveGroups)) || ((_saveGroups.length < 1)))){
sendWarning("No save groups found");
return (null);
};
var _local2:uint;
while (_local2 < _saveGroups.length) {
if (_saveGroups[_local2].name == _arg1){
return (_saveGroups[_local2]);
};
_local2++;
};
return (null);
}
public static function createSaveQuery(_arg1:String):SaveGroupQuery{
var _local2:SaveGroup = getSaveGroupByName(_arg1);
if (_local2){
return (_local2.createQuery());
};
return (null);
}
public static function executeSaveQuery(_arg1:SaveGroupQuery):void{
sendCommand("lookupSaveFiles", {publisher_id:publisher_id, group_id:_arg1.groupId, query:JSON.encode(_arg1.toObject())}, false, null, _arg1);
}
public static function checkFilePrivledges(_arg1:SaveFile):void{
sendCommand("checkFilePrivs", {group:_arg1.groupId, filename:_arg1.name, user_id:(user_id) ? user_id : 0, publisher_id:publisher_id});
}
public static function newSaveFile(_arg1:String):SaveFile{
var _local2:SaveGroup = getSaveGroupByName(_arg1);
if (_local2){
return (new SaveFile(_local2));
};
sendError({command_id:"newSaveFile"}, new APIError("INVALID_SAVE_GROUP", (("'" + _local2) + "' is not a valid save group.")));
return (null);
}
public static function saveFile(_arg1:SaveFile, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Object = _arg1.toObject();
_local4.user_name = user_name;
if (_arg1.id){
_local4.save_id = _arg1.id;
};
_local4.overwrite = (_arg3) ? 1 : 0;
if (_arg2){
_local4.draft = 1;
};
var _local5:ByteArray = new ByteArray();
if ((_arg1.contents is ByteArray)){
_local5.writeByte(0);
_local5.writeBytes(_arg1.contents);
} else {
_local5.writeByte(1);
_local5.writeObject(_arg1.contents);
};
_local5.compress();
var _local6:Object = new Object();
_local6.file = _local5;
if (_arg1.thumbnail){
_local6.thumbnail = PNGEncoder.encode(_arg1.thumbnail);
};
sendSecureCommand("saveFile", _local4, null, _local6, _arg1);
}
public static function rateSaveFile(_arg1:SaveFile, _arg2:SaveRating, _arg3:Number):void{
sendSecureCommand("rateSaveFile", {group:_arg1.groupId, save_id:_arg1.id, rating_id:_arg2.id, vote:_arg3, user_id:user_id}, null, null, _arg1);
}
public static function loadSaveFile(_arg1:Number, _arg2:Boolean=true){
var _local3:Object = {publisher_id:publisher_id, save_id:_arg1, get_contents:_arg2};
sendCommand("loadSaveFile", _local3);
}
private static function doEvent(_arg1:Object):void{
var _local2:String;
var _local3:Object;
var _local4:String;
var _local5:Boolean;
var _local6:ScoreBoard;
var _local7:Array;
var _local8:*;
var _local9:String;
var _local10:Medal;
var _local11:SaveGroup;
var _local12:Object;
var _local13:Object;
var _local14:Object;
var _local15:SaveFile;
var _local16:uint;
var _local17:Object;
var _local18:uint;
switch (getCommandName(_arg1.command_id)){
case "connectMovie":
timeoutTimer.stop();
if (_arg1.success){
sendMessage("You have successfully connected to the Newgrounds API Gateway");
sendMessage((("Movie identified as \"" + _arg1.movie_name) + "\""));
callListener(APIEvent.API_CONNECTED, _arg1.success, {title:_arg1.movie_name});
} else {
callListener(APIEvent.API_CONNECTED, _arg1.success, {});
return;
};
_local5 = false;
if (_arg1.ad_status === -1){
_local2 = "This movie was not approved to run Flash Ads.";
sendWarning(_local2);
sendWarning((("visit " + AD_TERMS_URL) + " to view our approval guidelines"));
if (!_arg1.ad_url){
callListener(APIEvent.ADS_APPROVED, false, new APIError("FLASH_ADS_NOT_APPROVED", _local2));
} else {
_local5 = true;
};
} else {
if (_arg1.ad_status === 0){
_local2 = "Flash Ads are currently awaiting approval.";
sendNotice(_local2);
if (!_arg1.ad_url){
callListener(APIEvent.ADS_APPROVED, false, new APIError("FLASH_ADS_NOT_APPROVED", _local2));
} else {
_local5 = true;
};
};
};
if (_arg1.ad_url){
ad_url = unescape(_arg1.ad_url);
if (!_local5){
sendMessage("This movie has been approved to run Flash Ads!");
};
_adsApproved = true;
callListener(APIEvent.ADS_APPROVED, true);
};
if (_arg1.deny_host){
_local2 = (getHost() + " does not have permission to run this movie!");
sendWarning(_local2);
sendWarning(("\tUpdate your API configuration to unblock " + getHost()));
callListener(APIEvent.HOST_BLOCKED, true, {real_url:unescape(_arg1.movie_url), url:getOfficialURL()});
};
if (_arg1.movie_version){
sendWarning("According to your API Configuration, this version is out of date.");
if (version){
sendWarning(("\tThe this movie is version " + version));
};
sendWarning(("\tThe most current version is " + _arg1.movie_version));
callListener(APIEvent.NEW_VERSION_AVAILABLE, true, {version:_arg1.movie_version, real_url:unescape(_arg1.movie_url), url:getOfficialURL()});
};
if (_arg1.request_portal_url){
sendCommand("setPortalID", {portal_url:_url});
};
sendCommand("preloadSettings", {publisher_id:publisher_id, user_id:user_id});
break;
case "preloadSettings":
if (_arg1.medals){
populateMedals(_arg1.medals);
if (((!(hasUserSession())) && (!(debugMode)))){
echo("Checking for SharedObject Medals...");
_local8 = loadLocal("medals_unlocked");
if (_local8){
for (_local9 in _local8) {
if (_local8[_local9]){
_local10 = getMedalById(uint(_local9));
echo(("Now unlocking " + _local10.name));
_local10.unlocked = true;
};
};
};
};
};
if (_arg1.save_groups){
populateSaveGroups(_arg1.save_groups);
};
if (_arg1.save_file_path){
_saveFilePath = (_arg1.save_file_path + "/");
};
if (_arg1.image_file_path){
_imageFilePath = (_arg1.image_file_path + "/");
};
if (_arg1.score_boards){
populateScoreBoards(_arg1.score_boards);
};
sendMessage("Metadata loaded!");
callListener(APIEvent.METADATA_LOADED, _arg1.success);
if (((_saveFileId) && (_saveGroupId))){
_local11 = getSaveGroupById(_saveGroupId);
if (_local11){
callListener(APIEvent.FILE_REQUESTED, true, {save_id:_saveFileId, group:_local11});
};
};
_preloadComplete = true;
break;
case "logCustomEvent":
if (_arg1.success){
sendMessage((("Event '" + _arg1.event) + "' was logged."));
};
callListener(APIEvent.EVENT_LOGGED, _arg1.success, {event:_arg1.event});
break;
case "postScore":
if (_arg1.success){
_local4 = "User";
if (user_email){
_local4 = user_email;
} else {
if (user_name){
_local4 = user_name;
};
};
_local6 = getScoreBoardById(_arg1.board);
if (_local6){
sendMessage((((((_local4 + " posted ") + _arg1.value) + " to '") + _local6.name) + "'"));
};
if (_arg1.best_scores){
_local12 = {today:_arg1.best_scores.D, yesterday:_arg1.best_scores.P, week:_arg1.best_scores.W, year:_arg1.best_scores.Y, all_time:_arg1.best_scores.A};
} else {
_local12 = {};
};
if (_arg1.best_ranks){
_local13 = {today:_arg1.best_ranks.D, yesterday:_arg1.best_ranks.P, week:_arg1.best_ranks.W, year:_arg1.best_ranks.Y, all_time:_arg1.best_ranks.A};
} else {
_local13 = {};
};
if (_arg1.num_scores){
_local14 = {today:_arg1.num_scores.D, yesterday:_arg1.num_scores.P, week:_arg1.num_scores.W, year:_arg1.num_scores.Y, all_time:_arg1.num_scores.A};
} else {
_local14 = {};
};
_local3 = {score:_arg1.score, value:_arg1.value, username:_local4, best_scores:_local12, best_ranks:_local13, num_scores:_local14};
};
callListener(APIEvent.SCORE_POSTED, _arg1.success, _local3);
break;
case "loadScores":
_local3 = new Object();
_local6 = getScoreBoardById(_arg1.board);
if (_local6){
_local6.setScores(_arg1.scores, _arg1.period, _arg1.page, _arg1.num_results, _arg1.num_scores);
};
callListener(APIEvent.SCORES_LOADED, _arg1.success, _local6);
break;
case "unlockMedal":
if (_medals){
_local10 = getMedalByName(_arg1.medal_name);
if (_local10.unlocked){
return;
};
_local10.unlocked = true;
callListener(APIEvent.MEDAL_UNLOCKED, _arg1.success, _local10);
};
break;
case "getMedals":
if (_arg1.success){
populateMedals(_arg1.medals);
};
callListener(APIEvent.MEDALS_LOADED, _arg1.success, _local3);
break;
case "loadSaveFile":
if (_arg1.success){
_local11 = getSaveGroupById(_arg1.group_id);
_local15 = new SaveFile(_local11);
_local15.id = _arg1.file.save_id;
_local15.name = _arg1.file.filename;
_local15.fileUrl = (_saveFilePath + _arg1.file.file);
_local15.thumbnailUrl = (_imageFilePath + _arg1.file.thumb);
_local15.authorName = _arg1.file.user_name;
_local15.authorId = _arg1.file.user_id;
_local15.setStatus(_arg1.file.status);
_local15.description = _arg1.file.description;
_local15.setFileSize(_arg1.file.file_size);
if (((_arg1.file.keys) && (_arg1.file.keys.length))){
_local16 = 0;
while (_local16 < _arg1.file.keys.length) {
_local15.setKey(_arg1.file.keys[_local16].id, _arg1.file.keys[_local16].value);
_local16++;
};
};
if (((_arg1.file.ratings) && (_arg1.file.ratings.length))){
_local16 = 0;
while (_local16 < _arg1.file.ratings.length) {
_local15.setRating(_arg1.file.ratings[_local16].id, _arg1.file.ratings[_local16].votes, _arg1.file.ratings[_local16].score);
_local16++;
};
};
if (_arg1.get_contents){
_local15.loadContents();
};
};
callListener(APIEvent.FILE_INITIALIZED, _arg1.success, _local15);
break;
case "lookupSaveFiles":
_local7 = [];
if (((_arg1.success) && (_arg1.files))){
_local16 = 0;
while (_local16 < _arg1.files.length) {
_local17 = _arg1.files[_local16];
_local15 = new SaveFile(getSaveGroupById(_arg1.group_id));
_local15.name = _local17.filename;
_local15.id = _local17.save_id;
_local15.description = _local17.description;
_local15.thumbnailUrl = (_imageFilePath + _local17.thumb);
_local15.fileUrl = (_saveFilePath + _local17.file);
_local15.authorName = _local17.user_name;
_local15.authorId = _local17.user_id;
_local15.setStatus(_local17.status);
_local15.setFileSize(_local17.file_size);
if (((_local17.keys) && (_local17.keys.length))){
_local18 = 0;
while (_local18 < _local17.keys.length) {
_local15.setKey(_local17.keys[_local18].id, _local17.keys[_local18].value);
_local18++;
};
};
if (((_local17.ratings) && (_local17.ratings.length))){
_local18 = 0;
while (_local18 < _local17.ratings.length) {
_local15.setRating(_local17.ratings[_local18].id, _local17.ratings[_local18].votes, _local17.ratings[_local18].score);
_local18++;
};
};
_local7.push(_local15);
_local16++;
};
};
_arg1.owner.dispatchEvent(new APIEvent(APIEvent.QUERY_COMPLETE, _arg1.success, _local7));
break;
case "rateSaveFile":
_local15 = _arg1.owner;
_arg1.success = ((_arg1.success) && (!(_arg1.already_voted)));
if (_arg1.success){
_local15.setRating(_arg1.rating_id, _arg1.votes, _arg1.score);
};
_arg1.file = _local15;
_local15.dispatchEvent(new APIEvent(APIEvent.VOTE_COMPLETE, _arg1.success, _arg1));
break;
case "saveFile":
_local3 = {};
if (_arg1.success){
_local3 = {save_id:_arg1.save_id, filename:_arg1.filename, file_url:_arg1.file_url, thumbnail:_arg1.thumbnail, icon:_arg1.icon};
SaveFile(_arg1.owner).fileSaved(_local3);
};
_arg1.owner.dispatchEvent(new APIEvent(APIEvent.FILE_SAVED, _arg1.success, _local3));
break;
case "checkFilePrivs":
_local3 = {filename:_arg1.filename, folder:_arg1.folder, can_read:_arg1.can_read, can_write:_arg1.can_write};
callListener(APIEvent.FILE_PRIVS_LOADED, _arg1.success, _local3);
break;
};
}
public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:uint=0, _arg5:Boolean=false):void{
_eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public static function hasEventListener(_arg1:String):Boolean{
return (_eventDispatcher.hasEventListener(_arg1));
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
_eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
private static function dispatchEvent(_arg1:Event):void{
_eventDispatcher.dispatchEvent(_arg1);
echo(("Fired Event: " + _arg1.type));
}
static function callListener(_arg1:String, _arg2:Boolean=true, _arg3=undefined):void{
dispatchEvent(new APIEvent(_arg1, _arg2, _arg3));
if (_bridge){
_bridge.sendEvent(_arg1, {success:_arg2, data:_arg3});
};
}
private static function getCommandName(_arg1:String):String{
return (_arg1);
}
private static function getCommandID(_arg1:String):String{
return (_arg1);
}
private static function getPeriodAliases():Object{
var _local2:String;
var _local1:Object = new Object();
for (_local2 in period_aliases) {
_local1[period_aliases[_local2].alias] = _local2;
};
return (_local1);
}
public static function getPeriodName(_arg1:String):String{
var _local2:String;
for (_local2 in period_aliases) {
if (_local2 == _arg1){
return (period_aliases[_local2].name);
};
};
return (null);
}
public static function getPeriodAlias(_arg1:String):String{
var _local2:String;
for (_local2 in period_aliases) {
if (_local2 == _arg1){
return (period_aliases[_local2].alias);
};
};
return (null);
}
private static function sendError(_arg1:Object, _arg2:APIError):void{
var _local3:String = ((((("[NewgroundsAPI ERROR] :: " + getCommandName(_arg1.command_id)) + "() - ") + _arg2.name) + ":\n\t\t\t\t") + _arg2.message);
trace(_local3);
if (_bridge){
_bridge.sendEvent("trace", {data:_local3});
};
}
private static function sendWarning(_arg1:String, _arg2:String=null):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n[NewgroundsAPI WARNING] :: \tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(_arg1);
if (_bridge){
_bridge.sendEvent("trace", {data:_arg1});
};
}
private static function sendNotice(_arg1:String, _arg2:String=null):void{
var _local3:String;
if (_arg2){
_arg1 = (_arg1 + ((("\n[NewgroundsAPI NOTICE] :: \tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(_arg1);
if (_bridge){
_bridge.sendEvent("trace", {data:_arg1});
};
}
private static function fatalError(_arg1:String, _arg2:String):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n\tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(("***ERROR*** class=API\n\n" + _arg1));
}
public static function sendSecureCommand(_arg1:String, _arg2:Object, _arg3:Object=null, _arg4:Object=null, _arg5=null):void{
if (((((!(debugMode)) && (!(hasUserSession())))) && (!(hasUserEmail())))){
sendError({command_id:getCommandID(_arg1)}, new APIError("IDENTIFICATION_REQUIRED", (("You must be logged in or provide an e-mail address ( using NewgroundsAPI.setUserEmail(\"name@domain.com\"); ) to use " + _arg1) + "().")));
return;
};
if (!_arg1){
fatalError("Missing command", "sendSecureCommand");
};
if (!_arg2){
fatalError("Missing secure_params", "sendSecureCommand");
};
if (!_arg3){
_arg3 = new Object();
};
var _local6 = "";
var _local7:uint;
while (_local7 < 16) {
_local6 = (_local6 + compression_radix.charAt(Math.floor((Math.random() * compression_radix.length))));
_local7++;
};
if (((debugMode) && (!(session_id)))){
_arg2.session_id = "";
} else {
_arg2.session_id = session_id;
};
_arg2.as_version = 3;
_arg2.user_email = user_email;
_arg2.publisher_id = publisher_id;
_arg2.seed = _local6;
_arg2.command_id = getCommandID(_arg1);
var _local8:String = MD5.hash(_local6);
var _local9:String = RC4.encrypt(JSON.encode(_arg2), _encryptionKey);
var _local10:String = (_local8 + _local9);
_arg3.secure = compressHex(_local10);
secureCommand = _arg1;
sendCommand("securePacket", _arg3, false, _arg4, _arg5);
}
public static function stopPendingCommands():void{
SmartURLLoader.closeAll();
}
private static function onCommandComplete(_arg1:Event):void{
var response:Object;
var error:APIError;
var e = _arg1;
var loader:SmartURLLoader = SmartURLLoader(e.target);
echo((("INPUT: \n" + loader.response) + "\n"));
var i:uint;
while (i < _preloadAssets.length) {
if (_preloadAssets[i] == loader){
_preloadAssets.splice(i, 1);
break;
};
i = (i + 1);
};
try {
response = JSON.decode(loader.response);
} catch(error:Error) {
};
if (!response){
response = {command_id:loader._command, success:false};
};
response.owner = loader.owner;
if (((!(response)) || (!(response.success)))){
if (response.command_id == "connectMovie"){
connected = false;
};
error = new APIError(response.error_code, response.error_msg);
sendError(response, error);
if (response.command_id){
doEvent(response);
};
} else {
doEvent(response);
};
}
private static function onCommandError(_arg1:Event):void{
var _local2:Object = {success:false};
var _local3:SmartURLLoader = SmartURLLoader(_arg1.target);
_local2.owner = _local3.owner;
var _local4:uint;
while (_local4 < _preloadAssets.length) {
if (_preloadAssets[_local4] == _local3){
_preloadAssets.splice(_local4, 1);
break;
};
_local4++;
};
if (_local3._command){
_local2.command_id = _local3._command;
if (_local2.command_id == "connectMovie"){
connected = false;
};
doEvent(_local2);
};
}
private static function sendCommand(_arg1:String, _arg2:Object, _arg3:Boolean=false, _arg4:Object=null, _arg5=null):void{
var _local7:String;
var _local8:String;
var _local9:String;
if (((!(connected)) && (!((_arg1 == "connectMovie"))))){
_local7 = (("NewgroundsAPI." + _arg1) + "() - NewgroundsAPI.connectMovie() must be called before this command can be called\n");
fatalError(_local7, "connectMovie");
};
var _local6:SmartURLLoader = new SmartURLLoader();
_local6.addVariable("command_id", getCommandID(_arg1));
_local6.addVariable("tracker_id", _movieId);
if (debugMode){
_local6.addVariable("debug", 1);
};
if (_arg2){
for (_local8 in _arg2) {
_local6.addVariable(_local8, _arg2[_local8]);
};
};
if (_arg4){
for (_local9 in _arg4) {
_local6.addFile(_local9, _arg4[_local9], _local9);
};
};
if (_arg3){
_local6.method = URLRequestMethod.GET;
} else {
_local6.method = URLRequestMethod.POST;
};
_local6.preventCache = true;
if (_arg3){
_local6.openBrowser = true;
_local6.method = URLRequestMethod.GET;
} else {
_local6.addEventListener(Event.COMPLETE, onCommandComplete);
_local6.addEventListener(IOErrorEvent.IO_ERROR, onCommandError);
_local6.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onCommandError);
_local6.method = URLRequestMethod.POST;
};
if (_arg2.secure){
_local6._command = secureCommand;
} else {
_local6._command = getCommandID(_arg1);
};
_local6.owner = _arg5;
_local6.load(GATEWAY_URL);
}
public static function isFlashVersion(_arg1:uint, _arg2:uint=0, _arg3:uint=0, _arg4:uint=0):Boolean{
var _local6:Array = Capabilities.version.split(" ")[1].split(",");
var _local7:Array = arguments;
var _local8:uint;
while (_local8 < _local7.length) {
_local6[_local8] = uint(_local6[_local8]);
_local8++;
};
_local8 = 0;
while (_local8 < _local7.length) {
if (_local6[_local8] > _local7[_local8]){
return (true);
};
if (_local6[_local8] < _local7[_local8]){
return (false);
};
_local8++;
};
return (true);
}
public static function createAd():FlashAd{
sendMessage("You may see a security sandbox violation. This is normal!");
return (new FlashAd());
}
public static function sendMessage(_arg1:String, _arg2:Boolean=false):void{
var _local3:String = ("[NewgroundsAPI] :: " + _arg1);
trace(_local3);
if (_bridge){
_bridge.sendEvent("trace", {data:_local3});
};
}
private static function echo(_arg1:String):void{
if (do_echo){
trace(_arg1);
};
}
}
}//package com.newgrounds
Section 20
//APIError (com.newgrounds.APIError)
package com.newgrounds {
import flash.utils.*;
public class APIError {
public var code:Number;// = 0
public var message:String;
public var name:String;
public var alias:String;
public static const aliases:Array = new Array("UNKNOWN_ERROR", "INVALID_API_ID", "MISSING_PARAM", "INVALID_STAT_ID", "INVALID_COMMAND_ID", "FLASH_ADS_NOT_APPROVED", "PERMISSION_DENIED", "IDENTIFICATION_REQUIRED", "INVALID_EMAIL_ADDRESS", "BANNED_USER", "SESSION_EXPIRED", "INVALID_SCORE", "INVALID_MEDAL", "INVALID_FOLDER", "FILE_NOT_FOUND", "SITE_ID_REQUIRED", "UPLOAD_IN_PROGRESS", "USER_CANCELLED", "CONFIRM_REQUEST", "CONNECTION_FAILED");
private static const always_caps:Array = new Array("API", "URL", "ID");
public static const error_codes:Object = init_codes();
public static const error_names:Object = init_names();
public function APIError(_arg1, _arg2:String){
if ((_arg1 is String)){
_arg1 = error_codes[_arg1];
} else {
if (!(_arg1 is uint)){
_arg1 = 0;
};
};
this.code = _arg1;
this.message = _arg2;
this.name = error_names[_arg1];
this.alias = aliases[_arg1];
}
public function isError():Boolean{
return (true);
}
public static function init_codes():Dictionary{
var _local1:Dictionary = new Dictionary();
var _local2:uint;
while (_local2 < aliases.length) {
_local1[aliases[_local2]] = _local2;
_local2++;
};
return (_local1);
}
private static function init_names():Array{
var _local3:Array;
var _local4:uint;
var _local5:String;
var _local1:Array = new Array();
var _local2:uint;
while (_local2 < aliases.length) {
_local3 = aliases[_local2].toLowerCase().split("_");
_local4 = 0;
while (_local4 < _local3.length) {
_local3[_local4] = (_local3[_local4].substr(0, 1).toUpperCase() + _local3[_local4].substr(1, _local3[_local4].length));
for each (_local5 in always_caps) {
if (_local3[_local4].toUpperCase() == _local5){
_local3[_local4] = _local3[_local4].toUpperCase();
};
};
_local4++;
};
_local1[_local2] = _local3.join(" ");
_local2++;
};
return (_local1);
}
}
}//package com.newgrounds
Section 21
//APIEvent (com.newgrounds.APIEvent)
package com.newgrounds {
import flash.events.*;
public class APIEvent extends Event {
private var _data;
private var _success:Boolean;
private var _target;
private var _error:APIError;
public static const API_CONNECTED:String = "movieConnected";
public static const ADS_APPROVED:String = "adsApproved";
public static const AD_ATTACHED:String = "adAttached";
public static const HOST_BLOCKED:String = "hostBlocked";
public static const NEW_VERSION_AVAILABLE:String = "newVersionAvailable";
public static const EVENT_LOGGED:String = "eventLogged";
public static const SCORE_POSTED:String = "scorePosted";
public static const SCORES_LOADED:String = "scoresLoaded";
public static const MEDAL_UNLOCKED:String = "medalUnlocked";
public static const MEDALS_LOADED:String = "medalsLoaded";
public static const METADATA_LOADED:String = "metadataLoaded";
public static const FILE_PRIVS_LOADED:String = "filePrivsLoaded";
public static const FILE_SAVED:String = "fileSaved";
public static const FILE_LOADED:String = "fileLoaded";
public static const FILE_INITIALIZED:String = "fileInitialized";
public static const FILE_REQUESTED:String = "fileRequested";
public static const QUERY_COMPLETE:String = "queryComplete";
public static const VOTE_COMPLETE:String = "voteComplete";
public function APIEvent(_arg1:String, _arg2:Boolean=true, _arg3=undefined){
super(_arg1);
this._data = _arg3;
this._success = _arg2;
}
public function get success():Boolean{
return (this._success);
}
public function get data(){
return (this._data);
}
}
}//package com.newgrounds
Section 22
//BaseN (com.newgrounds.BaseN)
package com.newgrounds {
import flash.utils.*;
public class BaseN {
private var _hashIndex:String;
private var _hashVal:Dictionary;
private var _base:Number;
public function BaseN(_arg1:String=null){
if (_arg1){
this._hashIndex = _arg1;
} else {
this._hashIndex = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/";
};
this._base = this._hashIndex.length;
this._hashVal = new Dictionary();
var _local2:uint;
while (_local2 < this._base) {
this._hashVal[this._hashIndex.charAt(_local2)] = _local2;
_local2++;
};
}
public function encode(_arg1:Number, _arg2:uint=1):String{
var _local3:String = _arg1.toString();
var _local4 = "";
if (_local3.charAt(0) == "-"){
_local4 = "-";
_local3 = _local3.substring(1);
};
var _local5:Array = _local3.split(".", 2);
_local4 = (_local4 + this.baseNEncoder(_local5[0], _arg2));
if (_local5.length > 1){
_local4 = (_local4 + ("." + this.baseNEncoder(_local5[1])));
};
return (_local4);
}
public function decode(_arg1:String):Number{
var _local2 = "";
if (_arg1.charAt(0) == "-"){
_local2 = "-";
_arg1 = _arg1.substring(1);
};
var _local3:Array = _arg1.split(".", 2);
_local2 = (_local2 + this.baseNDecoder(_local3[0]));
if (_local3.length > 1){
_local2 = (_local2 + ".");
_local2 = (_local2 + this.baseNDecoder(_local3[1]));
};
return (Number(_local2));
}
private function baseNEncoder(_arg1:uint, _arg2:uint=1):String{
var _local3 = "";
var _local4:uint = _arg1;
while (_local4 != 0) {
_local3 = (this._hashIndex.charAt((_local4 % this._base)) + _local3);
_local4 = (_local4 / this._base);
};
if (_arg2){
while (_local3.length < _arg2) {
_local3 = (this._hashIndex.charAt(0) + _local3);
};
};
return (_local3);
}
private function baseNDecoder(_arg1:String):uint{
var _local2:uint;
var _local3:uint;
while (_local3 < _arg1.length) {
_local2 = (_local2 * this._base);
_local2 = (_local2 + this._hashVal[_arg1.charAt(_local3)]);
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 23
//Bridge (com.newgrounds.Bridge)
package com.newgrounds {
import flash.events.*;
import flash.net.*;
public class Bridge {
private var _inConnection:LocalConnection;
private var _outConnection:LocalConnection;
private var _widgetId:String;
public function Bridge(_arg1:String){
this._widgetId = _arg1;
this._inConnection = new LocalConnection();
this._outConnection = new LocalConnection();
this._inConnection.client = this;
this._inConnection.connect(("rec_" + this._widgetId));
this._outConnection.addEventListener(StatusEvent.STATUS, this.onStatus);
}
public function sendCommand(_arg1:String, _arg2:Object):void{
if (this._outConnection){
this._outConnection.send(this._widgetId, "sendCommand", _arg1, this.scrubParameters(_arg2));
};
}
public function sendEvent(_arg1:String, _arg2:Object):void{
if (this._outConnection){
this._outConnection.send(this._widgetId, "sendEvent", _arg1, this.scrubParameters(_arg2));
};
}
public function receiveEvent(_arg1:String, _arg2:Object):void{
API.callListener(_arg1, _arg2.success, _arg2.data);
}
public function scrubParameters(_arg1:Object):Object{
var _local3:String;
var _local2:Object = new Object();
for (_local3 in _arg1) {
if ((((((((((_arg1[_local3] is String)) || ((_arg1[_local3] is Number)))) || ((_arg1[_local3] is uint)))) || ((_arg1[_local3] is int)))) || ((_arg1[_local3] is Boolean)))){
_local2[_local3] = _arg1[_local3];
};
};
return (_local2);
}
private function onStatus(_arg1:Event):void{
}
}
}//package com.newgrounds
Section 24
//Medal (com.newgrounds.Medal)
package com.newgrounds {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class Medal {
private var _id:uint;
private var _name:String;
private var _value:uint;
private var _difficultyId:uint;
private var _unlocked:Boolean;// = false
private var _iconUrl:URLRequest;
private var _iconLoader:Loader;
private var _icon:BitmapData;
private static const DEFAULT_ICON:BitmapData = new BitmapData(50, 50, false, 0);
private static const DIFFICULT_NAMES:Array = [null, "Easy", "Moderate", "Challenging", "Difficult", "Brutal"];
public function Medal(_arg1:uint, _arg2:String, _arg3:uint, _arg4:uint, _arg5:Boolean, _arg6:String){
var id = _arg1;
var name = _arg2;
var value = _arg3;
var difficulty = _arg4;
var unlocked = _arg5;
var iconUrl = _arg6;
this._icon = DEFAULT_ICON;
super();
this._id = id;
this._name = name;
this._value = value;
this._difficultyId = difficulty;
this._unlocked = unlocked;
if (iconUrl){
this._iconUrl = new URLRequest(iconUrl);
this._iconLoader = new Loader();
this._iconLoader.contentLoaderInfo.addEventListener(Event.INIT, this.onIconLoaderInit);
this._iconLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.onIconLoaderError);
this._iconLoader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onIconLoaderError);
this._iconLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.onIconLoaderComplete);
try {
this._iconLoader.load(this._iconUrl, new LoaderContext(true));
} catch(e:Error) {
onIconLoaderError(null);
};
};
}
public function get difficulty():String{
return (DIFFICULT_NAMES[this._difficultyId]);
}
public function get difficultyId():uint{
return (this._difficultyId);
}
public function get icon():BitmapData{
return (this._icon);
}
public function get id():uint{
return (this._id);
}
public function get name():String{
return (this._name);
}
public function get unlocked():Boolean{
return (this._unlocked);
}
public function set unlocked(_arg1:Boolean):void{
this._unlocked = _arg1;
}
public function get value():uint{
return (this._value);
}
public function get bytesLoaded():uint{
return ((this._iconLoader) ? this._iconLoader.contentLoaderInfo.bytesLoaded : 0);
}
public function get bytesTotal():uint{
return ((this._iconLoader) ? this._iconLoader.contentLoaderInfo.bytesTotal : 0);
}
private function onIconLoaderInit(_arg1:Event):void{
}
private function onIconLoaderError(_arg1:IOErrorEvent):void{
trace((((("[NewgroundsAPI WARNING] :: Failed to load medal icon for " + this.name) + " (") + this._iconUrl.url.split("/").pop()) + ")"));
this._iconLoader.unload();
this._iconLoader = null;
}
private function onIconLoaderComplete(_arg1:Event):void{
var _local2:Bitmap = (this._iconLoader.content as Bitmap);
this._icon = _local2.bitmapData;
this._iconLoader.unload();
this._iconLoader = null;
}
public function unlock():void{
if (!this._unlocked){
API.unlockMedal(this._name);
};
}
public function createIconBitmap():Bitmap{
return (new Bitmap(this.icon));
}
public function toString():String{
return (this._name);
}
public static function createFromObject(_arg1:Object):Medal{
return (new Medal(_arg1.medal_id, _arg1.medal_name, _arg1.medal_value, _arg1.medal_difficulty, _arg1.medal_unlocked, _arg1.medal_icon));
}
}
}//package com.newgrounds
Section 25
//RC4 (com.newgrounds.RC4)
package com.newgrounds {
public class RC4 {
private static var sbox:Array = new Array(0xFF);
private static var mykey:Array = new Array(0xFF);
public static function encrypt(_arg1:String, _arg2:String):String{
var _local3:Array = strToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (charsToHex(_local5));
}
public static function encryptbin(_arg1:String, _arg2:String):Array{
var _local3:Array = strToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (_local5);
}
public static function decrypt(_arg1:String, _arg2:String):String{
var _local3:Array = hexToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (charsToStr(_local5));
}
private static function initialize(_arg1:Array):void{
var _local3:uint;
var _local2:uint;
var _local4:uint = _arg1.length;
var _local5:uint;
while (_local5 <= 0xFF) {
mykey[_local5] = _arg1[(_local5 % _local4)];
sbox[_local5] = _local5;
_local5++;
};
_local5 = 0;
while (_local5 <= 0xFF) {
_local2 = (((_local2 + sbox[_local5]) + mykey[_local5]) % 0x0100);
_local3 = sbox[_local5];
sbox[_local5] = sbox[_local2];
sbox[_local2] = _local3;
_local5++;
};
}
private static function calculate(_arg1:Array, _arg2:Array):Array{
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local10:uint;
initialize(_arg2);
var _local3:uint;
var _local4:uint;
var _local5:Array = new Array();
var _local9:uint;
while (_local9 < _arg1.length) {
_local3 = ((_local3 + 1) % 0x0100);
_local4 = ((_local4 + sbox[_local3]) % 0x0100);
_local7 = sbox[_local3];
sbox[_local3] = sbox[_local4];
sbox[_local4] = _local7;
_local10 = ((sbox[_local3] + sbox[_local4]) % 0x0100);
_local6 = sbox[_local10];
_local8 = (_arg1[_local9] ^ _local6);
_local5.push(_local8);
_local9++;
};
return (_local5);
}
private static function charsToHex(_arg1:Array):String{
var _local2:String = new String("");
var _local3:Array = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local4:uint;
while (_local4 < _arg1.length) {
_local2 = (_local2 + (_local3[(_arg1[_local4] >> 4)] + _local3[(_arg1[_local4] & 15)]));
_local4++;
};
return (_local2);
}
private static function hexToChars(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:uint = ((_arg1.substr(0, 2))=="0x") ? 2 : 0;
while (_local3 < _arg1.length) {
_local2.push(parseInt(_arg1.substr(_local3, 2), 16));
_local3 = (_local3 + 2);
};
return (_local2);
}
private static function charsToStr(_arg1:Array):String{
var _local2:String = new String("");
var _local3:uint;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(_arg1[_local3]));
_local3++;
};
return (_local2);
}
private static function strToChars(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:uint;
while (_local3 < _arg1.length) {
_local2.push(_arg1.charCodeAt(_local3));
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 26
//SaveFile (com.newgrounds.SaveFile)
package com.newgrounds {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
public class SaveFile extends EventDispatcher {
private var _filename:String;
private var _id:uint;
private var _description:String;
private var _contents;
private var _loader:SmartURLLoader;
private var _group:SaveGroup;
private var _keys:Dictionary;
private var _ratings:Dictionary;
private var _fileUrl:String;
private var _thumbnail:BitmapData;
private var _thumbnailUrl:String;
private var _authorId:uint;
private var _authorName:String;
private var _contentSize:uint;
private var _status:uint;
public static const STATUS_PRIVATE = 1;
public static const STATUS_SHARED = 2;
public static const STATUS_UNAPPROVED = 3;
public static const STATUS_APPROVED = 4;
public function SaveFile(_arg1:SaveGroup){
this._keys = new Dictionary();
this._ratings = new Dictionary();
this._group = _arg1;
this._description = "";
}
public function get name():String{
return (this._filename);
}
public function set name(_arg1:String):void{
this._filename = _arg1;
}
public function get id():uint{
return (this._id);
}
public function set id(_arg1:uint):void{
this._id = _arg1;
}
public function get description():String{
return (this._description);
}
public function set description(_arg1:String):void{
this._description = _arg1;
}
public function get contents(){
return (this._contents);
}
public function set contents(_arg1):void{
this._contents = _arg1;
this._contentSize = 0;
}
public function get thumbnailUrl():String{
return (this._thumbnailUrl);
}
public function set thumbnailUrl(_arg1:String):void{
this._thumbnailUrl = _arg1;
}
public function get fileUrl():String{
return (this._fileUrl);
}
public function set fileUrl(_arg1:String):void{
this._fileUrl = _arg1;
}
public function get thumbnail():BitmapData{
return (this._thumbnail);
}
public function set thumbnail(_arg1:BitmapData):void{
if (this._thumbnail){
this._thumbnail.dispose();
};
this._thumbnail = _arg1.clone();
}
public function loadThumbnail():Loader{
var _local1:Loader = new Loader();
if (this._thumbnailUrl){
_local1.load(new URLRequest(this._thumbnailUrl));
};
return (_local1);
}
public function get bytesLoaded():uint{
return ((this._loader) ? this._loader.bytesLoaded : this._contentSize);
}
public function get bytesTotal():uint{
return (this._contentSize);
}
public function get status():uint{
return (this._status);
}
function setStatus(_arg1:uint):void{
this._status = _arg1;
}
public function get groupId():uint{
return (this._group.id);
}
public function get groupName():String{
return (this._group.name);
}
public function get groupType():uint{
return (this._group.type);
}
public function get authorName():String{
return (this._authorName);
}
public function set authorName(_arg1:String):void{
this._authorName = _arg1;
}
public function get authorId():uint{
return (this._authorId);
}
public function set authorId(_arg1:uint):void{
this._authorId = _arg1;
}
public function get shared():Boolean{
return (true);
}
function setFileSize(_arg1:uint):void{
this._contentSize = _arg1;
}
public function setKey(_arg1, _arg2):void{
var _local3:SaveKey;
if ((_arg1 is String)){
_local3 = this._group.getKeyByName(_arg1);
} else {
_local3 = this._group.getKeyById(_arg1);
};
if (_local3){
switch (_local3.type){
case SaveKey.TYPE_BOOLEAN:
this._keys[_local3] = {id:_local3.id, val:Boolean(int(_arg2))};
break;
case SaveKey.TYPE_FLOAT:
this._keys[_local3] = {id:_local3.id, val:Number(_arg2)};
break;
case SaveKey.TYPE_INTEGER:
this._keys[_local3] = {id:_local3.id, val:int(_arg2)};
break;
case SaveKey.TYPE_STRING:
default:
this._keys[_local3] = {id:_local3.id, val:_arg2.toString()};
break;
};
};
}
public function getKey(_arg1){
var _local2:SaveKey;
if ((_arg1 is String)){
_local2 = this._group.getKeyByName(_arg1);
} else {
_local2 = this._group.getKeyById(_arg1);
};
if (_local2){
return (this._keys[_local2]);
};
return (null);
}
public function setRating(_arg1, _arg2:Number, _arg3:Number):void{
var _local4:SaveRating;
if ((_arg1 is String)){
_local4 = this._group.getRatingByName(_arg1);
} else {
_local4 = this._group.getRatingById(_arg1);
};
if (_local4){
this._ratings[_local4] = {id:_local4.id, name:_local4.name, votes:_arg2, score:_arg3};
};
}
public function getRating(_arg1):Object{
var _local2:SaveRating;
if ((_arg1 is String)){
_local2 = this._group.getRatingByName(_arg1);
} else {
_local2 = this._group.getRatingById(_arg1);
};
if (_local2){
return (this._ratings[_local2]);
};
return (null);
}
public function sendRating(_arg1:String, _arg2:Number):void{
var _local3:SaveRating = this._group.getRatingByName(_arg1);
if (!_local3){
trace((("[NewgroundsAPISaveFile] " + _arg1) + " is not a recognized save file"));
return;
};
if ((((_arg2 < _local3.minValue)) || ((_arg2 > _local3.maxValue)))){
trace(((("[NewgroundsAPISaveFile] Vote must be between " + _local3.minValue) + " and ") + _local3.maxValue));
return;
};
_local3.voted = true;
API.rateSaveFile(this, _local3, _arg2);
}
override public function toString():String{
var _local2:Object;
var _local3:Object;
var _local1 = (((((("Save File " + this._filename) + " ID: ") + this._id) + "\n ") + this._description) + "\n");
for each (_local2 in this._keys) {
_local1 = (_local1 + ((((" " + this._group.getKeyById(_local2.id).name) + ": ") + _local2.val) + "\n"));
};
for each (_local3 in this._ratings) {
_local1 = (_local1 + ((((((" " + this._group.getRatingById(_local3.id).name) + "\n Score: ") + _local3.score) + " Votes: ") + _local3.votes) + "\n"));
};
return (_local1);
}
public function toObject():Object{
var _local2:Object;
var _local1:Object = {group:this.groupId, filename:this.name, description:this.description, shared:true};
_local1.keys = [];
for each (_local2 in this._keys) {
_local1.keys.push({id:_local2.id, value:_local2.val});
};
return (_local1);
}
public function save(_arg1:Boolean=false, _arg2:Boolean=false):void{
API.saveFile(this, _arg1, _arg2);
}
public function loadContents():void{
if (this._fileUrl){
this._loader = new SmartURLLoader();
this._loader.responseFormat = URLLoaderDataFormat.BINARY;
this._loader.addEventListener(Event.COMPLETE, this.onContentsLoaded);
this._loader.addEventListener(IOErrorEvent.IO_ERROR, this.onContentsError);
this._loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onContentsError);
this._loader.load(this._fileUrl);
};
}
private function onContentsError(_arg1:Event):void{
this._loader = null;
dispatchEvent(new APIEvent(APIEvent.FILE_LOADED, false));
}
private function onContentsLoaded(_arg1:Event):void{
var _local2:ByteArray = _arg1.target.response;
this._contentSize = _local2.length;
_local2.uncompress();
var _local3:uint = _local2.readUnsignedByte();
if (_local3 == 0){
this._contents = new ByteArray();
this._contents.writeBytes(_local2, 1);
} else {
this._contents = _local2.readObject();
};
this._loader = null;
dispatchEvent(new APIEvent(APIEvent.FILE_LOADED, true, this.contents));
}
public function loadAuthorPage(){
API.loadUserPage(this._authorId, this._authorName);
}
function fileSaved(_arg1:Object):void{
this._id = _arg1.save_id;
this._thumbnailUrl = _arg1.thumbnail;
this._fileUrl = _arg1.file_url;
}
}
}//package com.newgrounds
Section 27
//SaveGroup (com.newgrounds.SaveGroup)
package com.newgrounds {
public class SaveGroup {
private var _name:String;
private var _id:uint;
private var _type:uint;
private var _keys:Array;
private var _ratings:Array;
private var _files:Array;
public static const TYPE_SYSTEM:uint = 0;
public static const TYPE_PRIVATE:uint = 1;
public static const TYPE_PUBLIC:uint = 2;
public static const TYPE_MODERATED:uint = 3;
public function SaveGroup(_arg1:uint, _arg2:String, _arg3:uint){
this._name = _arg2;
this._id = _arg1;
this._type = _arg3;
this._ratings = [];
this._keys = [];
this._files = [];
}
public function get name():String{
return (this._name);
}
public function get id():uint{
return (this._id);
}
public function get type():uint{
return (this._type);
}
public function get keys():Array{
return (this._keys.concat());
}
public function get ratings():Array{
return (this._ratings.concat());
}
public function addRating(_arg1:SaveRating):void{
this._ratings.push(_arg1);
}
public function getRatingById(_arg1:uint):SaveRating{
var _local2:uint;
while (_local2 < this._ratings.length) {
if (this._ratings[_local2].id == _arg1){
return (this._ratings[_local2]);
};
_local2++;
};
return (null);
}
public function getRatingByName(_arg1:String):SaveRating{
var _local2:uint;
while (_local2 < this._ratings.length) {
if (this._ratings[_local2].name == _arg1){
return (this._ratings[_local2]);
};
_local2++;
};
return (null);
}
public function addKey(_arg1:SaveKey):void{
this._keys.push(_arg1);
}
public function getKeyById(_arg1:uint):SaveKey{
var _local2:uint;
while (_local2 < this._keys.length) {
if (this._keys[_local2].id == _arg1){
return (this._keys[_local2]);
};
_local2++;
};
return (null);
}
public function getKeyByName(_arg1:String):SaveKey{
var _local2:uint;
while (_local2 < this._keys.length) {
if (this._keys[_local2].name == _arg1){
return (this._keys[_local2]);
};
_local2++;
};
return (null);
}
public function createQuery():SaveGroupQuery{
return (new SaveGroupQuery(this));
}
public function toString():String{
return ((((((("SaveGroup { name: " + this._name) + ", id: ") + this._id) + ", keys: ") + this._keys) + "}"));
}
public static function createFromObject(_arg1:Object):SaveGroup{
var _local4:Object;
var _local5:Object;
var _local2:SaveGroup = new SaveGroup(_arg1.group_id, _arg1.group_name, _arg1.group_type);
var _local3:uint;
while (_local3 < _arg1.keys.length) {
_local4 = _arg1.keys[_local3];
_local2.addKey(new SaveKey(_local4.id, _local4.name, _local4.type));
_local3++;
};
_local3 = 0;
while (_local3 < _arg1.ratings.length) {
_local5 = _arg1.ratings[_local3];
_local2.addRating(new SaveRating(_local5.id, _local5.name, _local5.float, _local5.min, _local5.max));
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 28
//SaveGroupQuery (com.newgrounds.SaveGroupQuery)
package com.newgrounds {
import flash.events.*;
public class SaveGroupQuery extends EventDispatcher {
private var _group:SaveGroup;
private var _groupBy:Array;
private var _lookupKeys:Array;
private var _lookupRatings:Array;
private var _fileConditions:Array;
private var _keyConditions:Array;
private var _ratingConditions:Array;
private var _sortConditions:Array;
private var _page:uint;
private var _resultsPerPage:uint;
private var _randomizeResults:Boolean;
public static const TABLE_FILES:uint = 1;
public static const TABLE_KEYS:uint = 2;
public static const TABLE_RATINGS:uint = 3;
public static const FILE_ID:uint = 0;
public static const AUTHOR_ID:uint = 1;
public static const AUTHOR_NAME:uint = 2;
public static const FILE_NAME:uint = 3;
public static const CREATED_ON:uint = 4;
public static const UPDATED_ON:uint = 5;
public static const TOTAL_VIEWS:uint = 6;
public static const FILE_STATUS:uint = 7;
public static const SCORE:String = "score";
public static const TOTAL_VOTES:String = "votes";
public function SaveGroupQuery(_arg1:SaveGroup){
this._group = _arg1;
this.reset();
}
public function get group():SaveGroup{
return (this._group);
}
public function get groupId():uint{
return (this._group.id);
}
public function get resultsPerPage():uint{
return (this._resultsPerPage);
}
public function set resultsPerPage(_arg1:uint):void{
this._resultsPerPage = _arg1;
}
public function get page():uint{
return (this._page);
}
public function set page(_arg1:uint):void{
this._page = _arg1;
}
public function get isRandomized():Boolean{
return (this._randomizeResults);
}
public function set isRandomized(_arg1:Boolean):void{
this._randomizeResults = _arg1;
}
public function reset():void{
this._fileConditions = [];
this._keyConditions = [];
this._ratingConditions = [];
this._sortConditions = [];
this._groupBy = [];
this._lookupKeys = [];
this._lookupRatings = [];
this._randomizeResults = false;
this._resultsPerPage = 20;
this._page = 1;
}
public function includeKey(_arg1:String):void{
var _local2:SaveKey = this._group.getKeyByName(_arg1);
if (_local2){
this._lookupKeys.push(_local2.id);
};
}
public function includeRating(_arg1:String):void{
var _local2:SaveRating = this._group.getRatingByName(_arg1);
if (_local2){
this._lookupRatings.push(_local2.id);
};
}
public function excludeKey(_arg1:String):void{
var _local2:SaveKey = this._group.getKeyByName(_arg1);
var _local3:uint;
while (_local3 < this._lookupKeys.length) {
if (this._lookupKeys[_local3] == _local2.id){
this._lookupKeys.splice(_local3, 1);
return;
};
_local3++;
};
}
public function excludeRating(_arg1:String):void{
var _local2:SaveRating = this._group.getRatingByName(_arg1);
var _local3:uint;
while (_local3 < this._lookupRatings.length) {
if (this._lookupRatings[_local3] == _local2.id){
this._lookupRatings.splice(_local3, 1);
return;
};
_local3++;
};
}
public function groupBy(_arg1:uint):void{
this._groupBy.push({table:TABLE_FILES, field:_arg1});
}
public function groupByRating(_arg1:String):void{
var _local2:SaveRating = this._group.getRatingByName(_arg1);
if (!_local2){
return;
};
this._groupBy.push({table:TABLE_RATINGS, field:_local2.id});
}
public function groupByKey(_arg1:String):void{
var _local2:SaveKey = this._group.getKeyByName(_arg1);
if (!_local2){
return;
};
this._groupBy.push({table:TABLE_KEYS, field:_local2.id});
}
public function addFileCondition(_arg1:uint, _arg2:String, _arg3):void{
this._fileConditions.push({field:_arg1, operator:_arg2, value:_arg3});
}
public function addKeyCondition(_arg1:String, _arg2:String, _arg3):void{
var _local4:SaveKey = this._group.getKeyByName(_arg1);
if (!_local4){
return;
};
if (!this.checkValue(_arg3, _local4.type)){
return;
};
this._keyConditions.push({key_id:_local4.id, operator:_arg2, value:_arg3});
}
public function addRatingCondition(_arg1:String, _arg2:String, _arg3, _arg4:String="score"):void{
var _local5:SaveRating = this._group.getRatingByName(_arg1);
if (!_local5){
return;
};
this._ratingConditions.push({rating_id:_local5.id, operator:_arg2, value:_arg3, column:_arg4});
}
private function addSortCondition(_arg1:uint, _arg2:uint, _arg3:Boolean=false, _arg4=null):void{
var _local5:Object = {table:_arg1, field:_arg2, desc:_arg3};
if (_arg4){
_local5.extra = _arg4;
};
this._sortConditions.push(_local5);
}
public function sortOn(_arg1:uint, _arg2:Boolean=false):void{
this.addSortCondition(TABLE_FILES, _arg1, _arg2);
}
public function sortOnKey(_arg1:String, _arg2:Boolean=false):void{
this.addSortCondition(TABLE_KEYS, this._group.getKeyByName(_arg1).id, _arg2);
}
public function sortOnRating(_arg1:String, _arg2:Boolean=false, _arg3:String="score"):void{
this.addSortCondition(TABLE_RATINGS, this._group.getRatingByName(_arg1).id, _arg2, _arg3);
}
public function execute():void{
API.executeSaveQuery(this);
}
private function checkValue(_arg1, _arg2:uint):Boolean{
return (true);
}
override public function toString():String{
return ("");
}
public function toObject():Object{
var _local1:Object = {page:this._page, num_results:this._resultsPerPage};
if (this.isRandomized){
_local1.randomize = 1;
};
if (((this._fileConditions) && ((this._fileConditions.length > 0)))){
_local1.file_conditions = this._fileConditions;
};
if (((this._keyConditions) && ((this._keyConditions.length > 0)))){
_local1.key_conditions = this._keyConditions;
};
if (((this._ratingConditions) && ((this._ratingConditions.length > 0)))){
_local1.rating_conditions = this._ratingConditions;
};
if (((this._sortConditions) && ((this._sortConditions.length > 0)))){
_local1.sort_conditions = this._sortConditions;
};
if (((this._lookupKeys) && ((this._lookupKeys.length > 0)))){
_local1.lookup_keys = this._lookupKeys;
};
if (((this._lookupRatings) && ((this._lookupRatings.length > 0)))){
_local1.lookup_ratings = this._lookupRatings;
};
if (((this._groupBy) && ((this._groupBy.length > 0)))){
_local1.group_by = this._groupBy;
};
return (_local1);
}
}
}//package com.newgrounds
Section 29
//SaveKey (com.newgrounds.SaveKey)
package com.newgrounds {
public class SaveKey {
private var _id:uint;
private var _name:String;
private var _type:uint;
public static const TYPE_FLOAT:uint = 1;
public static const TYPE_INTEGER:uint = 2;
public static const TYPE_STRING:uint = 3;
public static const TYPE_BOOLEAN:uint = 4;
public function SaveKey(_arg1:uint, _arg2:String, _arg3:uint){
this._id = _arg1;
this._name = _arg2;
this._type = _arg3;
}
public function get id():uint{
return (this._id);
}
public function get name():String{
return (this._name);
}
public function get type():uint{
return (this._type);
}
public function isValueValid(_arg1):Boolean{
if (this._type == TYPE_INTEGER){
return ((((_arg1 is int)) || ((_arg1 is uint))));
};
if (this._type == TYPE_FLOAT){
return ((((((_arg1 is int)) || ((_arg1 is uint)))) || ((_arg1 is Number))));
};
if (this._type == TYPE_STRING){
return ((_arg1 is String));
};
if (this._type == TYPE_BOOLEAN){
return ((((((((_arg1 is Boolean)) || ((_arg1 === 0)))) || ((_arg1 === 1)))) || ((_arg1 == ""))));
};
return (false);
}
public function toString():String{
return (this._name);
}
}
}//package com.newgrounds
Section 30
//SaveRating (com.newgrounds.SaveRating)
package com.newgrounds {
public class SaveRating {
private var _id:uint;
private var _name:String;
private var _minValue:Number;
private var _maxValue:Number;
private var _isFloat:Boolean;
private var _voted:Boolean;
public function SaveRating(_arg1:uint, _arg2:String, _arg3:Boolean, _arg4:Number=-INF, _arg5:Number=INF){
this._id = _arg1;
this._name = _arg2;
this._isFloat = _arg3;
this._minValue = _arg4;
this._maxValue = _arg5;
}
public function get id():uint{
return (this._id);
}
public function get name():String{
return (this._name);
}
public function get minValue():Number{
return (this._minValue);
}
public function get maxValue():Number{
return (this._maxValue);
}
public function get isFloat():Boolean{
return (this._isFloat);
}
public function get voted():Boolean{
return (this._voted);
}
public function set voted(_arg1:Boolean):void{
this._voted = _arg1;
}
public function toString():String{
return (this._name);
}
}
}//package com.newgrounds
Section 31
//Score (com.newgrounds.Score)
package com.newgrounds {
public class Score {
private var _board:ScoreBoard;
private var _position:uint;
private var _username:String;
private var _value:String;
private var _numeric_value:uint;
private var _tag:String;
public function Score(_arg1:ScoreBoard, _arg2:Number, _arg3:String, _arg4:String, _arg5:uint, _arg6:String){
this._board = _arg1;
this._position = _arg2;
this._username = _arg3;
this._value = _arg4;
this._numeric_value = _arg5;
this._tag = _arg6;
}
public function get board():ScoreBoard{
return (this._board);
}
public function get position():uint{
return (this._position);
}
public function get username():String{
return (this._username);
}
public function get value():String{
return (this._value);
}
public function get numeric_value():uint{
return (this._numeric_value);
}
public function get tag():String{
return (this._tag);
}
}
}//package com.newgrounds
Section 32
//ScoreBoard (com.newgrounds.ScoreBoard)
package com.newgrounds {
import flash.events.*;
public class ScoreBoard extends EventDispatcher {
private var _name:String;
private var _id:uint;
private var _scores:Array;
private var _period:String;// = "Today"
private var _num_results:uint;// = 10
private var _numScores:uint;
private var _desiredNumResults:uint;
private var _startRank:uint;
private var _endRank:uint;
private var _page:uint;// = 1
private var _tag:String;
public function ScoreBoard(_arg1:uint, _arg2:String, _arg3:String){
this._name = _arg2;
this._id = _arg1;
this._scores = [];
this._tag = _arg3;
}
public function exists():Boolean{
return ((this._id > 0));
}
public function get id():Number{
return (this._id);
}
public function get name():String{
return (this._name);
}
public function get period():String{
return (this._period);
}
public function get page():uint{
return (this._page);
}
public function get num_results():uint{
return (this._num_results);
}
public function get scores():Array{
return (this._scores);
}
public function get tag():String{
return (this._tag);
}
public function get num_scores():uint{
return (this._numScores);
}
public function postScore(_arg1:uint):void{
API.postScore(this._name, _arg1);
}
public function loadScores(_arg1:String="Today", _arg2:uint=1, _arg3:uint=10):void{
this._period = _arg1;
if (((!(this._period)) || ((this._period == "")))){
this._period = ScoreBoardPeriod.TODAY;
};
this._page = _arg2;
this._num_results = _arg3;
this._desiredNumResults = 0;
API.loadScores(this);
}
public function loadScoresInRange(_arg1:String="Today", _arg2:uint=1, _arg3:uint=10):void{
if (_arg2 == 0){
_arg2 = 1;
};
if (_arg3 < _arg2){
_arg3 = _arg2;
};
this._period = _arg1;
if (((!(this._period)) || ((this._period == "")))){
this._period = ScoreBoardPeriod.TODAY;
};
this._desiredNumResults = ((_arg3 - _arg2) + 1);
this._num_results = this._desiredNumResults;
while (int(((_arg2 - 1) / this._num_results)) != int(((_arg3 - 1) / this._num_results))) {
this._num_results++;
};
this._page = ((_arg2 - 1) / this._num_results);
this._startRank = _arg2;
this._endRank = _arg3;
this._page++;
API.loadScores(this);
}
function setScores(_arg1:Array, _arg2:String, _arg3:Number, _arg4:Number, _arg5:uint):void{
var _local7:uint;
this._period = _arg2;
this._page = _arg3;
this._num_results = _arg4;
this._numScores = _arg5;
this._scores = [];
var _local6:uint;
while (_local6 < _arg1.length) {
_local7 = (((this._num_results * (this._page - 1)) + 1) + _local6);
if (((!(this._desiredNumResults)) || ((((_local7 >= this._startRank)) && ((_local7 <= this._endRank)))))){
this._scores.push(new Score(this, _local7, _arg1[_local6].username, _arg1[_local6].value, _arg1[_local6].numeric_value, _arg1[_local6].tag));
};
_local6++;
};
this._num_results = this._scores.length;
}
}
}//package com.newgrounds
Section 33
//ScoreBoardPeriod (com.newgrounds.ScoreBoardPeriod)
package com.newgrounds {
public class ScoreBoardPeriod {
public static const TODAY:String = "Today";
public static const WEEK:String = "This Week";
public static const MONTH:String = "This Month";
public static const YEAR:String = "This Year";
public static const ALL_TIME:String = "All-Time";
}
}//package com.newgrounds
Section 34
//SmartURLLoader (com.newgrounds.SmartURLLoader)
package com.newgrounds {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.errors.*;
public class SmartURLLoader extends EventDispatcher {
private var _variables:Dictionary;
private var _files:Dictionary;
private var _hasVariables:Boolean;
private var _method:String;// = "GET"
private var _urlRequest:URLRequest;
private var _urlLoader:URLLoader;
private var _dataFormat:String;// = "text"
private var _openBrowser:Boolean;// = false
private var _preventCache:Boolean;// = false
var _command:String;
public var owner;
private static const CRLF:String = "
";
private static var _loaders:Dictionary = new Dictionary();
public function SmartURLLoader(){
this._urlRequest = new URLRequest();
this._variables = new Dictionary();
}
public function get responseFormat():String{
return (this._dataFormat);
}
public function set responseFormat(_arg1:String):void{
this._dataFormat = _arg1;
}
public function get response(){
return (this._urlLoader.data);
}
public function get hasFiles():Boolean{
return (Boolean(this._files));
}
public function get method():String{
return (this._method);
}
public function set method(_arg1:String):void{
if (((this.hasFiles) && ((_arg1 == URLRequestMethod.GET)))){
throw (new IllegalOperationError("GET cannot be used to upload files."));
};
this._method = _arg1;
}
public function get openBrowser():Boolean{
return (this._openBrowser);
}
public function set openBrowser(_arg1:Boolean):void{
this._openBrowser = _arg1;
}
public function get preventCache():Boolean{
return (this._preventCache);
}
public function set preventCache(_arg1:Boolean):void{
this._preventCache = _arg1;
}
public function get bytesLoaded():uint{
return ((this._urlLoader) ? this._urlLoader.bytesLoaded : 0);
}
public function get bytesTotal():uint{
return ((this._urlLoader) ? this._urlLoader.bytesTotal : 0);
}
public function addVariable(_arg1:String, _arg2=""):void{
this._variables[_arg1] = _arg2;
if (_arg2){
this._hasVariables = true;
};
}
public function addFile(_arg1:String, _arg2:ByteArray, _arg3:String, _arg4:String="application/octet-stream"):void{
this.method = URLRequestMethod.POST;
if (!this._files){
this._files = new Dictionary();
};
this._files[_arg1] = new File(_arg1, _arg2, _arg3, _arg4);
}
public function clearVariables():void{
this._variables = new Dictionary();
}
public function clearFiles():void{
this._files = null;
}
public function load(_arg1:String):void{
var urlVariables:URLVariables;
var key:String;
var boundary:String;
var i:uint;
var event:SecurityErrorEvent;
var url = _arg1;
this._urlRequest.url = url;
if (this._preventCache){
url = (url + ("?seed=" + Math.random()));
if (this._hasVariables){
url = (url + "&");
};
};
this._urlRequest.method = this._method;
if ((((this._urlRequest.method == URLRequestMethod.GET)) || (!(this.hasFiles)))){
this._urlRequest.contentType = "application/x-www-form-urlencoded";
if (this._hasVariables){
urlVariables = new URLVariables();
for (key in this._variables) {
urlVariables[key] = this._variables[key];
};
this._urlRequest.data = urlVariables;
};
} else {
boundary = "";
i = 0;
while (i < 32) {
boundary = (boundary + String.fromCharCode(uint((97 + (Math.random() * 25)))));
i = (i + 1);
};
this._urlRequest.contentType = (("multipart/form-data; boundary=\"" + boundary) + "\"");
this._urlRequest.data = this.buildMultipartData(boundary);
};
if (this.openBrowser){
navigateToURL(this._urlRequest, "_blank");
} else {
this._urlLoader = new URLLoader();
this._urlLoader.dataFormat = this._dataFormat;
this._urlLoader.addEventListener(Event.COMPLETE, this.onComplete);
this._urlLoader.addEventListener(ProgressEvent.PROGRESS, this.onProgress);
this._urlLoader.addEventListener(IOErrorEvent.IO_ERROR, this.onIOError);
this._urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, this.onHTTPStatus);
this._urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onSecurityError);
_loaders[this._urlLoader] = this;
try {
this._urlLoader.load(this._urlRequest);
} catch(error:Error) {
event = new SecurityErrorEvent(SecurityErrorEvent.SECURITY_ERROR, false, false, error.message);
onSecurityError(event);
};
};
}
public function close():void{
try {
this._urlLoader.close();
} catch(e:Error) {
};
}
public function dispose():void{
this.close();
this._files = null;
this._variables = null;
if (this._urlLoader){
this._urlLoader.removeEventListener(Event.COMPLETE, this.onComplete);
this._urlLoader.removeEventListener(ProgressEvent.PROGRESS, this.onProgress);
this._urlLoader.removeEventListener(IOErrorEvent.IO_ERROR, this.onIOError);
this._urlLoader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, this.onHTTPStatus);
this._urlLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onSecurityError);
this._urlLoader = null;
};
this._urlRequest = null;
delete _loaders[this];
}
private function buildMultipartData(_arg1:String):ByteArray{
var _local3:String;
var _local4:File;
var _local2:ByteArray = new ByteArray();
_local2.endian = Endian.BIG_ENDIAN;
_arg1 = ("--" + _arg1);
for (_local3 in this._variables) {
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(((("Content-Disposition: form-data; name=\"" + _local3) + "\"") + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes((this._variables[_local3] + CRLF));
};
if (this.hasFiles){
for each (_local4 in this._files) {
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(("Content-Disposition: form-data; name=\"Filename\"" + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes((_local4.fileName + CRLF));
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(((((("Content-Disposition: form-data; name=\"" + _local4.dataField) + "\"; filename=\"") + _local4.fileName) + "\"") + CRLF));
_local2.writeUTFBytes((("Content-Type: " + _local4.contentType) + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeBytes(_local4.data);
_local2.writeUTFBytes(CRLF);
};
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(("Content-Disposition: form-data; name=\"Upload\"" + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes(("Submit Query" + CRLF));
};
_local2.writeUTFBytes((_arg1 + "--"));
_local2.position = 0;
_local2.position = 0;
return (_local2);
}
private function onComplete(_arg1:Event):void{
dispatchEvent(_arg1);
this.dispose();
}
private function onProgress(_arg1:ProgressEvent):void{
dispatchEvent(_arg1);
}
private function onIOError(_arg1:IOErrorEvent):void{
dispatchEvent(_arg1);
this.dispose();
}
private function onSecurityError(_arg1:SecurityErrorEvent):void{
dispatchEvent(_arg1);
this.dispose();
}
private function onHTTPStatus(_arg1:HTTPStatusEvent):void{
dispatchEvent(_arg1);
}
public static function closeAll():void{
var _local1:SmartURLLoader;
for each (_local1 in _loaders) {
if (_local1){
_local1.dispose();
};
};
_loaders = new Dictionary();
}
}
}//package com.newgrounds
import flash.utils.*;
class File {
private var fileName:String;
private var data:ByteArray;
private var dataField:String;
private var contentType:String;
private function File(_arg1:String, _arg2:ByteArray, _arg3:String="Filedata", _arg4:String="application/octet-stream"){
this.fileName = _arg1;
this.data = _arg2;
this.dataField = _arg3;
this.contentType = _arg4;
}
}
Section 35
//NewgroundsAPIAsset_FlashAd_Container_2 (FlashAd_fla.NewgroundsAPIAsset_FlashAd_Container_2)
package FlashAd_fla {
import com.newgrounds.*;
import flash.display.*;
import flash.events.*;
public dynamic class NewgroundsAPIAsset_FlashAd_Container_2 extends MovieClip {
public var adMask:MovieClip;
public var ngLinkButton:SimpleButton;
public function NewgroundsAPIAsset_FlashAd_Container_2(){
addFrameScript(0, this.frame1, 10, this.frame11);
}
public function onNGLinkClicked(_arg1:MouseEvent):void{
API.loadNewgrounds();
}
function frame1(){
this.ngLinkButton.addEventListener(MouseEvent.CLICK, this.onNGLinkClicked);
}
function frame11(){
gotoAndPlay(1);
}
}
}//package FlashAd_fla
Section 36
//NewgroundsAPIAsset_Load_Indicator_5 (FlashAd_fla.NewgroundsAPIAsset_Load_Indicator_5)
package FlashAd_fla {
import flash.display.*;
import flash.events.*;
public dynamic class NewgroundsAPIAsset_Load_Indicator_5 extends MovieClip {
public function NewgroundsAPIAsset_Load_Indicator_5(){
addFrameScript(0, this.frame1);
}
public function onEnterFrame(_arg1:Event):void{
if (((visible) && (stage))){
rotation = (rotation + 30);
} else {
removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
};
}
function frame1(){
addEventListener(Event.ENTER_FRAME, this.onEnterFrame);
}
}
}//package FlashAd_fla
Section 37
//Char_Body_129 (Game_fla.Char_Body_129)
package Game_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Char_Body_129 extends MovieClip {
public var tf_ow:MovieClip;
public var armor:MovieClip;
public var hand1:MovieClip;
public var hand2:MovieClip;
public var head:MovieClip;
public var tf_lol:MovieClip;
public function Char_Body_129(){
addFrameScript(59, frame60, 60, frame61, 94, frame95, 95, frame96, 109, frame110, 111, frame112, 113, frame114, 115, frame116, 117, frame118, 119, frame120, 124, frame125, 125, frame126, 131, frame132, 135, frame136, 139, frame140, 144, frame145, 145, frame146, 156, frame157, 161, frame162, 174, frame175, 175, frame176, 185, frame186, 193, frame194, 203, frame204, 204, frame205, 219, frame220, 230, frame231, 234, frame235, 238, frame239, 269, frame270, 270, frame271, 281, frame282, 285, frame286, 289, frame290, 314, frame315, 315, frame316, 329, frame330, 331, frame332, 335, frame336, 339, frame340, 364, frame365, 365, frame366, 383, frame384, 386, frame387, 390, frame391, 394, frame395, 419, frame420, 420, frame421, 445, frame446, 449, frame450, 463, frame464, 464, frame465, 504, frame505, 505, frame506, 564, frame565, 565, frame566, 574, frame575, 602, frame603, 603, frame604, 636, frame637, 637, frame638, 684, frame685, 685, frame686, 694, frame695, 724, frame725, 754, frame755, 819, frame820, 820, frame821, 874, frame875, 875, frame876, 948, frame949, 949, frame950, 964, frame965, 988, frame989, 994, frame995, 1018, frame1019, 1041, frame1042, 1042, frame1043, 1058, frame1059, 1059, frame1060, 1079, frame1080, 1080, frame1081);
}
function frame949(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame391(){
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame157(){
hand1.flash.gotoAndPlay(4);
}
function frame950(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame395(){
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame1060(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame162(){
try {
hand1.pump.gotoAndPlay(2);
} catch(e) {
};
}
function frame286(){
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame282(){
if (Char(parent).weapon1 != 1){
hand2.gotoAndStop(3);
};
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame965(){
tf_lol.scaleX = parent.scaleX;
}
function frame603(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame604(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame725(){
if (Char(parent).head != ITEM.ZOMBIE){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
};
}
function frame290(){
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame176(){
gotoAndPlay("aiming");
Char(parent).animating = false;
}
function frame1080(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame1081(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame175(){
gotoAndPlay("aiming");
Char(parent).animating = false;
}
function frame186(){
if (Char(parent).weapon1 == 9){
hand1.visible = false;
};
}
function frame505(){
gotoAndPlay("dancing");
}
function frame506(){
gotoAndPlay("dancing");
}
function frame989(){
gotoAndPlay("drop");
}
function frame194(){
if (Char(parent).weapon1 == 9){
hand1.visible = true;
};
}
function frame755(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame995(){
tf_ow.scaleX = parent.scaleX;
}
function frame875(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame876(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame637(){
stop();
parent.visible = false;
}
function frame638(){
stop();
parent.visible = false;
}
function frame420(){
stop();
parent.visible = false;
}
function frame421(){
stop();
parent.visible = false;
}
function frame60(){
if (hand2.currentFrame == 3){
hand2.gotoAndStop(1);
};
gotoAndPlay(1);
}
function frame61(){
gotoAndPlay(59);
}
function frame316(){
stop();
parent.visible = false;
}
function frame315(){
stop();
parent.visible = false;
}
function frame685(){
try {
parent["feet"].visible = true;
} catch(e) {
};
gotoAndPlay("dizzy");
}
function frame204(){
gotoAndPlay("aiming");
Char(parent).animating = false;
}
function frame205(){
gotoAndPlay("aiming");
Char(parent).animating = false;
}
function frame565(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame566(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame446(){
hand1.visible = true;
}
function frame686(){
gotoAndPlay("dizzy");
}
function frame450(){
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame330(){
if (Char(parent).weapon1 != 1){
hand2.gotoAndStop(3);
};
}
function frame332(){
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame95(){
gotoAndPlay(65);
}
function frame695(){
Char(parent).feet.visible = false;
}
function frame336(){
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame575(){
Char(parent).animating = true;
Char(parent).feet.visible = false;
}
function frame340(){
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame220(){
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame464(){
gotoAndPlay(1);
Char(parent).animating = false;
}
function frame465(){
gotoAndPlay(1);
Char(parent).animating = false;
}
function frame96(){
gotoAndStop(65);
}
function frame1019(){
gotoAndPlay("drop");
}
function frame110(){
hand1.flash.play();
}
function frame112(){
hand1.flash.play();
}
function frame114(){
hand1.flash.play();
}
function frame116(){
hand1.flash.play();
}
function frame231(){
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame118(){
hand1.flash.play();
}
function frame235(){
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame239(){
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame366(){
stop();
parent.visible = false;
}
function frame125(){
gotoAndPlay("aiming");
Char(parent).animating = false;
}
function frame126(){
gotoAndPlay("aiming");
Char(parent).animating = false;
}
function frame120(){
hand1.flash.play();
}
function frame365(){
stop();
parent.visible = false;
}
function frame132(){
hand1.flash.play();
}
function frame1042(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame136(){
hand1.flash.play();
}
function frame1043(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame384(){
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame145(){
gotoAndPlay("aiming");
Char(parent).animating = false;
}
function frame146(){
gotoAndPlay("aiming");
Char(parent).animating = false;
}
function frame140(){
hand1.flash.play();
}
function frame820(){
stop();
parent.visible = false;
}
function frame1059(){
gotoAndPlay(1);
Char(parent).animating = false;
Char(parent).feet.visible = true;
}
function frame821(){
stop();
parent.visible = false;
}
function frame387(){
try {
GameEngine(parent.parent.parent).createFloorBlood(parent);
} catch(e) {
};
}
function frame270(){
stop();
parent.visible = false;
}
function frame271(){
stop();
parent.visible = false;
}
}
}//package Game_fla
Section 38
//Char_Body_gfx_130 (Game_fla.Char_Body_gfx_130)
package Game_fla {
import flash.display.*;
public dynamic class Char_Body_gfx_130 extends MovieClip {
public function Char_Body_gfx_130(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 39
//Char_hand_60 (Game_fla.Char_hand_60)
package Game_fla {
import flash.display.*;
public dynamic class Char_hand_60 extends MovieClip {
public var pump:MovieClip;
public var flash:MovieClip;
public function Char_hand_60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 40
//Char_hand_gfx_198 (Game_fla.Char_hand_gfx_198)
package Game_fla {
import flash.display.*;
public dynamic class Char_hand_gfx_198 extends MovieClip {
public function Char_hand_gfx_198(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 41
//Char_hand_grip_gfx_176 (Game_fla.Char_hand_grip_gfx_176)
package Game_fla {
import flash.display.*;
public dynamic class Char_hand_grip_gfx_176 extends MovieClip {
public function Char_hand_grip_gfx_176(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 42
//Char_hand_trigger_gfx_28 (Game_fla.Char_hand_trigger_gfx_28)
package Game_fla {
import flash.display.*;
public dynamic class Char_hand_trigger_gfx_28 extends MovieClip {
public function Char_hand_trigger_gfx_28(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 43
//Char_handback_47 (Game_fla.Char_handback_47)
package Game_fla {
import flash.display.*;
public dynamic class Char_handback_47 extends MovieClip {
public function Char_handback_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 44
//Char_handback_open_34 (Game_fla.Char_handback_open_34)
package Game_fla {
import flash.display.*;
public dynamic class Char_handback_open_34 extends MovieClip {
public function Char_handback_open_34(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 45
//Char_head_131 (Game_fla.Char_head_131)
package Game_fla {
import flash.display.*;
public dynamic class Char_head_131 extends MovieClip {
public function Char_head_131(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 46
//Char_head_zomjaw_50 (Game_fla.Char_head_zomjaw_50)
package Game_fla {
import flash.display.*;
public dynamic class Char_head_zomjaw_50 extends MovieClip {
public function Char_head_zomjaw_50(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(Math.ceil((Math.random() * 4)));
}
}
}//package Game_fla
Section 47
//DOODAD_blinking_light_38 (Game_fla.DOODAD_blinking_light_38)
package Game_fla {
import flash.display.*;
public dynamic class DOODAD_blinking_light_38 extends MovieClip {
public function DOODAD_blinking_light_38(){
addFrameScript(0, frame1, 38, frame39);
}
function frame1(){
mouseEnabled = false;
}
function frame39(){
this.gotoAndPlay((40 + Math.ceil((Math.random() * 50))));
}
}
}//package Game_fla
Section 48
//DOODAD_chaos_fill_rotate_noredbg_40 (Game_fla.DOODAD_chaos_fill_rotate_noredbg_40)
package Game_fla {
import flash.display.*;
public dynamic class DOODAD_chaos_fill_rotate_noredbg_40 extends MovieClip {
public function DOODAD_chaos_fill_rotate_noredbg_40(){
addFrameScript(0, frame1);
}
function frame1(){
try {
if (parent.parent.parent["effectsoff"] == true){
stop();
};
} catch(e) {
};
}
}
}//package Game_fla
Section 49
//DOODAD_disco_backlight_64 (Game_fla.DOODAD_disco_backlight_64)
package Game_fla {
import flash.display.*;
public dynamic class DOODAD_disco_backlight_64 extends MovieClip {
public function DOODAD_disco_backlight_64(){
addFrameScript(0, frame1);
}
function frame1(){
if (Math.random() > 0.5){
gotoAndPlay(10);
};
if (Math.random() > 0.5){
gotoAndPlay(20);
};
if (Math.random() > 0.5){
gotoAndPlay(30);
};
if (Math.random() > 0.5){
gotoAndPlay(40);
};
if (Math.random() > 0.5){
gotoAndPlay(50);
};
}
}
}//package Game_fla
Section 50
//DOODAD_discolines_65 (Game_fla.DOODAD_discolines_65)
package Game_fla {
import flash.display.*;
public dynamic class DOODAD_discolines_65 extends MovieClip {
public function DOODAD_discolines_65(){
addFrameScript(0, frame1);
}
function frame1(){
if (Math.random() > 0.5){
gotoAndPlay(10);
};
if (Math.random() > 0.5){
gotoAndPlay(20);
};
if (Math.random() > 0.5){
gotoAndPlay(30);
};
}
}
}//package Game_fla
Section 51
//DOODAD_dizzy_stars_136 (Game_fla.DOODAD_dizzy_stars_136)
package Game_fla {
import flash.display.*;
public dynamic class DOODAD_dizzy_stars_136 extends MovieClip {
public function DOODAD_dizzy_stars_136(){
addFrameScript(0, frame1);
}
function frame1(){
mouseEnabled = false;
}
}
}//package Game_fla
Section 52
//DOODAD_FallingWhale_89 (Game_fla.DOODAD_FallingWhale_89)
package Game_fla {
import flash.display.*;
public dynamic class DOODAD_FallingWhale_89 extends MovieClip {
public var gfx:MovieClip;
public function DOODAD_FallingWhale_89(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndPlay(Math.ceil((Math.random() * 60)));
}
}
}//package Game_fla
Section 53
//DOODAD_Fish_animated_79 (Game_fla.DOODAD_Fish_animated_79)
package Game_fla {
import flash.display.*;
public dynamic class DOODAD_Fish_animated_79 extends MovieClip {
public function DOODAD_Fish_animated_79(){
addFrameScript(0, frame1, 364, frame365);
}
function frame1(){
gotoAndPlay(Math.ceil((240 + ((Math.random() * 3) * 30))));
}
function frame365(){
if (Math.random() > 0.5){
gotoAndPlay(2);
};
}
}
}//package Game_fla
Section 54
//DOODAD_HangingTricky_animated_68 (Game_fla.DOODAD_HangingTricky_animated_68)
package Game_fla {
import flash.display.*;
public dynamic class DOODAD_HangingTricky_animated_68 extends MovieClip {
public var flash:MovieClip;
}
}//package Game_fla
Section 55
//DOODAD_Shoal_animated_80 (Game_fla.DOODAD_Shoal_animated_80)
package Game_fla {
import flash.display.*;
public dynamic class DOODAD_Shoal_animated_80 extends MovieClip {
public function DOODAD_Shoal_animated_80(){
addFrameScript(0, frame1, 519, frame520);
}
function frame1(){
gotoAndPlay(Math.ceil((400 + ((Math.random() * 3) * 30))));
}
function frame520(){
gotoAndPlay(2);
}
}
}//package Game_fla
Section 56
//DOODAD_ShoopFish_animated_81 (Game_fla.DOODAD_ShoopFish_animated_81)
package Game_fla {
import flash.display.*;
public dynamic class DOODAD_ShoopFish_animated_81 extends MovieClip {
public function DOODAD_ShoopFish_animated_81(){
addFrameScript(0, frame1, 364, frame365);
}
function frame1(){
gotoAndPlay(Math.ceil((240 + ((Math.random() * 3) * 30))));
}
function frame365(){
if (Math.random() > 0.5){
gotoAndPlay(2);
};
}
}
}//package Game_fla
Section 57
//DOODAD_superman_fly_77 (Game_fla.DOODAD_superman_fly_77)
package Game_fla {
import flash.display.*;
public dynamic class DOODAD_superman_fly_77 extends MovieClip {
public function DOODAD_superman_fly_77(){
addFrameScript(0, frame1);
}
function frame1(){
if (Math.random() > 0.5){
scaleX = -(scaleX);
};
}
}
}//package Game_fla
Section 58
//DOODAD_ufo_fly_75 (Game_fla.DOODAD_ufo_fly_75)
package Game_fla {
import flash.display.*;
public dynamic class DOODAD_ufo_fly_75 extends MovieClip {
public function DOODAD_ufo_fly_75(){
addFrameScript(0, frame1);
}
function frame1(){
if (Math.random() > 0.5){
scaleX = -(scaleX);
};
}
}
}//package Game_fla
Section 59
//DOODAD_WhaleGFX_91 (Game_fla.DOODAD_WhaleGFX_91)
package Game_fla {
import flash.display.*;
public dynamic class DOODAD_WhaleGFX_91 extends MovieClip {
public function DOODAD_WhaleGFX_91(){
addFrameScript(0, frame1);
}
function frame1(){
rotation = Math.round((Math.random() * 180));
}
}
}//package Game_fla
Section 60
//DoorLock_95 (Game_fla.DoorLock_95)
package Game_fla {
import flash.display.*;
public dynamic class DoorLock_95 extends MovieClip {
public var panel:MovieClip;
public var blink:MovieClip;
}
}//package Game_fla
Section 61
//ElevLock_93 (Game_fla.ElevLock_93)
package Game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class ElevLock_93 extends MovieClip {
public var blink:MovieClip;
public var tf:TextField;
}
}//package Game_fla
Section 62
//ElevLockBlink_94 (Game_fla.ElevLockBlink_94)
package Game_fla {
import flash.display.*;
public dynamic class ElevLockBlink_94 extends MovieClip {
public function ElevLockBlink_94(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
mouseEnabled = false;
}
}
}//package Game_fla
Section 63
//FINAL_atp_die_187 (Game_fla.FINAL_atp_die_187)
package Game_fla {
import flash.display.*;
public dynamic class FINAL_atp_die_187 extends MovieClip {
public var body:MovieClip;
}
}//package Game_fla
Section 64
//FINAL_atp_die_Body_188 (Game_fla.FINAL_atp_die_Body_188)
package Game_fla {
import flash.display.*;
public dynamic class FINAL_atp_die_Body_188 extends MovieClip {
public function FINAL_atp_die_Body_188(){
addFrameScript(23, frame24);
}
function frame24(){
stop();
}
}
}//package Game_fla
Section 65
//FINAL_leet_die_151 (Game_fla.FINAL_leet_die_151)
package Game_fla {
import flash.display.*;
public dynamic class FINAL_leet_die_151 extends MovieClip {
public var body:MovieClip;
}
}//package Game_fla
Section 66
//FINAL_leet_die_Body_152 (Game_fla.FINAL_leet_die_Body_152)
package Game_fla {
import flash.display.*;
public dynamic class FINAL_leet_die_Body_152 extends MovieClip {
public var armor:MovieClip;
public var hand1:MovieClip;
public var feet:MovieClip;
public var hand2:MovieClip;
public var head:MovieClip;
public function FINAL_leet_die_Body_152(){
addFrameScript(83, frame84);
}
function frame84(){
stop();
}
}
}//package Game_fla
Section 67
//FINAL_leet_die2_156 (Game_fla.FINAL_leet_die2_156)
package Game_fla {
import flash.display.*;
public dynamic class FINAL_leet_die2_156 extends MovieClip {
public var body:MovieClip;
}
}//package Game_fla
Section 68
//FINAL_leet_die2_Body_157 (Game_fla.FINAL_leet_die2_Body_157)
package Game_fla {
import flash.display.*;
public dynamic class FINAL_leet_die2_Body_157 extends MovieClip {
public function FINAL_leet_die2_Body_157(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Game_fla
Section 69
//FINAL_walkonly_158 (Game_fla.FINAL_walkonly_158)
package Game_fla {
import flash.display.*;
public dynamic class FINAL_walkonly_158 extends MovieClip {
public var body:MovieClip;
public var feet:MovieClip;
}
}//package Game_fla
Section 70
//FINAL_walkonly_Body_159 (Game_fla.FINAL_walkonly_Body_159)
package Game_fla {
import flash.display.*;
public dynamic class FINAL_walkonly_Body_159 extends MovieClip {
public var armor:MovieClip;
public var hand1:MovieClip;
public var hand2:MovieClip;
public var head:MovieClip;
}
}//package Game_fla
Section 71
//FX_auditorset_164 (Game_fla.FX_auditorset_164)
package Game_fla {
import flash.display.*;
public dynamic class FX_auditorset_164 extends MovieClip {
public function FX_auditorset_164(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package Game_fla
Section 72
//FX_auditorset2_194 (Game_fla.FX_auditorset2_194)
package Game_fla {
import flash.display.*;
public dynamic class FX_auditorset2_194 extends MovieClip {
public function FX_auditorset2_194(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package Game_fla
Section 73
//FX_Blink_227 (Game_fla.FX_Blink_227)
package Game_fla {
import flash.display.*;
public dynamic class FX_Blink_227 extends MovieClip {
public function FX_Blink_227(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package Game_fla
Section 74
//FX_Flash_51 (Game_fla.FX_Flash_51)
package Game_fla {
import flash.display.*;
public dynamic class FX_Flash_51 extends MovieClip {
public function FX_Flash_51(){
addFrameScript(0, frame1, 2, frame3, 4, frame5);
}
function frame3(){
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame5(){
gotoAndStop(1);
}
}
}//package Game_fla
Section 75
//FX_Ineffective_gfx_274 (Game_fla.FX_Ineffective_gfx_274)
package Game_fla {
import flash.display.*;
public dynamic class FX_Ineffective_gfx_274 extends MovieClip {
public function FX_Ineffective_gfx_274(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
gotoAndStop((2 + Math.ceil((Math.random() * 6))));
}
}
}//package Game_fla
Section 76
//LootMenu_itemsclip_208 (Game_fla.LootMenu_itemsclip_208)
package Game_fla {
import flash.display.*;
public dynamic class LootMenu_itemsclip_208 extends MovieClip {
public var stimpack:MovieClip;
public function LootMenu_itemsclip_208(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 77
//MAIN_crackedwall_23 (Game_fla.MAIN_crackedwall_23)
package Game_fla {
import flash.display.*;
public dynamic class MAIN_crackedwall_23 extends MovieClip {
public function MAIN_crackedwall_23(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
}
function frame3(){
stop();
parent.x = 0;
parent.y = 0;
}
function frame6(){
parent.x = -2;
parent.y = -2;
}
function frame7(){
stop();
parent.x = 0;
parent.y = 0;
}
function frame1(){
stop();
}
function frame4(){
parent.x = -2;
parent.y = -2;
}
function frame5(){
stop();
parent.x = 0;
parent.y = 0;
}
function frame8(){
stop();
}
function frame2(){
parent.x = -2;
parent.y = -2;
}
}
}//package Game_fla
Section 78
//MAIN_Locker_96 (Game_fla.MAIN_Locker_96)
package Game_fla {
import flash.display.*;
public dynamic class MAIN_Locker_96 extends MovieClip {
public function MAIN_Locker_96(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 79
//MainMenu_LoadView_126 (Game_fla.MainMenu_LoadView_126)
package Game_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainMenu_LoadView_126 extends MovieClip {
public var cancelbutton:SimpleButton;
public var c0:Char;
public var c1:Char;
public var c3:Char;
public var c2:Char;
public var tf_explored:TextField;
public var loadbutton:SimpleButton;
public function MainMenu_LoadView_126(){
addFrameScript(0, frame1);
}
public function copyCharDataObject(_arg1){
return (parent.parent["copyCharDataObject"](_arg1));
}
function frame1(){
c0.body.stop();
c1.body.stop();
c2.body.stop();
c3.body.stop();
c0.feet.stop();
c1.feet.stop();
c2.feet.stop();
c3.feet.stop();
}
public function loadOk(_arg1=null){
disableButtons();
this.visible = false;
var _local2 = parent;
_local2["loadOk"]();
}
public function cancelLoad(_arg1){
disableButtons();
var _local2 = parent;
_local2["enableButtons"]();
this.visible = false;
_local2 = parent.parent;
_local2["playSound"]("_SFX_Close");
}
public function disableButtons(){
loadbutton.removeEventListener(MouseEvent.CLICK, loadOk);
cancelbutton.removeEventListener(MouseEvent.CLICK, cancelLoad);
}
public function updateChars(){
var temp_so:*;
var chardata:Array;
var i:*;
var n:*;
try {
temp_so = SharedObject.getLocal("madness_retaliation");
chardata = [];
for (i in temp_so.data.player_chardata) {
chardata[i] = copyCharDataObject(temp_so.data.player_chardata[i]);
};
tf_explored.text = (Math.floor(((int(temp_so.data.exp_count) / parent.parent["totalRooms"]) * 100)) + "%");
n = 0;
while (n < 4) {
this[("c" + n)].body.armor.gotoAndStop(chardata[n].armor);
this[("c" + n)].body.head.gotoAndStop(chardata[n].head);
this[("c" + n)].body.hand1.gotoAndStop(chardata[n].weapon1);
n = (n + 1);
};
c0.visible = true;
c1.visible = true;
c2.visible = true;
c3.visible = true;
loadbutton.visible = true;
} catch(e) {
trace("SAVE MENU updateChars() ERROR:", e);
c0.visible = false;
c1.visible = false;
c2.visible = false;
c3.visible = false;
loadbutton.visible = false;
};
}
public function enableButtons(){
loadbutton.addEventListener(MouseEvent.CLICK, loadOk);
cancelbutton.addEventListener(MouseEvent.CLICK, cancelLoad);
}
}
}//package Game_fla
Section 80
//MainTimeline (Game_fla.MainTimeline)
package Game_fla {
import com.newgrounds.*;
import flash.display.*;
import flash.events.*;
import com.newgrounds.components.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var lootmenu:LootMenu;
public var equip_menu:EquipMenu;
public var default_gear_head:Array;
public var bloodsplatteroff:Boolean;
public var sfx_volume:Number;
public var lockedrooms:Array;
public var explored:Array;
public var totalRooms;
public var trickydata:Array;
public var halo:Boolean;
public var gear_armo:Array;
public var door_right:MovieClip;
public var leftwall:MovieClip;
public var lootdata:Array;
public var __setPropDict:Dictionary;
public var backdrop:MovieClip;
public var lrd_gear_item:Array;
public var savemenu:SaveMenu;
public var __id0_:APIConnector;
public var bgm_volume:Number;
public var exp_count:int;
public var bgm_channel:SoundChannel;
public var gear_head:Array;
public var cm;
public var mainmenu;
public var default_gear_hand:Array;
public var easymode:Boolean;
public var options;
public var elevlock:MovieClip;
public var bgm;
public var enemy_chardata:Array;
public var lrd_gear_armo:Array;
public var ge:GameEngine;
public var elevator:MovieClip;
public var lrd_current_room:int;
public var lrd_pid_energy:int;
public var lrd_player_chardata:Array;
public var roomdata:Array;
public var tipsenabled:Boolean;
public var minimap_button:SimpleButton;
public var nav:NavMenu;
public var gear_hand:Array;
public var lock:Object;
public var lrd_gear_head:Array;
public var locker:MovieClip;
public var default_gear_item:Array;
public var noenemies:Boolean;
public var nextentry:String;
public var map:MapMenu;
public var prev_room:uint;
public var crackedleft:MovieClip;
public var doorlockleft:MovieClip;
public var idleanimsoff;
public var pid:Boolean;
public var isdark:Array;
public var minimap:MapMenu;
public var player_chardata:Array;
public var lrd_explored:Array;
public var pid_energy:int;
public var lrd_gear_hand:Array;
public var gear_item:Array;
public var default_gear_armo:Array;
public var jesusdata:Array;
public var current_room:uint;
public var crackedright:MovieClip;
public var rightwall:MovieClip;
public var doorlockright:MovieClip;
public var keycard:int;
public var door_left:MovieClip;
public function MainTimeline(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(1, frame2, 0, frame1);
}
public function outLocker(_arg1){
Util.removeFilterFromMC(locker);
}
public function saveLastRoomData(){
var _local1:*;
lrd_current_room = prev_room;
lrd_gear_item = [];
for (_local1 in gear_item) {
lrd_gear_item[_local1] = gear_item[_local1];
};
lrd_explored = explored;
lrd_pid_energy = pid_energy;
}
public function unlockMedal(_arg1){
API.unlockMedal(_arg1);
}
public function setDefaultLockData(){
lockedrooms = [];
lockedrooms[6] = {door:"up", type:"elev", level:2};
lockedrooms[7] = {door:"left", type:"door", level:3};
lockedrooms[13] = {door:"left", type:"door", level:1};
lockedrooms[19] = {door:"down", type:"elev", level:1};
lockedrooms[22] = {door:"right", type:"door", level:2};
lockedrooms[39] = {door:"left", type:"door", level:2};
lockedrooms[74] = {door:"right", type:"door", level:2};
lockedrooms[49] = {door:"right", type:"door", level:3};
lockedrooms[47] = {door:"right", type:"door", level:2};
lockedrooms[61] = {door:"up", type:"elev", level:4};
lockedrooms[78] = {door:"up", type:"elev", level:4};
lockedrooms[83] = {door:"right", type:"door", level:4};
lockedrooms[99] = {door:"left", type:"door", level:3};
lockedrooms[118] = {door:"right", type:"door", level:3};
lockedrooms[121] = {door:"right", type:"door", level:4};
lockedrooms[132] = {door:"down", type:"elev", level:4};
lockedrooms[158] = {door:"up", type:"elev", level:4};
lockedrooms[56] = {door:"left", type:"crack", level:1};
lockedrooms[66] = {door:"right", type:"crack", level:1};
lockedrooms[79] = {door:"right", type:"crack", level:1};
lockedrooms[88] = {door:"left", type:"crack", level:1};
lockedrooms[109] = {door:"right", type:"crack", level:1};
lockedrooms[111] = {door:"left", type:"crack", level:1};
lockedrooms[128] = {door:"right", type:"crack", level:1};
lockedrooms[152] = {door:"right", type:"crack", level:1};
lockedrooms[159] = {door:"left", type:"crack", level:1};
}
public function clickedLocker(_arg1){
if (!ge.paused){
locker.gotoAndStop(2);
lootmenu.visible = true;
lootmenu.updateButtons(lootdata[current_room]);
ge.paused = true;
nav.visible = false;
playSound("_SFX_locker");
};
}
public function countEquips(_arg1){
var _local2:uint;
var _local3:*;
_local2 = 0;
_local3 = 1;
while (_local3 <= 4) {
if (ge[("pchar" + _local3)].weapon1 == _arg1){
_local2++;
};
if (ge[("pchar" + _local3)].weapon2 == _arg1){
_local2++;
};
_local3++;
};
return (_local2);
}
public function playSound(_arg1){
var sfx:*;
var sound_channel:*;
var trans:SoundTransform;
var sfx_name = _arg1;
try {
sfx = new (getDefinitionByName(sfx_name));
sound_channel = new SoundChannel();
trans = sound_channel.soundTransform;
trans.volume = sfx_volume;
sound_channel = sfx.play(0, 1, trans);
} catch(e) {
trace("playSound() ", e);
};
}
public function closeLootMenu(){
lootmenu.visible = false;
ge.paused = false;
nav.visible = true;
}
public function get flashbang():int{
return (gear_item[3]);
}
public function set flashbang(_arg1:int):void{
gear_item[3] = _arg1;
}
public function switchRoomNumber(_arg1){
if (roomdata[current_room][_arg1] == prev_room){
noenemies = true;
} else {
noenemies = false;
};
prev_room = current_room;
current_room = roomdata[current_room][_arg1];
}
public function countExplored(){
var _local1:*;
exp_count = 0;
_local1 = 1;
while (_local1 <= 176) {
if (explored[_local1] == true){
exp_count++;
};
_local1++;
};
return (exp_count);
}
function frame1(){
if ((((__setPropDict[__id0_] == undefined)) || (!((int(__setPropDict[__id0_]) == 1))))){
__setPropDict[__id0_] = currentFrame;
__setProp___id0__preloader_ngloader_1();
};
}
public function nextRoom(_arg1=true){
var rd:*;
var edata:*;
var saveextradata = _arg1;
itemBugFix();
try {
saveLastRoomData();
} catch(e) {
};
locker.alpha = 1;
nav.visible = false;
nav.cover.visible = false;
if (ge != null){
if (saveextradata){
player_chardata[0].abshp = ge.pchar1.hp;
player_chardata[1].abshp = ge.pchar2.hp;
player_chardata[2].abshp = ge.pchar3.hp;
player_chardata[3].abshp = ge.pchar4.hp;
player_chardata[0].weapon1 = ge.pchar1.weapon1;
player_chardata[1].weapon1 = ge.pchar2.weapon1;
player_chardata[2].weapon1 = ge.pchar3.weapon1;
player_chardata[3].weapon1 = ge.pchar4.weapon1;
player_chardata[0].weapon2 = ge.pchar1.weapon2;
player_chardata[1].weapon2 = ge.pchar2.weapon2;
player_chardata[2].weapon2 = ge.pchar3.weapon2;
player_chardata[3].weapon2 = ge.pchar4.weapon2;
};
try {
ge.dispose();
removeChild(ge);
} catch(e) {
};
};
ge = new GameEngine();
addChild(ge);
if (current_room <= 0){
current_room = 1;
};
rd = roomdata[current_room];
edata = enemy_chardata[current_room];
if (!(edata is Array)){
edata = [];
} else {
if (current_room == 166){
} else {
if (current_room == 107){
if (keycard >= 3){
edata = [];
};
} else {
if (current_room == 71){
if (halo){
edata = [];
};
} else {
if (current_room == 150){
if (pid){
edata = [];
};
} else {
if (((((easymode) || ((Math.random() >= 0.5)))) && (explored[current_room]))){
edata = [];
} else {
if (noenemies){
edata = [];
};
};
};
};
};
};
};
if (((!((lootdata[current_room] == null))) && ((lootdata[current_room] is Array)))){
if (lootdata[current_room].length > 0){
locker.gotoAndStop(1);
} else {
locker.gotoAndStop(2);
};
locker.visible = true;
locker.mouseEnabled = false;
} else {
locker.visible = false;
};
ge.init(player_chardata, edata, nextentry, (isdark[current_room] == true), nvg);
if (edata.length <= 0){
explored[current_room] = true;
};
equip_menu.engine = ge;
nav.engine = ge;
nav.up.alpha = 1;
nav.down.alpha = 1;
ge.equip_menu = equip_menu;
if (getChildIndex(ge) > getChildIndex(nav)){
setChildIndex(ge, getChildIndex(nav));
};
updateMaps();
updateNav((rd[0] > 0), (rd[1] > 0), (rd[2] > 0), (rd[3] > 0));
backdrop.gotoAndStop(current_room);
playMusic();
}
public function copyCharDataObject(_arg1){
var _local2:*;
_local2 = {col:_arg1.col, row:_arg1.row, weapon1:_arg1.weapon1, weapon2:_arg1.weapon2, head:_arg1.head, armor:_arg1.armor, charclass:_arg1.charclass, abshp:_arg1.abshp};
return (_local2);
}
public function enableLocker(){
if (locker.visible){
if (lootdata[current_room].length > 0){
locker.mouseEnabled = true;
};
};
}
public function setDefaultGearData(){
gear_item = default_gear_item;
gear_head = default_gear_head;
gear_armo = default_gear_armo;
gear_hand = default_gear_hand;
}
public function showSaveMenu(){
savemenu.updateChars();
nav.visible = false;
savemenu.visible = true;
playSound("_SFX_Open");
}
function frame2(){
roomdata = [];
roomdata[1] = [0, 2, 0, 0];
roomdata[2] = [1, 3, 0, 0];
roomdata[3] = [2, 9, 4, 0];
roomdata[4] = [5, 6, 0, 3];
roomdata[5] = [0, 4, 0, 0];
roomdata[6] = [4, 0, 7, 0];
roomdata[7] = [8, 0, 0, 6];
roomdata[8] = [0, 7, 0, 0];
roomdata[9] = [3, 10, 0, 0];
roomdata[10] = [9, 11, 0, 0];
roomdata[11] = [10, 12, 0, 0];
roomdata[12] = [11, 16, 0, 13];
roomdata[13] = [15, 14, 12, 0];
roomdata[14] = [13, 0, 0, 0];
roomdata[15] = [0, 13, 0, 0];
roomdata[16] = [12, 17, 0, 0];
roomdata[17] = [16, 18, 0, 0];
roomdata[18] = [17, 19, 0, 0];
roomdata[19] = [18, 20, 0, 24];
roomdata[20] = [19, 21, 0, 0];
roomdata[21] = [20, 22, 0, 0];
roomdata[22] = [21, 23, 0, 0];
roomdata[23] = [22, 0, 0, 0];
roomdata[24] = [0, 25, 19, 29];
roomdata[25] = [24, 26, 0, 0];
roomdata[26] = [25, 27, 0, 0];
roomdata[27] = [26, 28, 0, 32];
roomdata[28] = [27, 0, 0, 0];
roomdata[29] = [0, 0, 24, 34];
roomdata[30] = [0, 31, 0, 35];
roomdata[31] = [30, 32, 0, 0];
roomdata[32] = [31, 33, 27, 0];
roomdata[33] = [32, 0, 0, 0];
roomdata[34] = [0, 0, 29, 39];
roomdata[35] = [0, 36, 30, 0];
roomdata[36] = [35, 37, 0, 0];
roomdata[37] = [36, 38, 0, 0];
roomdata[38] = [37, 0, 0, 44];
roomdata[39] = [74, 40, 34, 0];
roomdata[40] = [39, 41, 0, 0];
roomdata[41] = [40, 42, 0, 0];
roomdata[42] = [41, 43, 0, 0];
roomdata[43] = [42, 44, 0, 48];
roomdata[44] = [43, 45, 38, 0];
roomdata[45] = [44, 46, 0, 0];
roomdata[46] = [45, 47, 0, 0];
roomdata[47] = [46, 75, 0, 0];
roomdata[48] = [51, 49, 43, 0];
roomdata[49] = [48, 50, 0, 0];
roomdata[50] = [49, 0, 0, 120];
roomdata[51] = [52, 48, 0, 0];
roomdata[52] = [53, 51, 0, 0];
roomdata[53] = [54, 52, 0, 0];
roomdata[54] = [55, 53, 0, 0];
roomdata[55] = [56, 54, 0, 0];
roomdata[56] = [57, 55, 0, 0];
roomdata[57] = [58, 56, 0, 0];
roomdata[58] = [59, 57, 0, 0];
roomdata[59] = [60, 58, 0, 0];
roomdata[60] = [61, 59, 65, 0];
roomdata[61] = [0, 60, 62, 0];
roomdata[62] = [0, 0, 63, 61];
roomdata[63] = [64, 0, 0, 62];
roomdata[64] = [0, 63, 0, 0];
roomdata[65] = [0, 66, 0, 60];
roomdata[66] = [65, 67, 0, 0];
roomdata[67] = [66, 68, 0, 0];
roomdata[68] = [67, 69, 73, 0];
roomdata[69] = [68, 0, 0, 0];
roomdata[70] = [0, 71, 0, 0];
roomdata[71] = [70, 72, 0, 0];
roomdata[72] = [71, 73, 0, 0];
roomdata[73] = [72, 74, 0, 68];
roomdata[74] = [73, 39, 0, 0];
roomdata[75] = [47, 76, 0, 0];
roomdata[76] = [75, 77, 0, 0];
roomdata[77] = [76, 78, 0, 79];
roomdata[78] = [77, 0, 161, 0];
roomdata[79] = [0, 80, 77, 82];
roomdata[80] = [79, 81, 0, 0];
roomdata[81] = [80, 0, 0, 0];
roomdata[82] = [88, 0, 79, 83];
roomdata[83] = [0, 84, 82, 0];
roomdata[84] = [83, 0, 85, 0];
roomdata[85] = [0, 86, 0, 84];
roomdata[86] = [85, 0, 0, 87];
roomdata[87] = [0, 0, 86, 0];
roomdata[88] = [90, 82, 0, 89];
roomdata[89] = [93, 0, 88, 0];
roomdata[90] = [0, 88, 91, 0];
roomdata[91] = [0, 92, 0, 90];
roomdata[92] = [91, 0, 0, 0];
roomdata[93] = [0, 89, 94, 0];
roomdata[94] = [95, 0, 0, 93];
roomdata[95] = [96, 94, 0, 0];
roomdata[96] = [97, 95, 0, 0];
roomdata[97] = [98, 96, 0, 0];
roomdata[98] = [99, 97, 0, 101];
roomdata[99] = [130, 98, 0, 0];
roomdata[100] = [0, 101, 0, 0];
roomdata[101] = [100, 102, 98, 0];
roomdata[102] = [101, 103, 0, 0];
roomdata[103] = [102, 104, 0, 0];
roomdata[104] = [103, 105, 0, 0];
roomdata[105] = [104, 106, 0, 0];
roomdata[106] = [105, 0, 0, 111];
roomdata[107] = [0, 108, 0, 0];
roomdata[108] = [107, 109, 0, 0];
roomdata[109] = [108, 110, 0, 117];
roomdata[110] = [109, 0, 0, 0];
roomdata[111] = [112, 115, 106, 121];
roomdata[112] = [113, 111, 0, 0];
roomdata[113] = [0, 112, 0, 114];
roomdata[114] = [0, 0, 113, 0];
roomdata[115] = [111, 116, 0, 0];
roomdata[116] = [115, 117, 0, 0];
roomdata[117] = [116, 118, 109, 0];
roomdata[118] = [117, 119, 0, 0];
roomdata[119] = [118, 120, 0, 0];
roomdata[120] = [119, 0, 50, 0];
roomdata[121] = [122, 123, 111, 0];
roomdata[122] = [0, 121, 0, 0];
roomdata[123] = [121, 124, 0, 0];
roomdata[124] = [123, 125, 0, 0];
roomdata[125] = [124, 126, 0, 0];
roomdata[126] = [125, 127, 0, 0];
roomdata[127] = [126, 128, 0, 0];
roomdata[128] = [127, 129, 0, 0];
roomdata[129] = [128, 0, 0, 0];
roomdata[130] = [131, 99, 0, 0];
roomdata[131] = [132, 130, 0, 0];
roomdata[132] = [133, 131, 0, 159];
roomdata[133] = [135, 132, 0, 0];
roomdata[134] = [0, 159, 0, 0];
roomdata[135] = [136, 133, 0, 0];
roomdata[136] = [0, 135, 0, 137];
roomdata[137] = [138, 155, 136, 0];
roomdata[138] = [139, 137, 0, 0];
roomdata[139] = [140, 138, 0, 0];
roomdata[140] = [144, 139, 0, 141];
roomdata[141] = [0, 142, 140, 0];
roomdata[142] = [141, 143, 0, 0];
roomdata[143] = [142, 0, 0, 152];
roomdata[144] = [0, 140, 0, 0];
roomdata[145] = [0, 0, 146, 148];
roomdata[146] = [0, 0, 0, 145];
roomdata[147] = [0, 148, 0, 0];
roomdata[148] = [147, 149, 145, 0];
roomdata[149] = [148, 150, 0, 0];
roomdata[150] = [149, 151, 0, 0];
roomdata[151] = [150, 152, 0, 0];
roomdata[152] = [151, 153, 143, 0];
roomdata[153] = [152, 154, 0, 0];
roomdata[154] = [153, 0, 0, 0];
roomdata[155] = [137, 156, 0, 0];
roomdata[156] = [155, 157, 0, 0];
roomdata[157] = [156, 158, 0, 0];
roomdata[158] = [157, 0, 159, 0];
roomdata[159] = [134, 0, 132, 158];
roomdata[160] = [161, 170, 0, 171];
roomdata[161] = [169, 163, 0, 78];
roomdata[162] = [161, 0, 0, 163];
roomdata[163] = [161, 171, 162, 0];
roomdata[164] = [165, 161, 176, 0];
roomdata[165] = [0, 164, 0, 0];
roomdata[166] = [0, 167, 0, 0];
roomdata[167] = [166, 167, 176, 164];
roomdata[168] = [0, 0, 161, 169];
roomdata[169] = [0, 160, 168, 161];
roomdata[170] = [160, 172, 0, 0];
roomdata[171] = [163, 0, 164, 160];
roomdata[172] = [0, 0, 161, 168];
roomdata[173] = [174, 176, 176, 164];
roomdata[174] = [175, 167, 176, 164];
roomdata[175] = [176, 176, 0, 173];
roomdata[176] = [175, 175, 0, 164];
setDefaultLootData();
lockedrooms = [];
setDefaultLockData();
jesusdata = [{col:7, row:3, weapon1:ITEM.oMOSSBERG, head:ITEM.LEET, armor:ITEM.LEET, charclass:"Heavy", abshp:5}, {col:10, row:5, weapon1:ITEM.oMP5, head:ITEM.LEET, armor:ITEM.LEET, charclass:"Assault", abshp:5}, {col:10, row:0, weapon1:ITEM.oMP5, head:ITEM.LEET, armor:ITEM.LEET, charclass:"Assault", abshp:5}, {col:8, row:4, weapon1:ITEM.oDEAGLE, head:ITEM.LEET, armor:ITEM.LEET, charclass:"Assault", abshp:5}, {col:8, row:1, weapon1:ITEM.oDEAGLE, head:ITEM.LEET, armor:ITEM.LEET, charclass:"Assault", abshp:5}, {col:9, row:3, weapon1:ITEM.o316, head:ITEM.JESUS, armor:ITEM.JESUS, charclass:"CQB", abshp:18}];
trickydata = [{col:10, row:4, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:10, row:1, weapon1:ITEM.oDEAGLE, head:ITEM.CLOWN, armor:ITEM.WHITE, charclass:"CQB", abshp:16}, {col:10, row:5, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:10, row:0, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:6, row:2, weapon1:ITEM.oMOSSBERG, head:ITEM.TAC, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:32}, {col:6, row:4, weapon1:ITEM.oMOSSBERG, head:ITEM.TAC, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:32}, {col:7, row:1, weapon1:ITEM.oBREN, head:ITEM.TAC, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:32}, {col:7, row:5, weapon1:ITEM.oBREN, head:ITEM.TAC, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:32}, {col:9, row:3, weapon1:ITEM.oWARNING, head:ITEM.TRICKY, armor:ITEM.TRICKY, charclass:"Heavy", abshp:12}];
enemy_chardata = [];
enemy_chardata[3] = [{col:6, row:3, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:6, row:1, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:7, row:2, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:7, row:4, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}];
enemy_chardata[6] = [{col:6, row:3, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:6, row:1, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:7, row:2, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:7, row:5, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:8, row:4, weapon1:ITEM.oBERETTA, head:1, armor:1, charclass:"NONE", abshp:3}];
enemy_chardata[9] = [{col:10, row:0, weapon1:ITEM.oBERETTA, head:1, armor:1, charclass:"NONE", abshp:3}, {col:10, row:5, weapon1:ITEM.oBERETTA, head:1, armor:1, charclass:"NONE", abshp:3}];
enemy_chardata[10] = [{col:5, row:3, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:6, row:1, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:7, row:2, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:9, row:5, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:10, row:4, weapon1:ITEM.oBERETTA, head:1, armor:1, charclass:"NONE", abshp:3}, {col:9, row:0, weapon1:ITEM.oBERETTA, head:1, armor:1, charclass:"NONE", abshp:3}];
enemy_chardata[11] = [{col:6, row:1, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:7, row:3, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:8, row:2, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:8, row:5, weapon1:ITEM.oTKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:9, row:1, weapon1:ITEM.oBERETTA, head:1, armor:1, charclass:"NONE", abshp:3}, {col:9, row:4, weapon1:ITEM.oBERETTA, head:1, armor:1, charclass:"NONE", abshp:3}];
enemy_chardata[13] = [{col:6, row:3, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:6, row:1, weapon1:ITEM.oTKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:7, row:4, weapon1:ITEM.oGLOCK, head:1, armor:1, charclass:"NONE", abshp:3}, {col:8, row:2, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:8, row:5, weapon1:ITEM.oTKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:9, row:4, weapon1:ITEM.oGLOCK, head:1, armor:1, charclass:"NONE", abshp:3}];
enemy_chardata[17] = [{col:6, row:3, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:6, row:1, weapon1:ITEM.oTKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:7, row:4, weapon1:ITEM.oGLOCK, head:1, armor:1, charclass:"NONE", abshp:3}, {col:8, row:0, weapon1:ITEM.oCKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:8, row:5, weapon1:ITEM.oTKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:9, row:3, weapon1:ITEM.oBERETTA, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}];
enemy_chardata[18] = [{col:5, row:1, weapon1:ITEM.oAXE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:6, row:4, weapon1:ITEM.oAXE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:10, row:3, weapon1:ITEM.oINGRAM, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:7, row:2, weapon1:ITEM.oGLOCK, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:8, row:5, weapon1:ITEM.oMACHETE, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:9, row:1, weapon1:ITEM.oBERETTA, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}];
enemy_chardata[21] = [{col:5, row:4, weapon1:ITEM.oGLOCK, head:1, armor:1, charclass:"NONE", abshp:3}, {col:6, row:1, weapon1:ITEM.oGLOCK, head:1, armor:1, charclass:"NONE", abshp:3}, {col:10, row:2, weapon1:ITEM.oINGRAM, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:7, row:3, weapon1:ITEM.oINGRAM, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:8, row:0, weapon1:ITEM.oDEAGLE, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:9, row:4, weapon1:ITEM.oBERETTA, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}];
enemy_chardata[25] = [{col:5, row:4, weapon1:ITEM.oGLOCK, head:1, armor:1, charclass:"NONE", abshp:3}, {col:5, row:1, weapon1:ITEM.oGLOCK, head:1, armor:1, charclass:"NONE", abshp:3}, {col:6, row:5, weapon1:ITEM.oBERETTA, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:7, row:0, weapon1:ITEM.oBERETTA, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:9, row:2, weapon1:ITEM.oDEAGLE, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:7, row:4, weapon1:ITEM.oINGRAM, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}];
enemy_chardata[26] = [{col:9, row:0, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:8, row:4, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}];
enemy_chardata[28] = [{col:5, row:4, weapon1:ITEM.oGLOCK, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:6, row:3, weapon1:ITEM.oGLOCK, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:6, row:2, weapon1:ITEM.oGLOCK, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:5, row:1, weapon1:ITEM.oGLOCK, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:8, row:2, weapon1:ITEM.oDEAGLE, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:9, row:3, weapon1:ITEM.oINGRAM, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}];
enemy_chardata[30] = [{col:8, row:1, weapon1:ITEM.oINGRAM, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:9, row:5, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:6, row:3, weapon1:ITEM.oTKNIFE, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:6, row:2, weapon1:ITEM.oAXE, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}];
enemy_chardata[31] = [{col:6, row:0, weapon1:ITEM.oDEAGLE, head:1, armor:3, charclass:"NONE", abshp:4}, {col:5, row:1, weapon1:ITEM.oTKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:5, row:2, weapon1:ITEM.oAXE, head:4, armor:1, charclass:"NONE", abshp:4}, {col:5, row:3, weapon1:ITEM.oAXE, head:4, armor:1, charclass:"NONE", abshp:4}, {col:5, row:4, weapon1:ITEM.oTKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:6, row:5, weapon1:ITEM.oDEAGLE, head:1, armor:3, charclass:"NONE", abshp:4}, {col:8, row:1, weapon1:ITEM.oINGRAM, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:8, row:4, weapon1:ITEM.oINGRAM, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}];
enemy_chardata[32] = [{col:6, row:3, weapon1:ITEM.oAXE, head:1, armor:3, charclass:"NONE", abshp:4}, {col:6, row:1, weapon1:ITEM.oTKNIFE, head:1, armor:4, charclass:"NONE", abshp:4}, {col:7, row:4, weapon1:ITEM.oDEAGLE, head:2, armor:1, charclass:"NONE", abshp:4}, {col:8, row:2, weapon1:ITEM.oMACHETE, head:1, armor:3, charclass:"NONE", abshp:4}, {col:8, row:5, weapon1:ITEM.oTKNIFE, head:1, armor:4, charclass:"NONE", abshp:4}, {col:9, row:4, weapon1:ITEM.oDEAGLE, head:2, armor:1, charclass:"NONE", abshp:4}];
enemy_chardata[34] = [{col:8, row:1, weapon1:ITEM.oINGRAM, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:9, row:5, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:6, row:3, weapon1:ITEM.oTKNIFE, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:7, row:2, weapon1:ITEM.oAXE, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}];
enemy_chardata[37] = [{col:5, row:3, weapon1:ITEM.oAXE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:5, row:1, weapon1:ITEM.oTKNIFE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:6, row:2, weapon1:ITEM.oBERETTA, head:1, armor:1, charclass:"NONE", abshp:3}, {col:6, row:4, weapon1:ITEM.oGLOCK, head:1, armor:1, charclass:"NONE", abshp:3}, {col:7, row:2, weapon1:ITEM.oDEAGLE, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:8, row:5, weapon1:ITEM.oBERETTA, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:9, row:0, weapon1:ITEM.oINGRAM, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:9, row:5, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}];
enemy_chardata[39] = [{col:5, row:1, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:8, row:3, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:5, row:4, weapon1:ITEM.oTKNIFE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:8, row:0, weapon1:ITEM.oTKNIFE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:6, row:3, weapon1:ITEM.oINGRAM, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:9, row:2, weapon1:ITEM.oINGRAM, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:7, row:5, weapon1:ITEM.oAUG, head:ITEM.WHITE, armor:ITEM.WHITE, charclass:"NONE", abshp:15}, {col:10, row:0, weapon1:ITEM.oAUG, head:ITEM.WHITE, armor:ITEM.WHITE, charclass:"NONE", abshp:15}];
enemy_chardata[40] = [{col:5, row:1, weapon1:ITEM.oMACHETE, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:5, row:3, weapon1:ITEM.oBERETTA, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:6, row:2, weapon1:ITEM.oDEAGLE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:7, row:4, weapon1:ITEM.oDEAGLE, head:1, armor:1, charclass:"NONE", abshp:3}, {col:7, row:2, weapon1:ITEM.oINGRAM, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:9, row:5, weapon1:ITEM.oINGRAM, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}];
enemy_chardata[42] = [{col:5, row:1, weapon1:ITEM.oMACHETE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:5, row:5, weapon1:ITEM.oMACHETE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:8, row:2, weapon1:ITEM.oINGRAM, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:9, row:4, weapon1:ITEM.oINGRAM, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}];
enemy_chardata[44] = [{col:5, row:1, weapon1:ITEM.oMACHETE, head:1, armor:2, charclass:"NONE", abshp:4}, {col:6, row:3, weapon1:ITEM.oSAWNOFF, head:4, armor:3, charclass:"NONE", abshp:4}, {col:7, row:2, weapon1:ITEM.oSAWNOFF, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:8, row:4, weapon1:ITEM.oSAWNOFF, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:8, row:5, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:9, row:3, weapon1:ITEM.oINGRAM, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}];
enemy_chardata[47] = [{col:5, row:2, weapon1:ITEM.oMACHETE, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:5, row:4, weapon1:ITEM.oSAWNOFF, head:2, armor:1, charclass:"NONE", abshp:4}, {col:6, row:3, weapon1:ITEM.oSAWNOFF, head:1, armor:3, charclass:"NONE", abshp:4}, {col:6, row:1, weapon1:ITEM.oGLOCK, head:1, armor:2, charclass:"NONE", abshp:4}, {col:7, row:2, weapon1:ITEM.oDEAGLE, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:8, row:5, weapon1:ITEM.oBERETTA, head:ITEM.LEET, armor:ITEM.LEET, charclass:"NONE", abshp:5}, {col:9, row:0, weapon1:ITEM.oINGRAM, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:9, row:4, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}];
enemy_chardata[50] = [{col:5, row:0, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:5, row:5, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.CLOWN, charclass:"NONE", abshp:12}, {col:5, row:3, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:6, row:1, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ZOMBIE, charclass:"CQB", abshp:18}, {col:6, row:2, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:6, row:5, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:7, row:4, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ZOMBIE, charclass:"CQB", abshp:18}, {col:7, row:0, weapon1:ITEM.oMP5, head:ITEM.ZOMBIE, armor:ITEM.LEET, charclass:"NONE", abshp:18}, {col:8, row:2, weapon1:ITEM.oMP5, head:ITEM.ZOMBIE, armor:ITEM.LEET, charclass:"NONE", abshp:18}, {col:8, row:5, weapon1:ITEM.oMP5, head:ITEM.ZOMBIE, armor:ITEM.LEET, charclass:"NONE", abshp:18}, {col:10, row:3, weapon1:ITEM.oAUG, head:ITEM.TAC, armor:ITEM.ATP, charclass:"Heavy", abshp:32}];
enemy_chardata[51] = [{col:5, row:4, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:7, row:1, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:9, row:3, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}];
enemy_chardata[52] = [{col:5, row:2, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:5, row:4, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:6, row:3, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:7, row:2, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:8, row:5, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:9, row:0, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}];
enemy_chardata[53] = [{col:5, row:3, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:6, row:4, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:6, row:2, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:8, row:1, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:8, row:5, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:9, row:3, weapon1:ITEM.oINGRAM, head:ITEM.WHITE, armor:ITEM.WHITE, charclass:"NONE", abshp:15}];
enemy_chardata[55] = [{col:5, row:2, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ZOMBIE, charclass:"CQB", abshp:18}, {col:7, row:4, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ZOMBIE, charclass:"CQB", abshp:18}, {col:8, row:3, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ZOMBIE, charclass:"CQB", abshp:18}];
enemy_chardata[56] = [{col:5, row:2, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:5, row:4, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:8, row:1, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ZOMBIE, charclass:"CQB", abshp:18}, {col:8, row:5, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ZOMBIE, charclass:"CQB", abshp:18}, {col:9, row:3, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.WHITE, charclass:"NONE", abshp:15}];
enemy_chardata[58] = [{col:5, row:2, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:6, row:3, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:6, row:1, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:6, row:4, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:7, row:5, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.CLOWN, charclass:"NONE", abshp:12}, {col:7, row:2, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:8, row:4, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:10, row:0, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:10, row:2, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:9, row:1, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.CLOWN, charclass:"NONE", abshp:12}];
enemy_chardata[60] = [{col:7, row:1, weapon1:ITEM.oINGRAM, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"NONE", abshp:18}, {col:7, row:5, weapon1:ITEM.oINGRAM, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"NONE", abshp:18}, {col:8, row:2, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.WHITE, charclass:"NONE", abshp:10}, {col:8, row:4, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.WHITE, charclass:"NONE", abshp:10}, {col:9, row:3, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.WHITE, charclass:"NONE", abshp:10}];
enemy_chardata[62] = [{col:6, row:1, weapon1:ITEM.oDEAGLE, head:ITEM.ZOMBIE, armor:ITEM.LEET, charclass:"CQB", abshp:24}, {col:6, row:4, weapon1:ITEM.oDEAGLE, head:ITEM.ZOMBIE, armor:ITEM.LEET, charclass:"CQB", abshp:24}, {col:9, row:1, weapon1:ITEM.oDEAGLE, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"CQB", abshp:24}, {col:9, row:4, weapon1:ITEM.oDEAGLE, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"CQB", abshp:24}];
enemy_chardata[65] = [{col:6, row:1, weapon1:ITEM.oAXE, head:ITEM.ZOMBIE, armor:ITEM.LEET, charclass:"CQB", abshp:18}, {col:7, row:3, weapon1:ITEM.oMACHETE, head:ITEM.ZOMBIE, armor:ITEM.LEET, charclass:"CQB", abshp:18}, {col:9, row:1, weapon1:ITEM.oAXE, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"CQB", abshp:18}, {col:10, row:3, weapon1:ITEM.oMACHETE, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"CQB", abshp:18}, {col:6, row:5, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"Assault", abshp:10}, {col:10, row:5, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"Assault", abshp:10}];
enemy_chardata[66] = [{col:5, row:2, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ZOMBIE, charclass:"NONE", abshp:18}, {col:6, row:3, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ZOMBIE, charclass:"NONE", abshp:18}, {col:7, row:1, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ZOMBIE, charclass:"NONE", abshp:18}, {col:9, row:4, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"NONE", abshp:18}, {col:8, row:5, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"NONE", abshp:18}];
enemy_chardata[68] = [{col:5, row:3, weapon1:ITEM.oMACHETE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:6, row:4, weapon1:ITEM.oAXE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:6, row:2, weapon1:ITEM.oAXE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:7, row:5, weapon1:ITEM.oMACHETE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:10, row:3, weapon1:ITEM.oMP5, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"NONE", abshp:18}, {col:8, row:4, weapon1:ITEM.oINGRAM, head:ITEM.ZOMBIE, armor:ITEM.LEET, charclass:"NONE", abshp:18}, {col:9, row:1, weapon1:ITEM.oINGRAM, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"NONE", abshp:18}];
enemy_chardata[71] = jesusdata;
enemy_chardata[73] = [{col:6, row:4, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:5, row:5, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.CLOWN, charclass:"NONE", abshp:12}, {col:5, row:3, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:8, row:0, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.TRICKY, charclass:"NONE", abshp:12}, {col:10, row:4, weapon1:ITEM.oMP5, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"NONE", abshp:18}, {col:7, row:5, weapon1:ITEM.oINGRAM, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"NONE", abshp:18}, {col:9, row:2, weapon1:ITEM.oINGRAM, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"NONE", abshp:18}];
enemy_chardata[76] = [{col:9, row:2, weapon1:ITEM.oBREN, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Heavy", abshp:16}, {col:5, row:4, weapon1:ITEM.oMACHETE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:5, row:1, weapon1:ITEM.oMACHETE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:6, row:5, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:6, row:0, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}];
enemy_chardata[80] = [{col:5, row:4, weapon1:ITEM.oMACHETE, head:ITEM.ATP, armor:ITEM.ATP, charclass:"CQB", abshp:16}, {col:5, row:1, weapon1:ITEM.oMACHETE, head:ITEM.ATP, armor:ITEM.ATP, charclass:"CQB", abshp:16}, {col:6, row:5, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:6, row:0, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:9, row:5, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:9, row:0, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:10, row:2, weapon1:ITEM.oAUG, head:ITEM.TAC, armor:ITEM.ATP, charclass:"Heavy", abshp:32}];
enemy_chardata[89] = [{col:5, row:4, weapon1:ITEM.oMACHETE, head:ITEM.ATP, armor:ITEM.ATP, charclass:"CQB", abshp:16}, {col:5, row:1, weapon1:ITEM.oMACHETE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:6, row:5, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:6, row:0, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:8, row:1, weapon1:ITEM.oMACHETE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:9, row:5, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:9, row:0, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:10, row:2, weapon1:ITEM.oAUG, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Heavy", abshp:16}];
enemy_chardata[91] = [{col:5, row:3, weapon1:ITEM.oAXE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:5, row:5, weapon1:ITEM.oAXE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:5, row:1, weapon1:ITEM.oMACHETE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:6, row:0, weapon1:ITEM.oMP5, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Assault", abshp:16}, {col:8, row:3, weapon1:ITEM.oAXE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:8, row:5, weapon1:ITEM.oAXE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:8, row:1, weapon1:ITEM.oMACHETE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:9, row:0, weapon1:ITEM.oAUG, head:ITEM.TAC, armor:ITEM.ATP, charclass:"Assault", abshp:32}];
enemy_chardata[93] = [{col:9, row:5, weapon1:ITEM.oAUG, head:ITEM.TAC, armor:ITEM.ATP, charclass:"Heavy", abshp:32}, {col:5, row:3, weapon1:ITEM.oAXE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:5, row:1, weapon1:ITEM.oMACHETE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:7, row:1, weapon1:ITEM.oINGRAM, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Assault", abshp:16}, {col:7, row:3, weapon1:ITEM.oINGRAM, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Assault", abshp:16}, {col:9, row:1, weapon1:ITEM.oMP5, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Assault", abshp:16}, {col:9, row:3, weapon1:ITEM.oMP5, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Assault", abshp:16}];
enemy_chardata[95] = [{col:5, row:3, weapon1:ITEM.oSAWNOFF, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"Heavy", abshp:20}, {col:6, row:2, weapon1:ITEM.oSAWNOFF, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"Heavy", abshp:20}, {col:6, row:4, weapon1:ITEM.oSAWNOFF, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"Heavy", abshp:20}];
enemy_chardata[97] = [{col:5, row:1, weapon1:ITEM.oSAWNOFF, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Heavy", abshp:16}, {col:7, row:1, weapon1:ITEM.oBREN, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Heavy", abshp:16}, {col:6, row:4, weapon1:ITEM.oSAWNOFF, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Heavy", abshp:16}, {col:8, row:4, weapon1:ITEM.oBREN, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Heavy", abshp:16}];
enemy_chardata[100] = [{col:10, row:2, weapon1:ITEM.oMP5, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Assault", abshp:16}, {col:10, row:3, weapon1:ITEM.oMP5, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Assault", abshp:16}, {col:5, row:2, weapon1:ITEM.oMOSSBERG, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:5, row:4, weapon1:ITEM.oMOSSBERG, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:6, row:1, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:6, row:3, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:7, row:2, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:7, row:4, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:8, row:1, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}, {col:8, row:3, weapon1:ITEM.oMP5, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"NONE", abshp:10}];
enemy_chardata[102] = [{col:9, row:1, weapon1:ITEM.oBREN, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"Heavy", abshp:20}, {col:9, row:3, weapon1:ITEM.oBREN, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"Heavy", abshp:20}, {col:5, row:1, weapon1:ITEM.oTKNIFE, head:4, armor:1, charclass:"NONE", abshp:4}, {col:5, row:3, weapon1:ITEM.oTKNIFE, head:2, armor:1, charclass:"NONE", abshp:4}, {col:5, row:5, weapon1:ITEM.oTKNIFE, head:1, armor:5, charclass:"NONE", abshp:4}, {col:6, row:0, weapon1:ITEM.oAXE, head:1, armor:1, charclass:"NONE", abshp:4}, {col:6, row:2, weapon1:ITEM.oAXE, head:4, armor:1, charclass:"NONE", abshp:4}, {col:6, row:4, weapon1:ITEM.oAXE, head:5, armor:1, charclass:"NONE", abshp:4}, {col:7, row:1, weapon1:ITEM.oDEAGLE, head:2, armor:1, charclass:"NONE", abshp:4}, {col:7, row:3, weapon1:ITEM.oDEAGLE, head:3, armor:1, charclass:"NONE", abshp:4}, {col:7, row:5, weapon1:ITEM.oDEAGLE, head:1, armor:2, charclass:"NONE", abshp:4}];
enemy_chardata[103] = [{col:9, row:0, weapon1:ITEM.oM60, head:ITEM.ATP, armor:ITEM.HEAVY, charclass:"Heavy", abshp:12}, {col:9, row:5, weapon1:ITEM.oM60, head:ITEM.ATP, armor:ITEM.HEAVY, charclass:"Heavy", abshp:12}, {col:5, row:2, weapon1:ITEM.oMACHETE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:6, row:3, weapon1:ITEM.oMACHETE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:7, row:2, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:7, row:4, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:9, row:2, weapon1:ITEM.oAUG, head:ITEM.TAC, armor:ITEM.ATP, charclass:"Heavy", abshp:32}];
enemy_chardata[104] = [{col:9, row:0, weapon1:ITEM.oM60, head:ITEM.ATP, armor:ITEM.HEAVY, charclass:"Heavy", abshp:12}, {col:9, row:5, weapon1:ITEM.oM60, head:ITEM.ATP, armor:ITEM.HEAVY, charclass:"Heavy", abshp:12}, {col:8, row:2, weapon1:ITEM.oMOSSBERG, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"Heavy", abshp:20}, {col:8, row:3, weapon1:ITEM.oMOSSBERG, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"Heavy", abshp:20}, {col:7, row:1, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:7, row:4, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}];
enemy_chardata[115] = [{col:5, row:3, weapon1:ITEM.oMOSSBERG, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"Heavy", abshp:20}, {col:8, row:1, weapon1:ITEM.oBREN, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:32}, {col:9, row:5, weapon1:ITEM.oBREN, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:32}];
enemy_chardata[116] = [{col:5, row:1, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"CQB", abshp:32}, {col:6, row:5, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"CQB", abshp:32}, {col:8, row:2, weapon1:ITEM.oMOSSBERG, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:32}, {col:7, row:4, weapon1:ITEM.oMOSSBERG, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:32}, {col:10, row:5, weapon1:ITEM.oAUG, head:ITEM.TAC, armor:ITEM.ATP, charclass:"Heavy", abshp:32}];
enemy_chardata[112] = [{col:5, row:1, weapon1:ITEM.o316, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"CQB", abshp:20}, {col:7, row:1, weapon1:ITEM.oSW500, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"CQB", abshp:20}, {col:9, row:1, weapon1:ITEM.oAUG, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:32}, {col:6, row:3, weapon1:ITEM.o316, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"CQB", abshp:20}, {col:8, row:3, weapon1:ITEM.oSW500, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"CQB", abshp:20}, {col:10, row:3, weapon1:ITEM.oAUG, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:32}];
enemy_chardata[109] = [{col:5, row:1, weapon1:ITEM.oAXE, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"CQB", abshp:32}, {col:6, row:5, weapon1:ITEM.oAXE, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"CQB", abshp:32}, {col:8, row:1, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"CQB", abshp:32}, {col:9, row:5, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"CQB", abshp:32}];
enemy_chardata[107] = [{col:10, row:1, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ATP, charclass:"CQB", abshp:64, scale:1.5}, {col:10, row:2, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ATP, charclass:"CQB", abshp:64, scale:1.5}, {col:10, row:3, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ATP, charclass:"CQB", abshp:64, scale:1.5}, {col:10, row:4, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ATP, charclass:"CQB", abshp:64, scale:1.5}];
enemy_chardata[121] = [{col:5, row:2, weapon1:ITEM.o316, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:6, row:3, weapon1:ITEM.o316, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:6, row:1, weapon1:ITEM.o316, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:7, row:0, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:7, row:5, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:8, row:2, weapon1:ITEM.o316, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:9, row:3, weapon1:ITEM.o316, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:9, row:1, weapon1:ITEM.o316, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:10, row:0, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:10, row:5, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}];
enemy_chardata[130] = [{col:6, row:3, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:5, row:2, weapon1:ITEM.oMOSSBERG, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:12}, {col:7, row:4, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:7, row:2, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:9, row:3, weapon1:ITEM.oINGRAM, head:ITEM.ATP, armor:ITEM.CQB, charclass:"Assault", abshp:12}];
enemy_chardata[131] = [{col:0, row:3, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:7, row:4, weapon1:ITEM.oMOSSBERG, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:12}, {col:8, row:0, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:9, row:1, weapon1:ITEM.oMP5, head:ITEM.ATP, armor:ITEM.CQB, charclass:"Assault", abshp:12}, {col:9, row:5, weapon1:ITEM.oMP5, head:ITEM.ATP, armor:ITEM.CQB, charclass:"Assault", abshp:12}];
enemy_chardata[133] = [{col:6, row:3, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:6, row:1, weapon1:ITEM.oSAWNOFF, head:ITEM.ATP, armor:ITEM.CQB, charclass:"CQB", abshp:12}, {col:7, row:1, weapon1:ITEM.oMP5, head:ITEM.ATP, armor:ITEM.CQB, charclass:"Assault", abshp:12}, {col:7, row:4, weapon1:ITEM.oMP5, head:ITEM.ATP, armor:ITEM.CQB, charclass:"Assault", abshp:12}, {col:8, row:3, weapon1:ITEM.oMP5, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"Assault", abshp:32}];
enemy_chardata[135] = [{col:7, row:2, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:7, row:4, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:9, row:2, weapon1:ITEM.oAUG, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"CQB", abshp:32}, {col:9, row:4, weapon1:ITEM.oAUG, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"CQB", abshp:32}];
enemy_chardata[136] = [{col:5, row:3, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:7, row:3, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:9, row:5, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:9, row:3, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:9, row:1, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}];
enemy_chardata[138] = [{col:6, row:4, weapon1:ITEM.oDEAGLE, head:ITEM.CLOWN, armor:ITEM.WHITE, charclass:"CQB", abshp:16}, {col:9, row:2, weapon1:ITEM.oDEAGLE, head:ITEM.CLOWN, armor:ITEM.WHITE, charclass:"CQB", abshp:16}];
enemy_chardata[139] = [{col:5, row:2, weapon1:ITEM.oDEAGLE, head:ITEM.CLOWN, armor:ITEM.WHITE, charclass:"CQB", abshp:16}, {col:7, row:0, weapon1:ITEM.oDEAGLE, head:ITEM.CLOWN, armor:ITEM.WHITE, charclass:"CQB", abshp:16}, {col:9, row:1, weapon1:ITEM.oBREN, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Heavy", abshp:16}, {col:9, row:5, weapon1:ITEM.oBREN, head:ITEM.ATP, armor:ITEM.ATP, charclass:"Heavy", abshp:16}, {col:10, row:3, weapon1:ITEM.oM60, head:ITEM.ATP, armor:ITEM.HEAVY, charclass:"Heavy", abshp:12}];
enemy_chardata[141] = [{col:5, row:3, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:6, row:5, weapon1:ITEM.oMOSSBERG, head:ITEM.ATP, armor:ITEM.CQB, charclass:"Heavy", abshp:12}, {col:6, row:1, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"Assault", abshp:12}, {col:7, row:3, weapon1:ITEM.oM60, head:ITEM.ATP, armor:ITEM.HEAVY, charclass:"Heavy", abshp:12}, {col:8, row:2, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:9, row:0, weapon1:ITEM.oBERETTA, head:ITEM.ATP, armor:ITEM.CQB, charclass:"Assault", abshp:12}, {col:9, row:4, weapon1:ITEM.oSAWNOFF, head:ITEM.ATP, armor:ITEM.CQB, charclass:"Heavy", abshp:12}, {col:10, row:2, weapon1:ITEM.oM60, head:ITEM.ATP, armor:ITEM.HEAVY, charclass:"Heavy", abshp:12}];
enemy_chardata[142] = [{col:5, row:2, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:6, row:4, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:8, row:3, weapon1:1, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:7, row:2, weapon1:ITEM.oMOSSBERG, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:32}, {col:9, row:4, weapon1:ITEM.oMOSSBERG, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:32}, {col:9, row:0, weapon1:ITEM.oM60, head:ITEM.ATP, armor:ITEM.HEAVY, charclass:"Heavy", abshp:12}, {col:10, row:3, weapon1:ITEM.oDEAGLE, head:ITEM.CLOWN, armor:ITEM.WHITE, charclass:"CQB", abshp:16}];
enemy_chardata[153] = [{col:5, row:2, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:8, row:3, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:7, row:2, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"CQB", abshp:32, scale:1.25}, {col:6, row:1, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"CQB", abshp:32, scale:1.25}];
enemy_chardata[152] = [{col:5, row:3, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:6, row:4, weapon1:ITEM.oMOSSBERG, head:ITEM.ATP, armor:ITEM.CQB, charclass:"Heavy", abshp:12}, {col:6, row:2, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.CQB, charclass:"Assault", abshp:12}, {col:7, row:3, weapon1:ITEM.oM60, head:ITEM.ATP, armor:ITEM.HEAVY, charclass:"Heavy", abshp:12}, {col:8, row:2, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:9, row:1, weapon1:ITEM.oBERETTA, head:ITEM.ATP, armor:ITEM.CQB, charclass:"Assault", abshp:12}, {col:9, row:3, weapon1:ITEM.oSAWNOFF, head:ITEM.ATP, armor:ITEM.CQB, charclass:"Heavy", abshp:12}, {col:10, row:2, weapon1:ITEM.oM60, head:ITEM.ATP, armor:ITEM.HEAVY, charclass:"Heavy", abshp:12}];
enemy_chardata[150] = trickydata;
enemy_chardata[147] = [{col:7, row:1, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.SAUCY, charclass:"CQB", abshp:12, scale:0.5}, {col:7, row:4, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.SAUCY, charclass:"CQB", abshp:12, scale:0.5}, {col:8, row:1, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.SAUCY, charclass:"CQB", abshp:12, scale:0.5}, {col:8, row:4, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.SAUCY, charclass:"CQB", abshp:12, scale:0.5}, {col:9, row:2, weapon1:ITEM.oAUG, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"CQB", abshp:12, scale:0.5}, {col:9, row:3, weapon1:ITEM.oAUG, head:ITEM.ZOMBIE, armor:ITEM.WHITE, charclass:"CQB", abshp:12, scale:0.5}];
enemy_chardata[124] = [{col:5, row:1, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ATP, charclass:"CQB", abshp:62, scale:1.5}, {col:7, row:4, weapon1:ITEM.oAUTOSHOTGUN, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:20}, {col:9, row:0, weapon1:ITEM.oBREN, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:32}, {col:9, row:5, weapon1:ITEM.oBREN, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:32}];
enemy_chardata[125] = [{col:5, row:2, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ATP, charclass:"CQB", abshp:62, scale:1.5}, {col:6, row:0, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ATP, charclass:"CQB", abshp:62, scale:1.5}, {col:6, row:4, weapon1:ITEM.oMOSSBERG, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"Heavy", abshp:32, scale:1.25}, {col:7, row:0, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"CQB", abshp:32, scale:1.25}, {col:7, row:5, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"CQB", abshp:32, scale:1.25}, {col:8, row:2, weapon1:ITEM.oM60, head:ITEM.TAC, armor:ITEM.ATP, charclass:"Heavy", abshp:32}, {col:9, row:4, weapon1:ITEM.oBREN, head:ITEM.TAC, armor:ITEM.ATP, charclass:"Heavy", abshp:32}];
enemy_chardata[127] = [{col:7, row:0, weapon1:1, head:ITEM.ZOMBIE, armor:ITEM.ATP, charclass:"CQB", abshp:62, scale:1.5}, {col:6, row:1, weapon1:ITEM.oMOSSBERG, head:ITEM.WHITE, armor:ITEM.LEET, charclass:"Heavy", abshp:32, scale:1.25}, {col:5, row:2, weapon1:ITEM.oDEAGLE, head:ITEM.CLOWN, armor:ITEM.WHITE, charclass:"CQB", abshp:16}, {col:7, row:4, weapon1:ITEM.oDEAGLE, head:ITEM.CLOWN, armor:ITEM.WHITE, charclass:"CQB", abshp:16}, {col:8, row:2, weapon1:ITEM.oM60, head:ITEM.ATP, armor:ITEM.HEAVY, charclass:"Heavy", abshp:32}, {col:9, row:4, weapon1:ITEM.oM60, head:ITEM.ATP, armor:ITEM.HEAVY, charclass:"Heavy", abshp:32}];
enemy_chardata[128] = [{col:5, row:1, weapon1:ITEM.oMOSSBERG, head:ITEM.ZOMBIE, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:62, scale:1.5}, {col:6, row:3, weapon1:ITEM.oMOSSBERG, head:ITEM.ZOMBIE, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:62, scale:1.5}, {col:5, row:5, weapon1:ITEM.oMOSSBERG, head:ITEM.ZOMBIE, armor:ITEM.ASSAULT, charclass:"Heavy", abshp:62, scale:1.5}, {col:7, row:2, weapon1:ITEM.oINGRAM, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"CQB", abshp:32}, {col:7, row:4, weapon1:ITEM.oINGRAM, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"CQB", abshp:32}, {col:9, row:0, weapon1:ITEM.oAUG, head:ITEM.WHITE, armor:ITEM.DEIMOS, charclass:"Heavy", abshp:48}, {col:10, row:3, weapon1:ITEM.oAUG, head:ITEM.WHITE, armor:ITEM.DEIMOS, charclass:"Heavy", abshp:48}, {col:9, row:5, weapon1:ITEM.oAUG, head:ITEM.WHITE, armor:ITEM.DEIMOS, charclass:"Heavy", abshp:48}];
enemy_chardata[155] = [{col:5, row:3, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:5, row:1, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:6, row:2, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:7, row:3, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:8, row:4, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:9, row:5, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:9, row:3, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}];
enemy_chardata[156] = [{col:0, row:1, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:0, row:5, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:9, row:2, weapon1:ITEM.oMOSSBERG, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"Heavy", abshp:20}, {col:9, row:4, weapon1:ITEM.oMOSSBERG, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"Heavy", abshp:20}];
enemy_chardata[157] = [{col:5, row:3, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"CQB", abshp:20}, {col:5, row:1, weapon1:ITEM.oDEAGLE, head:ITEM.ATP, armor:ITEM.JESUS, charclass:"CQB", abshp:20}, {col:6, row:2, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"CQB", abshp:16}, {col:10, row:1, weapon1:ITEM.oAUG, head:ITEM.TAC, armor:ITEM.ATP, charclass:"Heavy", abshp:32}, {col:10, row:3, weapon1:ITEM.oAXE, head:ITEM.CLOWN, armor:ITEM.SAUCY, charclass:"CQB", abshp:32}, {col:8, row:1, weapon1:ITEM.oCLAW, head:ITEM.CLOWN, armor:ITEM.TRICKY, charclass:"Heavy", abshp:16}, {col:8, row:3, weapon1:ITEM.oAUG, head:ITEM.TAC, armor:ITEM.ATP, charclass:"Heavy", abshp:32}];
enemy_chardata[166] = [{col:9, row:0, weapon1:ITEM.oSAWNOFF, head:ITEM.WHITE, armor:ITEM.WHITE, charclass:"CQB", abshp:20}, {col:9, row:1, weapon1:ITEM.oSAWNOFF, head:ITEM.WHITE, armor:ITEM.WHITE, charclass:"CQB", abshp:20}, {col:9, row:2, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.WHITE, charclass:"NONE", abshp:20}, {col:9, row:3, weapon1:ITEM.oDEAGLE, head:ITEM.WHITE, armor:ITEM.WHITE, charclass:"NONE", abshp:20}, {col:9, row:4, weapon1:ITEM.oAUG, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"CQB", abshp:20}, {col:9, row:5, weapon1:ITEM.oAUG, head:ITEM.ATP, armor:ITEM.ASSAULT, charclass:"CQB", abshp:20}, {col:10, row:0, weapon1:ITEM.oSW500, head:ITEM.SAUCY, armor:ITEM.SAUCY, charclass:"NONE", abshp:20}, {col:10, row:1, weapon1:ITEM.oSW500, head:ITEM.SAUCY, armor:ITEM.SAUCY, charclass:"NONE", abshp:20}, {col:10, row:2, weapon1:ITEM.oHOOK, head:ITEM.SANFORD, armor:ITEM.SANFORD, charclass:"CQB", abshp:20}, {col:10, row:3, weapon1:ITEM.oM60, head:ITEM.DEIMOS, armor:ITEM.DEIMOS, charclass:"CQB", abshp:20}, {col:10, row:4, weapon1:ITEM.oKATANA, head:ITEM.HANK, armor:ITEM.HANK, charclass:"CQB", abshp:20}, {col:10, row:5, weapon1:ITEM.oKATANA, head:ITEM.HANK, armor:ITEM.HANK, charclass:"CQB", abshp:20}];
bgm_volume = 0.5;
sfx_volume = 0.8;
easymode = false;
keycard = 0;
halo = false;
pid = false;
pid_energy = 0;
default_gear_item = [0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0];
default_gear_head = [0, 3, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
default_gear_armo = [0, 3, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
default_gear_hand = [0, 0, 0, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
setDefaultGearData();
setDefaultCharData();
isdark = [];
isdark[48] = true;
isdark[51] = true;
isdark[52] = true;
isdark[53] = true;
isdark[50] = true;
isdark[57] = true;
isdark[58] = true;
isdark[59] = true;
isdark[65] = true;
isdark[66] = true;
isdark[68] = true;
isdark[69] = true;
isdark[70] = true;
isdark[73] = true;
isdark[79] = true;
isdark[82] = true;
isdark[83] = true;
isdark[88] = true;
isdark[89] = true;
isdark[90] = true;
isdark[91] = true;
isdark[93] = true;
isdark[96] = true;
isdark[97] = true;
isdark[109] = true;
isdark[110] = true;
isdark[111] = true;
isdark[117] = true;
isdark[123] = true;
isdark[124] = true;
isdark[125] = true;
isdark[126] = true;
isdark[129] = true;
isdark[152] = true;
isdark[159] = true;
tipsenabled = true;
bloodsplatteroff = true;
idleanimsoff = false;
nextentry = "fromtop";
explored = [];
exp_count = 0;
totalRooms = 176;
makeExploredArray();
current_room = 1;
prev_room = 0;
noenemies = false;
stop();
enableMainMenu();
cm = new ContextMenu();
cm.hideBuiltInItems();
this.contextMenu = cm;
}
public function goWest(){
switchRoomNumber(0);
nextentry = "fromright";
ge.exitLeft();
playSound("_SFX_footsteps");
}
public function hideMap(_arg1){
map.visible = false;
playSound("_SFX_MapClose");
}
public function setDefaultCharData(){
var n:*;
try {
n = 4;
while (n >= 1) {
player_chardata[n] = null;
n = (n - 1);
};
} catch(e) {
};
player_chardata = new Array();
player_chardata = [{col:1, row:5, weapon1:3, weapon2:2, head:4, armor:3, charclass:"CQB", abshp:0}, {col:1, row:2, weapon1:10, weapon2:2, head:2, armor:4, charclass:"CQB", abshp:0}, {col:0, row:4, weapon1:10, weapon2:2, head:1, armor:2, charclass:"Assault", abshp:0}, {col:0, row:1, weapon1:10, weapon2:2, head:3, armor:1, charclass:"Heavy", abshp:0}];
}
public function get supermedkit():Boolean{
if (gear_item[4] > false){
return (true);
};
return (false);
}
public function saveData(_arg1:SharedObject, _arg2, _arg3){
var _local4:*;
var _local5:*;
if (getQualifiedClassName(this[_arg2]) == _arg3){
if (_arg2 == "player_chardata"){
_arg1.data[_arg2] = new Array();
for (_local4 in this[_arg2]) {
_arg1.data[_arg2][_local4] = copyCharDataObject(this[_arg2][_local4]);
};
} else {
if (_arg2 == "lootdata"){
_arg1.data[_arg2] = new Array();
for (_local4 in this[_arg2]) {
if (this[_arg2][_local4] != null){
_arg1.data[_arg2][_local4] = new Array();
for (_local5 in this[_arg2][_local4]) {
if (this[_arg2][_local4][_local5] != null){
_arg1.data[_arg2][_local4][_local5] = copyItemDataObject(this[_arg2][_local4][_local5]);
};
};
};
};
} else {
if (_arg3 == "Array"){
_arg1.data[_arg2] = new Array();
for (_local4 in this[_arg2]) {
_arg1.data[_arg2][_local4] = this[_arg2][_local4];
};
} else {
_arg1.data[_arg2] = this[_arg2];
};
};
};
} else {
trace("SAVE DATA ERROR: TYPE MISMATCH >", getQualifiedClassName(this[_arg2]), "!=", _arg3);
};
}
public function set smoke(_arg1:int):void{
gear_item[2] = _arg1;
}
public function showOptions(){
options.showOptions();
}
public function showNav(){
nav.visible = true;
}
public function get jhp():Boolean{
if (gear_item[ITEM.JHPAMMO] > 0){
return (true);
};
return (false);
}
public function updateMaps(){
var _local1:*;
map.marker.x = map[("r" + current_room)].x;
map.marker.y = map[("r" + current_room)].y;
minimap.marker.x = map[("r" + current_room)].x;
minimap.marker.y = map[("r" + current_room)].y;
minimap.x = (60 - minimap.marker.x);
minimap.y = ((305 + 110) - minimap.marker.y);
_local1 = 1;
while (_local1 <= 176) {
map[("r" + _local1)].visible = explored[_local1];
minimap[("r" + _local1)].visible = explored[_local1];
_local1++;
};
}
public function unlockElev(_arg1){
var _local2:*;
if (!ge.victory){
return (false);
};
if (keycard >= lock.level){
if (lock.level == 1){
unlockMedal("Progression");
};
elevlock.visible = false;
switch (lock.door){
case "up":
nav.up.visible = true;
break;
case "down":
nav.down.visible = true;
break;
};
_local2 = new SCREEN_AccessGranted();
addChild(_local2);
playSound("_SFX_lock_open");
lockedrooms[current_room] = null;
if (current_room == 132){
lockedrooms[158] = null;
} else {
if (current_room == 158){
lockedrooms[132] = null;
};
};
} else {
elevlock.blink.play();
playSound("_SFX_lock_deny");
};
}
public function init(){
stage.quality = "HIGH";
map = new MapMenu();
equip_menu = new EquipMenu();
options = new OptionsMenu();
nav = new NavMenu();
lootmenu = new LootMenu();
savemenu = new SaveMenu();
nav.visible = false;
addChild(nav);
map.visible = false;
map.addEventListener(MouseEvent.CLICK, hideMap);
minimap.marker.stop();
minimap_button.addEventListener(MouseEvent.CLICK, showMap);
addChild(map);
equip_menu.visible = false;
addChild(equip_menu);
options.x = 320;
options.y = 240;
options.visible = false;
addChild(options);
backdrop.mouseEnabled = false;
locker.buttonMode = true;
locker.mouseEnabled = false;
locker.addEventListener(MouseEvent.MOUSE_OUT, outLocker);
locker.addEventListener(MouseEvent.MOUSE_OVER, overLocker);
locker.addEventListener(MouseEvent.CLICK, clickedLocker);
lootmenu.x = 320;
lootmenu.y = 240;
lootmenu.visible = false;
addChild(lootmenu);
elevlock.addEventListener(MouseEvent.CLICK, unlockElev);
elevlock.buttonMode = true;
elevlock.tf.mouseEnabled = false;
doorlockleft.panel.addEventListener(MouseEvent.CLICK, unlockDoor);
doorlockleft.panel.buttonMode = true;
doorlockleft.panel.tf.mouseEnabled = false;
doorlockright.panel.addEventListener(MouseEvent.CLICK, unlockDoor);
doorlockright.panel.buttonMode = true;
doorlockright.panel.tf.mouseEnabled = false;
crackedleft.addEventListener(MouseEvent.CLICK, breakWall);
crackedright.addEventListener(MouseEvent.CLICK, breakWall);
savemenu.x = 320;
savemenu.y = 240;
savemenu.visible = false;
savemenu.cancelbutton.addEventListener(MouseEvent.CLICK, hideSaveMenu);
savemenu.loadbutton.addEventListener(MouseEvent.CLICK, loadGame);
savemenu.savebutton.addEventListener(MouseEvent.CLICK, saveGame);
addChild(savemenu);
}
public function unlockDoor(_arg1){
var _local2:*;
if (!ge.victory){
return (false);
};
if (keycard >= lock.level){
if (lock.level == 1){
unlockMedal("Progression");
};
doorlockleft.panel.visible = false;
doorlockright.panel.visible = false;
switch (lock.door){
case "left":
nav.west.visible = true;
leftwall.visible = false;
break;
case "right":
nav.east.visible = true;
rightwall.visible = false;
break;
};
_local2 = new SCREEN_AccessGranted();
addChild(_local2);
playSound("_SFX_lock_open");
lockedrooms[current_room].level = 0;
if (current_room == 74){
lockedrooms[39].level = 0;
} else {
if (current_room == 39){
lockedrooms[74].level = 0;
};
};
} else {
doorlockleft.blink.play();
doorlockright.blink.play();
playSound("_SFX_lock_deny");
};
}
public function set medkit(_arg1:int):void{
gear_item[1] = _arg1;
}
public function overLocker(_arg1){
Util.addGlowFilterToMC(locker);
}
public function saveGame(_arg1=null){
var _local2:SharedObject;
_local2 = SharedObject.getLocal("madness_retaliation");
player_chardata[0].abshp = Math.max(1, ge.pchar1.hp);
player_chardata[1].abshp = Math.max(1, ge.pchar2.hp);
player_chardata[2].abshp = Math.max(1, ge.pchar3.hp);
player_chardata[3].abshp = Math.max(1, ge.pchar4.hp);
countExplored();
saveData(_local2, "current_room", "int");
saveData(_local2, "player_chardata", "Array");
saveData(_local2, "gear_item", "Array");
saveData(_local2, "gear_head", "Array");
saveData(_local2, "gear_armo", "Array");
saveData(_local2, "gear_hand", "Array");
saveData(_local2, "lootdata", "Array");
saveData(_local2, "lockedrooms", "Array");
saveData(_local2, "explored", "Array");
saveData(_local2, "exp_count", "int");
saveData(_local2, "keycard", "int");
saveData(_local2, "halo", "Boolean");
saveData(_local2, "pid", "Boolean");
saveData(_local2, "pid_energy", "int");
trace("SAVED GAME", _local2.size, "BYTES");
savemenu.updateChars();
_local2.flush();
}
public function setDefaultLootData(){
lootdata = [];
lootdata[2] = [{type:"hand", id:ITEM.GLOCK, qty:1}, {type:"item", id:ITEM.MEDKIT, qty:4}];
lootdata[5] = [{type:"head", id:ITEM.BANDANA, qty:1}, {type:"head", id:ITEM.ASSAULTHELM, qty:1}, {type:"item", id:ITEM.SMOKE, qty:2}];
lootdata[7] = [{type:"armor", id:ITEM.DEIMOSJACKET, qty:1}, {type:"hand", id:ITEM.BREN, qty:1}];
lootdata[8] = [{type:"head", id:ITEM.SANFORDHEAD, qty:1}, {type:"head", id:ITEM.DEIMOSHEAD, qty:1}];
lootdata[14] = [{type:"hand", id:ITEM.BERETTA, qty:1}, {type:"armor", id:ITEM.SLEEVELESS, qty:1}, {type:"hand", id:ITEM.INGRAM, qty:1}];
lootdata[15] = [{type:"head", id:ITEM.LEETSHADES, qty:1}, {type:"armor", id:ITEM.LEETSUIT, qty:1}];
lootdata[20] = [{type:"hand", id:ITEM.BERETTA, qty:1}, {type:"armor", id:ITEM.JACKET, qty:1}];
lootdata[22] = [{type:"head", id:ITEM.BLOODYHEAD, qty:2}, {type:"armor", id:ITEM.BLOODYBODY, qty:2}, {type:"item", id:ITEM.KEY1, qty:1}];
lootdata[23] = [{type:"armor", id:ITEM.SANFORDCAMO, qty:1}, {type:"hand", id:ITEM.HOOK, qty:1}];
lootdata[28] = [{type:"hand", id:ITEM.SAWNOFF, qty:1}, {type:"hand", id:ITEM.AXE, qty:1}, {type:"item", id:ITEM.FLASHBANG, qty:1}];
lootdata[33] = [{type:"hand", id:ITEM.INGRAM, qty:1}, {type:"armor", id:ITEM.ASSAULTARMOR, qty:1}];
lootdata[38] = [{type:"hand", id:ITEM.DEAGLE, qty:1}, {type:"armor", id:ITEM.KNIFEBELT, qty:1}, {type:"item", id:ITEM.MEDKIT, qty:3}];
lootdata[41] = [{type:"head", id:ITEM.BANDAGE, qty:1}, {type:"hand", id:ITEM.BERETTA, qty:1}, {type:"item", id:ITEM.SMOKE, qty:1}];
lootdata[47] = [{type:"hand", id:ITEM.MACHETE, qty:1}, {type:"hand", id:ITEM.MP5, qty:1}, {type:"armor", id:ITEM.BANDAGE, qty:1}];
lootdata[50] = [{type:"hand", id:ITEM.AUTOSHOTGUN, qty:1}, {type:"item", id:ITEM.SMOKE, qty:3}];
lootdata[53] = [{type:"hand", id:ITEM.MOSSBERG, qty:1}, {type:"item", id:ITEM.MEDKIT, qty:2}];
lootdata[61] = [{type:"hand", id:ITEM.SAWNOFF, qty:1}, {type:"hand", id:ITEM.AUG, qty:1}, {type:"item", id:ITEM.SMOKE, qty:2}];
lootdata[64] = [{type:"hand", id:ITEM.M60, qty:1}, {type:"item", id:ITEM.SCANNER, qty:1}];
lootdata[66] = [{type:"head", id:ITEM.NVG, qty:1}, {type:"armor", id:ITEM.CHESTPLATE, qty:1}, {type:"item", id:ITEM.MEDKIT, qty:2}];
lootdata[69] = [{type:"item", id:ITEM.FLASHBANG, qty:1}, {type:"hand", id:ITEM.AXE, qty:1}, {type:"head", id:ITEM.COMMASK, qty:1}];
lootdata[70] = [{type:"hand", id:ITEM.JESUSSWORD, qty:1}, {type:"hand", id:ITEM.SW500, qty:1}, {type:"item", id:ITEM.KEY2, qty:1}];
lootdata[81] = [{type:"armor", id:ITEM.CAMOAMMO, qty:1}, {type:"item", id:ITEM.MEDKIT, qty:2}, {type:"item", id:ITEM.JHPAMMO, qty:1}];
lootdata[87] = [{type:"head", id:ITEM.TRICKY, qty:1}, {type:"item", id:ITEM.SMOKE, qty:2}, {type:"item", id:ITEM.FLASHBANG, qty:1}];
lootdata[92] = [{type:"head", id:ITEM.GLOWINGSHADES, qty:1}, {type:"armor", id:ITEM.WHITESUIT, qty:1}];
lootdata[94] = [{type:"item", id:ITEM.MEDKIT, qty:2}, {type:"item", id:ITEM.SMOKE, qty:1}];
lootdata[97] = [{type:"hand", id:ITEM.MP5, qty:1}, {type:"item", id:ITEM.MEDKIT, qty:2}, {type:"item", id:ITEM.FLASH, qty:1}];
lootdata[100] = [{type:"hand", id:ITEM.MACHETE, qty:1}, {type:"hand", id:ITEM.DEAGLE, qty:1}, {type:"hand", id:ITEM.MOSSBERG, qty:1}];
lootdata[105] = [{type:"hand", id:ITEM.TRENCHKNIFE, qty:1}, {type:"item", id:ITEM.SMOKE, qty:3}, {type:"item", id:ITEM.FLASHBANG, qty:2}];
lootdata[110] = [{type:"armor", id:ITEM.DARKRAGS, qty:1}, {type:"hand", id:ITEM.AUG, qty:1}, {type:"item", id:ITEM.MEDKIT, qty:4}];
lootdata[107] = [{type:"item", id:ITEM.KEY3, qty:1}];
lootdata[114] = [{type:"item", id:ITEM.SUPERMEDKIT, qty:1}, {type:"item", id:ITEM.SMOKE, qty:1}, {type:"item", id:ITEM.FLASHBANG, qty:1}];
lootdata[119] = [{type:"armor", id:ITEM.RAGS, qty:1}, {type:"head", id:ITEM.ZOMBIE, qty:1}, {type:"item", id:ITEM.SMOKE, qty:2}];
lootdata[122] = [{type:"armor", id:ITEM.ATPHELM, qty:1}, {type:"head", id:ITEM.ATPSUIT, qty:1}, {type:"item", id:ITEM.FLASHBANG, qty:1}];
lootdata[123] = [{type:"head", id:ITEM.CQB, qty:1}, {type:"head", id:ITEM.ASSAULT, qty:1}, {type:"head", id:ITEM.HEAVY, qty:1}];
lootdata[126] = [{type:"armor", id:ITEM.TAC, qty:1}, {type:"head", id:ITEM.TAC, qty:1}, {type:"item", id:ITEM.SMOKE, qty:3}];
lootdata[129] = [{type:"head", id:ITEM.HANK, qty:1}, {type:"armor", id:ITEM.HANK, qty:1}, {type:"item", id:ITEM.SMOKE, qty:3}];
lootdata[134] = [{type:"head", id:ITEM.CLOWN, qty:1}, {type:"item", id:ITEM.MEDKIT, qty:5}, {type:"item", id:ITEM.FLASHBANG, qty:2}];
lootdata[154] = [{type:"hand", id:ITEM.KATANA, qty:1}, {type:"item", id:ITEM.SMOKE, qty:3}, {type:"item", id:ITEM.FLASHBANG, qty:2}];
lootdata[144] = [{type:"armor", id:ITEM.CQB, qty:1}, {type:"armor", id:ITEM.ASSAULT, qty:1}, {type:"armor", id:ITEM.HEAVY, qty:1}];
lootdata[147] = [{type:"armor", id:ITEM.BLOODYRAGS, qty:1}, {type:"item", id:ITEM.SMOKE, qty:3}, {type:"item", id:ITEM.FLASHBANG, qty:2}];
lootdata[149] = [{type:"hand", id:ITEM.WARNINGSIGN, qty:1}, {type:"item", id:ITEM.KEY4, qty:1}, {type:"hand", id:ITEM.M60, qty:1}];
lootdata[146] = [{type:"hand", id:ITEM.BREN, qty:1}, {type:"head", id:ITEM.JESUS, qty:1}, {type:"armor", id:ITEM.JESUS, qty:1}];
lootdata[172] = [{type:"head", id:ITEM.SAUCY, qty:1}, {type:"armor", id:ITEM.SAUCY, qty:1}, {type:"item", id:ITEM.MEDKIT, qty:12}];
lootdata[166] = [{type:"item", id:ITEM.DNA, qty:1}];
}
public function showMap(_arg1){
updateMaps();
map.visible = true;
playSound("_SFX_MapOpen");
}
public function goEast(){
switchRoomNumber(1);
nextentry = "fromleft";
ge.exitRight();
playSound("_SFX_footsteps");
}
public function startGame2(){
var _local1:*;
_local1 = new SCREEN_Opening2();
addChild(_local1);
_local1.x = 320;
_local1.y = 240;
}
public function stopMusic(){
try {
bgm_channel.stop();
bgm = null;
} catch(e) {
trace("stopMusic(): CANNOT STOP. NO MUSIC PLAYING");
};
}
public function playMusic(){
if (ge == null){
switchMusic("_BGM_Opium");
} else {
if ((((((((bgm_volume <= 0.1)) || ((current_room == 48)))) || ((current_room == 133)))) || ((((current_room == 166)) && (ge.victory))))){
stopMusic();
} else {
if (current_room == 166){
switchMusic("_BGM_Scattered");
} else {
if (current_room >= 160){
switchMusic("_BGM_Opium");
} else {
if ((((current_room == 71)) && (!(halo)))){
switchMusic("_BGM_Scattered");
} else {
if ((((current_room == 150)) && (!(pid)))){
switchMusic("_BGM_Scattered");
} else {
if ((((current_room >= 51)) && ((current_room <= 74)))){
switchMusic("_BGM_LookOut");
} else {
if ((((current_room >= 107)) && ((current_room <= 129)))){
switchMusic("_BGM_Industrial");
} else {
if ((((current_room >= 133)) && ((current_room <= 143)))){
switchMusic("_BGM_Ouch");
} else {
if ((((current_room >= 155)) && ((current_room <= 157)))){
switchMusic("_BGM_Ouch");
} else {
switchMusic("_BGM_VeryScary");
};
};
};
};
};
};
};
};
};
};
}
public function makeExploredArray(){
var _local1:*;
_local1 = 1;
while (_local1 <= 176) {
explored[_local1] = false;
_local1++;
};
}
public function enableMainMenu(){
var scr:*;
try {
if (ge != null){
ge.dispose();
removeChild(ge);
};
} catch(e) {
};
if (mainmenu == null){
createMainMenu();
};
scr = new SCREEN_Reveal();
addChild(scr);
scr.x = 320;
scr.y = 240;
setSFXVolume(sfx_volume);
mainmenu.visible = true;
mainmenu.enableButtons();
playMusic();
}
public function loadFirstRoom(){
if (ge == null){
init();
};
nextRoom(false);
}
public function breakWall(_arg1){
var _local2:*;
_local2 = _arg1.currentTarget;
if ((_local2.currentFrame % 2) == 1){
_local2.play();
};
if (_local2.currentFrame == _local2.totalFrames){
_local2.visible = false;
lockedrooms[current_room].level = 0;
if (_local2 == crackedright){
nav.east.visible = true;
} else {
nav.west.visible = true;
};
playSound("_SFX_hitwall2");
unlockMedal("Renovation");
} else {
playSound("_SFX_hitwall");
};
}
public function removeMainMenu(){
removeChild(mainmenu);
mainmenu = null;
}
public function switchMusic(_arg1){
if (getQualifiedClassName(bgm) != _arg1){
trace("switchMusic():", _arg1);
stopMusic();
bgm = null;
bgm = new (getDefinitionByName(_arg1));
bgm_channel = bgm.play(0, 1000);
setBGMVolume(bgm_volume);
};
}
public function get smoke():int{
return (gear_item[2]);
}
public function startGame(){
var _local1:*;
keycard = 0;
pid = false;
halo = false;
easymode = false;
explored = [];
exp_count = 0;
makeExploredArray();
current_room = 1;
prev_room = 0;
setDefaultGearData();
setDefaultCharData();
setDefaultLootData();
setDefaultLockData();
_local1 = new SCREEN_Opening();
addChild(_local1);
_local1.x = 320;
_local1.y = 240;
}
public function getItem(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = lootdata[current_room][_arg1];
if (this[("gear_" + _local2.type.substring(0, 4))][_local2.id] == -1){
this[("gear_" + _local2.type.substring(0, 4))][_local2.id] = 0;
};
this[("gear_" + _local2.type.substring(0, 4))][_local2.id] = (this[("gear_" + _local2.type.substring(0, 4))][_local2.id] + _local2.qty);
lootdata[current_room][_arg1] = null;
if (_local2.type == "item"){
if ((((_local2.id >= ITEM.KEY1)) && ((_local2.id <= ITEM.KEY4)))){
trace("KEYCARD!!", (_local2.id - 5));
keycard = Math.max(keycard, (_local2.id - 5));
if ((((keycard == 3)) && ((current_room == 107)))){
closeLootMenu();
ge.key3RoomBattle();
};
} else {
if (_local2.id == ITEM.SUPERMEDKIT){
_local3 = new SCREEN_GetSupermedkit();
addChild(_local3);
} else {
if (_local2.id == ITEM.JHPAMMO){
_local3 = new SCREEN_GetJHPAmmo();
addChild(_local3);
} else {
if (_local2.id == ITEM.SCANNER){
_local3 = new SCREEN_GetScanner();
addChild(_local3);
} else {
if ((((current_room == 166)) && ((_local2.id == ITEM.DNA)))){
closeLootMenu();
ge.setupFinalBattle();
};
};
};
};
};
ge.updateItemUI();
};
playSound("_SFX_grab");
_local4 = 0;
while (_local4 < 3) {
if (((!((lootdata[current_room][_local4] == null))) && ((lootdata[current_room][_local4] is Object)))){
return (false);
};
_local4++;
};
lootdata[current_room] = [];
}
public function get medkit():int{
return (gear_item[1]);
}
public function exitToMain(){
var _local1:*;
_local1 = new SCREEN_ExitToMain();
addChild(_local1);
_local1.x = 320;
_local1.y = 240;
}
public function loadLastRoom(){
var _local1:*;
trace("LOAD LAST ROOM");
if (lrd_current_room == 166){
current_room = 165;
} else {
current_room = lrd_current_room;
};
gear_item = [];
for (_local1 in lrd_gear_item) {
gear_item[_local1] = lrd_gear_item[_local1];
};
trace("ITEMS", gear_item, "vs", lrd_gear_item);
explored = lrd_explored;
pid_energy = lrd_pid_energy;
noenemies = true;
nextentry = "fromtop";
nextRoom(false);
}
public function updateNav(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
nav.west.visible = _arg1;
door_left.visible = _arg1;
leftwall.visible = !(_arg1);
nav.east.visible = _arg2;
door_right.visible = _arg2;
rightwall.visible = !(_arg2);
nav.up.visible = _arg3;
nav.down.visible = _arg4;
elevator.visible = ((_arg3) || (_arg4));
_local5 = lockedrooms[current_room];
if ((_local5 is Object)){
lock = _local5;
elevlock.visible = (lock.type == "elev");
if (elevlock.visible){
elevlock.tf.text = lock.level;
nav.up.visible = false;
nav.down.visible = false;
};
doorlockright.visible = (((lock.type == "door")) && ((lock.door == "right")));
if (doorlockright.visible){
if (lock.level > 0){
doorlockright.panel.tf.text = lock.level;
doorlockright.panel.visible = true;
nav.east.visible = false;
rightwall.visible = true;
} else {
doorlockright.panel.visible = false;
};
};
doorlockleft.visible = (((lock.type == "door")) && ((lock.door == "left")));
if (doorlockleft.visible){
if (lock.level > 0){
doorlockleft.panel.tf.text = lock.level;
doorlockleft.panel.visible = true;
nav.west.visible = false;
leftwall.visible = true;
} else {
doorlockleft.panel.visible = false;
};
};
crackedleft.visible = (((lock.type == "crack")) && ((lock.door == "left")));
if (crackedleft.visible){
if (lock.level > 0){
crackedleft.gotoAndStop(1);
nav.west.visible = false;
} else {
crackedleft.visible = false;
};
};
crackedright.visible = (((lock.type == "crack")) && ((lock.door == "right")));
if (crackedright.visible){
if (lock.level > 0){
crackedright.gotoAndStop(1);
nav.east.visible = false;
} else {
crackedright.visible = false;
};
};
} else {
elevlock.visible = false;
doorlockleft.visible = false;
doorlockright.visible = false;
crackedleft.visible = false;
crackedright.visible = false;
};
}
public function get tac():Boolean{
var _local1:*;
for (_local1 in player_chardata) {
if ((((player_chardata[_local1].head == ITEM.TAC)) || ((player_chardata[_local1].head == ITEM.SAUCY)))){
return (true);
};
};
return (false);
}
public function get nvg():Boolean{
var _local1:*;
for (_local1 in player_chardata) {
if (player_chardata[_local1].head == ITEM.NVG){
return (true);
};
};
return (false);
}
function __setProp___id0__preloader_ngloader_1(){
try {
__id0_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id0_.debugMode = true;
__id0_.encryptionKey = "yp8IjJKjmVgTx4w81VqECVbZxkYlpmmn";
__id0_.movieId = "15021:NbXDNKZ7";
__id0_.movieVersion = "";
__id0_.showConnectingPopup = true;
__id0_.useErrorPopup = true;
__id0_.useMedalPopup = false;
try {
__id0_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function goUp(){
switchRoomNumber(2);
nextentry = "fromtop";
ge.exitUp();
if (current_room >= 160){
playSound("_SFX_warp");
} else {
playSound("_SFX_elevatordoor");
};
}
public function loadData(_arg1:SharedObject, _arg2, _arg3){
var _local4:*;
var _local5:*;
if (_arg1.data[_arg2] != null){
if (getQualifiedClassName(_arg1.data[_arg2]) == _arg3){
if (_arg2 == "player_chardata"){
this[_arg2] = new Array();
for (_local4 in _arg1.data[_arg2]) {
this[_arg2][_local4] = copyCharDataObject(_arg1.data[_arg2][_local4]);
};
} else {
if (_arg2 == "lootdata"){
this[_arg2] = new Array();
for (_local4 in _arg1.data[_arg2]) {
if (_arg1.data[_arg2][_local4] != null){
this[_arg2][_local4] = new Array();
for (_local5 in _arg1.data[_arg2][_local4]) {
if (_arg1.data[_arg2][_local4][_local5] != null){
this[_arg2][_local4][_local5] = copyItemDataObject(_arg1.data[_arg2][_local4][_local5]);
};
};
};
};
} else {
if (_arg3 == "Array"){
this[_arg2] = new Array();
for (_local4 in _arg1.data[_arg2]) {
this[_arg2][_local4] = _arg1.data[_arg2][_local4];
};
} else {
this[_arg2] = _arg1.data[_arg2];
};
};
};
} else {
trace("LOAD DATA ERROR: TYPE MISMATCH >", getQualifiedClassName(this[_arg2]), "!=", _arg3);
};
};
}
public function goDown(){
switchRoomNumber(3);
nextentry = "fromtop";
trace("goDown", current_room);
if (prev_room == 175){
nextentry = "fromleft";
};
ge.exitUp();
if (current_room >= 160){
playSound("_SFX_warp");
} else {
playSound("_SFX_elevatordoor");
};
}
public function setSFXVolume(_arg1:Number):void{
sfx_volume = _arg1;
SoundMixer.soundTransform = new SoundTransform(sfx_volume, 0);
}
public function setBGMVolume(_arg1:Number):void{
var trans:SoundTransform;
var volume = _arg1;
try {
bgm_volume = volume;
trans = bgm_channel.soundTransform;
trans.volume = bgm_volume;
bgm_channel.soundTransform = trans;
if (bgm_volume <= 0.1){
stopMusic();
} else {
if (bgm == null){
playMusic();
};
};
} catch(e) {
trace("setBGMVolume(): CANNOT ADJUST. NO MUSIC PLAYING");
};
}
public function copyItemDataObject(_arg1){
var _local2:*;
_local2 = {type:_arg1.type, id:_arg1.id, qty:_arg1.qty};
return (_local2);
}
public function createMainMenu(){
backdrop.gotoAndStop(1);
mainmenu = new MainMenu();
addChild(mainmenu);
}
public function hideSaveMenu(_arg1=null){
nav.visible = true;
savemenu.visible = false;
ge.paused = false;
playSound("_SFX_Close");
}
public function checkCollection(){
var _local1:*;
_local1 = 1;
while (_local1 <= 20) {
if (gear_hand[_local1] < 0){
return (false);
};
if (gear_armo[_local1] < 0){
return (false);
};
if (gear_head[_local1] < 0){
return (false);
};
_local1++;
};
unlockMedal("Collection");
}
public function itemBugFix(){
var _local1:*;
if (ge == null){
return (false);
};
_local1 = 1;
while (_local1 <= 20) {
if ((((gear_hand[_local1] == 0)) && ((countEquips((_local1 + 1)) == 0)))){
gear_hand[_local1] = 1;
};
_local1++;
};
}
public function get advanced_tac():Boolean{
if (gear_item[ITEM.SCANNER] > 0){
return (true);
};
return (false);
}
public function loadGame(_arg1=null){
var _local2:SharedObject;
_local2 = SharedObject.getLocal("madness_retaliation");
loadData(_local2, "current_room", "int");
loadData(_local2, "player_chardata", "Array");
loadData(_local2, "gear_item", "Array");
loadData(_local2, "gear_head", "Array");
loadData(_local2, "gear_armo", "Array");
loadData(_local2, "gear_hand", "Array");
loadData(_local2, "lootdata", "Array");
loadData(_local2, "lockedrooms", "Array");
loadData(_local2, "explored", "Array");
loadData(_local2, "exp_count", "int");
loadData(_local2, "keycard", "int");
loadData(_local2, "halo", "Boolean");
loadData(_local2, "pid", "Boolean");
loadData(_local2, "pid_energy", "int");
nextentry = "fromtop";
prev_room = current_room;
noenemies = true;
trace("LOADED GAME", _local2.size, "BYTES");
if (ge == null){
init();
nextRoom(false);
} else {
nextRoom(false);
savemenu.updateChars();
hideSaveMenu();
};
}
}
}//package Game_fla
Section 81
//OptionsMenu_VolSlider_220 (Game_fla.OptionsMenu_VolSlider_220)
package Game_fla {
import flash.display.*;
public dynamic class OptionsMenu_VolSlider_220 extends MovieClip {
public var bar:MovieClip;
}
}//package Game_fla
Section 82
//OptionsMenu_VolSlider_bar_221 (Game_fla.OptionsMenu_VolSlider_bar_221)
package Game_fla {
import flash.display.*;
public dynamic class OptionsMenu_VolSlider_bar_221 extends MovieClip {
public function OptionsMenu_VolSlider_bar_221(){
addFrameScript(0, frame1);
}
function frame1(){
mouseEnabled = false;
}
}
}//package Game_fla
Section 83
//RoomBackdrop_24 (Game_fla.RoomBackdrop_24)
package Game_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class RoomBackdrop_24 extends MovieClip {
public var gfx:MovieClip;
public var desk:MovieClip;
public var flash:MovieClip;
public function RoomBackdrop_24(){
addFrameScript(0, frame1, 49, frame50, 119, frame120, 144, frame145, 145, frame146, 147, frame148, 159, frame160, 160, frame161, 161, frame162, 162, frame163, 163, frame164, 164, frame165, 165, frame166, 166, frame167, 167, frame168, 168, frame169, 169, frame170, 170, frame171, 171, frame172, 172, frame173, 173, frame174, 174, frame175, 175, frame176);
}
function frame160(){
parent["nav"].cover.visible = true;
parent["elevator"].visible = false;
}
function frame164(){
parent["nav"].cover.visible = true;
parent["elevator"].visible = false;
}
function frame165(){
parent["elevator"].visible = false;
}
function frame167(){
parent["nav"].cover.visible = true;
parent["elevator"].visible = false;
}
function frame166(){
parent["elevator"].visible = false;
}
function frame168(){
parent["nav"].cover.visible = true;
parent["elevator"].visible = false;
}
function frame161(){
parent["nav"].cover.visible = true;
parent["elevator"].visible = false;
}
function frame163(){
parent["nav"].cover.visible = true;
parent["elevator"].visible = false;
}
function frame169(){
parent["nav"].cover.visible = true;
parent["elevator"].visible = false;
}
function frame162(){
parent["nav"].cover.visible = true;
parent["elevator"].visible = false;
}
function frame171(){
parent["nav"].cover.visible = true;
parent["elevator"].visible = false;
}
function frame172(){
parent["nav"].cover.visible = true;
parent["elevator"].visible = false;
}
function frame176(){
parent["nav"].cover.visible = true;
parent["elevator"].visible = false;
}
function frame170(){
parent["elevator"].visible = false;
}
function frame174(){
parent["nav"].cover.visible = true;
parent["elevator"].visible = false;
}
function frame1(){
stop();
}
function frame173(){
parent["nav"].cover.visible = true;
parent["elevator"].visible = false;
}
function frame175(){
parent["nav"].cover.visible = true;
parent["elevator"].visible = false;
}
function frame120(){
parent["elevator"].visible = false;
parent["nav"].cover.visible = true;
}
function frame50(){
parent["elevator"].visible = false;
parent["nav"].cover.visible = true;
}
function frame145(){
parent["elevator"].visible = false;
parent["nav"].down.alpha = 0;
parent["nav"].up.alpha = 0;
}
function frame146(){
parent["locker"].alpha = 0;
parent["nav"].down.alpha = 0;
parent["elevator"].visible = false;
}
function frame148(){
parent["elevator"].visible = false;
parent["nav"].up.alpha = 0;
}
}
}//package Game_fla
Section 84
//SCREEN_nvg_202 (Game_fla.SCREEN_nvg_202)
package Game_fla {
import flash.display.*;
public dynamic class SCREEN_nvg_202 extends MovieClip {
public function SCREEN_nvg_202(){
addFrameScript(0, frame1);
}
function frame1(){
mouseEnabled = false;
}
}
}//package Game_fla
Section 85
//SCREEN_Smoke_gfx_253 (Game_fla.SCREEN_Smoke_gfx_253)
package Game_fla {
import flash.display.*;
public dynamic class SCREEN_Smoke_gfx_253 extends MovieClip {
public var s1:MovieClip;
public var s2:MovieClip;
public function SCREEN_Smoke_gfx_253(){
addFrameScript(14, frame15);
}
function frame15(){
s1.x = (s1.x + 1);
s2.x = (s2.x + 1);
if (s1.x >= 630){
s1.x = 0;
s2.x = -630;
};
}
}
}//package Game_fla
Section 86
//SelectedArrow_gfx_282 (Game_fla.SelectedArrow_gfx_282)
package Game_fla {
import flash.display.*;
public dynamic class SelectedArrow_gfx_282 extends MovieClip {
public function SelectedArrow_gfx_282(){
addFrameScript(0, frame1);
}
function frame1(){
mouseEnabled = false;
}
}
}//package Game_fla
Section 87
//Timeline_1 (Game_fla.Timeline_1)
package Game_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public dynamic class Timeline_1 extends MovieClip {
public const FRAME_RATE_ADJUST:Boolean = true;
public const LOADER_FRAME_RATE:Number = 30;
public const AUTO_PLAY:Boolean = false;
public var bar:MovieClip;
public var ngButton:SimpleButton;
public var playButton:SimpleButton;
public var movieFrameRate:Number;
public var loadingComplete:Boolean;
public var tankLogo:MovieClip;
public var initialized:Boolean;
public function Timeline_1(){
addFrameScript(0, frame1, 50, frame51);
}
public function init():void{
if (initialized){
return;
};
movieFrameRate = 0;
if (((FRAME_RATE_ADJUST) && (stage))){
movieFrameRate = stage.frameRate;
stage.frameRate = LOADER_FRAME_RATE;
};
initialized = true;
stop();
if (((root) && ((root is MovieClip)))){
MovieClip(root).stop();
};
loadingComplete = false;
ngButton.addEventListener(MouseEvent.CLICK, ngButtonClickHandler, false, 0, true);
addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true);
if (meetsVersion([9, 0, 28, 0])){
addEventListener(Event.REMOVED_FROM_STAGE, cleanup, false, 0, true);
};
enterFrameHandler();
}
public function enterFrameHandler(_arg1:Event=null):void{
var _local2:Number;
if (((((!(movieFrameRate)) && (FRAME_RATE_ADJUST))) && (stage))){
movieFrameRate = stage.frameRate;
stage.frameRate = LOADER_FRAME_RATE;
};
if (!loadingComplete){
_local2 = 0;
if (loaderInfo){
_local2 = (loaderInfo.bytesLoaded / loaderInfo.bytesTotal);
};
if (bar){
bar.scaleX = _local2;
};
if (_local2 == 1){
loadingComplete = true;
if (AUTO_PLAY){
startMovie();
} else {
gotoAndPlay("loaded");
};
};
};
}
public function meetsVersion(_arg1:Array):Boolean{
var _local2:Array;
var _local3:uint;
_local2 = String(Capabilities.version.split(" ")[1]).split(",");
_local3 = 0;
while (_local3 < _arg1.length) {
if (uint(_local2[_local3]) > _arg1[_local3]){
return (true);
};
if (uint(_local2[_local3]) < _arg1[_local3]){
return (false);
};
_local3++;
};
return (true);
}
public function playButtonClickHandler(_arg1:Event=null):void{
startMovie();
}
function frame1(){
initialized = false;
init();
}
public function ngButtonClickHandler(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.newgrounds.com"), "_blank");
}
public function cleanup(_arg1:Event=null){
if (initialized){
ngButton.removeEventListener(MouseEvent.CLICK, ngButtonClickHandler);
removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
if (meetsVersion([9, 0, 28, 0])){
removeEventListener(Event.REMOVED_FROM_STAGE, cleanup);
};
if (movieFrameRate){
stage.frameRate = movieFrameRate;
movieFrameRate = 0;
};
};
initialized = false;
}
function frame51(){
stop();
if (((playButton) && (!(playButton.hasEventListener(MouseEvent.CLICK))))){
playButton.addEventListener(MouseEvent.CLICK, playButtonClickHandler, false, 0, true);
};
}
public function startMovie():void{
cleanup();
if (((root) && ((root is MovieClip)))){
MovieClip(root).play();
};
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package Game_fla
Section 88
//Timeline_124 (Game_fla.Timeline_124)
package Game_fla {
import flash.display.*;
public dynamic class Timeline_124 extends MovieClip {
public var tankLogo:MovieClip;
}
}//package Game_fla
Section 89
//Timeline_16 (Game_fla.Timeline_16)
package Game_fla {
import flash.display.*;
public dynamic class Timeline_16 extends MovieClip {
public function Timeline_16(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
}
}
}//package Game_fla
Section 90
//UI_EquipMenu_Lock_205 (Game_fla.UI_EquipMenu_Lock_205)
package Game_fla {
import flash.display.*;
public dynamic class UI_EquipMenu_Lock_205 extends MovieClip {
public function UI_EquipMenu_Lock_205(){
addFrameScript(0, frame1);
}
function frame1(){
mouseEnabled = false;
}
}
}//package Game_fla
Section 91
//UI_item_keycard_291 (Game_fla.UI_item_keycard_291)
package Game_fla {
import flash.display.*;
public dynamic class UI_item_keycard_291 extends MovieClip {
public function UI_item_keycard_291(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 92
//UI_item_redhalo_299 (Game_fla.UI_item_redhalo_299)
package Game_fla {
import flash.display.*;
public dynamic class UI_item_redhalo_299 extends MovieClip {
public function UI_item_redhalo_299(){
addFrameScript(0, frame1);
}
function frame1(){
mouseEnabled = false;
}
}
}//package Game_fla
Section 93
//UI_item_stimpack_209 (Game_fla.UI_item_stimpack_209)
package Game_fla {
import flash.display.*;
public dynamic class UI_item_stimpack_209 extends MovieClip {
public function UI_item_stimpack_209(){
addFrameScript(0, frame1);
}
function frame1(){
mouseEnabled = false;
}
}
}//package Game_fla
Section 94
//UI_portrait_288 (Game_fla.UI_portrait_288)
package Game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_portrait_288 extends MovieClip {
public var tf_hp:TextField;
public var tf_ap:TextField;
public var tf_class:TextField;
public var head:MovieClip;
}
}//package Game_fla
Section 95
//UI_weapon_206 (Game_fla.UI_weapon_206)
package Game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_weapon_206 extends MovieClip {
public var bg:MovieClip;
public var jhp:TextField;
public function UI_weapon_206(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 96
//Weapon_autoshotgun_pump_63 (Game_fla.Weapon_autoshotgun_pump_63)
package Game_fla {
import flash.display.*;
public dynamic class Weapon_autoshotgun_pump_63 extends MovieClip {
public function Weapon_autoshotgun_pump_63(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 97
//Weapon_mossberg_pump_62 (Game_fla.Weapon_mossberg_pump_62)
package Game_fla {
import flash.display.*;
public dynamic class Weapon_mossberg_pump_62 extends MovieClip {
public function Weapon_mossberg_pump_62(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 98
//Weapon_sawnoff_pump_61 (Game_fla.Weapon_sawnoff_pump_61)
package Game_fla {
import flash.display.*;
public dynamic class Weapon_sawnoff_pump_61 extends MovieClip {
public function Weapon_sawnoff_pump_61(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 99
//_BGM_Industrial (_BGM_Industrial)
package {
import flash.media.*;
public dynamic class _BGM_Industrial extends Sound {
}
}//package
Section 100
//_BGM_LookOut (_BGM_LookOut)
package {
import flash.media.*;
public dynamic class _BGM_LookOut extends Sound {
}
}//package
Section 101
//_BGM_Opium (_BGM_Opium)
package {
import flash.media.*;
public dynamic class _BGM_Opium extends Sound {
}
}//package
Section 102
//_BGM_Ouch (_BGM_Ouch)
package {
import flash.media.*;
public dynamic class _BGM_Ouch extends Sound {
}
}//package
Section 103
//_BGM_Scattered (_BGM_Scattered)
package {
import flash.media.*;
public dynamic class _BGM_Scattered extends Sound {
}
}//package
Section 104
//_BGM_VeryScary (_BGM_VeryScary)
package {
import flash.media.*;
public dynamic class _BGM_VeryScary extends Sound {
}
}//package
Section 105
//_SFX_Beep (_SFX_Beep)
package {
import flash.media.*;
public dynamic class _SFX_Beep extends Sound {
}
}//package
Section 106
//_SFX_ChangeArmor (_SFX_ChangeArmor)
package {
import flash.media.*;
public dynamic class _SFX_ChangeArmor extends Sound {
}
}//package
Section 107
//_SFX_click (_SFX_click)
package {
import flash.media.*;
public dynamic class _SFX_click extends Sound {
}
}//package
Section 108
//_SFX_Close (_SFX_Close)
package {
import flash.media.*;
public dynamic class _SFX_Close extends Sound {
}
}//package
Section 109
//_SFX_elevatordoor (_SFX_elevatordoor)
package {
import flash.media.*;
public dynamic class _SFX_elevatordoor extends Sound {
}
}//package
Section 110
//_SFX_explosion (_SFX_explosion)
package {
import flash.media.*;
public dynamic class _SFX_explosion extends Sound {
}
}//package
Section 111
//_SFX_Flick (_SFX_Flick)
package {
import flash.media.*;
public dynamic class _SFX_Flick extends Sound {
}
}//package
Section 112
//_SFX_footsteps (_SFX_footsteps)
package {
import flash.media.*;
public dynamic class _SFX_footsteps extends Sound {
}
}//package
Section 113
//_SFX_grab (_SFX_grab)
package {
import flash.media.*;
public dynamic class _SFX_grab extends Sound {
}
}//package
Section 114
//_SFX_GrenadeFlash (_SFX_GrenadeFlash)
package {
import flash.media.*;
public dynamic class _SFX_GrenadeFlash extends Sound {
}
}//package
Section 115
//_SFX_GrenadeSmoke (_SFX_GrenadeSmoke)
package {
import flash.media.*;
public dynamic class _SFX_GrenadeSmoke extends Sound {
}
}//package
Section 116
//_SFX_GunRifle (_SFX_GunRifle)
package {
import flash.media.*;
public dynamic class _SFX_GunRifle extends Sound {
}
}//package
Section 117
//_SFX_GunSMG (_SFX_GunSMG)
package {
import flash.media.*;
public dynamic class _SFX_GunSMG extends Sound {
}
}//package
Section 118
//_SFX_hitwall (_SFX_hitwall)
package {
import flash.media.*;
public dynamic class _SFX_hitwall extends Sound {
}
}//package
Section 119
//_SFX_hitwall2 (_SFX_hitwall2)
package {
import flash.media.*;
public dynamic class _SFX_hitwall2 extends Sound {
}
}//package
Section 120
//_SFX_lock_deny (_SFX_lock_deny)
package {
import flash.media.*;
public dynamic class _SFX_lock_deny extends Sound {
}
}//package
Section 121
//_SFX_lock_open (_SFX_lock_open)
package {
import flash.media.*;
public dynamic class _SFX_lock_open extends Sound {
}
}//package
Section 122
//_SFX_locker (_SFX_locker)
package {
import flash.media.*;
public dynamic class _SFX_locker extends Sound {
}
}//package
Section 123
//_SFX_MapClose (_SFX_MapClose)
package {
import flash.media.*;
public dynamic class _SFX_MapClose extends Sound {
}
}//package
Section 124
//_SFX_MapOpen (_SFX_MapOpen)
package {
import flash.media.*;
public dynamic class _SFX_MapOpen extends Sound {
}
}//package
Section 125
//_SFX_Medkit (_SFX_Medkit)
package {
import flash.media.*;
public dynamic class _SFX_Medkit extends Sound {
}
}//package
Section 126
//_SFX_Open (_SFX_Open)
package {
import flash.media.*;
public dynamic class _SFX_Open extends Sound {
}
}//package
Section 127
//_SFX_SelectChar (_SFX_SelectChar)
package {
import flash.media.*;
public dynamic class _SFX_SelectChar extends Sound {
}
}//package
Section 128
//_SFX_warp (_SFX_warp)
package {
import flash.media.*;
public dynamic class _SFX_warp extends Sound {
}
}//package
Section 129
//birth_imp_g (birth_imp_g)
package {
import flash.display.*;
public dynamic class birth_imp_g extends MovieClip {
}
}//package
Section 130
//Button_equip (Button_equip)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Button_equip extends MovieClip {
public var item:MovieClip;
public var weapon:MovieClip;
public var lock:MovieClip;
public var armor:MovieClip;
public var label:TextField;
public var qty:TextField;
public var armor_head:MovieClip;
public var head:MovieClip;
}
}//package
Section 131
//Char (Char)
package {
import flash.display.*;
public dynamic class Char extends MovieClip {
public var scanblock:Boolean;// = false
public var ap:uint;// = 0
public var tgtx:int;
public var tgty:int;
public var bloodlusted:Boolean;// = false
public var moveydone:Boolean;// = true
public var _weapon2:uint;// = 1
public var _weapon1:uint;// = 1
public var clown:Boolean;// = false
public var targetenemy;
public var attacking:Boolean;// = false
public var stunned:Boolean;// = false
public var owner:uint;// = 0
public var movexdone:Boolean;// = true
public var haslisteners:Boolean;// = true
public var weapon_damage:uint;// = 1
public var weapon_range_bonus:uint;// = 0
public var hp:int;// = 2
public var id:uint;// = 0
public var moveclear:Boolean;// = true
public var weapon_ap:uint;// = 2
public var shottype:String;// = "triple"
public var forcewalk:Boolean;// = false
public var walkedx:Boolean;// = false
public var ap_max:uint;// = 5
public var walkedy:Boolean;// = false
public var button:MovieClip;
public var animating:Boolean;// = false
public var weapon_range:uint;// = 1
public var melee:Boolean;// = true
public var col:uint;
public var ap_gain:uint;// = 3
public var armorclass:int;// = 0
public var body:MovieClip;
public var hp_max:int;// = 6
public var feet:MovieClip;
public var clown_hits:Array;
public var row:uint;
public var charclass:String;// = "CQB"
public static var engine:GameEngine;
public function Char(){
hp = 2;
hp_max = 6;
ap = 0;
ap_gain = 3;
ap_max = 5;
walkedx = false;
walkedy = false;
moveclear = true;
movexdone = true;
moveydone = true;
melee = true;
charclass = "CQB";
weapon_range = 1;
weapon_range_bonus = 0;
weapon_damage = 1;
weapon_ap = 2;
shottype = "triple";
armorclass = 0;
animating = false;
attacking = false;
forcewalk = false;
clown = false;
bloodlusted = false;
stunned = false;
scanblock = false;
owner = 0;
id = 0;
haslisteners = true;
_weapon1 = 1;
_weapon2 = 1;
super();
}
public function set armor(_arg1:uint){
var n = _arg1;
try {
removeArmorEffects(armor);
engine.changeArmor(this, n);
armorEffects(n);
if (hp <= 0){
hp = 1;
};
} catch(e) {
};
}
public function armorEffects(_arg1, _arg2:Boolean=false){
switch (_arg1){
case 2:
hp_max = (hp_max + (2 * halo_mult));
hp = (hp + (2 * halo_mult));
break;
case 3:
hp_max = (hp_max + (2 * halo_mult));
hp = (hp + (2 * halo_mult));
break;
case 4:
hp_max = (hp_max + (2 * halo_mult));
hp = (hp + (2 * halo_mult));
break;
case 5:
hp_max = (hp_max + (2 * halo_mult));
hp = (hp + (2 * halo_mult));
break;
case 6:
ap_gain = (ap_gain + 1);
break;
case 7:
armorclass = (armorclass + 3);
hp_max = (hp_max + (3 * halo_mult));
hp = (hp + (3 * halo_mult));
break;
case 8:
ap_max = (ap_max + 2);
break;
case 9:
if (_arg2){
} else {
armorclass = (armorclass + 2);
ap_max = (ap_max + 1);
};
break;
case 10:
armorclass = (armorclass + 1);
hp_max = (hp_max + (2 * halo_mult));
hp = (hp + (2 * halo_mult));
break;
case 11:
armorclass = (armorclass + 1);
hp_max = (hp_max + (2 * halo_mult));
hp = (hp + (2 * halo_mult));
ap_gain = (ap_gain + 2);
break;
case 12:
armorclass = (armorclass + 2);
hp_max = (hp_max + (4 * halo_mult));
hp = (hp + (4 * halo_mult));
if (_arg2){
ap_max = (ap_max + 1);
} else {
ap_gain = (ap_gain + 1);
};
break;
case 13:
armorclass = (armorclass + 2);
hp_max = (hp_max + (6 * halo_mult));
hp = (hp + (6 * halo_mult));
ap_gain = (ap_gain + 1);
ap_max = (ap_max + 3);
break;
case 14:
armorclass = (armorclass + 2);
hp_max = (hp_max + (1 * halo_mult));
hp = (hp + (1 * halo_mult));
ap_max = (ap_max + 2);
ap_gain = (ap_gain + 1);
break;
case 15:
hp_max = (hp_max - (1 * halo_mult));
hp = (hp - (1 * halo_mult));
weapon_range_bonus = (weapon_range_bonus + 1);
if (_arg2){
ap_max = (ap_max + 3);
} else {
ap_max = (ap_max + 1);
};
break;
case 16:
if (_arg2){
clown = true;
} else {
hp_max = (hp_max + (12 * halo_mult));
hp = (hp + (12 * halo_mult));
};
break;
case 17:
if (_arg2){
clown = false;
hp_max = (hp_max + (6 * halo_mult));
hp = (hp + (6 * halo_mult));
} else {
clown = false;
hp_max = (hp_max + (12 * halo_mult));
hp = (hp + (12 * halo_mult));
};
break;
case 18:
if (_arg2){
} else {
hp_max = (hp_max + (6 * halo_mult));
hp = (hp + (6 * halo_mult));
armorclass = (armorclass + 2);
};
break;
case 19:
armorclass = (armorclass + 4);
hp_max = (hp_max + (4 * halo_mult));
hp = (hp + (4 * halo_mult));
if (_arg2){
weapon_range_bonus = (weapon_range_bonus + 1);
};
break;
case 20:
ap_max = (ap_max + 4);
ap_gain = (ap_gain + 3);
break;
};
}
public function set weapon1(_arg1:uint){
_weapon1 = _arg1;
engine.changeWeapon1(this, _arg1);
}
public function set weapon2(_arg1:uint){
_weapon2 = _arg1;
}
public function get armor():uint{
return (this["body"]["armor"].currentFrame);
}
public function get halo_mult():int{
try {
if ((((engine.parent["halo"] == true)) && ((owner == 0)))){
return (2);
};
} catch(e) {
};
return (1);
}
public function removeArmorEffects(_arg1, _arg2:Boolean=false){
switch (_arg1){
case 2:
hp_max = (hp_max - (2 * halo_mult));
hp = (hp - (2 * halo_mult));
break;
case 3:
hp_max = (hp_max - (2 * halo_mult));
hp = (hp - (2 * halo_mult));
break;
case 4:
hp_max = (hp_max - (2 * halo_mult));
hp = (hp - (2 * halo_mult));
break;
case 5:
hp_max = (hp_max - (2 * halo_mult));
hp = (hp - (2 * halo_mult));
break;
case 6:
ap_gain = (ap_gain - 1);
break;
case 7:
armorclass = (armorclass - 3);
hp_max = (hp_max - (3 * halo_mult));
hp = (hp - (3 * halo_mult));
break;
case 8:
ap_max = (ap_max - 2);
break;
case 9:
if (_arg2){
} else {
armorclass = (armorclass - 2);
ap_max = (ap_max - 1);
};
break;
case 10:
armorclass = (armorclass - 1);
hp_max = (hp_max - (2 * halo_mult));
hp = (hp - (2 * halo_mult));
break;
case 11:
armorclass = (armorclass - 1);
hp_max = (hp_max - (2 * halo_mult));
hp = (hp - (2 * halo_mult));
ap_gain = (ap_gain - 2);
break;
case 12:
armorclass = (armorclass - 2);
hp_max = (hp_max - (4 * halo_mult));
hp = (hp - (4 * halo_mult));
if (_arg2){
ap_max = (ap_max - 1);
} else {
ap_gain = (ap_gain - 1);
};
break;
case 13:
armorclass = (armorclass - 2);
hp_max = (hp_max - (6 * halo_mult));
hp = (hp - (6 * halo_mult));
ap_gain = (ap_gain - 1);
ap_max = (ap_max - 3);
break;
case 14:
armorclass = (armorclass - 2);
hp_max = (hp_max - (1 * halo_mult));
hp = (hp - (1 * halo_mult));
ap_max = (ap_max - 2);
ap_gain = (ap_gain - 1);
break;
case 15:
hp_max = (hp_max + (1 * halo_mult));
hp = (hp + (1 * halo_mult));
weapon_range_bonus = (weapon_range_bonus - 1);
if (_arg2){
ap_max = (ap_max - 3);
} else {
ap_max = (ap_max - 1);
};
break;
case 16:
if (_arg2){
clown = false;
} else {
hp_max = (hp_max - (12 * halo_mult));
hp = (hp - (12 * halo_mult));
};
break;
case 17:
if (_arg2){
clown = false;
hp_max = (hp_max - (6 * halo_mult));
hp = (hp - (6 * halo_mult));
} else {
clown = false;
hp_max = (hp_max - (12 * halo_mult));
hp = (hp - (12 * halo_mult));
};
break;
case 18:
if (_arg2){
} else {
hp_max = (hp_max - (6 * halo_mult));
hp = (hp - (6 * halo_mult));
armorclass = (armorclass - 2);
};
break;
case 19:
armorclass = (armorclass - 4);
hp_max = (hp_max - (4 * halo_mult));
hp = (hp - (4 * halo_mult));
if (_arg2){
weapon_range_bonus = (weapon_range_bonus - 1);
};
break;
case 20:
ap_max = (ap_max - 4);
ap_gain = (ap_gain - 3);
break;
};
}
public function get weapon1():uint{
return (_weapon1);
}
public function get weapon2():uint{
return (_weapon2);
}
public function set head(_arg1:uint){
var n = _arg1;
try {
if (n != head){
removeArmorEffects(head, true);
engine.changeHead(this, n);
armorEffects(n, true);
if (hp <= 0){
hp = 1;
};
};
} catch(e) {
};
}
public function get head():uint{
return (this["body"]["head"].currentFrame);
}
}
}//package
Section 132
//EquipMenu (EquipMenu)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class EquipMenu extends MovieClip {
public var tf_id:TextField;
public var chardata;
public var tf_desc:TextField;
public var armor:SimpleButton;
public var char:Char;
public var equipbuttons:Array;
public var tf_class:TextField;
public var engine:GameEngine;
public var equip_target:String;
public var tf_stats:TextField;
public var closer:SimpleButton;
public var hand1:SimpleButton;
public var tf_classbonus:TextField;
public var hand2:SimpleButton;
public var head:SimpleButton;
public function EquipMenu(){
addFrameScript(0, frame1);
}
public function disableButtonListeners(){
trace("EquipMenu > disableButtonListeners()");
closer.removeEventListener(MouseEvent.CLICK, closeMenu);
head.removeEventListener(MouseEvent.CLICK, clickedCategoryButton);
armor.removeEventListener(MouseEvent.CLICK, clickedCategoryButton);
hand1.removeEventListener(MouseEvent.CLICK, clickedCategoryButton);
hand2.removeEventListener(MouseEvent.CLICK, clickedCategoryButton);
}
public function get gear_hand():Array{
return (parent["gear_hand"]);
}
public function enableButtonListeners(){
trace("EquipMenu > enableButtonListeners()");
closer.addEventListener(MouseEvent.CLICK, closeMenu);
head.addEventListener(MouseEvent.CLICK, clickedCategoryButton);
armor.addEventListener(MouseEvent.CLICK, clickedCategoryButton);
hand1.addEventListener(MouseEvent.CLICK, clickedCategoryButton);
hand2.addEventListener(MouseEvent.CLICK, clickedCategoryButton);
}
public function get gear_armo():Array{
return (parent["gear_armo"]);
}
public function clickedButton(_arg1){
var _local2:*;
var _local3:*;
_local2 = _arg1.currentTarget.id;
equipItem(_local2);
switchCategory(equip_target);
_local3 = new _SFX_Flick();
_local3.play();
}
public function showData(_arg1){
if (equip_target.substring(0, 4) == "hand"){
switch (_arg1){
case 1:
tf_desc.text = ("COMBAT KNIFE - [ Melee Weapon ] AP:2 \n" + "A sharp knife. . . Used for combat. . . DUH. \n\n - RANGE: 1\n - DAMAGE: 3\n\nTIP: melee attacks are 2x more likely to penetrate armor");
break;
case 2:
tf_desc.text = ("TRENCH KNIFE - [ Melee Weapon ] AP:2 \n" + "Big knife with a spiked knuckle guard. \n\n - RANGE: 1\n - DAMAGE: 4\n\nTIP: melee attacks are 2x more likely to penetrate armor");
break;
case 3:
tf_desc.text = ("HAND AXE - [ Melee Weapon ] AP:2 \n" + "When you want to bury the hatchet. In their face. \n\n - RANGE: 1\n - DAMAGE: 5\n\nTIP: melee attacks are 2x more likely to penetrate armor");
break;
case 4:
tf_desc.text = ("MACHETE - [ Melee Weapon ] AP:2 \n" + "Danny Trejo's weapon of choice. \n\n - RANGE: 2\n - DAMAGE: 4\n\nTIP: melee attacks are 2x more likely to penetrate armor");
break;
case 5:
tf_desc.text = ("KATANA - [ Melee Weapon ] AP:2 \n" + "Thai inscription says \"Crush, Destroy, Kills\" \n\n [ CLEAVING ] Hits 2x3 area around target.\n\n - RANGE: 1\n - DAMAGE: 8\n - LOCKED AP Cost: 2 (CQB's do not get AP reduction)");
break;
case 6:
tf_desc.text = ("WARNING SIGN - [ Melee Weapon ] AP:2 \n" + "If you can read this sign, you're already dead. \n\n [ PENETRATING ] Hits all targets in range.\n\n - RANGE: 3\n - DAMAGE: 8\n - LOCKED AP Cost: 2 (CQB's do not get AP reduction)");
break;
case 7:
tf_desc.text = ("316 SWORD - [ Melee Weapon ] AP:3 \n" + "Purge the wicked with the instrument of Armageddon. \n\n [ ARMOR PIERCING ] Ignores enemy armor.\n\n - RANGE: 2\n - DAMAGE: 12 \n - LOCKED AP Cost: 3 (CQB's do not get AP reduction)");
break;
case 8:
tf_desc.text = ("SANFORD'S HOOK - [ Melee Weapon ] AP:2 \n" + "Excellent for gutting enemies from afar. \n\n [ THROWN WEAPON ] 50% harder to evade even at range.\n\n - RANGE: 8\n - DAMAGE: 4\n - LOCKED AP Cost: 2 (CQB's do not get AP reduction)");
break;
case 9:
tf_desc.text = ("GLOCK 17 - [ Pistol ] AP:2 \n" + "Compact, lightweight & reliable. Like a baby (whut?)\n\n - RANGE: 4\n - DAMAGE: 2\n");
break;
case 10:
tf_desc.text = ("BERETTA 92 - [ Pistol ] AP:2 \n" + "Made by Italians to pack a little more 'OOMPH'\n\n - RANGE: 4\n - DAMAGE: 3\n");
break;
case 11:
tf_desc.text = ("DESERT EAGLE - [ Pistol ] AP:2 \n" + "Super strong. Super shiny. Everyone loves the Deagle.\n\n - RANGE: 4\n - DAMAGE: 4\n");
break;
case 12:
tf_desc.text = ("SMITH & WESSON MODEL 500 - [ Pistol ] AP:2 \n" + "The most powerful production model revolver today.\n . . . FOR REAL.\n\n [ ARMOR PIERCING ] Ignores enemy armor.\n\n - RANGE: 4\n - DAMAGE: 4\n");
break;
case 13:
tf_desc.text = ("SAWED-OFF - [ Shotgun ] AP:3 \n" + "Get those danged trespassers \"off o' mah propertay!\"\n\n [ SPREAD SHOT ] Hits 2x3 area around target.\n ( Warning: Splash damage can hurt your allies too )\n - RANGE: 3\n - DAMAGE: 8\n");
break;
case 14:
tf_desc.text = ("MOSSBERG 500 - [ Shotgun ] AP:3 \n" + "Shoots magical bullets that make faces disappear!!\n\n [ SPREAD SHOT ] Hits 2x3 area around target.\n ( Warning: Splash damage can hurt your allies too )\n - RANGE: 4\n - DAMAGE: 6\n");
break;
case 15:
tf_desc.text = ("AUTO-SHOTGUN - [ Shotgun ] AP:2 \n" + "Your best friend in the impending Zombie Apocalypse.\n\n [ RAPID FIRE ] Fires faster than other shotguns.\n [ SPREAD SHOT ] Hits 2x3 area around target.\n ( Warning: Splash damage can hurt your allies too )\n - RANGE: 4\n - DAMAGE: 4\n");
break;
case 16:
tf_desc.text = ("INGRAM MAC-10 - [ SMG ] AP:3 \n" + "9 out of 10 doctors agree that the MAC-10 gives your enemies the Recommended Dietary Allowance of Lead.\n\n");
if (parent["jhp"]){
tf_desc.appendText("[ JHP Ammo ] 75% chance to stun enemy\n");
};
tf_desc.appendText(" - RANGE: 6\n - DAMAGE: 6");
break;
case 17:
tf_desc.text = ("Heckler & Koch MP5 - [ SMG ] AP:3 \n" + "This gun also shoots bullets, surpize, surprize. Booooooooring. I look at this gun and want to barf.\n\n");
if (parent["jhp"]){
tf_desc.appendText("[ JHP Ammo ] 75% chance to stun enemy\n");
};
tf_desc.appendText(" - RANGE: 7\n - DAMAGE: 5");
break;
case 18:
tf_desc.text = ("STEYR AUG - [ Rifle ] AP:3 \n" + "The rifle that decided that it did not want to look like all the other rifles. It's good friends with the FN P90.\n\n [ PRECISE ] Unlike other rifles, only hits one target.\n [ ARMOR PIERCING ] Ignores enemy armor.\n - RANGE: 7\n - DAMAGE: 5");
break;
case 19:
tf_desc.text = ("BREN GUN - [ Machine Gun ] AP:3 \n" + "This bipod mounted light machine gun transforms people into crimson hued Spongebob Squarepants.\n\n [ PENETRATING ] Hits all targets in range.\n ( Warning: Splash damage can hurt your allies too )\n - RANGE: 6\n - DAMAGE: 12");
break;
case 20:
tf_desc.text = ("M60 - [ Machine Gun ] AP:3 \n" + "Want to unleash your inner Rambo? Drop on by to the nearest Rob's Gun Shack and get your own M60 today!\n\n [ PENETRATING ] Hits all targets in range.\n ( Warning: Splash damage can hurt your allies too )\n - RANGE: 5\n - DAMAGE: 16");
break;
};
} else {
if (equip_target.substring(0, 4) == "armo"){
switch (_arg1){
case 1:
tf_desc.text = ("GRAY SHIRT\n" + "If you can't decide what to wear, just go with gray.\n\n - NO STAT BONUSES");
break;
case 2:
tf_desc.text = ("SLEEVELESS SHIRT\n" + "Casual wear for chilling with your homies.\n\n - MAX HP + 2");
break;
case 3:
tf_desc.text = ("FUR-LINED JACKET\n" + "This trendy cover-up makes a statement: \n\"I WEAR ANIMALS\".\n\n - MAX HP + 2");
break;
case 4:
tf_desc.text = ("BANDAGE\n" + "Chicks dig guys in bandages. True story.\n\n - MAX HP + 2");
break;
case 5:
tf_desc.text = ("BLOODY BANDAGES\n" + ". . . but they're a grossed out by blood.\n\n - MAX HP + 2");
break;
case 6:
tf_desc.text = ("VEST and KNIFE BELT\n" + "No. It's not an extra weapon. Purely aesthetic.\n\n - AP GAIN + 1");
break;
case 7:
tf_desc.text = ("ASSAULT ARMOR\n" + "A stylish little number with elegant kevlar weave.\n\n - ARMOR CLASS + 3\n - MAX HP + 3");
break;
case 8:
tf_desc.text = ("AMMO and CAMO\n" + "Real men don't nead armor. They wear bullets.\n\n - MAX AP + 2");
break;
case 9:
tf_desc.text = ("CHESTPLATE\n" + "Keeps your innards nice and safe. You can still get shot in the limbs, but at the very least you won't die from organ failure.\n\n - ARMOR CLASS + 2\n - MAX AP + 1");
break;
case 10:
tf_desc.text = ("1337 SUIT\n" + "Nothing says \"Bad-ass Killer Man\" like a suit and tie.\n\n - ARMOR CLASS + 1\n - MAX HP + 2");
break;
case 11:
tf_desc.text = ("WHITE TUXEDO\n" + "All you need now is a sexy blonde and a dry martini.\n\n - ARMOR CLASS + 1\n - MAX HP + 2\n - AP GAIN + 2");
break;
case 12:
tf_desc.text = ("ATP COMBAT JACKET\n" + "The crossed straps are strategically placed to provide maximum protection to your vulnerable nipples.\n\n - ARMOR CLASS + 2\n - MAX HP + 4\n - AP GAIN + 1");
break;
case 13:
tf_desc.text = ("HANK'S TRENCH COAT\n" + "The sweat and blood encrusted in this coat have imbued it with incredible combat enhancing powers.\n\n [ DEFLECT ] If you're using a melee weapon you have \n a 75% chance to deflect any attack.\n - ARMOR CLASS + 3\n - MAX HP + 3\n - MAX AP + 3 | - AP GAIN + 1");
break;
case 14:
tf_desc.text = ("SANFORD'S CAMO SHORTS\n" + "The shorts also come with Sanford's back tattoo. These are the best shorts EVAR!!!\n\n - ARMOR CLASS + 2\n - MAX HP + 1\n - MAX AP + 2\n - AP GAIN + 1");
break;
case 15:
tf_desc.text = ("DEIMOS' TAC JACKET\n" + "The backpack does not contain communication gear. It contains hotdogs. . . And pie. . . mmMMMm. . . PIE.\n\n [ MARKSMANSHIP ] Your guns have +1 to range\n - MAX AP + 1\n - MAX HP - 1");
break;
case 16:
tf_desc.text = ("TATTERED RAGS\n" + "Tonight you hit the town. . . HOBO STYLE.\n\n - MAX HP + 12");
break;
case 17:
tf_desc.text = ("BLOODY TATTERS\n" + "It's just a flesh wound.\n\n - MAX HP + 12");
break;
case 18:
tf_desc.text = ("DARK TATTERS\n" + "The reaper left his cloak out. I took it. It was easy.\n\n - MAX HP + 6\n - ARMOR CLASS + 2");
break;
case 19:
tf_desc.text = ("HEAVY CHESTPLATE\n" + "Actually, it's not heavy at all. You wanna know why? \n. . . 'Cause It's made of mithril! MiiiiTHRiiiiLL!! >.<\n\n [ HEAVY MASTERY ] Allows a CQB or Assault Class to\n use 1 less AP on rifles & shotguns.\n - MAX HP + 4\n - ARMOR CLASS + 2");
break;
case 20:
tf_desc.text = ("SAUCY'S FANCY SUIT\n" + "Made from 50% silk and 50% hatred of ragtime music.\nWARNING: DO NOT DRY CLEAN. DISHWASHER SAFE.\n\n - MAX AP + 4\n - AP GAIN + 3");
break;
};
} else {
if (equip_target.substring(0, 4) == "head"){
switch (_arg1){
case 1:
tf_desc.text = ("NO HEADGEAR\n" + "Not even a hat. Nothing. Also, you have NO HAIR.\n\n- NO STAT BONUSES");
break;
case 2:
tf_desc.text = ("AMBER SHADES\n" + "$2 at the corner store. The ladies love it.\n\n - MAX HP + 1");
break;
case 3:
tf_desc.text = ("GOGGLES\n" + ". . . and if you put them over your eyes they'd actually serve a purpose.\n\n - MAX HP + 2");
break;
case 4:
tf_desc.text = ("HEAD BANDAGE\n" + "We broke the bank on this one. Three-ply tissue paper, baby!\n\n - MAX HP + 2");
break;
case 5:
tf_desc.text = ("BLOODY BANDAGES\n" + "Your head is bleeding. It's a sign of intelligence.\n\n - MAX HP + 2");
break;
case 6:
tf_desc.text = ("NIGHT VISION GOGGLES\n" + "Comes with the Collector's Edition of Sphincter Cell.\n\n [ NIGHT VISION ] Allows you to see better in the dark\n - AP GAIN + 1");
break;
case 7:
tf_desc.text = ("ASSAULT HELMET\n" + "People soon discovered that biker helmets are equally good at stopping bullets as it at stopping speeding concrete.\n\n - ARMOR CLASS + 3\n - MAX HP + 3");
break;
case 8:
tf_desc.text = ("BANDANA\n" + "The bandana used to be white but over time it's been tinted bright red by the blood of your enemies.\n\n - MAX AP + 2");
break;
case 9:
if (parent["advanced_tac"]){
tf_desc.text = ("ADVANCED TAC MASK\n" + "This plexiglass mask has a built-in bluetooth headset that allows you to chat with your friends even in the heat of combat. Comes with 1 month AT&T subscription.\n\n [ ADVANCED TAC SCAN ] Lets you see the HP, Armor Class, AP and AP Gain of your enemies\n - NO STAT BONUSES");
} else {
tf_desc.text = ("TACTICAL MASK\n" + "This plexiglass mask has a built-in bluetooth headset that allows you to chat with your friends even in the heat of combat. Comes with 1 month AT&T subscription.\n\n [ TACTICAL SCAN ] Lets you see the HP and Armor Class of your enemies\n - NO STAT BONUSES");
};
break;
case 10:
tf_desc.text = ("1337 SHADES\n" + "Maximum SPF UV Protection brought to you by Bay-Ran.\n\n - ARMOR CLASS + 1\n - MAX HP + 2");
break;
case 11:
tf_desc.text = ("TERMINATOR SHADES\n" + "When you put on these sunglasses, a Heads-Up Display will prompt you to say \"Chill out, dick-wad.\"\n\n - ARMOR CLASS + 1\n - MAX HP + 2\n - AP GAIN + 2");
break;
case 12:
tf_desc.text = ("ATP MASK\n" + "The asymmetric eyeshield was designed by Saiyan techs from planet Vegeta. It's style is over 9000!!!\n\n - ARMOR CLASS + 2\n - MAX HP + 4\n - AP MAX + 1");
break;
case 13:
tf_desc.text = ("HANK'S HEAD GEAR\n" + "You DO NOT want to see what's under there. It'll seriously @%!# you up.\n\n [ SHADOW DASH ] Teleport to a location for 1AP\n Maximum range equals current AP.\n [ SHADOW DODGE ] Teleport away when hit\n - ARMOR CLASS + 3 | - MAX HP + 3\n - MAX AP + 3 | - AP GAIN + 1");
break;
case 14:
tf_desc.text = ("SANFORD'S HEAD GEAR\n" + "Whoa!!! A lower lip?!? . . . And eyebrows??? \n. . He's got #@%&iNG EYEBROWSSSS MAN!!!\n\n [ HOOK SHOT ] Use the hook to pull an enemy to you\n - ARMOR CLASS + 2\n - MAX HP + 1\n - MAX AP + 2\n - AP GAIN + 1");
break;
case 15:
tf_desc.text = ("DEIMOS' HEAD GEAR\n" + "The visor is a memento from the time Deimos lost to Andre Agassi in the Wimbledon semi-finals. Honest.\n\n [ MARKSMANSHIP ] Your guns have +1 to range\n - MAX AP + 3\n - MAX HP - 1");
break;
case 16:
tf_desc.text = ("CLOWN MAKE-UP\n" + "Can't sleep Clown'll eat me Can't sleep Clown'll eat me\nCan't sleep Clown'll eat me Can't sleep Clown'll eat me\n\n [ CLOWN KILLS YOU ] You explode on death, dealing \n massive damage to anything and anyone nearby.");
break;
case 17:
tf_desc.text = ("TRICKY'S FACE\n" + "No. This is not a mask. This his actual FACE. . . You pulled a Hannibal man. YOU'RE WEARING HIS FACE!!! . . psycho.\n\n [ BOUNCY ] Jump to a location for 1AP. \n Maximum jump range equals current AP.\n - MAX HP + 6");
break;
case 18:
tf_desc.text = ("ZOMBIE HEAD\n" + "A few shots of T-Virus under the cheeks and around the mouth area will make you look mean and green.\n\n [ BLOODLUST ] You gain Full AP when you kill an enemy \n with a melee weapon. Works once per turn.\n - NO STAT BONUSES");
break;
case 19:
tf_desc.text = ("JESUS' HEAD\n" + "Look into my eyes. Your soul is stained by the blood of the innocent. Feel their pain.\n\n [ MARKSMANSHIP ] Your guns have +1 to range\n - MAX HP + 4\n - ARMOR CLASS + 2");
break;
case 20:
if (parent["advanced_tac"]){
tf_desc.text = ("SAUCY'S HEAD\n" + "What's the point of a monocle? You're holding up a piece of glass with only the muscle power in your eyebrows and cheeks. That's so F$%*ING RETARDED!\n\n [ ADVANCED TAC SCAN ] Lets you see the HP, Armor Class, AP and AP Gain of your enemies\n - MAX AP + 4\n - AP GAIN + 3");
} else {
tf_desc.text = ("SAUCY'S HEAD\n" + "What's the point of a monocle? You're holding up a piece of glass with only the muscle power in your eyebrows and cheeks. That's so F$%*ING RETARDED!\n\n [ TACTICAL SCAN ] Lets you see the HP and Armor Class of your enemies\n - MAX AP + 4\n - AP GAIN + 3");
};
break;
};
};
};
};
}
public function switchCategory(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if (equip_target != _arg1){
_local3 = new _SFX_click();
_local3.play();
};
equip_target = _arg1;
if (equip_target == "hand2"){
char.body.hand1.gotoAndStop(chardata.weapon2);
} else {
char.body.hand1.gotoAndStop(chardata.weapon1);
};
for (_local2 in equipbuttons) {
_local4 = equipbuttons[_local2];
_local5 = this[("gear_" + equip_target.substring(0, 4))];
_local4.item.visible = false;
_local4.head.visible = (((gear_head[_local4.id] >= 0)) && ((equip_target == "head")));
_local4.weapon.visible = (((gear_hand[_local4.id] >= 0)) && ((equip_target.substring(0, 4) == "hand")));
_local4.armor.visible = (((gear_armo[_local4.id] >= 0)) && ((equip_target == "armor")));
_local4.armor_head.visible = (((gear_armo[_local4.id] >= 0)) && ((equip_target == "armor")));
_local4.label.visible = (_local5[_local4.id] >= 0);
_local4.lock.visible = (_local5[_local4.id] < 0);
_local4.qty.visible = (_local5[_local4.id] >= 0);
_local4.qty.text = _local5[_local4.id];
if (_local5[_local4.id] <= 0){
if (_local5[_local4.id] == 0){
Util.addFilterToMC(_local4, Util.matrix_dark);
} else {
Util.removeFilterFromMC(_local4);
};
_local4.mouseEnabled = false;
} else {
Util.removeFilterFromMC(_local4);
_local4.mouseEnabled = true;
};
if (equip_target.substring(0, 4) == "hand"){
if (chardata[("weapon" + equip_target.substring(4, 5))] == (_local4.id + 1)){
Util.addGlowFilterToMC(_local4);
_local4.mouseEnabled = false;
showData(_local4.id);
};
} else {
if (chardata[equip_target] == _local4.id){
Util.addGlowFilterToMC(_local4);
_local4.mouseEnabled = false;
showData(_local4.id);
};
};
};
}
public function makeEquipMenu(){
var _local1:*;
var _local2:*;
var _local3:*;
char = new Char();
addChild(char);
char.x = 470;
char.y = 0x0100;
char.feet.stop();
char.body.gotoAndStop(1);
updateChar();
_local1 = 0;
while (_local1 < 5) {
_local2 = 0;
while (_local2 < 4) {
_local3 = new Button_equip();
addChild(_local3);
_local3.buttonMode = true;
_local3.x = (125 + (_local2 * 65));
_local3.y = (95 + (_local1 * 40));
_local3.id = (((_local1 * 4) + _local2) + 1);
_local3.addEventListener(MouseEvent.CLICK, clickedButton);
_local3.label.mouseEnabled = false;
_local3.qty.mouseEnabled = false;
_local3.weapon.mouseEnabled = false;
_local3.head.mouseEnabled = false;
_local3.armor_head.mouseEnabled = false;
_local3.weapon.gotoAndStop((1 + _local3.id));
_local3.weapon.jhp.visible = ((parent["jhp"]) && ((((_local3.id == ITEM.MP5)) || ((_local3.id == ITEM.INGRAM)))));
_local3.weapon.bg.visible = false;
_local3.head.gotoAndStop(_local3.id);
_local3.head.visible = false;
_local3.armor.gotoAndStop(_local3.id);
_local3.armor.mouseEnabled = false;
_local3.armor.visible = false;
_local3.qty.text = gear_hand[_local3.id];
equipbuttons[_local3.id] = _local3;
_local2++;
};
_local1++;
};
switchCategory("hand1");
}
public function closeMenu(_arg1=null){
var _local2:*;
engine.setWeaponStats(chardata, chardata.weapon1);
engine.allCharsAlpha(1);
engine.paused = false;
parent["nav"].visible = true;
visible = false;
if (_arg1 != null){
equip_target = "hand1";
hand1.alpha = 1;
hand2.alpha = 0.3;
head.alpha = 0.3;
armor.alpha = 0.3;
};
_local2 = new _SFX_Close();
_local2.play();
disableButtonListeners();
}
public function get gear_head():Array{
return (parent["gear_head"]);
}
function frame1(){
equipbuttons = [];
equip_target = "hand1";
chardata = {weapon1:20, weapon2:11, armor:7, head:16, id:4};
enableButtonListeners();
makeEquipMenu();
}
public function get player_chardata(){
return (parent["player_chardata"]);
}
public function setCharData(_arg1){
chardata = _arg1;
tf_id.text = chardata.id;
tf_class.text = chardata.charclass;
updateChar();
switchCategory(equip_target);
}
public function openMenu(_arg1){
setCharData(_arg1);
enableButtonListeners();
visible = true;
parent["nav"].visible = false;
}
public function updateChar(){
char.body.head.gotoAndStop(chardata.head);
char.body.armor.gotoAndStop(chardata.armor);
char.body.hand1.gotoAndStop((chardata.weapon1 + 1));
tf_stats.text = ((((((((((("HP MAX : " + chardata.hp_max) + "\nAP MAX : ") + chardata.ap_max) + "\nAP GAIN : ") + chardata.ap_gain) + " (per turn)") + "\n\nArmor Class: ") + chardata.armorclass) + "\n (") + Math.ceil(((chardata.armorclass / 12) * 100))) + "% block)");
switch (chardata.charclass){
case "CQB":
tf_classbonus.text = "CLASS BONUS \n-Less 1 AP to use Pistols\n-Less 1 AP to use Melee";
break;
case "Assault":
tf_classbonus.text = "CLASS BONUS \n-Less 1 AP to use SMG's\n-Less 1 AP to use Pistols";
break;
case "Heavy":
tf_classbonus.text = "CLASS BONUS \n-Less 1 AP to use Shotguns\n-Less 1 AP to use Rifles";
break;
};
}
public function clickedCategoryButton(_arg1){
switchCategory(_arg1.currentTarget.name);
head.alpha = (0.3 + int((_arg1.currentTarget == head)));
armor.alpha = (0.3 + int((_arg1.currentTarget == armor)));
hand1.alpha = (0.3 + int((_arg1.currentTarget == hand1)));
hand2.alpha = (0.3 + int((_arg1.currentTarget == hand2)));
}
public function equipItem(_arg1){
var n = _arg1;
try {
if (equip_target.substring(0, 4) == "hand"){
if (gear_hand[n] <= 0){
return (false);
};
gear_hand[(chardata[("weapon" + equip_target.substring(4, 5))] - 1)] = (gear_hand[(chardata[("weapon" + equip_target.substring(4, 5))] - 1)] + 1);
gear_hand[n] = (gear_hand[n] - 1);
chardata[("weapon" + equip_target.substring(4, 5))] = (n + 1);
player_chardata[(chardata.id - 1)].weapon1 = chardata.weapon1;
player_chardata[(chardata.id - 1)].weapon2 = chardata.weapon2;
} else {
if (this[("gear_" + equip_target.substring(0, 4))][n] <= 0){
return (false);
};
if (equip_target == "head"){
if (n == ITEM.NVG){
engine.nvgOn();
} else {
if (chardata[equip_target] == ITEM.NVG){
engine.nvgOff();
};
};
};
this[("gear_" + equip_target.substring(0, 4))][chardata[equip_target]] = (this[("gear_" + equip_target.substring(0, 4))][chardata[equip_target]] + 1);
this[("gear_" + equip_target.substring(0, 4))][n] = (this[("gear_" + equip_target.substring(0, 4))][n] - 1);
player_chardata[(chardata.id - 1)][equip_target] = n;
chardata[equip_target] = n;
};
} catch(e) {
trace(e);
};
updateChar();
}
}
}//package
Section 133
//FX_ArmorBlocked (FX_ArmorBlocked)
package {
import flash.display.*;
public dynamic class FX_ArmorBlocked extends MovieClip {
public function FX_ArmorBlocked(){
addFrameScript(45, frame46);
}
function frame46(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 134
//FX_audit_screen0 (FX_audit_screen0)
package {
import flash.display.*;
public dynamic class FX_audit_screen0 extends MovieClip {
public var desk:MovieClip;
public function FX_audit_screen0(){
addFrameScript(459, frame460);
}
function frame460(){
stop();
try {
GameEngine(parent).startFinalBattle();
var _local2 = parent.parent;
_local2["playMusic"]();
} catch(e) {
};
MovieClip(parent).removeChild(this);
}
}
}//package
Section 135
//FX_audit_screen1 (FX_audit_screen1)
package {
import flash.display.*;
public dynamic class FX_audit_screen1 extends MovieClip {
public function FX_audit_screen1(){
addFrameScript(30, frame31, 245, frame246, 326, frame327, 489, frame490);
}
function frame327(){
GameEngine(parent).finalBossPhase1_magnify();
}
function frame31(){
GameEngine(parent).selectNone();
GameEngine(parent).paused = true;
}
function frame246(){
GameEngine(parent).finalBossPhase1_respawn();
}
function frame490(){
stop();
}
}
}//package
Section 136
//FX_audit_screen2 (FX_audit_screen2)
package {
import flash.display.*;
public dynamic class FX_audit_screen2 extends MovieClip {
public function FX_audit_screen2(){
addFrameScript(38, frame39, 472, frame473, 829, frame830);
}
function frame830(){
stop();
}
function frame473(){
GameEngine(parent).finalBossPhase2_respawn();
}
function frame39(){
GameEngine(parent).selectNone();
GameEngine(parent).paused = true;
}
}
}//package
Section 137
//FX_audit_screen3 (FX_audit_screen3)
package {
import flash.display.*;
public dynamic class FX_audit_screen3 extends MovieClip {
public function FX_audit_screen3(){
addFrameScript(34, frame35, 719, frame720, 738, frame739, 772, frame773, 783, frame784, 792, frame793, 867, frame868, 937, frame938, 1174, frame1175);
}
function frame793(){
GameEngine(parent).finalBossPhase3_respawn4();
}
function frame1175(){
stop();
}
function frame739(){
GameEngine(parent).finalBossPhase3_respawn1();
}
function frame868(){
GameEngine(parent).useEnemySmokeGrenade();
GameEngine(parent).finalBossPhase3_rearrange();
}
function frame720(){
GameEngine(parent).paused = false;
}
function frame35(){
GameEngine(parent).selectNone();
GameEngine(parent).paused = true;
}
function frame773(){
GameEngine(parent).finalBossPhase3_respawn2();
}
function frame938(){
}
function frame784(){
GameEngine(parent).finalBossPhase3_respawn3();
}
}
}//package
Section 138
//FX_audit_screen4 (FX_audit_screen4)
package {
import flash.display.*;
public dynamic class FX_audit_screen4 extends MovieClip {
public function FX_audit_screen4(){
addFrameScript(49, frame50, 704, frame705);
}
function frame50(){
GameEngine(parent).selectNone();
GameEngine(parent).paused = true;
}
function frame705(){
stop();
GameEngine(parent).finalBossPhase4_respawn();
}
}
}//package
Section 139
//FX_audit_screen5 (FX_audit_screen5)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class FX_audit_screen5 extends MovieClip {
public var desk:MovieClip;
public function FX_audit_screen5(){
addFrameScript(76, frame77, 77, frame78);
}
function frame77(){
MovieClip(parent.parent)["locker"].visible = true;
}
function frame78(){
stop();
GameEngine(parent).checkForWin();
}
}
}//package
Section 140
//FX_Bloodlust (FX_Bloodlust)
package {
import flash.display.*;
public dynamic class FX_Bloodlust extends MovieClip {
public function FX_Bloodlust(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 141
//FX_BloodSpurt (FX_BloodSpurt)
package {
import flash.display.*;
public dynamic class FX_BloodSpurt extends MovieClip {
public function FX_BloodSpurt(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 142
//FX_Deflector (FX_Deflector)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class FX_Deflector extends MovieClip {
public var obj;
public function FX_Deflector(){
addFrameScript(4, frame5, 8, frame9);
}
function frame5(){
GameEngine(parent).paused = true;
}
function frame9(){
stop();
try {
obj = this["def_obj"];
GameEngine(parent).hurtChar(obj.attacker, obj.blocker, obj.damage, obj.shottype, obj.ignoresarmor, obj.stuns);
GameEngine(parent).paused = false;
} catch(e) {
};
MovieClip(parent).removeChild(this);
}
}
}//package
Section 143
//FX_DeimosGrenade (FX_DeimosGrenade)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class FX_DeimosGrenade extends MovieClip {
public function FX_DeimosGrenade(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
try {
this["tgt_char"].visible = true;
} catch(e) {
};
GameEngine(parent).useEnemySmokeGrenade();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 144
//FX_FloorBlood (FX_FloorBlood)
package {
import flash.display.*;
public dynamic class FX_FloorBlood extends MovieClip {
public var gfx:MovieClip;
public function FX_FloorBlood(){
addFrameScript(0, frame1);
}
function frame1(){
rotation = (Math.floor((Math.random() * 4)) * 90);
gfx.rotation = (rotation = (Math.floor((Math.random() * 8)) * 45));
stop();
}
}
}//package
Section 145
//FX_GetFlashbang (FX_GetFlashbang)
package {
import flash.display.*;
public dynamic class FX_GetFlashbang extends MovieClip {
public function FX_GetFlashbang(){
addFrameScript(27, frame28);
}
function frame28(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 146
//FX_GetMedkit (FX_GetMedkit)
package {
import flash.display.*;
public dynamic class FX_GetMedkit extends MovieClip {
public function FX_GetMedkit(){
addFrameScript(27, frame28);
}
function frame28(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 147
//FX_GetSmoke (FX_GetSmoke)
package {
import flash.display.*;
public dynamic class FX_GetSmoke extends MovieClip {
public function FX_GetSmoke(){
addFrameScript(27, frame28);
}
function frame28(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 148
//FX_HankAfterImage (FX_HankAfterImage)
package {
import flash.display.*;
public dynamic class FX_HankAfterImage extends MovieClip {
public function FX_HankAfterImage(){
addFrameScript(9, frame10, 19, frame20);
}
function frame10(){
GameEngine(parent).paused = true;
}
function frame20(){
stop();
GameEngine(parent).paused = false;
MovieClip(parent).removeChild(this);
}
}
}//package
Section 149
//FX_Hookshot (FX_Hookshot)
package {
import flash.display.*;
public dynamic class FX_Hookshot extends MovieClip {
public function FX_Hookshot(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 150
//FX_HPup (FX_HPup)
package {
import flash.display.*;
public dynamic class FX_HPup extends MovieClip {
public function FX_HPup(){
addFrameScript(38, frame39);
}
function frame39(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 151
//FX_Ineffective (FX_Ineffective)
package {
import flash.display.*;
public dynamic class FX_Ineffective extends MovieClip {
public function FX_Ineffective(){
addFrameScript(45, frame46);
}
function frame46(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 152
//FX_Miss (FX_Miss)
package {
import flash.display.*;
public dynamic class FX_Miss extends MovieClip {
public function FX_Miss(){
addFrameScript(45, frame46);
}
function frame46(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 153
//FX_Ouch (FX_Ouch)
package {
import flash.display.*;
public dynamic class FX_Ouch extends MovieClip {
public function FX_Ouch(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 154
//FX_PID_Power (FX_PID_Power)
package {
import flash.display.*;
public dynamic class FX_PID_Power extends MovieClip {
public function FX_PID_Power(){
addFrameScript(25, frame26);
}
function frame26(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 155
//FX_pid_screen (FX_pid_screen)
package {
import flash.display.*;
public dynamic class FX_pid_screen extends MovieClip {
public var bar:MovieClip;
public var warning:MovieClip;
public function FX_pid_screen(){
addFrameScript(0, frame1);
}
function frame1(){
warning.gotoAndStop(31);
}
}
}//package
Section 156
//FX_ResurrectBolt (FX_ResurrectBolt)
package {
import flash.display.*;
public dynamic class FX_ResurrectBolt extends MovieClip {
public function FX_ResurrectBolt(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 157
//FX_TrickyAfterImage (FX_TrickyAfterImage)
package {
import flash.display.*;
public dynamic class FX_TrickyAfterImage extends MovieClip {
public function FX_TrickyAfterImage(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 158
//FX_TrickyRails (FX_TrickyRails)
package {
import flash.display.*;
public dynamic class FX_TrickyRails extends MovieClip {
public function FX_TrickyRails(){
addFrameScript(100, frame101);
}
function frame101(){
stop();
GameEngine(parent).paused = false;
MovieClip(parent).removeChild(this);
}
}
}//package
Section 159
//GameEngine (GameEngine)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class GameEngine extends MovieClip {
public var bloodlimit:uint;// = 50
public var equip_menu:EquipMenu;
public var victory:Boolean;// = false
public var walkspeed:uint;// = 1
public var echar2:MovieClip;
public var echar4:MovieClip;
public var echar6:MovieClip;
public var echar3:MovieClip;
public var echar7:MovieClip;
public var echar9:MovieClip;
public var echar5:MovieClip;
public var echar1:MovieClip;
public var selectedchar:MovieClip;
public var echar8:MovieClip;
public var grenade_screen:MovieClip;
public var _paused:Boolean;// = false
public var ui:MovieClip;
public var targetenemy:MovieClip;
public var echar10:MovieClip;
public var echar11:MovieClip;
public var echar12:MovieClip;
public var selectarrow:MovieClip;
public var focused_enemy_index:uint;// = 1
public var clownbombson;// = true
public var smoked:Boolean;// = false
public var playerturn:Boolean;// = true
public var victory_timer:int;// = 60
public var attackmovetarget:MovieClip;
public var cols:uint;// = 11
public var tile_width:uint;// = 58
public var lastmouseloc:Object;
public var pchar1:MovieClip;
public var pchar2:MovieClip;
public var pchar3:MovieClip;
public var pchar4:MovieClip;
public var lost:Boolean;// = false
public var charmoved:Boolean;// = true
public var tf_timer:int;// = 0
public var moveline:Shape;
public var turn_delay:uint;// = 0
public var tilelight:MovieClip;
public var audit_screen;
public var bloodcount:uint;// = 0
public var dark_screen:MovieClip;
public var targetreticle:MovieClip;
public var tiles:Array;
public var flash_screen:MovieClip;
public var pid_screen:MovieClip;
public var charlayer:MovieClip;
public var trickybattle;// = false
public var numEnemies:uint;// = 0
public var finalphase:uint;// = 0
public var bloodreduce_mark:uint;// = 20
public var targettile;// = null
public var rows:uint;// = 6
public var nchar1:MovieClip;
public var enemy_smoke:Boolean;// = false
public function GameEngine(){
tiles = [];
rows = 6;
cols = 11;
numEnemies = 0;
focused_enemy_index = 1;
charmoved = true;
targettile = null;
tile_width = 58;
tf_timer = 0;
playerturn = true;
victory = false;
victory_timer = 60;
lost = false;
walkspeed = 1;
_paused = false;
bloodcount = 0;
bloodreduce_mark = 20;
bloodlimit = 50;
turn_delay = 0;
smoked = false;
enemy_smoke = false;
clownbombson = true;
trickybattle = false;
finalphase = 0;
super();
this.mouseEnabled = false;
Char.engine = this;
visible = false;
}
public function useMedkit(){
var _local1:*;
parent["medkit"] = (parent["medkit"] - 1);
ui.tf_medkit.text = ("" + parent["medkit"]);
if (parent["supermedkit"]){
selectedchar.hp = Math.min((selectedchar.hp + 16), selectedchar.hp_max);
} else {
selectedchar.hp = Math.min((selectedchar.hp + 8), selectedchar.hp_max);
};
_local1 = new FX_HPup();
addChild(_local1);
_local1.x = selectedchar.x;
_local1.y = selectedchar.y;
playSound("_SFX_Medkit");
}
public function finalBossPhase4(){
removeChild(audit_screen);
audit_screen = null;
audit_screen = new FX_audit_screen4();
addChild(audit_screen);
audit_screen.x = 320;
audit_screen.y = 240;
setChildIndex(audit_screen, getChildIndex(charlayer));
}
public function finalBossPhase5(){
var _local1:*;
parent["explored"][166] = true;
var _local2 = parent;
_local2["countExplored"]();
if (parent["exp_count"] >= 176){
unlockMedal("Exploration");
};
removeChild(audit_screen);
audit_screen = null;
_local1 = new SCREEN_Ending();
parent.addChild(_local1);
_local1.x = 320;
_local1.y = 240;
paused = true;
return (false);
}
public function hurtChar(_arg1, _arg2, _arg3, _arg4, _arg5=false, _arg6=false){
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
if (_arg1.hp <= 0){
return (false);
};
_local7 = _arg1.armorclass;
if ((((_arg4 == "melee")) || (_arg1.stunned))){
_local7 = Math.floor((_local7 / 2));
};
if ((((((_arg1.armor == ITEM.HANK)) && ((_arg1.shottype == "melee")))) && ((Math.random() >= 0.25)))){
if (_arg1 != _arg2){
weaponDeflect(_arg1, _arg2, _arg2.weapon_damage, _arg2.shottype, true);
return (false);
};
};
if (smoked){
if (Math.random() < 0.85){
_local8 = new FX_Miss();
addChild(_local8);
_local8.x = _arg1.x;
_local8.y = (_arg1.y - 70);
return (false);
};
};
if ((((_arg1.head == ITEM.SAUCY)) && ((_arg1.owner == 1)))){
if (_arg2.weapon1 != _arg1.weapon1){
_local9 = new FX_Ineffective();
weaponBlock(_arg1);
addChild(_local9);
_local9.x = _arg1.x;
_local9.y = (_arg1.y - 70);
return (false);
};
_local9 = new FX_Ouch();
setSaucyGun(_arg1);
addChild(_local9);
_local9.x = _arg1.x;
_local9.y = (_arg1.y - 70);
} else {
if (((!(_arg5)) && ((Math.ceil((Math.random() * 12)) <= _local7)))){
_local10 = new FX_ArmorBlocked();
addChild(_local10);
_local10.x = _arg1.x;
_local10.y = (_arg1.y - 70);
weaponBlock(_arg1);
return (false);
};
};
if (((_arg6) && (!((_arg1.head == ITEM.SAUCY))))){
trace("STUN CHANCE");
if (Math.random() >= 0.25){
_arg1.stunned = true;
_arg1.targetenemy = null;
if ((((_arg1.owner == 0)) && ((selectedchar == _arg1)))){
selectNone();
};
};
};
_arg1.hp = (_arg1.hp - _arg3);
createFloorBlood(_arg1);
if (((!((_arg4 == "melee"))) && ((_arg3 > 0)))){
_local11 = new FX_BloodSpurt();
_local11.scaleX = _arg1.scaleX;
addChild(_local11);
_local11.x = _arg1.x;
_local11.y = (_arg1.y - 70);
};
if (_arg1.hp <= 0){
if (_arg1 == targetenemy){
targetenemy = null;
};
if (_arg1.owner == 1){
if ((((_arg1.head == ITEM.TAC)) && ((_arg1.owner == 1)))){
itemGet(_arg1, -15);
itemGet(_arg1, 15);
} else {
if ((((((_arg1.armor == ITEM.WHITE)) && ((_arg1.owner == 1)))) && ((Math.random() >= 0.25)))){
itemGet(_arg1);
} else {
if ((((((((_arg1.armor == ITEM.WHITE)) || ((_arg1.head == ITEM.ATP)))) && ((_arg1.owner == 1)))) && ((Math.random() >= 0.5)))){
itemGet(_arg1);
};
};
};
if ((((_arg1.head == ITEM.CLOWN)) && (clownbombson))){
if (_arg1.armor == ITEM.SAUCY){
clownBombEffect(_arg1);
} else {
if (_arg1.armor == ITEM.TRICKY){
clownZombifyEffect(_arg1);
} else {
if (_arg1.armor == ITEM.WHITE){
clownStunEffect(_arg1);
};
};
};
} else {
if (_arg1.head == ITEM.JESUS){
jesusEffect(_arg1);
return (true);
};
if (_arg1.head == ITEM.TRICKY){
trickyEffect(_arg1, _arg2, _arg4);
return (true);
};
_arg1.feet.visible = false;
_arg1.body.gotoAndPlay(("death_" + _arg4));
};
checkForWin();
} else {
if (_arg1.owner == 0){
_arg1.feet.visible = false;
_arg1.body.gotoAndPlay(("death_" + _arg4));
if (_arg1 == selectedchar){
selectNone();
};
if (_arg1.head == ITEM.CLOWN){
clownBombEffect(_arg1);
};
checkForLose();
};
};
return (true);
} else {
if (_arg1.head == ITEM.HANK){
hankDodge(_arg1, _arg2);
} else {
if ((((((_arg2.head == ITEM.SANFORD)) && ((_arg2.weapon1 == ITEM.oHOOK)))) && (!((_arg2.owner == _arg1.owner))))){
_local12 = Math.round(_arg2.scaleX);
if (Math.abs(_arg2.scaleX) <= 1){
_local12 = (_local12 * 2);
};
if (checkTileAvail((_arg1.col - _local12), _arg2.row)){
placeCharOnTile(_arg1, (_arg1.col - _local12), _arg2.row);
};
_arg1.animating = true;
_arg1.body.gotoAndPlay("hurt");
_arg1.stunned = true;
} else {
_arg1.animating = true;
_arg1.body.gotoAndPlay("hurt");
};
};
};
return (false);
}
public function createCharLayer(){
charlayer = new MovieClip();
addChild(charlayer);
}
public function finalBossPhase0(){
trace("PHASE 0: LEET CREW & ATP");
placeCharOnTile(echar1, 1, 4);
placeCharOnTile(echar2, 1, 2);
placeCharOnTile(echar3, 9, 4);
placeCharOnTile(echar4, 9, 2);
placeCharOnTile(echar5, 0, 5);
placeCharOnTile(echar6, 10, 5);
correctPlacement(echar1, 20, "drop");
correctPlacement(echar2, 20, "drop");
correctPlacement(echar3, 20, "drop");
correctPlacement(echar4, 20, "drop");
correctPlacement(echar5, 32, "drop");
correctPlacement(echar6, 32, "drop");
focused_enemy_index = 1;
echar1.scaleX = 1;
echar2.scaleX = 1;
echar5.scaleX = 1;
echar3.scaleX = -1;
echar4.scaleX = -1;
echar6.scaleX = -1;
paused = false;
}
public function finalBossPhase3(){
removeChild(audit_screen);
audit_screen = null;
audit_screen = new FX_audit_screen3();
addChild(audit_screen);
audit_screen.x = 320;
audit_screen.y = 240;
setChildIndex(audit_screen, getChildIndex(charlayer));
}
public function zapOneEnemy(){
var _local1:*;
var _local2:uint;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = Math.floor((Math.random() * numEnemies));
_local2 = 0;
while (_local2 < numEnemies) {
_local3 = this[("echar" + (_local1 + 1))];
if ((((_local3 is Char)) && ((_local3.hp > 0)))){
_local4 = hurtChar(_local3, _local3, 24, "zap", true, false);
if (!_local4){
_local5 = new FX_ResurrectBolt();
_local5.x = _local3.x;
_local5.y = _local3.y;
addChild(_local5);
};
return (true);
};
_local2++;
_local1 = ((_local1 + 1) % numEnemies);
};
return (false);
}
public function startFinalBattle(){
paused = false;
walkspeed = 1;
finalBossPhase0();
victory = false;
victory_timer = 60;
playerturn = false;
parent["locker"].mouseEnabled = false;
parent["nav"].visible = false;
}
public function useSmokeGrenade(){
parent["smoke"] = (parent["smoke"] - 1);
ui.tf_smoke.text = ("" + parent["smoke"]);
smoked = true;
grenade_screen = new SCREEN_Smoke();
addChild(grenade_screen);
setChildIndex(grenade_screen, getChildIndex(ui));
playSound("_SFX_GrenadeSmoke");
}
public function mouseOverChar(_arg1){
var _local2:*;
if (((equip_menu.visible) || (victory))){
return (false);
};
if (playerturn){
_local2 = _arg1.currentTarget;
if ((((_local2.alpha < 1)) || ((_local2.hp <= 0)))){
return (false);
};
if ((((_local2.owner == 1)) && (!((selectedchar == null))))){
targetenemy = _local2;
if (_local2.scanblock){
targetreticle.tf.text = "\n\n? ? ?";
} else {
if (parent["advanced_tac"]){
targetreticle.tf.text = (((((((((("Class:" + targetenemy.charclass) + "\nHP:") + targetenemy.hp) + " / AC:") + targetenemy.armorclass) + "\n AP:") + targetenemy.ap) + "(+") + targetenemy.ap_gain) + ")");
} else {
targetreticle.tf.text = ((("\n\nHP:" + targetenemy.hp) + " / AC:") + targetenemy.armorclass);
};
};
};
};
}
public function getMouseColRow(){
var _local1:*;
var _local2:*;
_local1 = Math.floor((mouseX / tile_width));
_local2 = Math.floor(((mouseY - 240) / 20));
return ({col:_local1, row:_local2});
}
public function unlockMedal(_arg1){
var _local2 = parent;
_local2["unlockMedal"](_arg1);
}
public function allCharsAlpha(_arg1){
var _local2:*;
_local2 = 0;
while (_local2 < charlayer.numChildren) {
charlayer.getChildAt(_local2).alpha = _arg1;
if (charlayer.getChildAt(_local2) == selectedchar){
selectedchar.mouseEnabled = false;
} else {
if (_arg1 == 1){
MovieClip(charlayer.getChildAt(_local2)).mouseEnabled = true;
} else {
MovieClip(charlayer.getChildAt(_local2)).mouseEnabled = false;
};
};
_local2++;
};
}
public function clickedChar(_arg1){
var _local2:*;
if (((((equip_menu.visible) || (((victory) && ((victory_timer > 0)))))) || (paused))){
return (false);
};
if (playerturn){
_local2 = _arg1.currentTarget;
if ((((((_local2 is Char)) && ((_local2.alpha == 1)))) && (!(_local2.animating)))){
if (_local2.owner == 0){
if ((((_local2 == selectedchar)) && ((victory_timer <= 0)))){
gotoEquipMenu();
} else {
switchSelected(_local2);
};
} else {
if (_local2.owner == 1){
if (selectedchar != null){
targettile = null;
shootEnemy(selectedchar, _local2);
};
};
};
};
};
}
public function getCharOnTile(_arg1, _arg2){
var _local3:*;
var _local4:Char;
if ((((((((_arg1 < 0)) || ((_arg1 >= cols)))) || ((_arg2 < 0)))) || ((_arg2 >= rows)))){
return (false);
};
_local3 = 0;
while (_local3 < charlayer.numChildren) {
_local4 = Char(charlayer.getChildAt(_local3));
if ((((((_local4.hp > 0)) && ((_local4.col == _arg1)))) && ((_local4.row == _arg2)))){
return (_local4);
};
_local3++;
};
return (false);
}
public function setWeaponStats(_arg1, _arg2){
_arg1.weapon_ap = 2;
if (_arg2 > 9){
_arg1.melee = false;
if (_arg2 >= 17){
_arg1.shottype = "burst";
_arg1.weapon_ap = 3;
if (_arg2 >= 19){
if ((((_arg1.charclass == "Heavy")) || ((_arg1.armor == ITEM.JESUS)))){
_arg1.weapon_ap = 2;
};
} else {
if (_arg1.charclass == "Assault"){
_arg1.weapon_ap = 2;
};
};
} else {
if (_arg2 >= 14){
_arg1.shottype = "shotgun";
_arg1.weapon_ap = 3;
if (_arg2 == 16){
_arg1.weapon_ap = 2;
};
if ((((_arg1.charclass == "Heavy")) || ((_arg1.armor == ITEM.JESUS)))){
_arg1.weapon_ap = (_arg1.weapon_ap - 1);
};
} else {
_arg1.shottype = "triple";
if ((((_arg1.charclass == "CQB")) || ((_arg1.charclass == "Assault")))){
_arg1.weapon_ap = 1;
};
};
};
} else {
_arg1.melee = true;
_arg1.shottype = "melee";
if (_arg1.charclass == "CQB"){
_arg1.weapon_ap = 1;
};
};
switch (_arg2){
case 1:
_arg1.weapon_range = 1;
_arg1.weapon_damage = 3;
break;
case 2:
_arg1.weapon_range = 1;
_arg1.weapon_damage = 3;
break;
case 3:
_arg1.weapon_range = 1;
_arg1.weapon_damage = 4;
break;
case 4:
_arg1.weapon_range = 1;
_arg1.weapon_damage = 5;
break;
case 5:
_arg1.weapon_range = 2;
_arg1.weapon_damage = 4;
break;
case 6:
_arg1.weapon_ap = 2;
_arg1.weapon_range = 1;
_arg1.weapon_damage = 8;
break;
case 7:
_arg1.weapon_ap = 2;
_arg1.weapon_range = 3;
_arg1.weapon_damage = 8;
break;
case 8:
_arg1.weapon_ap = 3;
_arg1.weapon_range = 2;
_arg1.weapon_damage = 12;
break;
case 9:
_arg1.weapon_range = 8;
_arg1.weapon_damage = 4;
_arg1.weapon_ap = 2;
break;
case 10:
_arg1.weapon_range = 4;
_arg1.weapon_damage = 2;
break;
case 11:
_arg1.weapon_range = 4;
_arg1.weapon_damage = 3;
break;
case 12:
_arg1.weapon_range = 4;
_arg1.weapon_damage = 4;
break;
case 13:
_arg1.weapon_range = 4;
_arg1.weapon_damage = 4;
break;
case 14:
_arg1.weapon_range = 3;
_arg1.weapon_damage = 8;
break;
case 15:
_arg1.weapon_range = 4;
_arg1.weapon_damage = 6;
break;
case 16:
_arg1.weapon_range = 4;
_arg1.weapon_damage = 4;
break;
case 17:
_arg1.weapon_range = 6;
_arg1.weapon_damage = 6;
if (((parent["jhp"]) && ((_arg1.owner == 0)))){
_arg1.weapon_damage = (_arg1.weapon_damage + 2);
};
break;
case 18:
_arg1.weapon_range = 7;
_arg1.weapon_damage = 5;
if (((parent["jhp"]) && ((_arg1.owner == 0)))){
_arg1.weapon_damage = (_arg1.weapon_damage + 2);
};
break;
case 19:
_arg1.weapon_range = 7;
_arg1.weapon_damage = 5;
break;
case 20:
_arg1.weapon_range = 6;
_arg1.weapon_damage = 12;
break;
case 21:
_arg1.weapon_range = 5;
_arg1.weapon_damage = 16;
break;
};
if (_arg1.shottype != "melee"){
_arg1.weapon_range = (_arg1.weapon_range + _arg1.weapon_range_bonus);
};
}
public function dispose(){
var n:*;
var r:*;
var char:*;
var c:*;
stop();
removeEventListener(Event.ENTER_FRAME, frameFunc);
stage.removeEventListener(MouseEvent.MOUSE_UP, mouseFunc);
ui.w2.removeEventListener(MouseEvent.CLICK, clickedSwapButton);
ui.options.removeEventListener(MouseEvent.CLICK, showOptions);
ui.btn_togglequality.removeEventListener(MouseEvent.CLICK, toggleQuality);
ui.endturn.removeEventListener(MouseEvent.CLICK, endPlayerTurn);
ui.saveload.removeEventListener(MouseEvent.CLICK, showSaveMenu);
ui.medkit.removeEventListener(MouseEvent.CLICK, clickedMedkit);
ui.supermedkit.removeEventListener(MouseEvent.CLICK, clickedMedkit);
ui.smoke.removeEventListener(MouseEvent.CLICK, clickedSmokeGrenade);
ui.flashbang.removeEventListener(MouseEvent.CLICK, clickedFlashbang);
ui.pid.removeEventListener(MouseEvent.CLICK, clickedPID);
ui.halo.removeEventListener(MouseEvent.CLICK, clickedHalo);
n = (charlayer.numChildren - 1);
while (n >= 0) {
try {
char = charlayer.getChildAt(n);
char.removeEventListener(MouseEvent.CLICK, clickedChar);
char.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverChar);
char.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutChar);
} catch(e) {
};
charlayer.removeChild(charlayer.getChildAt(n));
n = (n - 1);
};
removeChild(charlayer);
for (r in tiles) {
for (c in tiles[r]) {
removeChild(tiles[r][c]);
};
tiles[r] = null;
};
tiles = null;
}
public function trickyTrain(_arg1, _arg2, _arg3){
var _local4:*;
var _local5:*;
_local4 = new FX_TrickyRails();
addChild(_local4);
_local4.y = _arg1.y;
_local4.x = 320;
setChildIndex(_local4, getChildIndex(charlayer));
_local5 = new SCREEN_Train();
addChild(_local5);
_local5.y = _arg1.y;
_local5.x = 320;
_local5.clown = _arg1;
_local5.playerchar = _arg2;
_arg1.feet.visible = false;
_arg1.body.gotoAndPlay(_arg3);
_arg1.animating = true;
_arg1.hp = 5;
if (_arg1.weapon1 == ITEM.oM60){
_arg1.weapon1 = (_arg1.weapon2 = ITEM.oWARNING);
} else {
if (_arg1.weapon1 == ITEM.oWARNING){
_arg1.weapon1 = (_arg1.weapon2 = ITEM.oSAWNOFF);
} else {
_arg1.weapon1 = (_arg1.weapon2 = ITEM.oM60);
};
};
}
public function finalBossPhase4_respawn(){
trace("PHASE 3: CLONES");
useEnemySmokeGrenade();
placeCharOnTile(echar9, 1, 2);
placeCharOnTile(echar10, 2, 4);
placeCharOnTile(echar11, 4, 3);
correctPlacement(echar9, 24, "drop");
correctPlacement(echar10, 12, "drop");
correctPlacement(echar11, 48, "dodge");
paused = false;
}
public function clickedSwapButton(_arg1){
if (((equip_menu.visible) || (((victory) && ((victory_timer > 0)))))){
return (false);
};
if (((playerturn) && (!((selectedchar == null))))){
swapWeapons(selectedchar);
};
}
public function repositionEnemyToSides(){
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < charlayer.numChildren) {
_local2 = charlayer.getChildAt(_local1);
if (_local2.owner == 1){
if (_local2.col < 8){
if (_local2.col > 3){
placeCharOnTile(_local2, ((10 - _local2.col) - 3), _local2.row);
_local2.scaleX = (-1 * _local2.scaleX);
};
};
};
_local1++;
};
}
public function acquireHalo(){
var _local1:*;
if (parent["halo"]){
return (false);
};
parent["halo"] = true;
_local1 = 1;
while (_local1 <= 4) {
this[("pchar" + _local1)].hp_max = (this[("pchar" + _local1)].hp_max * 2);
this[("pchar" + _local1)].hp = (this[("pchar" + _local1)].hp * 2);
parent["player_chardata"][(_local1 - 1)].abshp = Math.max(1, this[("pchar" + _local1)].hp);
_local1++;
};
}
public function set tipsenabled(_arg1:Boolean){
parent["tipsenabled"] = _arg1;
}
public function hideline(){
moveline.graphics.clear();
moveline.visible = false;
tilelight.visible = false;
}
public function playSound(_arg1){
var _local2 = parent;
_local2["playSound"](_arg1);
}
public function snapSelectArrow(){
if ((selectedchar is Char)){
if (((!((selectarrow.x == selectedchar.x))) || (!((selectarrow.y == selectedchar.y))))){
selectarrow.visible = true;
selectarrow.scaleX = selectedchar.scaleX;
selectarrow.x = selectedchar.x;
selectarrow.y = (selectedchar.y - 100);
};
} else {
selectarrow.visible = false;
};
}
public function exitLeft(){
var _local1:*;
orderCharToTile(pchar1, (pchar1.col - 3), pchar1.row);
orderCharToTile(pchar2, (pchar2.col - 3), pchar2.row);
orderCharToTile(pchar3, (pchar3.col - 3), pchar3.row);
orderCharToTile(pchar4, (pchar4.col - 3), pchar4.row);
_local1 = new SCREEN_Wipe();
_local1.x = 320;
_local1.y = 240;
_local1.scaleX = -1;
addChild(_local1);
}
public function exitUp(){
var _local1:*;
pchar1.scaleX = Math.abs(pchar1.scaleX);
pchar2.scaleX = Math.abs(pchar2.scaleX);
pchar3.scaleX = -(Math.abs(pchar3.scaleX));
pchar4.scaleX = -(Math.abs(pchar4.scaleX));
orderCharToTile(pchar1, (pchar1.col + 1), (pchar1.row - 2));
orderCharToTile(pchar2, pchar2.col, (pchar2.row - 2));
orderCharToTile(pchar3, pchar3.col, (pchar3.row - 2));
orderCharToTile(pchar4, (pchar4.col - 1), (pchar4.row - 2));
_local1 = new SCREEN_WipeVert();
_local1.x = 320;
_local1.y = 240;
addChild(_local1);
}
public function key3RoomBattleStart(){
paused = false;
echar1.visible = true;
echar2.visible = true;
echar3.visible = true;
echar4.visible = true;
echar1.body.gotoAndPlay(696);
echar2.body.gotoAndPlay(692);
echar3.body.gotoAndPlay(690);
echar4.body.gotoAndPlay(694);
}
public function endPlayerTurn(_arg1){
var _local2:*;
if (paused){
return (false);
};
if (playerturn){
ui.endturn.visible = false;
ui.w1.visible = false;
ui.w2.visible = false;
playerturn = false;
selectNone();
focused_enemy_index = 1;
_local2 = 1;
while (_local2 <= 4) {
this[("pchar" + _local2)].stunned = false;
_local2++;
};
if (enemy_smoke){
trace("try exiting enemy smoke", grenade_screen);
if (grenade_screen != null){
grenade_screen.gotoAndPlay("exit");
trace("SUCCESS exiting enemy smoke");
};
smoked = false;
enemy_smoke = false;
};
};
}
public function jesusEffect(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = 1;
while (_local2 <= numEnemies) {
if (this[("echar" + _local2)].hp > 0){
_local3 = new SCREEN_20FrameDelay();
addChild(_local3);
_arg1.hp = this[("echar" + _local2)].hp;
_arg1.body.gotoAndPlay("empower");
_arg1.animating = true;
_local5 = new FX_HPup();
addChild(_local5);
_local5.x = _arg1.x;
_local5.y = _arg1.y;
hurtChar(this[("echar" + _local2)], _arg1, 100, "zap", true);
trace(_arg1.hp);
return (true);
};
trace("jesusEffect() ENEMY NOT VIABLE", _local2);
_local2++;
};
if (_arg1.weapon1 == ITEM.o316){
_local3 = new SCREEN_JesusTeleport();
_local3.char = _arg1;
addChild(_local3);
paused = true;
_arg1.hp = 10;
_arg1.weapon1 = ITEM.oSW500;
_arg1.weapon2 = ITEM.oSW500;
_arg1.feet.visible = false;
_arg1.visible = false;
if (getCharOnTile(0, 3) != false){
_local6 = getCharOnTile(0, 3);
hurtChar(_local6, _arg1, _local6.hp_max, "zap", true);
_local6.visible = false;
selectNone();
};
placeCharOnTile(_arg1, 0, 3);
_arg1.body.gotoAndPlay("teleported");
_arg1.animating = true;
_local2 = 1;
while (_local2 <= numEnemies) {
if (this[("echar" + _local2)].hp <= 0){
if (getCharOnTile((2 + (_local2 % 2)), (_local2 % 6)) == false){
placeCharOnTile(this[("echar" + _local2)], (2 + (_local2 % 2)), (_local2 % 6));
resurrectChar(this[("echar" + _local2)]);
this[("echar" + _local2)].weapon1 = 1;
this[("echar" + _local2)].weapon2 = 1;
this[("echar" + _local2)].head = ITEM.ZOMBIE;
this[("echar" + _local2)].charclass = "CQB";
this[("echar" + _local2)].hp = 6;
};
};
_local2++;
};
return (true);
};
_arg1.feet.visible = false;
_arg1.body.gotoAndPlay("death_zap");
_local4 = new SCREEN_JesusExit();
addChild(_local4);
acquireHalo();
}
public function useFlashbang(){
var _local1:*;
var _local2:*;
var _local3:*;
parent["flashbang"] = (parent["flashbang"] - 1);
ui.tf_flashbang.text = ("" + parent["flashbang"]);
flash_screen = new SCREEN_Flash();
addChild(flash_screen);
setChildIndex(flash_screen, getChildIndex(ui));
_local1 = 1;
while (_local1 <= numEnemies) {
if (this[("echar" + _local1)].hp > 0){
_local2 = false;
if (this[("echar" + _local1)].head == ITEM.SAUCY){
_local2 = true;
};
if (this[("echar" + _local1)].head == ITEM.HANK){
_local2 = true;
};
if (this[("echar" + _local1)].head == ITEM.SANFORD){
_local2 = true;
};
if (_local2){
_local3 = new FX_Ineffective();
weaponBlock(this[("echar" + _local1)]);
addChild(_local3);
_local3.x = this[("echar" + _local1)].x;
_local3.y = (this[("echar" + _local1)].y - 70);
} else {
this[("echar" + _local1)].body.gotoAndPlay((640 + Math.ceil((Math.random() * 39))));
this[("echar" + _local1)].stunned = true;
};
};
_local1++;
};
playSound("_SFX_GrenadeFlash");
}
public function set paused(_arg1:Boolean){
hideAlert();
_paused = _arg1;
}
public function orderSelectedToMove(){
if (selectedchar == null){
return (false);
};
if (checkTileAvail(targettile.col, targettile.row)){
if (orderCharToTile(selectedchar, targettile.col, targettile.row) == true){
ui.ap.text = selectedchar.ap;
targettile = null;
};
};
}
public function getClosestCharTo(_arg1, _arg2:String, _arg3=true){
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
_local4 = null;
_local5 = null;
_local6 = 11;
_local7 = 4;
if (_arg2 == "echar"){
_local7 = numEnemies;
};
_local8 = 1;
while (_local8 <= _local7) {
_local9 = this[(_arg2 + _local8)];
if (_local9.hp > 0){
_local10 = Math.abs((_arg1.col - _local9.col));
if (_local10 == 0){
_local5 = _local9;
} else {
if (_local10 < _local6){
_local4 = _local9;
_local6 = _local10;
} else {
if ((((_local10 == _local6)) && (_arg3))){
if (_local4.row != _arg1.row){
if (Math.random() > 0.5){
_local4 = _local9;
_local6 = _local10;
};
};
};
};
};
};
_local8++;
};
if (((!((_local5 == null))) && ((((_local4 == null)) || (((!((_local4 == null))) && ((_local6 > 1)))))))){
return (_local5);
};
return (_local4);
}
public function syncUI(){
var _local1:*;
if (tf_timer > 0){
tf_timer--;
if (tf_timer == 0){
ui.tf.visible = false;
ui.tfbg.visible = false;
ui.tf_movetip.visible = false;
};
};
if (selectedchar != null){
ui.w1.gotoAndStop(selectedchar.weapon1);
ui.w2.gotoAndStop(selectedchar.weapon2);
ui.w1.jhp.visible = ((parent["jhp"]) && ((((selectedchar.weapon1 == ITEM.oMP5)) || ((selectedchar.weapon1 == ITEM.oINGRAM)))));
ui.w2.jhp.visible = ((parent["jhp"]) && ((((selectedchar.weapon2 == ITEM.oMP5)) || ((selectedchar.weapon2 == ITEM.oINGRAM)))));
ui.ap.text = Math.min(selectedchar.ap, selectedchar.ap_max);
ui.tf_weapon.text = ((((("AP: " + selectedchar.weapon_ap) + " | DMG: ") + selectedchar.weapon_damage) + " | RNG: ") + selectedchar.weapon_range);
} else {
ui.ap.text = "";
ui.tf_weapon.text = "";
};
_local1 = 1;
while (_local1 <= 4) {
if (this[("pchar" + _local1)].hp > 0){
ui[("b" + _local1)].tf_ap.text = Math.min(this[("pchar" + _local1)].ap, this[("pchar" + _local1)].ap_max);
ui[("b" + _local1)].tf_hp.text = ((this[("pchar" + _local1)].hp + "/") + this[("pchar" + _local1)].hp_max);
} else {
ui[("b" + _local1)].visible = false;
};
_local1++;
};
}
public function createFloor(){
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = 0;
while (_local1 < rows) {
tiles[_local1] = [];
_local2 = 0;
while (_local2 < cols) {
_local3 = new Tile();
_local3.x = (_local2 * tile_width);
_local3.y = (240 + (_local1 * 20));
addChild(_local3);
tiles[_local1][_local2] = _local3;
_local2++;
};
_local1++;
};
}
public function setSaucyGun(_arg1){
var _local2:*;
_local2 = getRandomPlayerGun();
if (_local2 != false){
setBothWeapons(_arg1, _local2);
};
}
public function getClosestPlayerCharTo(_arg1, _arg2=true){
var _local3:*;
_local3 = getClosestCharTo(_arg1, "pchar", _arg2);
return (_local3);
}
public function key3RoomBattle(){
var _local1:*;
paused = true;
echar1.animating = true;
echar2.animating = true;
echar3.animating = true;
echar4.animating = true;
focused_enemy_index = 5;
placeCharOnTile(echar1, (3 - 1), (2 - 1));
placeCharOnTile(echar2, (4 - 3), (4 + 1));
placeCharOnTile(echar3, (6 + 3), (4 + 1));
placeCharOnTile(echar4, (7 + 1), (2 - 1));
resurrectChar(echar1, false, 64);
resurrectChar(echar2, false, 64);
resurrectChar(echar3, false, 64);
resurrectChar(echar4, false, 64);
echar1.scaleX = Math.abs(echar1.scaleX);
echar2.scaleX = Math.abs(echar2.scaleX);
echar3.scaleX = -(Math.abs(echar3.scaleX));
echar4.scaleX = -(Math.abs(echar4.scaleX));
victory = false;
victory_timer = 60;
playerturn = false;
parent["locker"].mouseEnabled = false;
parent["nav"].visible = false;
_local1 = new SCREEN_ZombieDrop();
addChild(_local1);
}
public function PIDrevive(){
var _local1:*;
var _local2:*;
_local1 = 1;
while (_local1 <= 4) {
_local2 = this[("pchar" + _local1)];
if ((((_local2.hp <= 0)) && ((parent["pid_energy"] > 0)))){
parent["pid_energy"] = (parent["pid_energy"] - 1);
resurrectChar(_local2);
_local2.ap = 0;
selectNone();
};
_local1++;
};
updateItemUI();
}
public function faceCharToTarget(_arg1){
if (_arg1.targetenemy != null){
if (_arg1.x < _arg1.targetenemy.x){
_arg1.scaleX = Math.abs(_arg1.scaleX);
} else {
_arg1.scaleX = -(Math.abs(_arg1.scaleX));
};
};
}
public function createMoveLine(){
moveline = new Shape();
addChild(moveline);
tilelight = new TileLight();
tilelight.mouseEnabled = false;
tilelight.visible = false;
addChild(tilelight);
}
public function showAlert(_arg1, _arg2){
if (!playerturn){
return (false);
};
if (ui.tf.text != _arg1){
ui.tf.text = _arg1;
ui.tf.visible = true;
ui.tfbg.visible = true;
tf_timer = _arg2;
};
}
public function placeCharOnTile(_arg1, _arg2, _arg3){
var char = _arg1;
var c = _arg2;
var r = _arg3;
try {
char.x = (tiles[r][c].x + (tile_width / 2));
char.y = (tiles[r][c].y + 10);
char.tgtx = char.x;
char.tgty = char.y;
char.col = c;
char.row = r;
charmoved = true;
} catch(e) {
trace("placeCharOnTile()", e);
};
}
public function createUI(){
selectarrow = new SelectedArrow();
selectarrow.mouseEnabled = false;
selectarrow.x = -1000;
addChild(selectarrow);
targetreticle = new TargetReticle();
targetreticle.mouseEnabled = false;
targetreticle.x = -1000;
addChild(targetreticle);
if (parent["tac"] == true){
targetreticle.gotoAndStop(2);
} else {
targetreticle.tf.visible = false;
};
ui = new UI();
addChild(ui);
ui.tf_equiptip.visible = false;
ui.tf_movetip.visible = false;
ui.tfbg.visible = false;
ui.tf.visible = false;
ui.options.addEventListener(MouseEvent.CLICK, showOptions);
ui.btn_togglequality.addEventListener(MouseEvent.CLICK, toggleQuality);
ui.endturn.addEventListener(MouseEvent.CLICK, endPlayerTurn);
ui.saveload.visible = false;
ui.saveload.addEventListener(MouseEvent.CLICK, showSaveMenu);
formatShortcutButton(ui.b1);
formatShortcutButton(ui.b2);
formatShortcutButton(ui.b3);
formatShortcutButton(ui.b4);
ui.w2.addEventListener(MouseEvent.CLICK, clickedSwapButton);
ui.w2.buttonMode = true;
ui.tf_quality.text = ("TOGGLE QUALITY:" + stage.quality);
updateItemUI();
ui.medkit.addEventListener(MouseEvent.CLICK, clickedMedkit);
ui.supermedkit.addEventListener(MouseEvent.CLICK, clickedMedkit);
ui.smoke.addEventListener(MouseEvent.CLICK, clickedSmokeGrenade);
ui.flashbang.addEventListener(MouseEvent.CLICK, clickedFlashbang);
ui.pid.addEventListener(MouseEvent.CLICK, clickedPID);
ui.halo.addEventListener(MouseEvent.CLICK, clickedHalo);
}
public function clickedSmokeGrenade(_arg1){
if (((((((((!(playerturn)) || (victory))) || (!((grenade_screen == null))))) || (smoked))) || (paused))){
return (false);
};
if (parent["smoke"] <= 0){
return (false);
};
useSmokeGrenade();
}
public function refillEnemyAP(){
var _local1:*;
_local1 = 1;
while (_local1 <= numEnemies) {
if ((this[("echar" + _local1)] is Char)){
this[("echar" + _local1)].ap = Math.min(this[("echar" + _local1)].ap_max, (this[("echar" + _local1)].ap + this[("echar" + _local1)].ap_gain));
};
_local1++;
};
}
public function setCharData(_arg1, _arg2="pchar"){
var cd:*;
var n:*;
var owner:*;
var newhp:*;
var chardata = _arg1;
var obj_prefix = _arg2;
n = 1;
while (n <= chardata.length) {
try {
cd = chardata[(n - 1)];
if (this[(obj_prefix + n)] == null){
owner = 1;
if (obj_prefix == "pchar"){
owner = 0;
};
this[(obj_prefix + n)] = createChar(cd.col, cd.row, owner, n);
} else {
placeCharOnTile(this[(obj_prefix + n)], cd.col, cd.row);
};
if (cd.scale != null){
this[(obj_prefix + n)].scaleX = (this[(obj_prefix + n)].scaleX * cd.scale);
this[(obj_prefix + n)].scaleY = cd.scale;
};
if (((parent["halo"]) && ((this[(obj_prefix + n)].owner == 0)))){
this[(obj_prefix + n)].hp_max = (this[(obj_prefix + n)].hp_max * 2);
};
this[(obj_prefix + n)].charclass = cd.charclass;
this[(obj_prefix + n)].head = cd.head;
this[(obj_prefix + n)].armor = cd.armor;
this[(obj_prefix + n)].weapon1 = cd.weapon1;
if (cd.weapon2 == null){
this[(obj_prefix + n)].weapon2 = cd.weapon1;
} else {
this[(obj_prefix + n)].weapon2 = cd.weapon2;
};
this[(obj_prefix + n)].hp = this[(obj_prefix + n)].hp_max;
this[(obj_prefix + n)].ap = this[(obj_prefix + n)].ap_max;
if (cd.abshp > 0){
if (this[(obj_prefix + n)].owner == 0){
newhp = cd.abshp;
if (current_room != parent["prev_room"]){
newhp = (newhp + 2);
};
this[(obj_prefix + n)].hp = Math.min(this[(obj_prefix + n)].hp_max, newhp);
cd.abshp = this[(obj_prefix + n)].hp;
} else {
if (this[(obj_prefix + n)].owner == 1){
this[(obj_prefix + n)].hp = (this[(obj_prefix + n)].hp_max = cd.abshp);
};
};
};
if (obj_prefix == "pchar"){
ui[("b" + n)].char_tgt = this[(obj_prefix + n)];
ui[("b" + n)].tf_class.text = this[(obj_prefix + n)].charclass;
this[(obj_prefix + n)].button = ui[("b" + n)];
} else {
if ((((this[(obj_prefix + n)].head == ITEM.TRICKY)) || ((this[(obj_prefix + n)].head == ITEM.SAUCY)))){
this[(obj_prefix + n)].scanblock = true;
};
if (this[(obj_prefix + n)].head == ITEM.TRICKY){
trickybattle = true;
pid_screen = new FX_pid_screen();
addChild(pid_screen);
pid_screen.x = 320;
pid_screen.y = 240;
setChildIndex(pid_screen, getChildIndex(charlayer));
} else {
if (this[(obj_prefix + n)].head == ITEM.CLOWN){
if (this[(obj_prefix + n)].armor == ITEM.WHITE){
this[(obj_prefix + n)].body.gotoAndPlay("travolta");
this[(obj_prefix + n)].feet.visible = false;
} else {
if (this[(obj_prefix + n)].armor == ITEM.TRICKY){
this[(obj_prefix + n)].body.gotoAndPlay("arise");
this[(obj_prefix + n)].feet.visible = false;
} else {
this[(obj_prefix + n)].body.gotoAndPlay("drop");
};
};
this[(obj_prefix + n)].animating = true;
};
};
};
} catch(e) {
};
n = (n + 1);
};
}
public function orderCharToTile(_arg1, _arg2, _arg3){
var col_cost:*;
var fx:*;
var char = _arg1;
var c = _arg2;
var r = _arg3;
if ((((((((c < 0)) || ((c >= cols)))) || ((r < 0)))) || ((r >= rows)))){
return (false);
};
try {
col_cost = Math.abs((char.col - c));
if (col_cost > char.ap){
showAlert("CANT MOVE. TOO FAR TO MOVE!!", 30);
return (false);
} else {
if ((((char.head == ITEM.TRICKY)) || ((char.head == ITEM.HANK)))){
if ((((((((char.owner == 0)) && (!(victory)))) || ((char.owner == 1)))) && ((col_cost > 1)))){
char.ap = (char.ap - 1);
if (char.head == ITEM.TRICKY){
fx = new FX_TrickyAfterImage();
char.body.gotoAndPlay("drop");
} else {
fx = new FX_HankAfterImage();
char.body.gotoAndPlay("dodge");
};
addChild(fx);
fx.scaleX = char.scaleX;
fx.scaleY = char.scaleY;
fx.x = char.x;
fx.y = char.y;
placeCharOnTile(char, c, r);
char.feet.visible = false;
char.animating = true;
return (true);
} else {
char.ap = (char.ap - col_cost);
};
} else {
char.ap = (char.ap - col_cost);
};
};
char.tgtx = (tiles[r][c].x + (tile_width / 2));
char.tgty = (tiles[r][c].y + 10);
char.col = c;
char.row = r;
char.moveclear = false;
char.movexdone = false;
char.moveydone = false;
charmoved = true;
if (char.owner == 1){
turn_delay = Math.max(turn_delay, (col_cost * 10));
};
return (true);
} catch(e) {
trace("orderCharToTile()", e);
};
}
public function magnifyChar(_arg1, _arg2){
_arg1.tgtscale = _arg2;
_arg1.addEventListener(Event.ENTER_FRAME, stepMagnify);
}
public function clickedMedkit(_arg1){
if (((((!(victory)) && (!(playerturn)))) || (paused))){
return (false);
};
if (selectedchar == null){
return (false);
};
if (selectedchar.hp >= selectedchar.hp_max){
return (false);
};
if (parent["medkit"] <= 0){
return (false);
};
useMedkit();
}
public function selectNone(){
if ((selectedchar is Char)){
Util.removeFilterFromMC(selectedchar);
Util.removeFilterFromMC(selectedchar.button);
ui.w1.visible = false;
ui.w2.visible = false;
selectedchar = null;
targetreticle.visible = false;
selectarrow.visible = false;
};
}
public function trickyEffect(_arg1, _arg2, _arg3){
var _local4:*;
var _local5:*;
_local4 = "lol";
if (_arg3 == "melee"){
pid_screen.bar.scaleX = Math.max(0, (pid_screen.bar.scaleX - 0.25));
_local4 = "ow";
} else {
pid_screen.bar.scaleX = Math.max(0, (pid_screen.bar.scaleX - 0.1));
};
if (pid_screen.bar.scaleX > 0){
trickyTrain(_arg1, _arg2, _local4);
} else {
_arg1.hp = 1;
killAllEnemies("zap", _arg1);
_arg1.hp = 0;
_arg1.feet.visible = false;
_arg1.body.gotoAndPlay("death_explode");
pid_screen.warning.stop();
pid_screen.warning.visible = false;
_local5 = new SCREEN_TrickyExit();
addChild(_local5);
};
}
public function clownBomb(_arg1:Array){
var _local2:*;
for (_local2 in _arg1) {
if ((((_arg1[_local2] is Char)) && (!((_arg1[_local2].head == ITEM.TRICKY))))){
hurtChar(_arg1[_local2], _arg1[_local2], 32, "shotgun", true, true);
};
};
}
public function shootEnemy(_arg1, _arg2){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
_local3 = "success";
if (_arg1.animating){
_local3 = "animating";
return (_local3);
};
if (((!((_arg1 == null))) && ((_arg2.hp > 0)))){
if (_arg1.moveclear == false){
_local3 = "moving";
return (_local3);
};
if (_arg1.targetenemy == _arg2){
faceCharToTarget(_arg1);
_local4 = _arg2.row;
_local5 = _arg1.col;
_local6 = (_local5 - _arg2.col);
if (((_arg1.forcewalk) && ((_arg1.owner == 1)))){
trace("FORCEWALK for ENEMY");
if (_arg2.col > _arg1.col){
_local5 = (_local5 + 1);
} else {
_local5--;
};
if (checkTileAvail(_local5, _arg1.row)){
orderCharToTile(_arg1, _local5, _arg1.row);
_arg1.forcewalk = false;
_local3 = "forcewalk: SAME ROW";
return (_local3);
};
if (checkTileAvail(_local5, _local4)){
orderCharToTile(_arg1, _local5, _local4);
_arg1.forcewalk = false;
_local3 = "forcewalk: TARGET'S ROW";
return (_local3);
};
_arg1.forcewalk = false;
_local3 = "cancel: FORCEWALK DESTINATION is BLOCKED";
return (_local3);
};
if (_arg2.col == _arg1.col){
_local5 = (_arg2.col - 1);
};
if (Math.abs(_local6) > _arg1.weapon_range){
if (_arg2.col >= _arg1.col){
_local5 = (_arg2.col - _arg1.weapon_range);
} else {
_local5 = (_arg2.col + _arg1.weapon_range);
};
};
_local6 = (_local5 - _arg1.col);
if (((!((_arg1.row == _local4))) || (!((_arg1.col == _local5))))){
if (checkTileAvail(_local5, _local4)){
if (_arg1.col == _local5){
orderCharToTile(_arg1, _local5, _local4);
attackmovetarget = null;
tilelight.visible = false;
} else {
if (attackmovetarget != _arg2){
attackmovetarget = _arg2;
if (_arg1.owner == 0){
tilelight.visible = true;
tilelight.x = ((_local5 * tile_width) + (tile_width / 2));
tilelight.y = (250 + (_local4 * 20));
};
if (Math.abs(_local6) <= _arg1.ap){
if (tipsenabled){
showAlert((("RE-CLICK ENEMY TO GET IN RANGE (AP:" + _local6) + ")"), 90);
} else {
showAlert(("ATTACK MOVE COST:" + _local6), 90);
};
_local3 = "needsmove: REQUESTED RE-CLICK";
return (_local3);
} else {
showAlert((("ATTACK MOVE COST:" + _local6) + ". NOT ENOUGH AP :<"), 90);
_local3 = "toofar. try swap weapon or forcewalk";
if (_arg1.owner == 1){
_arg1.forcewalk = true;
if (Math.random() > 0.5){
swapWeapons(_arg1);
};
};
return (_local3);
};
} else {
orderCharToTile(_arg1, _local5, _local4);
attackmovetarget = null;
tilelight.visible = false;
_local3 = "movingtoattack: RE-CLICKED ENEMY";
return (_local3);
};
};
} else {
if (getCharOnTile(_local5, _local4).owner == _arg1.owner){
_local7 = getCharOnTile(_local5, _local4);
if (_arg1.col == _local5){
orderCharToTile(_local7, _local5, _arg1.row);
orderCharToTile(_arg1, _local5, _local4);
tilelight.visible = false;
_local3 = "movingtoattack: SWITCH WITH ALLY";
return (_local3);
};
if ((((_local7.row > 0)) && (checkTileAvail(_local7.col, (_local7.row - 1))))){
orderCharToTile(_local7, _local7.col, (_local7.row - 1));
showAlert("TELLING ALLY TO MOVE ASIDE", 60);
_local3 = "movingtoattack: ALLY MOVING ASIDE";
return (_local3);
};
if ((((_local7.row < 5)) && (checkTileAvail(_local7.col, (_local7.row + 1))))){
orderCharToTile(_local7, _local7.col, (_local7.row + 1));
showAlert("TELLING ALLY TO MOVE ASIDE", 60);
_local3 = "movingtoattack: ALLY MOVING ASIDE";
return (_local3);
};
showAlert("ATTACK LOCATION BLOCKED BY ALLY", 60);
_local3 = "cancel: ALLY STUCK";
return (_local3);
} else {
showAlert("OH NOES!! ATTACK LOCATION BLOCKED", 60);
if (_arg1.owner == 0){
tilelight.visible = true;
tilelight.x = ((_local5 * tile_width) + (tile_width / 2));
tilelight.y = (250 + (_local4 * 20));
_local3 = "suggested move: ATTACK LOCATION BLOCKED";
} else {
if (_arg1.owner == 1){
_arg1.forcewalk = true;
_local3 = "try forcewalk: ATTACK LOCATION BLOCKED";
};
};
return (_local3);
};
};
} else {
if (_arg1.ap < _arg1.weapon_ap){
showAlert("CAN'T SHOOT.. NOT ENOUGH AP!! T.T", 60);
_local3 = "cancel: not enough AP";
return (_local3);
};
_arg1.ap = (_arg1.ap - _arg1.weapon_ap);
if (_arg1.melee){
_arg1.body.gotoAndPlay("slashing");
} else {
_arg1.body.gotoAndPlay(("shooting_" + _arg1.shottype));
};
showAlert("", 1);
_arg1.animating = true;
if (_arg1.weapon1 >= 19){
playSound("_SFX_GunRifle");
};
if ((((_arg1.weapon1 >= 20)) || ((_arg1.weapon1 == 7)))){
_local8 = hurtRow(_arg1, _arg2);
} else {
if ((((_arg1.weapon1 == 6)) || ((((_arg1.weapon1 >= 14)) && ((_arg1.weapon1 <= 16)))))){
if (_arg1.weapon1 == 6){
_local8 = hurtTrio(_arg1, _arg2, false);
} else {
_local8 = hurtTrio(_arg1, _arg2);
};
} else {
if ((((_arg1.weapon1 == 17)) || ((_arg1.weapon1 == 18)))){
_local9 = false;
if ((((_arg1.owner == 0)) && (parent["jhp"]))){
_local9 = true;
};
if ((((_arg1.owner == 1)) && ((_arg1.head == ITEM.ATP)))){
_local9 = true;
};
hurtChar(_arg2, _arg1, _arg1.weapon_damage, _arg1.shottype, false, _local9);
playSound("_SFX_GunSMG");
} else {
if ((((((_arg1.weapon1 == 8)) || ((_arg1.weapon1 == 13)))) || ((_arg1.weapon1 == 19)))){
_local8 = hurtChar(_arg2, _arg1, _arg1.weapon_damage, _arg1.shottype, true);
} else {
_local8 = hurtChar(_arg2, _arg1, _arg1.weapon_damage, _arg1.shottype);
};
};
};
};
if ((((((((_arg1.head == ITEM.ZOMBIE)) && (!(_arg1.bloodlusted)))) && (_local8))) && ((_arg1.shottype == "melee")))){
_arg1.ap = _arg1.ap_max;
_arg1.bloodlusted = true;
_local10 = new FX_Bloodlust();
_local10.x = _arg1.x;
_local10.y = _arg1.y;
addChild(_local10);
};
if (_arg1.weapon1 == 9){
_local11 = new FX_Hookshot();
_local11.x = _arg2.x;
_local11.y = (_arg2.y - 70);
_local11.scaleX = _arg1.scaleX;
addChild(_local11);
};
if (_arg1.targetenemy.hp <= 0){
targetenemy = null;
_arg1.targetenemy = null;
};
_local3 = "success";
return (_local3);
};
} else {
_arg1.targetenemy = _arg2;
attackmovetarget = null;
tilelight.visible = false;
faceCharToTarget(_arg1);
_local3 = "switchedtarget";
return (_local3);
};
};
return (_local3);
}
public function swapWeapons(_arg1){
var _local2:*;
if (paused){
return (false);
};
_local2 = _arg1.weapon1;
_arg1.weapon1 = _arg1.weapon2;
_arg1.weapon2 = _local2;
ui.w1.gotoAndStop(_arg1.weapon1);
ui.w2.gotoAndStop(_arg1.weapon2);
parent["player_chardata"][(_arg1.id - 1)].weapon1 = _arg1.weapon1;
parent["player_chardata"][(_arg1.id - 1)].weapon2 = _arg1.weapon2;
if (_arg1.owner == 0){
playSound("_SFX_Flick");
};
}
public function zapOnePlayer(){
var _local1:*;
var _local2:uint;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = Math.floor((Math.random() * 4));
_local2 = 0;
while (((!(_local4)) || ((_local2 < 4)))) {
_local3 = this[("pchar" + (_local1 + 1))];
if ((((_local3 is Char)) && ((_local3.hp > 0)))){
_local4 = hurtChar(_local3, _local3, 12, "zap", true, false);
if (!_local4){
_local5 = new FX_ResurrectBolt();
_local5.x = _local3.x;
_local5.y = _local3.y;
addChild(_local5);
};
return (true);
};
_local2++;
_local1 = ((_local1 + 1) % 4);
};
return (false);
}
public function createChar(_arg1, _arg2, _arg3:uint=1, _arg4=0, _arg5="CQB"){
var _local6:*;
_local6 = new Char();
charlayer.addChild(_local6);
_local6.owner = _arg3;
_local6.id = _arg4;
_local6.charclass = _arg5;
_local6.body.gotoAndPlay(Math.ceil((Math.random() * 60)));
placeCharOnTile(_local6, _arg1, _arg2);
_local6.addEventListener(MouseEvent.CLICK, clickedChar);
_local6.addEventListener(MouseEvent.MOUSE_OVER, mouseOverChar);
_local6.addEventListener(MouseEvent.MOUSE_OUT, mouseOutChar);
_local6.body.mouseEnabled = false;
_local6.body.hand1.mouseEnabled = false;
changeWeapon1(_local6, 1);
orderCharToTile(_local6, _arg1, _arg2);
if (_arg1 < 5){
_local6.scaleX = Math.abs(_local6.scaleX);
} else {
_local6.scaleX = -(Math.abs(_local6.scaleX));
};
if (_arg3 == 1){
numEnemies++;
};
return (_local6);
}
public function moveChar(_arg1){
syncCharAnimation(_arg1);
if (_arg1.moveclear){
return (false);
};
charmoved = true;
if (_arg1.x != _arg1.tgtx){
if (Math.abs((_arg1.x - _arg1.tgtx)) < (5.8 * walkspeed)){
_arg1.x = _arg1.tgtx;
} else {
if (_arg1.x > _arg1.tgtx){
_arg1.x = (_arg1.x - (5.8 * walkspeed));
if (_arg1.targetenemy == null){
_arg1.scaleX = -(Math.abs(_arg1.scaleX));
} else {
faceCharToTarget(_arg1);
};
} else {
_arg1.x = (_arg1.x + (5.8 * walkspeed));
if (_arg1.targetenemy == null){
_arg1.scaleX = Math.abs(_arg1.scaleX);
} else {
faceCharToTarget(_arg1);
};
};
};
} else {
_arg1.movexdone = true;
};
if (_arg1.y != _arg1.tgty){
if (_arg1.y > _arg1.tgty){
_arg1.y = (_arg1.y - 4);
} else {
_arg1.y = (_arg1.y + 4);
};
} else {
_arg1.moveydone = true;
};
if (((((_arg1.movexdone) && (_arg1.moveydone))) && (!(_arg1.moveclear)))){
_arg1.feet.gotoAndStop(1);
_arg1.moveclear = true;
faceCharToTarget(_arg1);
} else {
_arg1.feet.play();
};
}
public function tinyMode(){
var _local1:*;
var _local2:*;
_local1 = 1;
while (_local1 <= numEnemies) {
_local2 = this[("echar" + _local1)];
if ((((((_local2 is Char)) && ((_local2.hp > 0)))) && ((Math.abs(_local2.scaleX) > 0.5)))){
_local2.scaleX = Math.max(-0.5, Math.min(0.5, (_local2.scaleX * 0.5)));
_local2.scaleY = 0.5;
_local2.hp = Math.ceil((_local2.hp / 2));
};
_local1++;
};
}
public function convertToClowns(){
var _local1:*;
var _local2:*;
_local1 = 1;
while (_local1 <= numEnemies) {
_local2 = this[("echar" + _local1)];
if ((((((_local2 is Char)) && ((_local2.hp > 0)))) && ((Math.random() > 0.5)))){
_local2.head = ITEM.CLOWN;
if (Math.random() >= 0.4){
_local2.armor = ITEM.WHITE;
} else {
if (Math.random() >= 0.5){
_local2.armor = ITEM.SAUCY;
} else {
_local2.armor = ITEM.TRICKY;
};
};
};
_local1++;
};
}
public function checkTileAvail(_arg1, _arg2){
var _local3:*;
var _local4:*;
if ((((((((_arg1 < 0)) || ((_arg1 >= cols)))) || ((_arg2 < 0)))) || ((_arg2 >= rows)))){
return (false);
};
_local3 = 0;
while (_local3 < charlayer.numChildren) {
_local4 = charlayer.getChildAt(_local3);
if ((((_local4.col == _arg1)) && ((_local4.row == _arg2)))){
if (_local4.hp > 0){
return (false);
};
};
_local3++;
};
return (true);
}
public function showSaveMenu(_arg1){
if (!paused){
hideAlert();
paused = true;
var _local2 = parent;
_local2["showSaveMenu"]();
} else {
if (parent["savemenu"].visible){
_local2 = parent;
_local2["hideSaveMenu"](_arg1);
};
};
}
public function hurtTrio(_arg1, _arg2, _arg3=true){
var _local4:Boolean;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
_local4 = false;
_local5 = getCharOnTile(_arg2.col, (_arg2.row - 1));
_local6 = getCharOnTile(_arg2.col, (_arg2.row + 1));
_local7 = 1;
if (_arg1.col > _arg2.col){
_local7 = -1;
};
_local8 = getCharOnTile((_arg2.col + _local7), (_arg2.row - 1));
_local9 = getCharOnTile((_arg2.col + _local7), _arg2.row);
_local10 = getCharOnTile((_arg2.col + _local7), (_arg2.row + 1));
if ((_local5 is Char)){
if (((_arg3) || (!((_local5.owner == _arg1.owner))))){
if (hurtChar(_local5, _arg1, _arg1.weapon_damage, _arg1.shottype)){
_local4 = true;
};
};
};
if ((_local6 is Char)){
if (((_arg3) || (!((_local6.owner == _arg1.owner))))){
if (hurtChar(_local6, _arg1, _arg1.weapon_damage, _arg1.shottype)){
_local4 = true;
};
};
};
if ((_local8 is Char)){
if (((_arg3) || (!((_local8.owner == _arg1.owner))))){
if (hurtChar(_local8, _arg1, _arg1.weapon_damage, _arg1.shottype)){
_local4 = true;
};
};
};
if ((_local9 is Char)){
if (((_arg3) || (!((_local9.owner == _arg1.owner))))){
if (hurtChar(_local9, _arg1, _arg1.weapon_damage, _arg1.shottype)){
_local4 = true;
};
};
};
if ((_local10 is Char)){
if (((_arg3) || (!((_local10.owner == _arg1.owner))))){
if (hurtChar(_local10, _arg1, _arg1.weapon_damage, _arg1.shottype)){
_local4 = true;
};
};
};
if (hurtChar(_arg2, _arg1, _arg1.weapon_damage, _arg1.shottype)){
_local4 = true;
};
return (_local4);
}
public function clownStun(){
var _local1:*;
_local1 = 1;
while (_local1 <= 4) {
hurtChar(this[("pchar" + _local1)], this[("pchar" + _local1)], 0, "shotgun", true, true);
_local1++;
};
}
public function killAllClowns(){
var _local1:*;
var _local2:*;
_local1 = 1;
while (_local1 <= numEnemies) {
_local2 = this[("echar" + _local1)];
if ((((((_local2 is Char)) && ((_local2.hp > 0)))) && ((_local2.head == ITEM.CLOWN)))){
hurtChar(_local2, _local2, 100, "zap", true, false);
};
_local1++;
};
}
public function exitDown(){
var _local1:*;
pchar1.scaleX = Math.abs(pchar1.scaleX);
pchar2.scaleX = Math.abs(pchar2.scaleX);
pchar3.scaleX = -(Math.abs(pchar3.scaleX));
pchar4.scaleX = -(Math.abs(pchar4.scaleX));
orderCharToTile(pchar1, pchar1.col, (pchar1.row + 3));
orderCharToTile(pchar2, pchar2.col, (pchar2.row + 3));
orderCharToTile(pchar3, pchar3.col, (pchar3.row + 3));
orderCharToTile(pchar4, pchar4.col, (pchar4.row + 3));
_local1 = new SCREEN_WipeVert();
_local1.x = 320;
_local1.y = 240;
_local1.scaleY = -1;
addChild(_local1);
}
public function showOptions(_arg1){
if (!paused){
hideAlert();
paused = true;
var _local2 = parent;
_local2["showOptions"]();
} else {
if (parent["options"].visible){
parent["options"].hideOptions(_arg1);
};
};
}
public function getRandomPlayerGun(){
var _local1:*;
var _local2:*;
var _local3:*;
_local2 = 1;
while (_local2 <= 4) {
_local3 = this[("pchar" + _local2)];
if (_local3.hp > 0){
if ((((Math.random() > 0.5)) || ((_local1 == null)))){
_local1 = _local3.weapon1;
};
};
_local2++;
};
return (_local1);
}
public function finalBossPhase3_rearrange(){
trace("PHASE 3: REARRANGE");
placeCharOnTile(pchar1, 9, 2);
placeCharOnTile(pchar2, 8, 3);
placeCharOnTile(pchar3, 9, 4);
placeCharOnTile(pchar4, 8, 5);
pchar1.feet.visible = false;
pchar2.feet.visible = false;
pchar3.feet.visible = false;
pchar4.feet.visible = false;
pchar1.scaleX = -1;
pchar2.scaleX = -1;
pchar3.scaleX = -1;
pchar4.scaleX = -1;
pchar1.animating = true;
pchar2.animating = true;
pchar3.animating = true;
pchar4.animating = true;
pchar1.body.gotoAndPlay("drop");
pchar2.body.gotoAndPlay("drop");
pchar3.body.gotoAndPlay("drop");
pchar4.body.gotoAndPlay("drop");
}
public function enterFromRight(){
var _local1:*;
var _local2:*;
var _local3:*;
orderCharToTile(pchar1, (pchar1.col - 1), pchar1.row);
orderCharToTile(pchar2, (pchar2.col - 1), pchar2.row);
orderCharToTile(pchar3, (pchar3.col - 1), pchar3.row);
orderCharToTile(pchar4, (pchar4.col - 1), pchar4.row);
_local1 = new SCREEN_Reveal();
_local1.x = 320;
_local1.y = 240;
_local1.scaleX = -1;
addChild(_local1);
if ((((current_room == 71)) && ((parent["halo"] == false)))){
visible = true;
_local2 = new SCREEN_JesusEnter();
addChild(_local2);
};
if ((((current_room == 150)) && ((parent["pid"] == false)))){
visible = true;
_local3 = new SCREEN_TrickyEnter();
addChild(_local3);
visible = true;
echar1.visible = false;
echar2.visible = false;
echar3.visible = false;
echar4.visible = false;
echar1.hp = 0;
echar2.hp = 0;
echar3.hp = 0;
echar4.hp = 0;
};
refillPlayerAP();
}
public function formatShortcutButton(_arg1){
_arg1.addEventListener(MouseEvent.CLICK, clickedCharShortcut);
_arg1.buttonMode = true;
_arg1.tf_class.mouseEnabled = false;
_arg1.tf_hp.mouseEnabled = false;
_arg1.tf_ap.mouseEnabled = false;
_arg1.head.stop();
}
public function finalBossPhase1_respawn(){
trace("PHASE 1: LEET CREW");
placeCharOnTile(echar1, 1, 4);
placeCharOnTile(echar2, 1, 2);
placeCharOnTile(echar3, 9, 4);
placeCharOnTile(echar4, 9, 2);
placeCharOnTile(echar5, 0, 5);
placeCharOnTile(echar6, 10, 5);
correctPlacement(echar1, 40, "resurrected");
correctPlacement(echar2, 40, "resurrected");
correctPlacement(echar3, 40, "resurrected");
correctPlacement(echar4, 40, "resurrected");
correctPlacement(echar5, 32, "resurrected");
correctPlacement(echar6, 32, "resurrected");
focused_enemy_index = 1;
paused = false;
}
public function tinyYou(){
var _local1:*;
var _local2:*;
_local1 = 1;
while (_local1 <= 4) {
_local2 = this[("pchar" + _local1)];
if ((((_local2 is Char)) && ((_local2.hp > 0)))){
_local2.scaleX = (_local2.scaleX * 0.5);
_local2.scaleY = 0.5;
_local2.hp = Math.ceil((_local2.hp / 2));
};
_local1++;
};
}
public function startPlayerTurn(){
var _local1:*;
var _local2:*;
var _local3:*;
if (!playerturn){
if (trickybattle){
killAllClowns();
};
_local1 = 1;
while (_local1 <= 4) {
if ((((this[("pchar" + _local1)].hp > 0)) && (!(this[("pchar" + _local1)].stunned)))){
switchSelected(this[("pchar" + _local1)]);
break;
};
_local1++;
};
if (parent["pid"]){
PIDrevive();
};
_local2 = 1;
while (_local2 <= numEnemies) {
if ((((this[("echar" + _local2)] is Char)) && ((this[("echar" + _local2)].hp > 0)))){
this[("echar" + _local2)].targetenemy = null;
this[("echar" + _local2)].stunned = false;
};
_local2++;
};
ui.endturn.visible = !(victory);
ui.saveload.visible = victory;
ui.w1.visible = true;
ui.w2.visible = true;
playerturn = true;
refillPlayerAP();
refillEnemyAP();
if (tipsenabled){
showAlert("YOUR TURN!!!", 60);
};
if (grenade_screen != null){
grenade_screen.gotoAndPlay("exit");
};
if (flash_screen != null){
removeChild(flash_screen);
};
smoked = false;
trace("SMOKE STATUS:", smoked);
if ((((current_room == 166)) && ((echar10.hp > 0)))){
_local3 = new FX_DeimosGrenade();
addChild(_local3);
_local3.x = echar10.x;
_local3.y = echar10.y;
_local3.tgt_char = echar10;
echar10.visible = false;
};
};
}
public function hankDodge(_arg1, _arg2){
var _local3:int;
var _local4:*;
var _local5:Array;
var _local6:*;
var _local7:*;
_local3 = 1;
if (_arg2.col > _arg1.col){
_local3 = -1;
};
_local4 = Math.floor((Math.random() * 16));
_local5 = [];
_local5[_local4] = {legal:checkTileAvail((_arg1.col + _local3), ((_arg1.row + 1) % 5)), col:(_arg1.col + _local3), row:((_arg1.row + 1) % 5)};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail((_arg1.col + _local3), ((_arg1.row + 2) % 5)), col:(_arg1.col + _local3), row:((_arg1.row + 2) % 5)};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail((_arg1.col + _local3), ((_arg1.row + 3) % 5)), col:(_arg1.col + _local3), row:((_arg1.row + 3) % 5)};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail((_arg1.col + _local3), ((_arg1.row + 4) % 5)), col:(_arg1.col + _local3), row:((_arg1.row + 4) % 5)};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail((_arg1.col + _local3), ((_arg1.row + 5) % 5)), col:(_arg1.col + _local3), row:((_arg1.row + 5) % 5)};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail((_arg1.col + _local3), _arg1.row), col:(_arg1.col + _local3), row:_arg1.row};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail((_arg1.col - _local3), ((_arg1.row + 1) % 5)), col:(_arg1.col - _local3), row:((_arg1.row + 1) % 5)};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail((_arg1.col - _local3), ((_arg1.row + 2) % 5)), col:(_arg1.col - _local3), row:((_arg1.row + 2) % 5)};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail((_arg1.col - _local3), ((_arg1.row + 3) % 5)), col:(_arg1.col - _local3), row:((_arg1.row + 3) % 5)};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail((_arg1.col - _local3), ((_arg1.row + 4) % 5)), col:(_arg1.col - _local3), row:((_arg1.row + 4) % 5)};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail((_arg1.col - _local3), ((_arg1.row + 5) % 5)), col:(_arg1.col - _local3), row:((_arg1.row + 5) % 5)};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail(_arg1.col, ((_arg1.row + 1) % 5)), col:_arg1.col, row:((_arg1.row + 1) % 5)};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail(_arg1.col, ((_arg1.row + 2) % 5)), col:_arg1.col, row:((_arg1.row + 2) % 5)};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail(_arg1.col, ((_arg1.row + 3) % 5)), col:_arg1.col, row:((_arg1.row + 3) % 5)};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail(_arg1.col, ((_arg1.row + 4) % 5)), col:_arg1.col, row:((_arg1.row + 4) % 5)};
_local4 = ((_local4 + 1) % 16);
_local5[_local4] = {legal:checkTileAvail(_arg1.col, ((_arg1.row + 5) % 5)), col:_arg1.col, row:((_arg1.row + 5) % 5)};
_local4 = ((_local4 + 1) % 16);
for (_local6 in _local5) {
if (_local5[_local6].legal == true){
_arg1.animating = true;
_arg1.feet.visible = false;
_arg1.body.gotoAndPlay("dodge");
_local7 = new FX_HankAfterImage();
addChild(_local7);
_local7.x = _arg1.x;
_local7.y = _arg1.y;
_local7.scaleX = _arg1.scaleX;
_local7.scaleY = _arg1.scaleY;
placeCharOnTile(_arg1, _local5[_local6].col, _local5[_local6].row);
return (true);
};
};
return (false);
}
public function mouseFunc(_arg1){
var _local2:*;
if (((((equip_menu.visible) || (victory))) || (paused))){
return (false);
};
if (playerturn){
_local2 = getMouseColRow();
if ((((((((_local2.row < 0)) || ((_local2.col < 0)))) || ((_local2.row >= rows)))) || ((_local2.col >= cols)))){
targettile = null;
return (false);
};
if (((((((!((selectedchar == null))) && (!((targettile == null))))) && ((targettile.row == _local2.row)))) && ((targettile.col == _local2.col)))){
orderSelectedToMove();
} else {
if ((((((((selectedchar == null)) || ((selectedchar.moveclear == false)))) || (!((targetenemy == null))))) || (selectedchar.animating))){
return (false);
};
if (checkTileAvail(_local2.col, _local2.row)){
targettile = _local2;
playSound("_SFX_click");
};
};
};
}
public function toggleQuality(_arg1){
switch (stage.quality){
case "MEDIUM":
stage.quality = "LOW";
break;
case "LOW":
stage.quality = "HIGH";
break;
default:
stage.quality = "MEDIUM";
break;
};
ui.tf_quality.text = ("TOGGLE QUALITY:" + stage.quality);
}
public function init(_arg1, _arg2, _arg3="fromleft", _arg4:Boolean=false, _arg5:Boolean=false){
trace("GameEngine INITIALIZED");
addEventListener(Event.ENTER_FRAME, frameFunc);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseFunc);
createFloor();
createMoveLine();
createCharLayer();
if (_arg4){
dark_screen = new SCREEN_darkness();
if (_arg5){
nvgOn();
};
addChild(dark_screen);
dark_screen.x = 320;
dark_screen.mouseEnabled = false;
};
createUI();
hideline();
setCharData(_arg1);
switchSelected(pchar1);
setCharData(_arg2, "echar");
if (_arg3 == "fromleft"){
enterFromLeft();
} else {
if (_arg3 == "fromright"){
repositionFlipAll();
enterFromRight();
} else {
if (_arg3 == "frombottom"){
repositionEnemyToSides();
enterFromBottom();
} else {
if (_arg3 == "fromtop"){
repositionEnemyToSides();
enterFromTop();
};
};
};
};
if ((((current_room == 107)) && ((numEnemies > 0)))){
enterKey3Room();
} else {
if ((((current_room == 166)) && ((numEnemies > 0)))){
enterFinalRoom();
parent["explored"][166] = true;
var _local6 = parent;
_local6["updateMaps"]();
};
};
if (_arg2.length <= 0){
walkspeed = 3;
victory_timer = 0;
checkForWin();
};
}
public function clickedHalo(_arg1){
parent["easymode"] = !(parent["easymode"]);
ui.redhalo.visible = parent["easymode"];
}
public function updateItemUI(){
ui.tf_medkit.visible = (parent["medkit"] >= 0);
ui.medkit.visible = (((parent["medkit"] >= 0)) && (!(parent["supermedkit"])));
ui.supermedkit.visible = (((parent["medkit"] >= 0)) && (parent["supermedkit"]));
ui.tf_smoke.visible = (ui.smoke.visible = (parent["smoke"] >= 0));
ui.tf_flashbang.visible = (ui.flashbang.visible = (parent["flashbang"] >= 0));
ui.tf_medkit.text = ("" + parent["medkit"]);
ui.tf_smoke.text = ("" + parent["smoke"]);
ui.tf_flashbang.text = ("" + parent["flashbang"]);
ui.halo.visible = parent["halo"];
ui.redhalo.visible = parent["easymode"];
ui.pid.visible = parent["pid"];
ui.tf_pid.visible = parent["pid"];
ui.tf_pid.text = ("" + parent["pid_energy"]);
ui.keycard.gotoAndStop((parent["keycard"] + 1));
}
public function setupFinalBattle(){
var _local1:*;
var _local2:*;
paused = true;
ui.saveload.visible = false;
victory = false;
victory_timer = 60;
parent["locker"].mouseEnabled = false;
parent["locker"].visible = false;
parent["nav"].visible = false;
_local1 = new SCREEN_FinalBoss();
addChild(_local1);
parent["backdrop"]["desk"].visible = false;
_local2 = new FX_audit_screen0();
addChild(_local2);
_local2.x = 320;
_local2.y = 240;
setChildIndex(_local2, getChildIndex(charlayer));
}
public function deactivateClowns(){
clownbombson = false;
}
public function clownBombEffect(_arg1){
var _local2:*;
var _local3:*;
_local2 = new SCREEN_ClownBomb();
addChild(_local2);
_local2.tgt_char = _arg1;
_local3 = [];
_local3[0] = getCharOnTile((_arg1.col - 1), _arg1.row);
_local3[1] = getCharOnTile((_arg1.col + 1), _arg1.row);
_local3[2] = getCharOnTile(_arg1.col, (_arg1.row - 1));
_local3[3] = getCharOnTile(_arg1.col, (_arg1.row + 1));
_local3[4] = getCharOnTile((_arg1.col - 1), (_arg1.row - 1));
_local3[5] = getCharOnTile((_arg1.col + 1), (_arg1.row - 1));
_local3[6] = getCharOnTile((_arg1.col - 1), (_arg1.row + 1));
_local3[7] = getCharOnTile((_arg1.col + 1), (_arg1.row + 1));
_local3[8] = getCharOnTile((_arg1.col - 2), _arg1.row);
_local3[9] = getCharOnTile((_arg1.col + 2), _arg1.row);
_local3[10] = getCharOnTile(_arg1.col, (_arg1.row - 2));
_local3[11] = getCharOnTile(_arg1.col, (_arg1.row + 2));
_arg1.clown_hits = _local3;
_arg1.feet.visible = false;
_arg1.body.gotoAndPlay("death_explode");
}
public function hideAlert(){
ui.tf.text = "";
ui.tf.visible = false;
ui.tfbg.visible = false;
ui.tf_movetip.visible = false;
tf_timer = 0;
}
public function trickySpawn1(_arg1){
var _local2:*;
_local2 = -1;
if (_arg1.scaleX < 0){
_local2 = 1;
};
placeCharOnTile(_arg1, (_arg1.col + _local2), (_arg1.row - 1));
placeCharOnTile(echar1, (_arg1.col + _local2), (_arg1.row - 1));
placeCharOnTile(echar2, (_arg1.col + _local2), (_arg1.row + 1));
correctPlacement(_arg1, 5);
correctPlacement(echar1);
correctPlacement(echar2);
}
public function get tipsenabled():Boolean{
return (parent["tipsenabled"]);
}
public function itemGet(_arg1, _arg2=0){
var _local3:*;
var _local4:*;
_local3 = Math.floor((Math.random() * 4));
switch (_local3){
case 0:
case 1:
parent["medkit"] = (parent["medkit"] + 1);
_local4 = new FX_GetMedkit();
break;
case 2:
parent["smoke"] = (parent["smoke"] + 1);
_local4 = new FX_GetSmoke();
break;
case 3:
parent["flashbang"] = (parent["flashbang"] + 1);
_local4 = new FX_GetFlashbang();
break;
};
_local4.x = (_arg1.x + _arg2);
_local4.y = _arg1.y;
addChild(_local4);
updateItemUI();
}
public function trickySpawn2(_arg1){
var _local2:*;
_local2 = -1;
if (_arg1.scaleX < 0){
_local2 = 1;
};
placeCharOnTile(_arg1, (_arg1.col + _local2), (_arg1.row - 1));
placeCharOnTile(echar3, (_arg1.col + _local2), (_arg1.row - 1));
placeCharOnTile(echar4, (_arg1.col + _local2), (_arg1.row + 1));
correctPlacement(_arg1, 12);
correctPlacement(echar3, 32);
correctPlacement(echar4, 32);
}
public function trickySpawn3(_arg1){
var _local2:*;
_local2 = -1;
if (_arg1.scaleX < 0){
_local2 = 1;
};
placeCharOnTile(_arg1, (_arg1.col + _local2), (_arg1.row - 1));
placeCharOnTile(echar1, (_arg1.col - _local2), (_arg1.row - 1));
placeCharOnTile(echar2, (_arg1.col - _local2), (_arg1.row + 1));
placeCharOnTile(echar3, (_arg1.col + _local2), (_arg1.row - 1));
placeCharOnTile(echar4, (_arg1.col + _local2), (_arg1.row + 1));
correctPlacement(_arg1, 12);
correctPlacement(echar1);
correctPlacement(echar2);
correctPlacement(echar3, 32);
correctPlacement(echar4, 32);
}
public function snapMoveLine(){
var _local1:*;
if (((!((targettile == null))) && (!((selectedchar == null))))){
_local1 = Math.abs((selectedchar.col - targettile.col));
if ((((selectedchar.ap <= 0)) && ((_local1 > 0)))){
return (false);
};
if (_local1 > selectedchar.ap){
if (tipsenabled){
showAlert((("MOVE COST: " + _local1) + " AP??? ERROR! TOO FAR!!1"), 90);
};
allCharsAlpha(1);
} else {
if (tipsenabled){
if (selectedchar.head == ITEM.TRICKY){
showAlert("JUMP COST: 1 AP", 90);
} else {
showAlert((("MOVE COST: " + _local1) + "AP"), 90);
};
ui.tf_movetip.visible = true;
};
allCharsAlpha(0.2);
};
drawline(selectedchar.x, selectedchar.y, ((targettile.col * tile_width) + (tile_width / 2)), ((targettile.row * 20) + 250));
} else {
if (moveline.visible){
allCharsAlpha(1);
hideline();
};
};
}
public function get paused():Boolean{
return (_paused);
}
public function hurtRow(_arg1, _arg2){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:Boolean;
_local6 = false;
if (_arg1.col < _arg2.col){
_local3 = 0;
while (_local3 < charlayer.numChildren) {
_local4 = charlayer.getChildAt(_local3);
_local5 = Math.abs((_local4.col - _arg1.col));
if ((((((_local4.row == _arg1.row)) && ((_local5 <= _arg1.weapon_range)))) && ((_arg1.col < _local4.col)))){
if (hurtChar(_local4, _arg1, _arg1.weapon_damage, _arg1.shottype)){
_local6 = true;
};
};
_local3++;
};
} else {
_local3 = 0;
while (_local3 < charlayer.numChildren) {
_local4 = charlayer.getChildAt(_local3);
_local5 = Math.abs((_local4.col - _arg1.col));
if ((((((_local4.row == _arg1.row)) && ((_local5 <= _arg1.weapon_range)))) && ((_arg1.col > _local4.col)))){
if (hurtChar(_local4, _arg1, _arg1.weapon_damage, _arg1.shottype)){
_local6 = true;
};
};
_local3++;
};
};
return (_local6);
}
public function refillPlayerAP(_arg1:Boolean=false){
var _local2:*;
_local2 = 1;
while (_local2 <= 4) {
if (_arg1){
this[("pchar" + _local2)].ap = 100;
} else {
this[("pchar" + _local2)].ap = Math.min(this[("pchar" + _local2)].ap_max, (this[("pchar" + _local2)].ap + this[("pchar" + _local2)].ap_gain));
this[("pchar" + _local2)].bloodlusted = false;
};
_local2++;
};
}
public function setBothWeapons(_arg1, _arg2){
_arg1.weapon1 = _arg2;
_arg1.weapon2 = _arg2;
}
public function checkForLose(){
var _local1:*;
var _local2:*;
if (lost){
return (false);
};
trace("checkForLose");
_local1 = 0;
_local2 = 1;
while (_local2 <= 4) {
if ((((this[("pchar" + _local2)] is Char)) && ((this[("pchar" + _local2)].hp > 0)))){
_local1++;
};
_local2++;
};
if (_local1 <= 0){
lost = true;
if (current_room == 166){
parent["lootdata"][166] = [{type:"item", id:ITEM.DNA, qty:1}];
} else {
if (current_room == 107){
parent["keycard"] = 2;
parent["lootdata"][107] = [{type:"item", id:ITEM.KEY3, qty:1}];
};
};
runLosingScene();
};
}
public function drawline(_arg1, _arg2, _arg3, _arg4){
if (!(moveline is Shape)){
moveline = new Shape();
addChild(moveline);
};
moveline.visible = true;
moveline.graphics.clear();
moveline.graphics.lineStyle(8, 0, 0.5);
moveline.graphics.moveTo(_arg1, _arg2);
moveline.graphics.lineTo(_arg3, _arg4);
moveline.graphics.lineStyle(6, 0xFF0000);
moveline.graphics.moveTo(_arg1, (_arg2 - 5));
moveline.graphics.lineTo(_arg3, (_arg4 - 5));
tilelight.visible = true;
tilelight.x = _arg3;
tilelight.y = _arg4;
}
public function killAllEnemies(_arg1, _arg2=null){
var _local3:*;
var _local4:*;
deactivateClowns();
_local3 = 1;
while (_local3 <= numEnemies) {
_local4 = this[("echar" + _local3)];
if (((!((_arg2 == null))) && ((_local4 == _arg2)))){
} else {
if ((((_local4 is Char)) && ((_local4.hp > 0)))){
hurtChar(_local4, _local4, 100, _arg1, true, false);
};
};
_local3++;
};
}
public function mouseOutChar(_arg1){
var _local2:*;
if (((equip_menu.visible) || (victory))){
return (false);
};
if (playerturn){
_local2 = _arg1.currentTarget;
if (_local2.hp <= 0){
return (false);
};
if (targetenemy == _local2){
targetenemy = null;
targetreticle.tf.text = "";
};
};
}
public function enterFromTop(){
var _local1:*;
placeCharOnTile(pchar3, 5, 2);
placeCharOnTile(pchar2, 4, 1);
placeCharOnTile(pchar1, 6, 1);
placeCharOnTile(pchar4, 5, 0);
pchar2.scaleX = -1;
pchar4.scaleX = -1;
orderCharToTile(pchar4, pchar4.col, (pchar4.row + 1));
orderCharToTile(pchar1, pchar1.col, (pchar1.row + 1));
orderCharToTile(pchar2, pchar2.col, (pchar2.row + 1));
orderCharToTile(pchar3, pchar3.col, (pchar3.row + 2));
_local1 = new SCREEN_RevealVert();
_local1.x = 320;
_local1.y = 240;
addChild(_local1);
refillPlayerAP();
}
public function createFloorBlood(_arg1){
var _local2:*;
if (parent["bloodsplatteroff"]){
return (false);
};
if (bloodcount > bloodlimit){
return (false);
};
if (bloodcount > bloodreduce_mark){
if ((bloodcount % 2) == 0){
bloodcount++;
return (false);
};
};
_local2 = new FX_FloorBlood();
addChild(_local2);
setChildIndex(_local2, getChildIndex(charlayer));
_local2.x = _arg1.x;
_local2.y = _arg1.y;
bloodcount++;
}
public function stepMagnify(_arg1){
var _local2:*;
_local2 = _arg1.currentTarget;
if (_local2.scaleX < 0){
_local2.scaleX = Math.max(-(_local2.tgtscale), (_local2.scaleX = (_local2.scaleX - 0.01)));
} else {
_local2.scaleX = Math.min(_local2.tgtscale, (_local2.scaleX = (_local2.scaleX + 0.01)));
};
_local2.scaleY = Math.abs(_local2.scaleX);
if (Math.abs(_local2.scaleX) == _local2.tgtscale){
delete _local2.tgtscale;
_local2.removeEventListener(Event.ENTER_FRAME, stepMagnify);
};
}
public function changeArmor(_arg1, _arg2){
_arg1.body.armor.gotoAndStop(_arg2);
}
public function nvgOff(){
if (dark_screen != null){
dark_screen.gotoAndStop(1);
};
}
public function weaponDeflect(_arg1, _arg2, _arg3, _arg4, _arg5=true, _arg6=false){
var _local7:*;
var _local8:*;
_local7 = {blocker:_arg1, attacker:_arg2, damage:_arg3, shottype:_arg4, ignoresarmor:_arg5, stun:_arg6};
_local8 = new FX_Deflector();
_local8.x = _arg1.x;
_local8.y = _arg1.y;
_local8.def_obj = _local7;
addChild(_local8);
if (_arg1.col < _arg2.col){
_arg1.scaleX = Math.abs(_arg1.scaleX);
} else {
_arg1.scaleX = -(Math.abs(_arg1.scaleX));
};
_arg1.animating = true;
_arg1.body.gotoAndPlay("deflect");
}
public function clownStunEffect(_arg1){
var _local2:*;
_local2 = new SCREEN_ClownFlashbang();
addChild(_local2);
_arg1.feet.visible = false;
_arg1.body.gotoAndPlay("death_explode");
}
public function enterFinalRoom(){
victory = true;
victory_timer = 0;
walkspeed = 1;
orderCharToTile(pchar1, 3, 2);
orderCharToTile(pchar2, 4, 4);
orderCharToTile(pchar3, 6, 4);
orderCharToTile(pchar4, 7, 2);
echar1.hp = 0;
echar2.hp = 0;
echar3.hp = 0;
echar4.hp = 0;
echar5.hp = 0;
echar6.hp = 0;
echar7.hp = 0;
echar8.hp = 0;
echar9.hp = 0;
echar10.hp = 0;
echar11.hp = 0;
echar12.hp = 0;
echar1.visible = false;
echar2.visible = false;
echar3.visible = false;
echar4.visible = false;
echar5.visible = false;
echar6.visible = false;
echar7.visible = false;
echar8.visible = false;
echar9.visible = false;
echar10.visible = false;
echar11.visible = false;
echar12.visible = false;
visible = true;
}
public function checkForWin(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
if (victory){
return (false);
};
_local1 = 0;
_local2 = 1;
while (_local2 <= numEnemies) {
if ((((this[("echar" + _local2)] is Char)) && ((this[("echar" + _local2)].hp > 0)))){
_local1++;
};
_local2++;
};
if (_local1 <= 0){
if (current_room == 166){
if (finalphase < 5){
finalphase++;
var _local5 = this;
_local5[("finalBossPhase" + finalphase)]();
return (false);
};
};
if (echar1 != null){
_local3 = new SCREEN_RoomClear();
addChild(_local3);
if (parent["pid"]){
_local4 = new FX_PID_Power();
addChild(_local4);
_local4.x = 501.5;
_local4.y = 444.5;
parent["pid_energy"] = Math.min(30, (parent["pid_energy"] + 2));
updateItemUI();
};
};
victory = true;
selectNone();
syncUI();
};
}
public function finalBossPhase1_magnify(){
magnifyChar(echar1, 1.5);
magnifyChar(echar2, 1.5);
magnifyChar(echar3, 1.5);
magnifyChar(echar4, 1.5);
}
public function enterFromBottom(){
var _local1:*;
placeCharOnTile(pchar1, 5, 5);
placeCharOnTile(pchar2, 4, 4);
placeCharOnTile(pchar3, 6, 4);
placeCharOnTile(pchar4, 5, 3);
pchar1.scaleX = -1;
pchar2.scaleX = -1;
orderCharToTile(pchar4, pchar4.col, (pchar4.row - 3));
orderCharToTile(pchar3, pchar3.col, (pchar3.row - 2));
orderCharToTile(pchar2, pchar2.col, (pchar2.row - 2));
orderCharToTile(pchar1, pchar1.col, (pchar1.row - 1));
_local1 = new SCREEN_RevealVert();
_local1.x = 320;
_local1.y = 240;
addChild(_local1);
refillPlayerAP();
}
public function clickedCharShortcut(_arg1){
var _local2:*;
if (((!(playerturn)) || (((victory) && ((victory_timer > 0)))))){
return (false);
};
_local2 = _arg1.currentTarget;
if (equip_menu.visible){
trace("switch while menu open");
equip_menu.closeMenu();
switchSelected(_local2.char_tgt);
gotoEquipMenu();
} else {
if (paused){
return (false);
};
if (_local2.char_tgt == selectedchar){
gotoEquipMenu();
} else {
switchSelected(_local2.char_tgt);
};
};
}
public function resurrectChar(_arg1, _arg2=true, _arg3=1){
var _local4:*;
if (_arg2){
_local4 = new FX_ResurrectBolt();
_local4.x = _arg1.x;
_local4.y = _arg1.y;
addChild(_local4);
_arg1.animating = true;
_arg1.body.gotoAndStop("resurrected");
_arg1.visible = true;
};
_arg1.hp = _arg3;
_arg1.stunned = false;
_arg1.ap = _arg1.ap_max;
if (_arg1.owner == 0){
_arg1.button.visible = true;
};
if (!_arg1.haslisteners){
_arg1.haslisteners = true;
_arg1.addEventListener(MouseEvent.CLICK, clickedChar);
_arg1.addEventListener(MouseEvent.MOUSE_OVER, mouseOverChar);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, mouseOutChar);
};
}
public function magMode(){
var _local1:*;
var _local2:*;
_local1 = 1;
while (_local1 <= numEnemies) {
_local2 = this[("echar" + _local1)];
if ((((((_local2 is Char)) && ((_local2.hp > 0)))) && ((Math.abs(_local2.scaleX) == 1)))){
_local2.scaleX = Math.max(-1.5, Math.min(1.5, (_local2.scaleX * 1.5)));
_local2.scaleY = Math.abs(_local2.scaleX);
_local2.hp = Math.ceil((_local2.hp * 2));
};
_local1++;
};
}
public function exitRight(){
var _local1:*;
orderCharToTile(pchar1, (pchar1.col + 3), pchar1.row);
orderCharToTile(pchar2, (pchar2.col + 3), pchar2.row);
orderCharToTile(pchar3, (pchar3.col + 3), pchar3.row);
orderCharToTile(pchar4, (pchar4.col + 3), pchar4.row);
_local1 = new SCREEN_Wipe();
_local1.x = 320;
_local1.y = 240;
addChild(_local1);
}
public function correctPlacement(_arg1, _arg2=16, _arg3="drop"){
var _local4:Array;
var _local5:*;
var _local6:*;
var _local7:*;
_local4 = [];
_local4[0] = {legal:checkTileAvail(_arg1.col, _arg1.row), c:_arg1.col, r:_arg1.row};
_local4[1] = {legal:checkTileAvail((_arg1.col - 1), _arg1.row), c:(_arg1.col - 1), r:_arg1.row};
_local4[2] = {legal:checkTileAvail((_arg1.col + 1), _arg1.row), c:(_arg1.col + 1), r:_arg1.row};
_local4[3] = {legal:checkTileAvail(_arg1.col, (_arg1.row - 1)), c:_arg1.col, r:(_arg1.row - 1)};
_local4[4] = {legal:checkTileAvail(_arg1.col, (_arg1.row + 1)), c:_arg1.col, r:(_arg1.row + 1)};
_local4[5] = {legal:checkTileAvail((_arg1.col - 2), _arg1.row), c:(_arg1.col - 2), r:_arg1.row};
_local4[6] = {legal:checkTileAvail((_arg1.col + 2), _arg1.row), c:(_arg1.col + 2), r:_arg1.row};
_local4[7] = {legal:checkTileAvail(_arg1.col, (_arg1.row - 2)), c:_arg1.col, r:(_arg1.row - 2)};
_local4[8] = {legal:checkTileAvail(_arg1.col, (_arg1.row + 2)), c:_arg1.col, r:(_arg1.row + 2)};
_local7 = 0;
while (_local7 < _local4.length) {
if (_local4[_local7].legal){
_local5 = _local4[_local7].c;
_local6 = _local4[_local7].r;
break;
};
_local7++;
};
if ((((_local5 == null)) || ((_local6 == null)))){
return (false);
};
resurrectChar(_arg1, false, _arg2);
placeCharOnTile(_arg1, _local5, _local6);
_arg1.visible = true;
_arg1.feet.visible = false;
_arg1.body.gotoAndPlay(_arg3);
_arg1.animating = true;
}
public function gotoEquipMenu(){
if (!victory){
return (false);
};
if (!equip_menu.visible){
playSound("_SFX_Open");
};
allCharsAlpha(0.99);
equip_menu.openMenu(selectedchar);
paused = true;
}
public function moveAllChars(){
var _local1:*;
_local1 = 0;
while (_local1 < charlayer.numChildren) {
moveChar(charlayer.getChildAt(_local1));
_local1++;
};
}
public function runLosingScene(){
var _local1:*;
trace("runLosingScene");
_local1 = new SCREEN_Lost();
_local1.x = 320;
_local1.y = 240;
addChild(_local1);
}
public function enterKey3Room(){
orderCharToTile(pchar1, 3, 2);
orderCharToTile(pchar2, 4, 4);
orderCharToTile(pchar3, 6, 4);
orderCharToTile(pchar4, 7, 2);
echar1.hp = 0;
echar2.hp = 0;
echar3.hp = 0;
echar4.hp = 0;
echar1.visible = false;
echar2.visible = false;
echar3.visible = false;
echar4.visible = false;
victory = true;
victory_timer = 0;
walkspeed = 1;
visible = true;
}
public function enemyAI(){
var e:*;
var p:*;
var walk_dir:*;
var walk_dirY:*;
var rand_tgt:*;
var shoot_result:*;
var move_try:*;
var tgtc:*;
var tgtr:*;
if (playerturn){
return (false);
};
if (focused_enemy_index > numEnemies){
if (turn_delay > 0){
turn_delay--;
} else {
startPlayerTurn();
};
return (true);
};
try {
e = this[("echar" + focused_enemy_index)];
if (((((!((e is Char))) || ((e.ap <= 0)))) || ((e.hp <= 0)))){
e.targetenemy = null;
focused_enemy_index++;
return (false);
};
if (e.animating){
return (false);
};
if (e.stunned){
if ((((e.ap >= e.weapon_ap)) && ((((Math.random() <= 0.3)) || (((!((e.targetenemy == null))) && ((e.targetenemy.owner == 1)))))))){
rand_tgt = e.targetenemy;
if ((((rand_tgt == null)) || ((((rand_tgt.owner == 0)) && ((Math.random() <= 0.3)))))){
if (Math.random() >= 0.5){
trace("enemyAI() GOT NEW TARGET ENEMY");
rand_tgt = getClosestEnemyCharTo(e);
} else {
trace("enemyAI() GOT NEW TARGET PLAYER");
rand_tgt = getClosestPlayerCharTo(e);
};
e.targetenemy = rand_tgt;
};
trace("enemyAI() TRY SHOOTING", rand_tgt);
if ((rand_tgt is Char)){
if (shootEnemy(e, rand_tgt) == "success"){
e.targetenemy = null;
};
if (Math.random() <= 0.2){
focused_enemy_index++;
};
return (false);
};
};
walk_dir = 1;
walk_dirY = (Math.floor((Math.random() * 3)) - 1);
if (Math.random() > 0.5){
walk_dir = -1;
};
if (checkTileAvail((e.col + walk_dir), (e.row + walk_dirY))){
orderCharToTile(e, (e.col + walk_dir), (e.row + walk_dirY));
} else {
if (checkTileAvail((e.col + (-1 * walk_dir)), (e.row + walk_dirY))){
orderCharToTile(e, (e.col + (-1 * walk_dir)), (e.row + walk_dirY));
} else {
if (Math.random() > 0.5){
trace("enemyAI() STUNNED AI LUCKY END", e.ap);
focused_enemy_index++;
};
};
};
return (false);
};
p = getClosestPlayerCharTo(e);
if ((p is Char)){
try {
shoot_result = shootEnemy(e, p);
if (shoot_result.substring(0, 6) == "cancel"){
e.targetenemy = null;
focused_enemy_index++;
return (false);
};
} catch(err1) {
trace("shootEnemy() FAILED", err1, " || TRYING MOVE");
if (e.ap > 0){
move_try = 1;
if (p.col <= e.col){
move_try = -1;
};
tgtc = e.col;
tgtr = e.row;
if (checkTileAvail((e.col + move_try), e.row)){
tgtc = (e.col + move_try);
} else {
if (checkTileAvail((e.col + move_try), (e.row + 1))){
tgtc = (e.col + move_try);
tgtr = (e.row + 1);
} else {
if (checkTileAvail((e.col + move_try), (e.row - 1))){
tgtc = (e.col + move_try);
tgtr = (e.row - 1);
};
};
};
if (((!((tgtc == e.col))) || (!((tgtr == e.row))))){
orderCharToTile(e, tgtc, tgtr);
return (false);
};
};
focused_enemy_index++;
return (false);
};
};
} catch(err2) {
trace(e.id, "ENEMY AI ", err2, "PLAYER CHECK", p, "shoot_result:", shoot_result);
focused_enemy_index++;
};
}
public function snapTargetReticle(){
if ((targetenemy is Char)){
targetreticle.visible = ((true) && (!(victory)));
targetreticle.x = mouseX;
targetreticle.y = mouseY;
} else {
targetreticle.visible = false;
};
}
public function victoryProcedures(){
refillPlayerAP(true);
syncUI();
if (victory_timer > 0){
parent["explored"][current_room] = true;
var _local1 = parent;
_local1["updateMaps"]();
targetreticle.visible = false;
victory_timer--;
} else {
if (victory_timer == 0){
walkspeed = 2;
victory_timer = -1;
ui.endturn.visible = false;
ui.saveload.visible = true;
pchar1.stunned = false;
pchar2.stunned = false;
pchar3.stunned = false;
pchar4.stunned = false;
if (pchar1.hp <= 0){
placeCharOnTile(pchar1, 3, 2);
resurrectChar(pchar1);
} else {
orderCharToTile(pchar1, 3, 2);
};
if (pchar2.hp <= 0){
placeCharOnTile(pchar2, 4, 4);
resurrectChar(pchar2);
} else {
orderCharToTile(pchar2, 4, 4);
};
if (pchar3.hp <= 0){
placeCharOnTile(pchar3, 6, 4);
resurrectChar(pchar3);
} else {
orderCharToTile(pchar3, 6, 4);
};
if (pchar4.hp <= 0){
placeCharOnTile(pchar4, 7, 2);
resurrectChar(pchar4);
} else {
orderCharToTile(pchar4, 7, 2);
};
} else {
if (victory_timer == -1){
if (tipsenabled){
ui.tf_equiptip.visible = true;
};
_local1 = parent;
_local1["enableLocker"]();
if (((!(pchar1.moveclear)) || (pchar1.animating))){
return (false);
};
pchar1.scaleX = -(Math.abs(pchar1.scaleX));
if (((!(pchar2.moveclear)) || (pchar2.animating))){
return (false);
};
pchar2.scaleX = -(Math.abs(pchar2.scaleX));
if (((!(pchar3.moveclear)) || (pchar3.animating))){
return (false);
};
pchar3.scaleX = Math.abs(pchar3.scaleX);
if (((!(pchar4.moveclear)) || (pchar4.animating))){
return (false);
};
pchar4.scaleX = Math.abs(pchar4.scaleX);
victory_timer = -2;
_local1 = root;
_local1["showNav"]();
};
};
};
}
public function set current_room(_arg1:int){
parent["current_room"] = _arg1;
}
public function changeHead(_arg1, _arg2){
_arg1.body.head.gotoAndStop(_arg2);
if (_arg1.owner == 0){
ui[("b" + _arg1.id)].head.gotoAndStop(_arg2);
};
}
public function enterFromLeft(){
var _local1:*;
orderCharToTile(pchar1, (pchar1.col + 1), pchar1.row);
orderCharToTile(pchar2, (pchar2.col + 1), pchar2.row);
orderCharToTile(pchar3, (pchar3.col + 1), pchar3.row);
orderCharToTile(pchar4, (pchar4.col + 1), pchar4.row);
_local1 = new SCREEN_Reveal();
_local1.x = 320;
_local1.y = 240;
addChild(_local1);
refillPlayerAP();
}
public function changeWeapon2(_arg1, _arg2){
}
public function useEnemySmokeGrenade(){
if (grenade_screen != null){
grenade_screen.stop();
removeChild(grenade_screen);
};
enemy_smoke = true;
smoked = true;
grenade_screen = new SCREEN_Smoke();
addChild(grenade_screen);
setChildIndex(grenade_screen, getChildIndex(ui));
playSound("_SFX_GrenadeSmoke");
}
public function clickedFlashbang(_arg1){
if (((((((!(playerturn)) || (victory))) || (!((flash_screen == null))))) || (paused))){
return (false);
};
if (parent["flashbang"] <= 0){
return (false);
};
useFlashbang();
}
public function frameFunc(_arg1){
if (lost){
return (false);
};
moveAllChars();
orderCharLayer();
if (victory){
victoryProcedures();
} else {
snapSelectArrow();
snapTargetReticle();
snapMoveLine();
enemyAI();
syncUI();
};
}
public function hidePChar(_arg1){
this[("pchar" + _arg1)].visible = false;
ui[("b" + _arg1)].visible = false;
}
public function finalBossPhase3_respawn2(){
trace("PHASE 3: LEETS (NORMAL)");
placeCharOnTile(echar1, 1, 1);
placeCharOnTile(echar2, 1, 4);
correctPlacement(echar1, 20, "resurrected");
correctPlacement(echar2, 20, "resurrected");
}
public function removeBlood(){
var n:*;
n = (this.numChildren - 1);
while (n >= 0) {
if ((this.getChildAt(n) is FX_FloorBlood)){
try {
removeChild(this.getChildAt(n));
} catch(e) {
};
};
n = (n - 1);
};
}
public function finalBossPhase3_respawn4(){
trace("PHASE 3: zombie & clown");
echar3.head = ITEM.ZOMBIE;
echar3.armor = ITEM.ASSAULT;
setBothWeapons(echar3, 1);
echar4.head = ITEM.CLOWN;
echar4.armor = ITEM.WHITE;
placeCharOnTile(echar3, 3, 5);
placeCharOnTile(echar4, 2, 1);
correctPlacement(echar3, 62, "resurrected");
correctPlacement(echar4, 16, "resurrected");
magnifyChar(echar3, 1.5);
}
public function trainEffect(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
trace("TRAIN EFFECT");
useEnemySmokeGrenade();
_local2 = _arg1.clown;
_local3 = _arg1.playerchar;
_local4 = _local2.col;
_local5 = _local2.row;
placeCharOnTile(_local2, _local3.col, _local3.row);
placeCharOnTile(_local3, _local4, _local5);
_local3.animating = true;
_local3.body.gotoAndPlay("drop");
if (_local3 == selectedchar){
selectNone();
};
echar1.head = ITEM.CLOWN;
echar2.head = ITEM.CLOWN;
echar3.head = ITEM.CLOWN;
echar4.head = ITEM.CLOWN;
if (pid_screen.bar.scaleX > 0.7){
trickySpawn1(_local2);
} else {
if (pid_screen.bar.scaleX >= 0.3){
trickySpawn2(_local2);
} else {
pid_screen.warning.play();
trickySpawn3(_local2);
};
};
}
public function changeWeapon1(_arg1, _arg2){
_arg1.body.hand1.gotoAndStop(_arg2);
if (_arg2 == 1){
_arg1.body.hand2.gotoAndStop(2);
} else {
_arg1.body.hand2.gotoAndStop(1);
};
setWeaponStats(_arg1, _arg2);
attackmovetarget = null;
tilelight.visible = false;
}
public function nvgOn(){
if (dark_screen != null){
dark_screen.gotoAndStop(2);
};
}
public function weaponBlock(_arg1){
_arg1.animating = true;
_arg1.body.gotoAndPlay("block");
}
public function get current_room():int{
return (parent["current_room"]);
}
public function finalBossPhase2_respawn(){
trace("PHASE 2: SAUCY");
placeCharOnTile(echar7, 1, 3);
placeCharOnTile(echar8, 9, 3);
correctPlacement(echar7, 24, "drop");
correctPlacement(echar8, 24, "drop");
echar7.scaleX = 1;
focused_enemy_index = 1;
setSaucyGun(echar7);
setSaucyGun(echar8);
paused = false;
}
public function clickedPID(_arg1){
var _local2:*;
var _local3:uint;
if (parent["pid_energy"] < 1){
return (false);
};
if (current_room == 166){
trace("PID BLOCKED");
return (false);
};
if (victory){
parent["pid_energy"] = (parent["pid_energy"] - 1);
updateItemUI();
_local2 = new SCREEN_FlashSimple();
parent.addChild(_local2);
randomWarp();
} else {
if (!playerturn){
return (false);
};
parent["pid_energy"] = (parent["pid_energy"] - 1);
updateItemUI();
_local2 = new SCREEN_FlashSimple();
parent.addChild(_local2);
_local3 = Math.floor((Math.random() * 12));
if (_local3 < 5){
zapOneEnemy();
} else {
switch (_local3){
case 6:
zapOnePlayer();
break;
case 7:
magMode();
break;
case 8:
tinyMode();
break;
case 9:
convertToClowns();
break;
case 10:
tinyYou();
break;
case 11:
killAllEnemies("zap");
break;
};
};
};
}
public function finalBossPhase3_respawn1(){
echar1.scaleX = (echar1.scaleY = 1);
echar2.scaleX = (echar2.scaleY = 1);
echar3.scaleX = (echar3.scaleY = 1);
echar4.scaleX = (echar4.scaleY = 1);
echar5.scaleX = (echar5.scaleY = 1);
echar6.scaleX = (echar6.scaleY = 1);
echar7.scaleX = (echar7.scaleY = 1);
echar8.scaleX = (echar8.scaleY = 1);
echar9.scaleX = (echar9.scaleY = 1);
echar10.scaleX = (echar10.scaleY = 1);
echar11.scaleX = (echar11.scaleY = 1);
echar12.scaleX = (echar12.scaleY = 1);
trace("PHASE 3: SAUCY");
placeCharOnTile(echar7, 0, 0);
placeCharOnTile(echar8, 0, 5);
correctPlacement(echar7, 24, "drop");
correctPlacement(echar8, 24, "drop");
focused_enemy_index = 1;
setSaucyGun(echar7);
setSaucyGun(echar8);
}
public function finalBossPhase3_respawn3(){
trace("PHASE 3: ATPS");
placeCharOnTile(echar5, 0, 2);
placeCharOnTile(echar6, 0, 3);
correctPlacement(echar5, 32, "resurrected");
correctPlacement(echar6, 32, "resurrected");
}
public function randomWarp(){
var _local1:uint;
var _local2:Boolean;
var _local3:uint;
_local1 = 1;
_local2 = false;
_local3 = 0;
while (((!(_local2)) && ((_local3 < 100)))) {
_local1 = Math.ceil((Math.random() * 176));
_local2 = parent["explored"][_local1];
_local3++;
};
current_room = _local1;
parent["noenemies"] = false;
var _local4 = parent;
_local4["nextRoom"]();
}
public function switchSelected(_arg1){
if (((!((_arg1 == selectedchar))) && (!(_arg1.stunned)))){
if ((selectedchar is Char)){
allCharsAlpha(1);
Util.removeFilterFromMC(selectedchar);
Util.removeFilterFromMC(selectedchar.button);
playSound("_SFX_Flick");
};
selectedchar = _arg1;
targettile = null;
tilelight.visible = false;
ui.ap.text = selectedchar.ap;
ui.w1.visible = true;
ui.w2.visible = true;
if (selectedchar.targetenemy != null){
targetreticle.visible = ((true) && (!(victory)));
};
Util.addGlowFilterToMC(selectedchar);
Util.addGlowFilterToMC(selectedchar.button);
};
}
public function syncCharAnimation(_arg1){
var char = _arg1;
if ((((char.alpha == 1)) && (!(paused)))){
if (char.hp > 0){
char.body.play();
};
} else {
if (char.hp > 0){
char.body.stop();
};
};
if (char.hp <= 0){
if (char.haslisteners){
char.haslisteners = false;
char.removeEventListener(MouseEvent.CLICK, clickedChar);
char.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverChar);
char.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutChar);
};
return (false);
};
if (char.animating){
return (false);
};
if (((((victory) && ((victory_timer > 0)))) && ((victory_timer < 35)))){
if (char.body.currentFrame < 470){
char.body.gotoAndPlay((470 + Math.floor((Math.random() * 19))));
};
} else {
if (char.targetenemy != null){
if (char.targetenemy.hp <= 0){
char.targetenemy = null;
} else {
if ((((char.body.currentFrame < 65)) || ((char.body.currentFrame > 96)))){
try {
if (parent["idleanimsoff"] == true){
char.body.gotoAndStop(65);
} else {
char.body.gotoAndPlay(65);
};
} catch(e) {
};
};
};
} else {
try {
if (parent["idleanimsoff"] == true){
char.body.gotoAndStop(1);
} else {
if (char.stunned){
if (char.body.currentFrame < 640){
char.body.gotoAndPlay("dizzy");
};
} else {
if (char.body.currentFrame > 60){
char.body.gotoAndPlay(1);
};
};
if (((((((char.clown) && ((char.alpha == 1)))) && (!(char.stunned)))) && (!(paused)))){
if (char.targetenemy == null){
char.body.gotoAndPlay(Math.ceil((Math.random() * 59)));
} else {
char.body.gotoAndPlay((65 + Math.ceil((Math.random() * 29))));
};
};
};
} catch(e) {
};
};
};
}
public function orderCharLayer(){
var _local1:Boolean;
var _local2:*;
if (!charmoved){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < (charlayer.numChildren - 1)) {
if (charlayer.getChildAt(_local2).y > charlayer.getChildAt((_local2 + 1)).y){
charlayer.swapChildren(charlayer.getChildAt(_local2), charlayer.getChildAt((_local2 + 1)));
_local1 = true;
} else {
if (charlayer.getChildAt(_local2).y == charlayer.getChildAt((_local2 + 1)).y){
if (playerturn){
if (charlayer.getChildAt(_local2).x < charlayer.getChildAt((_local2 + 1)).x){
charlayer.swapChildren(charlayer.getChildAt(_local2), charlayer.getChildAt((_local2 + 1)));
_local1 = true;
};
} else {
if (charlayer.getChildAt(_local2).x > charlayer.getChildAt((_local2 + 1)).x){
charlayer.swapChildren(charlayer.getChildAt(_local2), charlayer.getChildAt((_local2 + 1)));
_local1 = true;
};
};
};
};
_local2++;
};
if (!_local1){
charmoved = false;
};
}
public function finalBossPhase1(){
audit_screen = new FX_audit_screen1();
addChild(audit_screen);
audit_screen.x = 320;
audit_screen.y = 240;
setChildIndex(audit_screen, getChildIndex(charlayer));
}
public function finalBossPhase2(){
removeChild(audit_screen);
audit_screen = null;
audit_screen = new FX_audit_screen2();
addChild(audit_screen);
audit_screen.x = 320;
audit_screen.y = 240;
setChildIndex(audit_screen, getChildIndex(charlayer));
}
public function clownZombify(_arg1:Array){
var _local2:*;
var _local3:*;
trace("clownZombify()", _arg1);
for (_local2 in _arg1) {
if (_arg1[_local2].owner == 1){
if (_arg1[_local2].head != ITEM.TRICKY){
_local3 = Math.max(2, (_arg1[_local2].hp * 2));
_arg1[_local2].weapon1 = (_arg1[_local2].weapon2 = 1);
_arg1[_local2].head = ITEM.ZOMBIE;
resurrectChar(_arg1[_local2], false, _local3);
_arg1[_local2].animating = true;
_arg1[_local2].feet.visible = false;
_arg1[_local2].charclass = "CQB";
_arg1[_local2].body.gotoAndPlay("teleported");
};
} else {
hurtChar(_arg1[_local2], _arg1[_local2], 16, "shotgun", true, true);
};
};
}
public function getClosestEnemyCharTo(_arg1, _arg2=true){
var _local3:*;
_local3 = getClosestCharTo(_arg1, "echar", _arg2);
return (_local3);
}
public function clownZombifyEffect(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = new SCREEN_ClownZombify();
addChild(_local2);
_local2.tgt_char = _arg1;
_local3 = [];
_local3[0] = getCharOnTile((_arg1.col - 1), _arg1.row);
_local3[1] = getCharOnTile((_arg1.col + 1), _arg1.row);
_local3[2] = getCharOnTile(_arg1.col, (_arg1.row - 1));
_local3[3] = getCharOnTile(_arg1.col, (_arg1.row + 1));
_local3[4] = getCharOnTile((_arg1.col - 1), (_arg1.row - 1));
_local3[5] = getCharOnTile((_arg1.col + 1), (_arg1.row - 1));
_local3[6] = getCharOnTile((_arg1.col - 1), (_arg1.row + 1));
_local3[7] = getCharOnTile((_arg1.col + 1), (_arg1.row + 1));
_local3[8] = getCharOnTile((_arg1.col - 2), _arg1.row);
_local3[9] = getCharOnTile((_arg1.col + 2), _arg1.row);
_local3[10] = getCharOnTile(_arg1.col, (_arg1.row - 2));
_local3[11] = getCharOnTile(_arg1.col, (_arg1.row + 2));
_local4 = (_local3.length - 1);
while (_local4 >= 0) {
if (!(_local3[_local4] is Char)){
_local3.splice(_local4, 1);
};
_local4--;
};
_arg1.clown_hits = _local3;
_arg1.feet.visible = false;
_arg1.body.gotoAndPlay("death_explode");
}
public function repositionFlipAll(){
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < charlayer.numChildren) {
_local2 = charlayer.getChildAt(_local1);
placeCharOnTile(_local2, (10 - _local2.col), _local2.row);
_local2.scaleX = (-1 * _local2.scaleX);
_local1++;
};
}
}
}//package
Section 160
//ITEM (ITEM)
package {
public class ITEM {
public static var BREN = 19;
public static var oSW500 = 13;
public static var INGRAM = 16;
public static var FLASHBANG = 3;
public static var DEIMOS = 15;
public static var ATPSUIT = 12;
public static var LEETSUIT = 10;
public static var COMBATKNIFE = 1;
public static var JESUS = 19;
public static var SW500 = 12;
public static var oHOOK = 9;
public static var DEIMOSJACKET = 15;
public static var oAXE = 4;
public static var DEAGLE = 11;
public static var WHITE = 11;
public static var oMP5 = 18;
public static var HOOK = 8;
public static var oINGRAM = 17;
public static var oWARNING = 7;
public static var SANFORDHEAD = 14;
public static var KNIFEBELT = 6;
public static var ZOMBIE = 18;
public static var KATANA = 5;
public static var BLOODYHEAD = 5;
public static var WARNINGSIGN = 6;
public static var oSAWNOFF = 14;
public static var MOSSBERG = 14;
public static var BERETTA = 10;
public static var SMOKE = 2;
public static var oCKNIFE = 2;
public static var GLOWINGSHADES = 11;
public static var GOGGLES = 3;
public static var oCLAW = 1;
public static var AUTOSHOTGUN = 15;
public static var RAGS = 16;
public static var CAMOAMMO = 8;
public static var oDEAGLE = 12;
public static var BANDANA = 8;
public static var ASSAULTHELM = 7;
public static var oKATANA = 6;
public static var DEIMOSHEAD = 15;
public static var HANKHEAD = 13;
public static var BANDAGEHEAD = 4;
public static var CLOWN = 16;
public static var HANK = 13;
public static var SANFORD = 14;
public static var NVG = 6;
public static var ATPHELM = 12;
public static var HANKSUIT = 13;
public static var ATP = 12;
public static var TAC = 9;
public static var TRICKY = 17;
public static var JESUSSWORD = 7;
public static var oAUTOSHOTGUN = 16;
public static var MEDKIT = 1;
public static var SAUCY = 20;
public static var WHITEPLATE = 19;
public static var oMACHETE = 5;
public static var SAWNOFF = 13;
public static var AUG = 18;
public static var CQB = 6;
public static var BANDAGE = 4;
public static var BLOODYRAGS = 17;
public static var ASSAULT = 7;
public static var POSHSUIT = 20;
public static var SUPERMEDKIT = 4;
public static var JHPAMMO = 5;
public static var oMOSSBERG = 15;
public static var HEAVY = 8;
public static var ASSAULTARMOR = 7;
public static var SANFORDCAMO = 14;
public static var WHITESUIT = 11;
public static var TRENCHKNIFE = 2;
public static var SLEEVELESS = 2;
public static var oAUG = 19;
public static var M60 = 20;
public static var o316 = 8;
public static var CHESTPLATE = 9;
public static var JACKET = 3;
public static var FLASH = 3;
public static var DARKRAGS = 18;
public static var KEY1 = 6;
public static var KEY2 = 7;
public static var KEY3 = 8;
public static var KEY4 = 9;
public static var MACHETE = 4;
public static var SCANNER = 10;
public static var oTKNIFE = 3;
public static var BLOODYBODY = 5;
public static var oGLOCK = 10;
public static var COMMASK = 9;
public static var SHADES = 2;
public static var oBREN = 20;
public static var LEET = 10;
public static var GLOCK = 9;
public static var AXE = 3;
public static var DNA = 11;
public static var MP5 = 17;
public static var LEETSHADES = 10;
public static var oBERETTA = 11;
public static var oM60 = 21;
}
}//package
Section 161
//LootMenu (LootMenu)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class LootMenu extends MovieClip {
public var b0:Button_equip;
public var b2:Button_equip;
public var b1:Button_equip;
public var done:SimpleButton;
public var takeall:SimpleButton;
public function LootMenu(){
addFrameScript(0, frame1);
}
public function clickedButton(_arg1){
_arg1.currentTarget.visible = false;
var _local2 = parent;
_local2["getItem"](_arg1.currentTarget.name.substring(1, 2));
}
function frame1(){
done.addEventListener(MouseEvent.CLICK, closeMenu);
takeall.addEventListener(MouseEvent.CLICK, clickedTakeAll);
b0.addEventListener(MouseEvent.CLICK, clickedButton);
b1.addEventListener(MouseEvent.CLICK, clickedButton);
b2.addEventListener(MouseEvent.CLICK, clickedButton);
b0.buttonMode = true;
b1.buttonMode = true;
b2.buttonMode = true;
}
public function closeMenu(_arg1){
var _local2 = parent;
_local2["closeLootMenu"]();
}
public function updateButtons(_arg1){
var _local2:*;
if ((((_arg1 == null)) || (!((_arg1 is Array))))){
return (false);
};
_local2 = 0;
while (_local2 < 3) {
if (((!((_arg1[_local2] == null))) && ((_arg1[_local2] is Object)))){
setButtonGFX(_local2, _arg1[_local2]);
this[("b" + _local2)].visible = true;
} else {
this[("b" + _local2)].visible = false;
};
_local2++;
};
}
public function clickedTakeAll(_arg1){
if (b0.visible){
var _local2 = parent;
_local2["getItem"](0);
b0.visible = false;
};
if (b1.visible){
_local2 = parent;
_local2["getItem"](1);
b1.visible = false;
};
if (b2.visible){
_local2 = parent;
_local2["getItem"](2);
b2.visible = false;
};
}
public function setButtonGFX(_arg1, _arg2){
var _local3:*;
_local3 = this[("b" + _arg1)];
_local3.item.visible = false;
_local3.head.visible = false;
_local3.armor_head.visible = false;
_local3.armor.visible = false;
_local3.weapon.visible = false;
_local3.weapon.bg.visible = false;
_local3.weapon.jhp.visible = false;
_local3.lock.visible = false;
_local3.label.visible = false;
if ((((_arg2.qty == null)) || ((_arg2.qty <= 1)))){
_local3.qty.visible = false;
} else {
_local3.qty.text = _arg2.qty;
_local3.qty.visible = true;
};
switch (_arg2.type){
case "item":
_local3.item.gotoAndStop(_arg2.id);
_local3.item.visible = true;
break;
case "hand":
_local3.weapon.gotoAndStop((_arg2.id + 1));
_local3.weapon.visible = true;
break;
case "armor":
_local3.armor.gotoAndStop(_arg2.id);
_local3.armor.visible = true;
_local3.armor_head.visible = true;
break;
case "head":
_local3.head.gotoAndStop(_arg2.id);
_local3.head.visible = true;
break;
};
}
}
}//package
Section 162
//MainMenu (MainMenu)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainMenu extends MovieClip {
public var btn_new:SimpleButton;
public var loadview:MovieClip;
public var btn_load:SimpleButton;
public var flash:MovieClip;
public function MainMenu(){
addFrameScript(0, frame1);
}
public function loadGame(_arg1){
disableButtons();
loadview.visible = true;
loadview.updateChars();
loadview.enableButtons();
var _local2 = parent;
_local2["playSound"]("_SFX_Open");
}
public function loadOk(_arg1=null){
disableButtons();
visible = false;
var _local2 = parent;
_local2["loadGame"]();
_local2 = parent;
_local2["playSound"]("_SFX_hitwall2");
_local2 = parent;
_local2["removeMainMenu"]();
}
function frame1(){
loadview.visible = false;
}
public function disableButtons(){
btn_new.removeEventListener(MouseEvent.CLICK, startNew);
btn_load.removeEventListener(MouseEvent.CLICK, loadGame);
}
public function enableButtons(){
btn_new.addEventListener(MouseEvent.CLICK, startNew);
btn_load.addEventListener(MouseEvent.CLICK, loadGame);
}
public function startNew(_arg1){
disableButtons();
visible = false;
var _local2 = parent;
_local2["startGame"]();
_local2 = parent;
_local2["playSound"]("_SFX_hitwall2");
_local2 = parent;
_local2["removeMainMenu"]();
}
}
}//package
Section 163
//MapMenu (MapMenu)
package {
import flash.display.*;
public dynamic class MapMenu extends MovieClip {
public var marker:MovieClip;
public var r100:MovieClip;
public var r101:MovieClip;
public var r102:MovieClip;
public var r103:MovieClip;
public var r104:MovieClip;
public var r105:MovieClip;
public var r106:MovieClip;
public var r107:MovieClip;
public var r108:MovieClip;
public var r109:MovieClip;
public var r111:MovieClip;
public var r112:MovieClip;
public var r113:MovieClip;
public var r114:MovieClip;
public var r115:MovieClip;
public var r116:MovieClip;
public var r110:MovieClip;
public var r117:MovieClip;
public var r118:MovieClip;
public var r119:MovieClip;
public var r120:MovieClip;
public var r122:MovieClip;
public var r126:MovieClip;
public var r123:MovieClip;
public var r125:MovieClip;
public var r127:MovieClip;
public var r124:MovieClip;
public var r128:MovieClip;
public var r129:MovieClip;
public var r121:MovieClip;
public var r131:MovieClip;
public var r133:MovieClip;
public var r135:MovieClip;
public var r130:MovieClip;
public var r139:MovieClip;
public var r134:MovieClip;
public var r138:MovieClip;
public var r132:MovieClip;
public var r136:MovieClip;
public var r140:MovieClip;
public var r141:MovieClip;
public var r142:MovieClip;
public var r143:MovieClip;
public var r144:MovieClip;
public var r145:MovieClip;
public var r146:MovieClip;
public var r147:MovieClip;
public var r148:MovieClip;
public var r149:MovieClip;
public var r137:MovieClip;
public var r150:MovieClip;
public var r151:MovieClip;
public var r152:MovieClip;
public var r153:MovieClip;
public var r155:MovieClip;
public var r157:MovieClip;
public var r154:MovieClip;
public var r156:MovieClip;
public var r158:MovieClip;
public var r160:MovieClip;
public var r161:MovieClip;
public var r163:MovieClip;
public var r164:MovieClip;
public var r165:MovieClip;
public var r166:MovieClip;
public var r168:MovieClip;
public var r162:MovieClip;
public var r167:MovieClip;
public var r159:MovieClip;
public var r170:MovieClip;
public var r171:MovieClip;
public var r173:MovieClip;
public var r174:MovieClip;
public var r175:MovieClip;
public var r176:MovieClip;
public var r172:MovieClip;
public var r169:MovieClip;
public var r1:MovieClip;
public var r2:MovieClip;
public var r3:MovieClip;
public var r4:MovieClip;
public var r5:MovieClip;
public var r7:MovieClip;
public var r8:MovieClip;
public var r6:MovieClip;
public var r9:MovieClip;
public var r12:MovieClip;
public var r14:MovieClip;
public var r16:MovieClip;
public var r19:MovieClip;
public var r15:MovieClip;
public var r18:MovieClip;
public var r13:MovieClip;
public var r10:MovieClip;
public var r11:MovieClip;
public var r21:MovieClip;
public var r23:MovieClip;
public var r25:MovieClip;
public var r27:MovieClip;
public var r28:MovieClip;
public var r24:MovieClip;
public var r20:MovieClip;
public var r26:MovieClip;
public var r29:MovieClip;
public var r22:MovieClip;
public var r30:MovieClip;
public var r31:MovieClip;
public var r33:MovieClip;
public var r34:MovieClip;
public var r36:MovieClip;
public var r37:MovieClip;
public var r38:MovieClip;
public var r39:MovieClip;
public var r35:MovieClip;
public var r17:MovieClip;
public var r32:MovieClip;
public var r40:MovieClip;
public var r41:MovieClip;
public var r42:MovieClip;
public var r43:MovieClip;
public var r44:MovieClip;
public var r45:MovieClip;
public var r46:MovieClip;
public var r47:MovieClip;
public var r48:MovieClip;
public var r49:MovieClip;
public var r50:MovieClip;
public var r52:MovieClip;
public var r53:MovieClip;
public var r54:MovieClip;
public var r57:MovieClip;
public var r51:MovieClip;
public var r59:MovieClip;
public var r55:MovieClip;
public var r56:MovieClip;
public var r58:MovieClip;
public var r60:MovieClip;
public var r61:MovieClip;
public var r62:MovieClip;
public var r63:MovieClip;
public var r64:MovieClip;
public var r65:MovieClip;
public var r66:MovieClip;
public var r67:MovieClip;
public var r68:MovieClip;
public var r69:MovieClip;
public var r70:MovieClip;
public var r71:MovieClip;
public var r72:MovieClip;
public var r73:MovieClip;
public var r74:MovieClip;
public var r75:MovieClip;
public var r76:MovieClip;
public var r77:MovieClip;
public var r78:MovieClip;
public var r79:MovieClip;
public var r80:MovieClip;
public var r81:MovieClip;
public var r82:MovieClip;
public var r83:MovieClip;
public var r84:MovieClip;
public var r85:MovieClip;
public var r86:MovieClip;
public var r87:MovieClip;
public var r88:MovieClip;
public var r89:MovieClip;
public var r90:MovieClip;
public var r92:MovieClip;
public var r93:MovieClip;
public var r94:MovieClip;
public var r95:MovieClip;
public var r97:MovieClip;
public var r91:MovieClip;
public var r99:MovieClip;
public var r96:MovieClip;
public var r98:MovieClip;
}
}//package
Section 164
//NavMenu (NavMenu)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class NavMenu extends MovieClip {
public var engine:GameEngine;
public var down:SimpleButton;
public var west:SimpleButton;
public var up:SimpleButton;
public var cover:MovieClip;
public var east:SimpleButton;
public function NavMenu(){
addFrameScript(0, frame1);
}
public function buttonFunc(_arg1){
var e = _arg1;
try {
switch (e.currentTarget){
case east:
var _local3 = root;
_local3["goEast"]();
break;
case west:
_local3 = root;
_local3["goWest"]();
break;
case down:
_local3 = root;
_local3["goDown"]();
break;
case up:
_local3 = root;
_local3["goUp"]();
break;
};
visible = false;
} catch(e) {
trace("NAV ERROR. Likely engine UNDEFINED", e);
};
}
function frame1(){
east.addEventListener(MouseEvent.CLICK, buttonFunc);
west.addEventListener(MouseEvent.CLICK, buttonFunc);
down.addEventListener(MouseEvent.CLICK, buttonFunc);
up.addEventListener(MouseEvent.CLICK, buttonFunc);
}
}
}//package
Section 165
//NewgroundsAPIAsset_big_popup_background (NewgroundsAPIAsset_big_popup_background)
package {
import flash.display.*;
public dynamic class NewgroundsAPIAsset_big_popup_background extends MovieClip {
public var tl:MovieClip;
public var br:MovieClip;
public var tr:MovieClip;
public var l:MovieClip;
public var shadow:MovieClip;
public var r:MovieClip;
public var b:MovieClip;
public var bl:MovieClip;
public var t:MovieClip;
public var c:MovieClip;
}
}//package
Section 166
//OptionsMenu (OptionsMenu)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class OptionsMenu extends MovieClip {
public var blood:TextField;
public var exit:SimpleButton;
public var tips:TextField;
public var donebutton:SimpleButton;
public var toggle_tips:SimpleButton;
public var toggle_blood:SimpleButton;
public var sfxslider:MovieClip;
public var bgmslider:MovieClip;
public var idle:TextField;
public var toggle_idle:SimpleButton;
public function OptionsMenu(){
addFrameScript(0, frame1);
}
public function toggleBlood(_arg1){
var sfx:*;
var e = _arg1;
parent["bloodsplatteroff"] = !(parent["bloodsplatteroff"]);
if (parent["bloodsplatteroff"]){
blood.text = "BLOOD SPLATTER : OFF";
try {
parent["ge"].removeBlood();
} catch(e) {
};
} else {
blood.text = "BLOOD SPLATTER : ON";
};
sfx = new _SFX_click();
sfx.play();
}
public function hideOptions(_arg1=null){
var _local2:*;
visible = false;
parent["ge"].paused = false;
_local2 = new _SFX_Close();
_local2.play();
disableButtons();
}
public function brighten(_arg1){
this[_arg1.currentTarget.name.substring(7)].alpha = 1;
}
public function toggleIdle(_arg1){
var _local2:*;
parent["idleanimsoff"] = !(parent["idleanimsoff"]);
if (parent["idleanimsoff"]){
idle.text = "IDLE ANIMATIONS : OFF";
} else {
idle.text = "IDLE ANIMATIONS : ON";
};
_local2 = new _SFX_click();
_local2.play();
}
function frame1(){
}
public function disableButtons(){
sfxslider.removeEventListener(MouseEvent.MOUSE_DOWN, clickedSlider);
bgmslider.removeEventListener(MouseEvent.MOUSE_DOWN, clickedSlider);
sfxslider.removeEventListener(MouseEvent.MOUSE_MOVE, clickedSlider);
bgmslider.removeEventListener(MouseEvent.MOUSE_MOVE, clickedSlider);
exit.removeEventListener(MouseEvent.CLICK, clickedExit);
donebutton.removeEventListener(MouseEvent.CLICK, hideOptions);
toggle_idle.removeEventListener(MouseEvent.CLICK, toggleIdle);
toggle_tips.removeEventListener(MouseEvent.CLICK, toggleTips);
toggle_blood.removeEventListener(MouseEvent.CLICK, toggleBlood);
toggle_idle.removeEventListener(MouseEvent.MOUSE_OVER, brighten);
toggle_idle.removeEventListener(MouseEvent.MOUSE_OUT, darken);
toggle_tips.removeEventListener(MouseEvent.MOUSE_OVER, brighten);
toggle_tips.removeEventListener(MouseEvent.MOUSE_OUT, darken);
toggle_blood.removeEventListener(MouseEvent.MOUSE_OVER, brighten);
toggle_blood.removeEventListener(MouseEvent.MOUSE_OUT, darken);
}
public function darken(_arg1){
this[_arg1.currentTarget.name.substring(7)].alpha = 0.7;
}
public function toggleTips(_arg1){
var _local2:*;
parent["tipsenabled"] = !(parent["tipsenabled"]);
if (parent["tipsenabled"]){
tips.text = "GAME TIPS : ON";
} else {
tips.text = "GAME TIPS : OFF";
};
parent["ge"].ui.tf_equiptip.visible = ((parent["tipsenabled"]) && (parent["ge"].victory));
_local2 = new _SFX_click();
_local2.play();
}
public function enableButtons(){
sfxslider.bar.width = (204 * parent["sfx_volume"]);
bgmslider.bar.width = (204 * parent["bgm_volume"]);
sfxslider.addEventListener(MouseEvent.MOUSE_DOWN, clickedSlider);
bgmslider.addEventListener(MouseEvent.MOUSE_DOWN, clickedSlider);
sfxslider.addEventListener(MouseEvent.MOUSE_MOVE, clickedSlider);
bgmslider.addEventListener(MouseEvent.MOUSE_MOVE, clickedSlider);
exit.addEventListener(MouseEvent.CLICK, clickedExit);
donebutton.addEventListener(MouseEvent.CLICK, hideOptions);
toggle_idle.addEventListener(MouseEvent.CLICK, toggleIdle);
toggle_tips.addEventListener(MouseEvent.CLICK, toggleTips);
toggle_blood.addEventListener(MouseEvent.CLICK, toggleBlood);
toggle_idle.addEventListener(MouseEvent.MOUSE_OVER, brighten);
toggle_idle.addEventListener(MouseEvent.MOUSE_OUT, darken);
toggle_tips.addEventListener(MouseEvent.MOUSE_OVER, brighten);
toggle_tips.addEventListener(MouseEvent.MOUSE_OUT, darken);
toggle_blood.addEventListener(MouseEvent.MOUSE_OVER, brighten);
toggle_blood.addEventListener(MouseEvent.MOUSE_OUT, darken);
idle.alpha = 0.7;
tips.alpha = 0.7;
blood.alpha = 0.7;
}
public function showOptions(_arg1=null){
var _local2:*;
visible = true;
parent["ge"].paused = true;
_local2 = new _SFX_Open();
_local2.play();
enableButtons();
}
public function clickedExit(_arg1){
disableButtons();
hideOptions();
var _local2 = parent;
_local2["exitToMain"]();
}
public function clickedSlider(_arg1){
var _local2:*;
var _local3:*;
if (_arg1.buttonDown == false){
return (false);
};
_local2 = _arg1.currentTarget;
_local2.bar.width = Math.max(1, Math.min(204, _local2.mouseX));
_local3 = (Math.round((_local2.bar.width - 1)) / 204);
if (_local2 == sfxslider){
var _local4 = parent;
_local4["setSFXVolume"](_local3);
_local4 = parent;
_local4["playSound"]("_SFX_Flick");
} else {
_local4 = parent;
_local4["setBGMVolume"](_local3);
};
}
}
}//package
Section 167
//SaveMenu (SaveMenu)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SaveMenu extends MovieClip {
public var cancelbutton:SimpleButton;
public var c0:Char;
public var c1:Char;
public var c3:Char;
public var c2:Char;
public var tf_explored:TextField;
public var loadbutton:SimpleButton;
public var savebutton:SimpleButton;
public function SaveMenu(){
addFrameScript(0, frame1);
}
public function copyCharDataObject(_arg1){
return (parent["copyCharDataObject"](_arg1));
}
function frame1(){
c0.body.stop();
c1.body.stop();
c2.body.stop();
c3.body.stop();
c0.feet.stop();
c1.feet.stop();
c2.feet.stop();
c3.feet.stop();
}
public function updateChars(){
var temp_so:*;
var chardata:Array;
var i:*;
var n:*;
try {
temp_so = SharedObject.getLocal("madness_retaliation");
chardata = [];
for (i in temp_so.data.player_chardata) {
chardata[i] = copyCharDataObject(temp_so.data.player_chardata[i]);
};
tf_explored.text = (Math.floor(((int(temp_so.data.exp_count) / parent["totalRooms"]) * 100)) + "%");
n = 0;
while (n < 4) {
this[("c" + n)].body.armor.gotoAndStop(chardata[n].armor);
this[("c" + n)].body.head.gotoAndStop(chardata[n].head);
this[("c" + n)].body.hand1.gotoAndStop(chardata[n].weapon1);
n = (n + 1);
};
c0.visible = true;
c1.visible = true;
c2.visible = true;
c3.visible = true;
loadbutton.visible = true;
} catch(e) {
trace("SAVE MENU updateChars() ERROR:", e);
c0.visible = false;
c1.visible = false;
c2.visible = false;
c3.visible = false;
loadbutton.visible = false;
};
}
}
}//package
Section 168
//SCREEN_20FrameDelay (SCREEN_20FrameDelay)
package {
import flash.display.*;
public dynamic class SCREEN_20FrameDelay extends MovieClip {
public function SCREEN_20FrameDelay(){
addFrameScript(19, frame20, 39, frame40);
}
function frame20(){
GameEngine(parent).paused = true;
}
function frame40(){
stop();
GameEngine(parent).paused = false;
MovieClip(parent).removeChild(this);
}
}
}//package
Section 169
//SCREEN_AccessGranted (SCREEN_AccessGranted)
package {
import flash.display.*;
public dynamic class SCREEN_AccessGranted extends MovieClip {
public function SCREEN_AccessGranted(){
addFrameScript(22, frame23);
}
function frame23(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 170
//SCREEN_ClownBomb (SCREEN_ClownBomb)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SCREEN_ClownBomb extends MovieClip {
public function SCREEN_ClownBomb(){
addFrameScript(14, frame15, 15, frame16, 17, frame18, 19, frame20, 34, frame35);
}
function frame18(){
MovieClip(parent.parent).x = -5;
}
function frame15(){
try {
GameEngine(parent).clownBomb(this["tgt_char"].clown_hits);
GameEngine(parent).paused = true;
} catch(e) {
};
}
function frame16(){
MovieClip(parent.parent).x = 5;
}
function frame20(){
MovieClip(parent.parent).x = 0;
}
function frame35(){
stop();
GameEngine(parent).paused = false;
MovieClip(parent).removeChild(this);
}
}
}//package
Section 171
//SCREEN_ClownFlashbang (SCREEN_ClownFlashbang)
package {
import flash.display.*;
public dynamic class SCREEN_ClownFlashbang extends MovieClip {
public function SCREEN_ClownFlashbang(){
addFrameScript(14, frame15, 15, frame16, 17, frame18, 19, frame20, 34, frame35);
}
function frame18(){
MovieClip(parent.parent).x = -5;
}
function frame15(){
try {
GameEngine(parent).clownStun();
} catch(e) {
};
}
function frame16(){
MovieClip(parent.parent).x = 5;
}
function frame20(){
MovieClip(parent.parent).x = 0;
}
function frame35(){
stop();
GameEngine(parent).paused = false;
MovieClip(parent).removeChild(this);
}
}
}//package
Section 172
//SCREEN_ClownZombify (SCREEN_ClownZombify)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SCREEN_ClownZombify extends MovieClip {
public function SCREEN_ClownZombify(){
addFrameScript(9, frame10, 18, frame19, 20, frame21, 22, frame23, 49, frame50);
}
function frame10(){
try {
GameEngine(parent).clownZombify(this["tgt_char"].clown_hits);
} catch(e) {
};
}
function frame19(){
MovieClip(parent.parent).x = 5;
}
function frame23(){
MovieClip(parent.parent).x = 0;
}
function frame21(){
MovieClip(parent.parent).x = -5;
}
function frame50(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 173
//SCREEN_darkness (SCREEN_darkness)
package {
import flash.display.*;
public dynamic class SCREEN_darkness extends MovieClip {
public function SCREEN_darkness(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
mouseEnabled = false;
}
}
}//package
Section 174
//SCREEN_Ending (SCREEN_Ending)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SCREEN_Ending extends MovieClip {
public var testfx;
public var b0:MovieClip;
public var b2:MovieClip;
public var b1:MovieClip;
public var b3:MovieClip;
public var w1:MovieClip;
public var w2:MovieClip;
public var h1:MovieClip;
public var h2:MovieClip;
public var h0:MovieClip;
public var h3:MovieClip;
public function SCREEN_Ending(){
addFrameScript(59, frame60, 153, frame154, 196, frame197);
}
function frame154(){
h0.gotoAndStop(parent["player_chardata"][0].head);
h1.gotoAndStop(parent["player_chardata"][1].head);
h2.gotoAndStop(parent["player_chardata"][2].head);
h3.gotoAndStop(parent["player_chardata"][3].head);
b0.gotoAndStop(parent["player_chardata"][0].armor);
b1.gotoAndStop(parent["player_chardata"][1].armor);
b2.gotoAndStop(parent["player_chardata"][2].armor);
b3.gotoAndStop(parent["player_chardata"][3].armor);
w1.gotoAndStop(parent["player_chardata"][1].weapon1);
w2.gotoAndStop(parent["player_chardata"][2].weapon2);
}
function frame197(){
stop();
try {
var _local2 = parent;
_local2["unlockMedal"]("Completion");
} catch(e) {
};
testfx = new SCREEN_Ending1();
parent.addChild(testfx);
testfx.x = 320;
testfx.y = 240;
MovieClip(parent).removeChild(this);
}
function frame60(){
var _local1 = parent;
_local1["stopMusic"]();
}
}
}//package
Section 175
//SCREEN_Ending1 (SCREEN_Ending1)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SCREEN_Ending1 extends MovieClip {
public var c0:Char;
public var c1:Char;
public var c3:Char;
public var c2:Char;
public var e1:Char;
public var fx;
public var flash:MovieClip;
public function SCREEN_Ending1(){
addFrameScript(0, frame1, 51, frame52, 59, frame60, 60, frame61, 71, frame72, 79, frame80, 89, frame90, 91, frame92, 99, frame100, 111, frame112, 119, frame120, 124, frame125, 129, frame130, 131, frame132, 139, frame140, 144, frame145, 151, frame152, 159, frame160, 171, frame172, 179, frame180, 201, frame202);
}
function frame152(){
c3.body.gotoAndPlay("shooting_burst");
}
function frame72(){
c3.body.gotoAndPlay("shooting_burst");
}
function frame160(){
e1.body.gotoAndPlay("death_burst");
c2.body.gotoAndPlay("shooting_burst");
}
function frame80(){
c2.body.gotoAndPlay("shooting_burst");
}
function frame172(){
c3.body.gotoAndPlay("shooting_burst");
}
function frame90(){
c1.body.gotoAndPlay("aiming");
c1.feet.play();
}
function frame1(){
try {
var _local2 = parent;
_local2["checkCollection"]();
} catch(e) {
};
c2.head = parent["player_chardata"][2].head;
c2.armor = parent["player_chardata"][2].armor;
c2.weapon1 = Math.max(parent["player_chardata"][2].weapon1, ITEM.oINGRAM);
trace(parent["player_chardata"]);
c0.head = parent["player_chardata"][0].head;
c0.armor = parent["player_chardata"][0].armor;
c0.weapon1 = Math.max(parent["player_chardata"][0].weapon1, ITEM.oDEAGLE);
c1.head = parent["player_chardata"][1].head;
c1.armor = parent["player_chardata"][1].armor;
c1.weapon1 = Math.max(parent["player_chardata"][1].weapon1, ITEM.oDEAGLE);
c3.head = parent["player_chardata"][3].head;
c3.armor = parent["player_chardata"][3].armor;
c3.weapon1 = Math.max(parent["player_chardata"][3].weapon1, ITEM.oINGRAM);
}
function frame100(){
e1.head = ITEM.ATP;
e1.armor = ITEM.ATP;
e1.weapon1 = ITEM.oAUG;
c2.body.gotoAndPlay("shooting_burst");
c0.body.gotoAndPlay("shooting_triple");
}
function frame92(){
c3.body.gotoAndPlay("shooting_burst");
}
function frame202(){
stop();
fx = new SCREEN_Ending2();
fx.x = 320;
fx.y = 240;
parent.addChild(fx);
MovieClip(parent).removeChild(this);
}
function frame180(){
c2.body.gotoAndPlay("shooting_burst");
}
function frame112(){
c3.body.gotoAndPlay("shooting_burst");
}
function frame125(){
e1.body.gotoAndPlay("shooting_burst");
e1.feet.stop();
}
function frame120(){
c2.body.gotoAndPlay("shooting_burst");
}
function frame130(){
c1.body.gotoAndPlay("shooting_triple");
}
function frame132(){
c3.body.gotoAndPlay("shooting_burst");
}
function frame52(){
c3.body.gotoAndPlay("shooting_burst");
}
function frame145(){
e1.body.gotoAndPlay("shooting_burst");
c1.body.gotoAndPlay("standing");
}
function frame61(){
c1.body.gotoAndPlay("shooting_triple");
c1.feet.stop();
}
function frame60(){
c2.body.gotoAndPlay("shooting_burst");
}
function frame140(){
c2.body.gotoAndPlay("shooting_burst");
}
}
}//package
Section 176
//SCREEN_Ending2 (SCREEN_Ending2)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SCREEN_Ending2 extends MovieClip {
public var testfx;
public var c0:MovieClip;
public var c1:MovieClip;
public var c3:MovieClip;
public var c2:MovieClip;
public function SCREEN_Ending2(){
addFrameScript(73, frame74, 148, frame149);
}
function frame74(){
c0.body.head.gotoAndStop(parent["player_chardata"][0].head);
c0.body.armor.gotoAndStop(parent["player_chardata"][0].armor);
c0.body.hand1.gotoAndStop(parent["player_chardata"][0].weapon1);
c1.body.head.gotoAndStop(parent["player_chardata"][1].head);
c1.body.armor.gotoAndStop(parent["player_chardata"][1].armor);
c1.body.hand1.gotoAndStop(parent["player_chardata"][1].weapon1);
c2.body.head.gotoAndStop(parent["player_chardata"][2].head);
c2.body.armor.gotoAndStop(parent["player_chardata"][2].armor);
c2.body.hand1.gotoAndStop(parent["player_chardata"][2].weapon1);
c3.body.head.gotoAndStop(parent["player_chardata"][3].head);
c3.body.armor.gotoAndStop(parent["player_chardata"][3].armor);
c3.body.hand1.gotoAndStop(parent["player_chardata"][3].weapon1);
}
function frame149(){
stop();
testfx = new SCREEN_Ending3();
parent.addChild(testfx);
testfx.x = 320;
testfx.y = 240;
MovieClip(parent).removeChild(this);
}
}
}//package
Section 177
//SCREEN_Ending3 (SCREEN_Ending3)
package {
import flash.display.*;
public dynamic class SCREEN_Ending3 extends MovieClip {
public function SCREEN_Ending3(){
addFrameScript(0, frame1, 1191, frame1192);
}
function frame1192(){
stop();
var _local1 = parent;
_local1["exitToMain"]();
MovieClip(parent).removeChild(this);
}
function frame1(){
var _local1 = parent;
_local1["stopMusic"]();
}
}
}//package
Section 178
//SCREEN_ExitToMain (SCREEN_ExitToMain)
package {
import flash.display.*;
public dynamic class SCREEN_ExitToMain extends MovieClip {
public function SCREEN_ExitToMain(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
var _local1 = parent;
_local1["enableMainMenu"]();
}
function frame30(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 179
//SCREEN_FinalBoss (SCREEN_FinalBoss)
package {
import flash.display.*;
public dynamic class SCREEN_FinalBoss extends MovieClip {
public function SCREEN_FinalBoss(){
addFrameScript(29, frame30, 59, frame60);
}
function frame30(){
}
function frame60(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 180
//SCREEN_Flash (SCREEN_Flash)
package {
import flash.display.*;
public dynamic class SCREEN_Flash extends MovieClip {
public function SCREEN_Flash(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
MovieClip(parent).visible = true;
}
function frame30(){
stop();
try {
GameEngine(parent).flash_screen = null;
} catch(e) {
};
MovieClip(parent).removeChild(this);
}
}
}//package
Section 181
//SCREEN_FlashSimple (SCREEN_FlashSimple)
package {
import flash.display.*;
public dynamic class SCREEN_FlashSimple extends MovieClip {
public function SCREEN_FlashSimple(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 182
//SCREEN_GetJHPAmmo (SCREEN_GetJHPAmmo)
package {
import flash.display.*;
public dynamic class SCREEN_GetJHPAmmo extends MovieClip {
public function SCREEN_GetJHPAmmo(){
addFrameScript(0, frame1, 120, frame121);
}
function frame1(){
}
function frame121(){
stop();
try {
var _local2 = parent;
_local2["unlockMedal"]("Ammunition");
} catch(e) {
};
MovieClip(parent).removeChild(this);
}
}
}//package
Section 183
//SCREEN_GetScanner (SCREEN_GetScanner)
package {
import flash.display.*;
public dynamic class SCREEN_GetScanner extends MovieClip {
public function SCREEN_GetScanner(){
addFrameScript(139, frame140);
}
function frame140(){
stop();
try {
var _local2 = parent;
_local2["unlockMedal"]("Information");
} catch(e) {
};
MovieClip(parent).removeChild(this);
}
}
}//package
Section 184
//SCREEN_GetSupermedkit (SCREEN_GetSupermedkit)
package {
import flash.display.*;
public dynamic class SCREEN_GetSupermedkit extends MovieClip {
public var stimpack:MovieClip;
public function SCREEN_GetSupermedkit(){
addFrameScript(120, frame121);
}
function frame121(){
stop();
try {
var _local2 = parent;
_local2["unlockMedal"]("Medication");
} catch(e) {
};
MovieClip(parent).removeChild(this);
}
}
}//package
Section 185
//SCREEN_JesusEnter (SCREEN_JesusEnter)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SCREEN_JesusEnter extends MovieClip {
public function SCREEN_JesusEnter(){
addFrameScript(154, frame155);
}
function frame155(){
stop();
GameEngine(parent).paused = false;
try {
this["char"].visible = true;
} catch(e) {
};
MovieClip(parent).removeChild(this);
}
}
}//package
Section 186
//SCREEN_JesusExit (SCREEN_JesusExit)
package {
import flash.display.*;
public dynamic class SCREEN_JesusExit extends MovieClip {
public function SCREEN_JesusExit(){
addFrameScript(0, frame1, 19, frame20, 199, frame200, 209, frame210);
}
function frame200(){
GameEngine(parent).updateItemUI();
}
function frame210(){
stop();
GameEngine(parent).paused = false;
GameEngine(parent).checkForWin();
try {
GameEngine(parent).unlockMedal("Redemption");
} catch(e) {
};
MovieClip(parent).removeChild(this);
}
function frame1(){
try {
var _local2 = parent.parent;
_local2["stopMusic"]();
} catch(e) {
trace("SCREEN_jesusExit > stopMusic", e);
};
}
function frame20(){
GameEngine(parent).paused = true;
}
}
}//package
Section 187
//SCREEN_JesusTeleport (SCREEN_JesusTeleport)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SCREEN_JesusTeleport extends MovieClip {
public function SCREEN_JesusTeleport(){
addFrameScript(36, frame37);
}
function frame37(){
stop();
GameEngine(parent).paused = false;
try {
this["char"].visible = true;
} catch(e) {
};
MovieClip(parent).removeChild(this);
}
}
}//package
Section 188
//SCREEN_Lost (SCREEN_Lost)
package {
import flash.display.*;
import flash.events.*;
public dynamic class SCREEN_Lost extends MovieClip {
public var btn:SimpleButton;
public function SCREEN_Lost(){
addFrameScript(259, frame260, 264, frame265);
}
function frame265(){
stop();
var _local1 = MovieClip(parent.parent);
_local1["loadLastRoom"]();
MovieClip(parent).removeChild(this);
}
public function endIt(_arg1){
btn.removeEventListener(MouseEvent.CLICK, endIt);
gotoAndStop(265);
}
function frame260(){
stop();
btn.addEventListener(MouseEvent.CLICK, endIt);
}
}
}//package
Section 189
//SCREEN_Opening (SCREEN_Opening)
package {
import flash.display.*;
public dynamic class SCREEN_Opening extends MovieClip {
public function SCREEN_Opening(){
addFrameScript(0, frame1, 687, frame688);
}
function frame688(){
stop();
var _local1 = parent;
_local1["startGame2"]();
MovieClip(parent).removeChild(this);
}
function frame1(){
var _local1 = parent;
_local1["stopMusic"]();
}
}
}//package
Section 190
//SCREEN_Opening2 (SCREEN_Opening2)
package {
import flash.display.*;
public dynamic class SCREEN_Opening2 extends MovieClip {
public function SCREEN_Opening2(){
addFrameScript(130, frame131);
}
function frame131(){
stop();
var _local1 = parent;
_local1["loadFirstRoom"]();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 191
//SCREEN_Reveal (SCREEN_Reveal)
package {
import flash.display.*;
public dynamic class SCREEN_Reveal extends MovieClip {
public function SCREEN_Reveal(){
addFrameScript(0, frame1, 15, frame16);
}
function frame16(){
stop();
MovieClip(parent).removeChild(this);
}
function frame1(){
MovieClip(parent).visible = true;
}
}
}//package
Section 192
//SCREEN_RevealVert (SCREEN_RevealVert)
package {
import flash.display.*;
public dynamic class SCREEN_RevealVert extends MovieClip {
public function SCREEN_RevealVert(){
addFrameScript(0, frame1, 15, frame16);
}
function frame16(){
stop();
MovieClip(parent).removeChild(this);
}
function frame1(){
MovieClip(parent).visible = true;
}
}
}//package
Section 193
//SCREEN_RoomClear (SCREEN_RoomClear)
package {
import flash.display.*;
public dynamic class SCREEN_RoomClear extends MovieClip {
public function SCREEN_RoomClear(){
addFrameScript(44, frame45);
}
function frame45(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 194
//SCREEN_Smoke (SCREEN_Smoke)
package {
import flash.display.*;
public dynamic class SCREEN_Smoke extends MovieClip {
public function SCREEN_Smoke(){
addFrameScript(0, frame1, 29, frame30, 39, frame40);
}
function frame1(){
MovieClip(parent).visible = true;
}
function frame30(){
stop();
}
function frame40(){
stop();
try {
GameEngine(parent).grenade_screen = null;
} catch(e) {
};
MovieClip(parent).removeChild(this);
}
}
}//package
Section 195
//SCREEN_Train (SCREEN_Train)
package {
import flash.display.*;
public dynamic class SCREEN_Train extends MovieClip {
public function SCREEN_Train(){
addFrameScript(27, frame28, 69, frame70, 129, frame130);
}
function frame70(){
GameEngine(parent).trainEffect(this);
}
function frame28(){
GameEngine(parent).paused = true;
}
function frame130(){
stop();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 196
//SCREEN_TrickyEnter (SCREEN_TrickyEnter)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SCREEN_TrickyEnter extends MovieClip {
public function SCREEN_TrickyEnter(){
addFrameScript(144, frame145);
}
function frame145(){
stop();
GameEngine(parent).paused = false;
try {
this["char"].visible = true;
} catch(e) {
};
MovieClip(parent).removeChild(this);
}
}
}//package
Section 197
//SCREEN_TrickyExit (SCREEN_TrickyExit)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.filters.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SCREEN_TrickyExit extends MovieClip {
public function SCREEN_TrickyExit(){
addFrameScript(0, frame1, 229, frame230, 245, frame246);
}
function frame1(){
parent.parent["nav"].visible = false;
GameEngine(parent).paused = true;
try {
var _local2 = parent.parent;
_local2["stopMusic"]();
} catch(e) {
trace("SCREEN_jesusExit > stopMusic", e);
};
}
function frame230(){
try {
parent.parent["pid"] = true;
GameEngine(parent).paused = false;
parent.parent["nav"].visible = false;
GameEngine(parent).updateItemUI();
} catch(e) {
};
}
function frame246(){
stop();
try {
GameEngine(parent).unlockMedal("Consternation");
GameEngine(parent).checkForWin();
} catch(e) {
};
MovieClip(parent).removeChild(this);
}
}
}//package
Section 198
//SCREEN_Wipe (SCREEN_Wipe)
package {
import flash.display.*;
public dynamic class SCREEN_Wipe extends MovieClip {
public function SCREEN_Wipe(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
MovieClip(parent).visible = false;
var _local1 = parent.parent;
_local1["nextRoom"]();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 199
//SCREEN_WipeVert (SCREEN_WipeVert)
package {
import flash.display.*;
public dynamic class SCREEN_WipeVert extends MovieClip {
public function SCREEN_WipeVert(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
MovieClip(parent).visible = false;
var _local1 = parent.parent;
_local1["nextRoom"]();
MovieClip(parent).removeChild(this);
}
}
}//package
Section 200
//SCREEN_ZombieDrop (SCREEN_ZombieDrop)
package {
import flash.display.*;
public dynamic class SCREEN_ZombieDrop extends MovieClip {
public function SCREEN_ZombieDrop(){
addFrameScript(89, frame90, 154, frame155);
}
function frame155(){
stop();
GameEngine(parent).paused = false;
GameEngine(parent).startPlayerTurn();
MovieClip(parent).removeChild(this);
}
function frame90(){
GameEngine(parent).key3RoomBattleStart();
}
}
}//package
Section 201
//SelectedArrow (SelectedArrow)
package {
import flash.display.*;
public dynamic class SelectedArrow extends MovieClip {
public var gfx:MovieClip;
}
}//package
Section 202
//TargetReticle (TargetReticle)
package {
import flash.display.*;
import flash.text.*;
public dynamic class TargetReticle extends MovieClip {
public var tf:TextField;
public function TargetReticle(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
tf.mouseEnabled = false;
}
}
}//package
Section 203
//Tile (Tile)
package {
import flash.display.*;
public dynamic class Tile extends MovieClip {
}
}//package
Section 204
//TileLight (TileLight)
package {
import flash.display.*;
public dynamic class TileLight extends MovieClip {
}
}//package
Section 205
//UI (UI)
package {
import flash.display.*;
import flash.text.*;
public dynamic class UI extends MovieClip {
public var endturn:SimpleButton;
public var tf_medkit:TextField;
public var b2:MovieClip;
public var saveload:SimpleButton;
public var b1:MovieClip;
public var b3:MovieClip;
public var tf_quality:TextField;
public var ap:TextField;
public var tfbg:MovieClip;
public var b4:MovieClip;
public var halo:SimpleButton;
public var tf_movetip:TextField;
public var tf_smoke:TextField;
public var smoke:SimpleButton;
public var tf_pid:TextField;
public var flashbang:SimpleButton;
public var tf_weapon:TextField;
public var medkit:SimpleButton;
public var btn_togglequality:SimpleButton;
public var tf_equiptip:TextField;
public var w1:MovieClip;
public var tf:TextField;
public var redhalo:MovieClip;
public var options:SimpleButton;
public var w2:MovieClip;
public var tf_flashbang:TextField;
public var supermedkit:SimpleButton;
public var pid:SimpleButton;
public var keycard:MovieClip;
public function UI(){
addFrameScript(0, frame1);
}
function frame1(){
tf_medkit.mouseEnabled = false;
tf_smoke.mouseEnabled = false;
tf_flashbang.mouseEnabled = false;
tf_pid.mouseEnabled = false;
}
}
}//package
Section 206
//Util (Util)
package {
import flash.display.*;
import flash.filters.*;
import flash.geom.*;
public class Util {
public static var matrix_redglow:Array = new Array();
public static var matrix_dark:Array = new Array();
public static var matrix_normal:Array = new Array();
public static var matrix_red:Array = new Array();
public static function getBitmapFilter():BitmapFilter{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Number;
_local1 = 0xFF0000;
_local2 = 1;
_local3 = 2;
_local4 = 2;
_local5 = 5;
_local6 = false;
_local7 = false;
_local8 = BitmapFilterQuality.HIGH;
return (new GlowFilter(_local1, _local2, _local3, _local4, _local5, _local8, _local6, _local7));
}
public static function getDistanceObjs(_arg1, _arg2){
return (getDistance(_arg1.x, _arg1.y, _arg2.x, _arg2.y));
}
public static function getDistance(_arg1, _arg2, _arg3, _arg4){
var _local5:Point;
var _local6:Point;
_local5 = new Point(_arg1, _arg2);
_local6 = new Point(_arg3, _arg4);
return (Point.distance(_local5, _local6));
}
public static function getObjWithLowerProp(_arg1, _arg2, _arg3){
var _local4:*;
_local4 = _arg1;
if (_arg1[_arg3] != null){
if (_arg2[_arg3] != null){
if (_arg1[_arg3] > _arg2[_arg3]){
_local4 = _arg2;
};
};
} else {
_local4 = _arg2;
};
return (_local4);
}
public static function numDirToCompass(_arg1:uint):String{
switch (_arg1){
case 1:
return ("SW");
case 2:
return ("S");
case 3:
return ("SE");
case 4:
return ("W");
case 5:
return ("X");
case 6:
return ("E");
case 7:
return ("NW");
case 8:
return ("N");
case 9:
return ("NE");
};
return ("X");
}
public static function addFilterToMC(_arg1:DisplayObject, _arg2:Array):void{
var _local3:*;
var _local4:ColorMatrixFilter;
var _local5:Array;
if (_arg2 == null){
_local3 = matrix_normal;
} else {
_local3 = _arg2;
};
_local4 = new ColorMatrixFilter(_local3);
_local5 = new Array();
_local5.push(_local4);
_arg1.filters = _local5;
}
public static function getObjWithHigherProp(_arg1, _arg2, _arg3){
var _local4:*;
_local4 = _arg1;
if (_arg1[_arg3] != null){
if (_arg2[_arg3] != null){
if (_arg1[_arg3] < _arg2[_arg3]){
_local4 = _arg2;
};
};
} else {
_local4 = _arg2;
};
return (_local4);
}
public static function getSign(_arg1:Number):int{
if (_arg1 == 0){
return (0);
};
return ((_arg1 / Math.abs(_arg1)));
}
public static function getRotation(_arg1, _arg2):Number{
var _local3:Number;
var _local4:Number;
_local3 = Math.atan2(_arg2, _arg1);
_local4 = (360 * (_local3 / (2 * Math.PI)));
return (_local4);
}
public static function radToDeg(_arg1){
return (((_arg1 * 180) / Math.PI));
}
public static function addGlowFilterToMC(_arg1:DisplayObject):void{
var _local2:BitmapFilter;
var _local3:Array;
_local2 = getBitmapFilter();
_local3 = new Array();
_local3.push(_local2);
_arg1.filters = _local3;
}
public static function getAngleObjs(_arg1, _arg2):Number{
return (getAngle((_arg1.x - _arg2.x), (_arg1.y - _arg2.y)));
}
public static function degToRad(_arg1){
return (((_arg1 * Math.PI) / 180));
}
public static function removeFilterFromMC(_arg1:DisplayObject):void{
var _local2:Array;
_local2 = new Array();
_arg1.filters = _local2;
}
public static function getAngle(_arg1, _arg2):Number{
var _local3:Number;
_local3 = Math.atan2(_arg2, _arg1);
return (_local3);
}
matrix_normal = matrix_normal.concat([1, 0, 0, 0, 0]);
matrix_normal = matrix_normal.concat([0, 1, 0, 0, 0]);
matrix_normal = matrix_normal.concat([0, 0, 1, 0, 0]);
matrix_normal = matrix_normal.concat([0, 0, 0, 1, 0]);
matrix_redglow = matrix_redglow.concat([1.1, 0, 0, 0, 100]);
matrix_redglow = matrix_redglow.concat([0, 0.9, 0, 0, 0]);
matrix_redglow = matrix_redglow.concat([0, 0, 0.9, 0, 0]);
matrix_redglow = matrix_redglow.concat([0, 0, 0, 1, 0]);
matrix_red = matrix_red.concat([1, 0, 0, 0, 155]);
matrix_red = matrix_red.concat([0, 0, 0, 0, 0]);
matrix_red = matrix_red.concat([0, 0, 0, 0, 0]);
matrix_red = matrix_red.concat([0, 0, 0, 1, 0]);
matrix_dark = matrix_dark.concat([0.5, 0, 0, 0, 0]);
matrix_dark = matrix_dark.concat([0, 0.5, 0, 0, 0]);
matrix_dark = matrix_dark.concat([0, 0, 0.5, 0, 0]);
matrix_dark = matrix_dark.concat([0, 0, 0, 1, 0]);
}
}//package