Combined Code
movieClip 3 {
}
movieClip 5 {
}
movieClip 6 leader_stat_bar_vertical {
}
movieClip 8 leader_icon_ceasefire {
frame 1 {
stop();
}
}
movieClip 12 {
}
movieClip 14 graph_001 {
}
movieClip 15 tank001 {
}
movieClip 19 tankNoShade_shadow {
}
movieClip 54 tank_noshade {
}
movieClip 55 suicide_bomber_tint {
}
movieClip 272 suicide_bomber {
}
movieClip 275 {
}
movieClip 278 {
}
movieClip 279 space_rocket {
}
movieClip 496 soldier {
}
movieClip 545 ship_plane {
}
movieClip 546 plane001 {
}
movieClip 547 plane001_shadow {
}
movieClip 548 shadow001 {
}
movieClip 549 emptyMC {
}
movieClip 551 {
}
movieClip 553 {
}
movieClip 556 rocket {
frame 1 {
stop();
}
}
movieClip 558 redDot {
}
movieClip 607 plane002_tint {
}
movieClip 656 plane002 {
}
movieClip 657 plane002_shadow {
}
movieClip 658 marine {
}
movieClip 695 antiAir_mus {
frame 1 {
stop();
}
}
movieClip 732 antiAir_jew {
frame 1 {
stop();
}
}
movieClip 769 {
frame 1 {
stop();
}
}
movieClip 806 antiAir_chr {
frame 1 {
stop();
}
}
movieClip 843 antiAir_bhu {
frame 1 {
stop();
}
}
movieClip 844 buildings_antiAir {
}
movieClip 847 {
}
movieClip 854 carrier_MC {
}
movieClip 855 aircraftCarrier {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 857 {
}
movieClip 862 {
}
movieClip 864 {
}
movieClip 866 {
}
movieClip 870 {
}
movieClip 871 gameloader_mc {
frame 1 {
stop();
}
}
movieClip 877 {
}
movieClip 5257 __Packages.SpaceRocket_smoke {
#initclip
if (!SpaceRocket_smoke) {
_global.SpaceRocket_smoke = function () {
super();
this.groundY = this._y;
this.trailArr = new Array();
this.interval_ID = _global.setInterval(this, 'removeTrail', 8000);
};
_global.SpaceRocket_smoke extends MovieClip;
var v1 = _global.SpaceRocket_smoke.prototype;
v1.onEnterFrame = function () {
if (this.offSet_toSpawn >= this.offSet_toSpawn_max) {
this.addTrailElement();
++this.trailCount;
} else {
++this.offSet_toSpawn;
}
this.updateTrail();
};
v1.addTrailElement = function () {
var v2 = this._parent.attachMovie('spaceRocket_trail_element', 'trail' + this.trailCount, this._parent.getNextHighestDepth());
v2._x = this._x;
v2.rootX = v2._x;
v2._y = this._y;
v2.rootY = v2._y;
v2.groundY = this.groundY;
v2.spawn();
this.trailArr.push(v2);
};
v1.updateTrail = function () {
for (var i in this.trailArr) {
this.trailArr[i].setStep(this._x, this._y);
}
};
v1.removeTrail = function () {
_global.clearInterval(this.interval_ID);
this.onEnterFrame = undefined;
for (var i in this.trailArr) {
this.trailArr[i].removeMovieClip();
}
};
ASSetPropFlags(v1, null, 1);
v1.trailCount = 0;
v1.trailCount_max = 50;
v1.offSet_toSpawn = 0;
v1.offSet_toSpawn_max = 1;
}
#endinitclip
}
movieClip 5258 __Packages.Cloud {
#initclip
if (!Cloud) {
_global.Cloud = function () {
super();
this._startLoc = new Object();
this._pivotLoc = new Object();
this._x = 0;
this._y = 0;
};
_global.Cloud extends MovieClip;
var v1 = _global.Cloud.prototype;
v1.__set__angleChange = function (_num) {
this._angleChange = _num / 10;
return this.__get__angleChange();
};
v1.__get__angleChange = function () {
return this._angleChange;
};
v1.__set__startLoc = function (_obj) {
this._startLoc._x = _obj._x;
this._pivotLoc._x = this._startLoc._x;
this._startLoc._y = _obj._y;
this._pivotLoc._y = this._startLoc._y;
return this.__get__startLoc();
};
v1.initialLoc = function () {
this._x = this._startLoc._x;
this._y = this._startLoc._y;
};
v1.__get__startLoc = function () {
return this._startLoc;
};
v1.frame_step = function () {
this.pivot_step();
var v2 = this._angle * (Math.PI / 180);
this._x = this._pivotLoc._x + this.xRadius * Math.cos(v2);
this._y = this._pivotLoc._y + this.yRadius * Math.sin(v2);
this._angle += this.angleChange;
this._angle %= 360;
};
v1.pivot_step = function () {
var v2 = this._pivotAngle * (Math.PI / 180);
this._pivotLoc._x = this._startLoc._x + 40 * Math.cos(v2);
this._pivotLoc._y = this._startLoc._y + 70 * Math.sin(v2);
this._pivotAngle += 0.1;
this._pivotAngle %= 360;
};
v1.__get__dist = function () {
return Math.sqrt((this._x - this._startLoc._x) * (this._x - this._startLoc._x) + (this._y - this._startLoc._y) * (this._y - this._startLoc._y));
};
v1.__set__curPosByObj = function (_obj) {
this._x = _obj._x;
this._y = _obj._y;
return this.__get__curPosByObj();
};
v1.__set__frameLocOffset = function (_obj) {
this._frameLocOffset = _obj;
return this.__get__frameLocOffset();
};
v1.addProperty('curPosByObj', function () {}, v1.__set__curPosByObj);
v1.addProperty('startLoc', v1.__get__startLoc, v1.__set__startLoc);
v1.addProperty('frameLocOffset', function () {}, v1.__set__frameLocOffset);
v1.addProperty('angleChange', v1.__get__angleChange, v1.__set__angleChange);
v1.addProperty('dist', v1.__get__dist, function () {});
ASSetPropFlags(v1, null, 1);
v1._angle = 0;
v1.xRadius = 20;
v1.yRadius = 20;
v1._angleChange = 1;
v1._pivotAngle = 0;
v1.completeCloud_angle = 0;
}
#endinitclip
}
movieClip 5259 __Packages.BioCloud {
#initclip
if (!BioCloud) {
_global.BioCloud = function () {
super();
this.maxFloat = new Object();
this.maxFloat._x = 0;
this.maxFloat._y = 0;
};
_global.BioCloud extends MovieClip;
var v1 = _global.BioCloud.prototype;
v1.spawn = function () {
this._x = _global.model.tools.randRange(-25, 25);
this._y = _global.model.tools.randRange(-20, 0);
this._alpha = _global.model.tools.randRange(30, 50);
this._yscale = _global.model.tools.randRange(40, 80);
this._xscale = this._yscale;
this.alpha_decay = _global.model.tools.randRange(1, 3);
this.size_decay = _global.model.tools.randRange(2, 15);
this.ySpeed = 2;
this.cur_horizontalFloat_offset = _global.model.tools.randRange(this.horizontalFloat_max * -1, this.horizontalFloat_max);
this.cur_horizontalFloat_multiplier = 1;
};
v1.onEnterFrame = function () {
if (this._alpha <= 0) {
this.spawn();
} else {
this._x += 0.3 * this.cur_horizontalFloat_multiplier;
--this.cur_horizontalFloat_offset;
if (this.cur_horizontalFloat_offset <= 0) {
this.cur_horizontalFloat_multiplier *= -1;
this.cur_horizontalFloat_offset = this.horizontalFloat_max;
}
this._y -= this.ySpeed;
this._alpha -= this.alpha_decay;
this._xscale += this.size_decay;
this._yscale += this.size_decay;
}
};
ASSetPropFlags(v1, null, 1);
v1.horizontalFloat_max = 10;
}
#endinitclip
}
movieClip 5260 __Packages.SpaceRocket_trail_element {
#initclip
if (!SpaceRocket_trail_element) {
_global.SpaceRocket_trail_element = function () {
super();
};
_global.SpaceRocket_trail_element extends MovieClip;
var v1 = _global.SpaceRocket_trail_element.prototype;
v1.spawn = function () {
this._x = _global.model.tools.randRange(this.rootX - 2, this.rootX + 2);
this._y = _global.model.tools.randRange(this.rootY - 5, this.rootY + 5);
this._yscale = 100;
this._xscale = 100;
this._alpha = _global.model.tools.randRange(50, 60);
this.xAdd = _global.model.tools.randRange(-1, 1);
this.yAdd = _global.model.tools.randRange(1, 2);
this.xAdd_decay = 0.2;
this.sizeDecay_decay = 0.2;
this.sizeDecay = _global.model.tools.randRange(3, 15);
this.alphaDecay = _global.model.tools.randRange(2, 4);
};
v1.setStep = function (_rootX, _rootY) {
this._x += this.xAdd;
this.sizeDecay -= this.sizeDecay_decay;
if (this._y <= this.groundY) {
this._y += this.yAdd;
} else {
this._x += this.xAdd * 3;
this._alpha -= this.alphaDecay * 2;
}
this._alpha -= this.alphaDecay;
this._yscale += this.sizeDecay;
this._xscale = this._yscale;
if (this._alpha <= 0) {
this.rootX = _rootX;
this.rootY = _rootY;
this.spawn();
}
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5261 __Packages.Main {
#initclip
if (!Main) {
_global.Main = function () {
fscommand('' add 'allowscale', false);
fscommand('' add 'showmenu', false);
_global._quality = 'BEST';
_global.WDTrace = new WD_trace();
_global.debug = new Object();
this.FORCE_COMPILTION = new SpaceRocket_smoke();
this.FORCE_COMPILTION = new SpaceRocket_trail_element();
_global.model = new Model();
this.model = _global.model;
this.model.turnActions = 0;
this.model.turn = 0;
this.model.maxFunds = 100;
this.model.decisionPoints = new DecisionPoints();
_global.presenter = new Presenter(this.model);
this.presenter = _global.presenter;
_global.view = new View(this.model, this.presenter, _root.interfaceMC, _root.battleMC);
this.view = _global.view;
this.presenter.view = this.view;
this.model_interface = new Model_interface();
_global.model_interface = this.model_interface;
this.presenter_interface = new Presenter_interface();
_global.presenter_interface = this.presenter_interface;
this.view_interface = new View_interface(_level0.interfaceMC);
_global.view_interface = this.view_interface;
this.presenter_gameMenu = new Presenter_gameMenu();
_global.presenter_gameMenu = this.presenter_gameMenu;
this.view_gameMenu = new View_gameMenu(_root.gameMenu);
_global.view_gameMenu = this.view_gameMenu;
this.model_gameMenu = new Model_gameMenu();
_global.model_gameMenu = this.model_gameMenu;
this.model_gameMenu.presenter = this.presenter_gameMenu;
this.presenter_gameMenu.view = this.view_gameMenu;
this.presenter_gameMenu.model = this.model_gameMenu;
this.presenter_gameMenu.initialize_gameMenu();
_global.play_sound_by_action = function (_str) {
_global.presenter_interface.play_sound_by_action(_str);
};
_global.play_sound_by_building = function (_str) {
if (_global.model.option.playSound) {
_global.presenter_interface.play_sound_by_building(_str);
}
};
_global.play_sound_by_event = function (_str, _pan) {
if (_global.model.option.playSound) {
_global.presenter_interface.play_sound_by_event(_str, _pan);
}
};
_global.explosion_sound_by_mc_name = function (_str, _pan) {
if (_global.model.option.playSound) {
_global.presenter_interface.explosion_sound_by_mc_name(_str, _pan);
}
};
this.presenter_interface.view_interface = this.view_interface;
this.presenter_interface.presenter = this.presenter;
this.presenter_interface.model = _global.model;
this.presenter_interface.model_interface = this.model_interface;
this.presenter_interface.view = this.view;
this.view_interface.presenter_interface = this.presenter_interface;
this.view_interface.model_interface = this.model_interface;
this.view.view_interface = this.view_interface;
this.view.presenter_interface = this.presenter_interface;
this.view.clipSrc = _root.createEmptyMovieClip('windowContainer', 9000);
this.view._graphMC = _root.graphMC;
this.model.set_city_position_to_array();
_level0.endGameMC._visible = false;
_root.debugBtn1.onPress = function () {
--_root.battleMC._visible;
--_root.sidePanels._visible;
--_root.interfaceMC._visible;
};
_root.turnBtn.onPress = function () {
var v2 = 0;
goto 2534;
for (;;) {
++v2;
label 2534:
if (v2 >= 1) break;
_global.model.doTurn();
_global.main.updateStageTxt();
_global.presenter.initBattle();
}
};
_root.turnBtn2.onPress = function () {
var v2 = 0;
goto 2686;
for (;;) {
++v2;
label 2686:
if (v2 >= 25) break;
_global.model.doTurn();
_global.main.updateStageTxt();
_global.presenter.initBattle();
}
};
_global.view.cloudTicker_initiate();
this.model.set_city_position_to_array();
this.model.comp2.cityArr[1].population = 2;
_level0.interfaceMC._visible = false;
_level0.gameMenu._visible = false;
_level0.splashScreenMC.onPress = function () {
_level0.splashScreenMC._visible = false;
_level0.gameMenu._visible = true;
};
_level0.introMovie.onPress = function () {
_level0.introMovie.gotoAndStop(2);
_level0.introMovie._visible = false;
_global.presenter_interface.init_theme_snd();
};
_level0.createEmptyMovieClip('theme_sound_mc', _level0.getNextHighestDepth());
this.model.theme_sound = new Sound(_level0.theme_sound_mc);
this.model.theme_sound.attachSound('WDTheme.wav');
this.model.option.setMusic();
fscommand('' add 'allowscale', 'false');
fscommand('' add 'showmenu', 'false');
};
var v1 = _global.Main.prototype;
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5262 __Packages.Sub_model {
#initclip
if (!Sub_model) {
_global.Sub_model = function () {};
var v1 = _global.Sub_model.prototype;
v1.get_demo_version_name = function () {
return this.demo_version_arr[this.demo_version];
};
v1.get_demo_version_url = function () {
if (this.demo_version == 0) {
var v2 = _global.unescape(_root._url);
var v3 = v2.lastIndexOf('_');
var v4 = v2.lastIndexOf('.swf');
var v5 = v2.slice(0, v4);
var v6 = v5.slice(v3 + 1);
return 'https://secure.bmtmicro.com/servlets/Orders.ShoppingCart?CLR=0&CID=2249&PRODUCTID=22490032&AID=' + v6;
}
return this.demo_version_url[this.demo_version];
};
v1.get_religion_name_by_code = function (a_str) {
for (var i in this.religion_arr) {
if (this.religion_arr[i][0] == a_str) {
return this.religion_arr[i][1];
}
}
};
v1.getCityByID = function (_nr) {
for (var i in this.playerArr) {
for (var j in this.activePlayerArr[i].cityArr) {
if (this.activePlayerArr[i].cityArr[j].cityID == _nr) {
var v3 = this.activePlayerArr[i].cityArr[j];
}
}
}
return v3;
};
v1.string_is_used_action = function (_str) {
for (var i in this.playerAB_position_arr) {
if (_str == this.playerAB_position_arr[i].action_name) {
return true;
}
}
return false;
};
v1.reset_playerAB_position_arr = function () {
this.playerAB_position_arr = [{'_num': 0, 'building_name': undefined, 'building_MC': undefined, 'action_name': undefined}, {'_num': 0, 'building_name': undefined, 'building_MC': undefined, 'action_name': undefined}, {'_num': 1, 'building_name': undefined, 'building_MC': undefined, 'action_name': undefined}, {'_num': 1, 'building_name': undefined, 'building_MC': undefined, 'action_name': undefined}, {'_num': 2, 'building_name': undefined, 'building_MC': undefined, 'action_name': undefined}, {'_num': 2, 'building_name': undefined, 'building_MC': undefined, 'action_name': undefined}, {'_num': 3, 'building_name': undefined, 'building_MC': undefined, 'action_name': undefined}, {'_num': 3, 'building_name': undefined, 'building_MC': undefined, 'action_name': undefined}, {'_num': 4, 'building_name': undefined, 'building_MC': undefined, 'action_name': undefined}, {'_num': 4, 'building_name': undefined, 'building_MC': undefined, 'action_name': undefined}];
};
v1.get_plr_arr_of_action = function (_str) {
var v3 = new Array();
for (var i in this.playerAB_position_arr) {
if (this.playerAB_position_arr[i].building_name == _str) {
v3.push(this.playerAB_position_arr[i]._num);
}
}
return v3;
};
v1.loop_playerAB_position_arr = function (_for, _num, _BN, _BMC, _action) {
for (var i in this.playerAB_position_arr) {
var v7 = this.playerAB_position_arr[i];
switch (_for) {
case 'num':
if (v7.building_name == _BN && v7.building_MC == _BMC) {
return v7._num;
}
break;
case 'name':
if (v7._num == _num && v7.building_MC == _BMC) {
return v7.building_name;
}
break;
case 'MC':
if (v7._num == _num && v7.building_name == _BN) {
return v7.building_MC;
}
if (v7._num == _num && v7.action_name == _BN) {
return v7.building_MC;
}
break;
case 'preAttack_any':
if (v7.building_name == 'silo' || (v7.building_name == 'airfield' || (v7.building_name == 'sub' || v7.building_name == 'space'))) {
return true;
}
break;
case 'isDouble':
if (v7._num == _num && v7.building_name == _BN) {
return true;
}
}
}
};
v1.reset_preAttackFrame = function (_plr) {};
v1.get_playerAB_mc = function (_plrNum, _aname) {
if (_aname == 'preAttack') {
var v4 = this.loop_playerAB_position_arr('MC', _plrNum, 'silo');
if (!v4) {
v4 = this.loop_playerAB_position_arr('MC', _plrNum, 'airfield');
}
if (!v4) {
v4 = this.loop_playerAB_position_arr('MC', _plrNum, 'sub');
}
if (!v4) {
v4 = this.loop_playerAB_position_arr('MC', _plrNum, 'space');
}
return v4;
}
v4 = this.loop_playerAB_position_arr('MC', _plrNum, _aname);
return v4;
};
v1.__set__broadcaster = function (param) {
this._broadcaster = param;
return this.__get__broadcaster();
};
v1.setHumanTurnAction = function () {
if (this.human.getNextTurnAction()) {
var v2 = this.human.getNextTurnAction();
} else {}
storedv2.doReset();
storedv2.action = this.userSelectedActionBtn;
if (storedv2.action == 'preAttack') {
if (this.human.preAttackStatus != 'ready') {
storedv2.preAttackCarrier = this.userSelectedWeapon;
} else {
storedv2.preAttackCarrier = this.userSelectedCarrier;
storedv2.preAttackPayload = this.userSelectedWeapon;
}
} else {
if (storedv2.action == 'attack' || storedv2.action == 'defense') {
storedv2.attackWeapon = this.userSelectedWeapon;
}
}
storedv2.humanBuyArr = this.human.weaponStock.productionArray;
storedv2.targetCity = this.userSelectedCity;
storedv2.ship_attack_arr = this.ship_attack_arr;
storedv2.targetPlayer = this.userSelectedPlayer;
storedv2.spyBuilding = this.userSelectedSpyBuilding;
if (storedv2.action == 'production') {
var v3 = Math.round((this.human.turnMoney / 100) * this.userSelectedProductionInvestmentArr_total_amount);
this.human.turnMoney -= v3;
} else {
if (storedv2.action == 'research') {
this.human.turnMoney -= this.researchMoneySpend;
storedv2.researchMoneySpend = this.researchMoneySpend;
storedv2.researchArr = this.userSelectedResearchArr;
}
}
storedv2.productionInvestmentArr = this._userSelectedProductionInvestmentArr;
storedv2.diplomacyArr = this.userSelectedDiplomacyArr;
storedv2.diplomacyLeader = this.userSelectedDiplomacyLeader;
storedv2.diplomacyOption = this.userSelectedDiplomacyOption;
if (this.userSelectedActionBtn == 'diplomacy' && this.diplomacy_options_arr[this.userSelectedDiplomacyOption][0] == 'offer') {
this.human.turnMoney -= this.diplomacy_options_arr[this.userSelectedDiplomacyOption][2];
}
this.resetUserSelections();
};
v1.loadTurnAction = function (_ta) {
this.resetUserSelections();
this.userSelectedActionBtn = _ta.action;
this.userSelectedCity = _ta.targetCity;
this.userSelectedPlayer = _ta.targetPlayer;
this.userSelectedWeapon = _ta.attackWeapon;
if (this.human.preAttackStatus != 'ready') {
this.userSelectedCarrier = _ta.preAttackCarrier;
}
this.ship_attack_arr = _ta.ship_attack_arr;
_ta.doReset();
};
v1.__get__display_turnMoney = function () {
var v2 = '$ ';
if (this.human.turnMoney > 0) {
v2 = this.human.turnMoney + '.000.000';
return v2;
}
v2 += '0';
return v2;
};
v1.__get__display_population = function () {
var v2 = '';
v2 += Math.round(this.human.population) + '.000.000';
return v2;
};
v1.resetPlayersForNewturn = function () {
for (var i in this.activePlayerArr) {
var v2 = this.activePlayerArr[i];
v2.resetActions();
v2.weaponStock.resetPreOrder();
v2.techTree.resetPreOrder();
v2.turnMoney = v2.money;
this.userSelectedSpyBuilding = 'spyCenter';
}
this.resetUserSelections();
};
v1.error = function (errorType, var1, var2, var3) {
if (this.errorHandling) {
if (!errorType) {
this._broadcaster.broadcastMessage('error', 'And undefiend error occured... whatcha gonna do \'bout it?');
} else {
if (errorType == 'getTargets') {
this._broadcaster.broadcastMessage('error', 'Player: ' + var1 + ', General undefined error in \'getTargets\' method @ ' + var2);
} else {
if (errorType == 'doubleAction') {
this._broadcaster.broadcastMessage('error', 'player ' + var1 + ' chose ' + var2 + ' for both their actions... OMG!! ');
} else {
if (errorType == 'noPreCarrier') {
this._broadcaster.broadcastMessage('error', 'player ' + var1 + ' prepaired a pre attack withoug choosing a carrier');
} else {
if (errorType == 'noWeaponSelected') {
this._broadcaster.broadcastMessage('error', 'player' + var1 + ' selected \'attack\' as an action, but did not select a weapon');
} else {
if (errorType == 'money') {
this._broadcaster.broadcastMessage('error', 'player' + var1 + ' has a negative amount of money. $ ' + var2 + '.000.000 ');
}
}
}
}
}
}
}
};
v1.__set__userSelectedActionBtn = function (_param) {
if (_param == undefined) {
this.resetUserSelections();
}
this._userSelectedActionBtn = _param;
return this.__get__userSelectedActionBtn();
};
v1.__get__userSelectedActionBtn = function () {
return this._userSelectedActionBtn;
};
v1.__set__userSelectedStockBtn = function (_param) {
this._userSelectedStockBtn = _param;
return this.__get__userSelectedStockBtn();
};
v1.__get__userSelectedStockBtn = function () {
return this._userSelectedStockBtn;
};
v1.__set__userSelectedCity = function (_param) {
this._userSelectedCity = _param;
return this.__get__userSelectedCity();
};
v1.__set__userSelectedShipCityWaitingForTurnAction = function (_param) {
this._userSelectedShipCityWaitingForTurnAction = _param;
return this.__get__userSelectedShipCityWaitingForTurnAction();
};
v1.__get__userSelectedShipCityWaitingForTurnAction = function () {
return this._userSelectedShipCityWaitingForTurnAction;
};
v1.__set__userSelectedShipCityArr = function (_param) {
this._userSelectedShipCityArr = _param;
return this.__get__userSelectedShipCityArr();
};
v1.__get__userSelectedShipCityPlrNum = function () {
return this._userSelectedShipCityPlrNum;
};
v1.__set__userSelectedShipCityPlrNum = function (_param) {
this._userSelectedShipCityPlrNum = _param;
return this.__get__userSelectedShipCityPlrNum();
};
v1.__get__userSelectedShipCityArr = function () {
return this._userSelectedShipCityArr;
};
v1.__get__userSelectedCity = function () {
return this._userSelectedCity;
};
v1.__set__userSelectedPlayer = function (_param) {
this._userSelectedPlayer = _param;
return this.__get__userSelectedPlayer();
};
v1.__get__userSelectedPlayer = function () {
return this._userSelectedPlayer;
};
v1.__set__userSelectedCarrier = function (_param) {
this._userSelectedCarrier = _param;
return this.__get__userSelectedCarrier();
};
v1.__get__userSelectedCarrier = function () {
return this._userSelectedCarrier;
};
v1.__set__userSelectedWeapon = function (_param) {
this._userSelectedWeapon = _param;
return this.__get__userSelectedWeapon();
};
v1.__get__userSelectedWeapon = function () {
return this._userSelectedWeapon;
};
v1.__set__userSelectedPayload = function (_param) {
this._userSelectedPayload = _param;
return this.__get__userSelectedPayload();
};
v1.__get__userSelectedPayload = function () {
return this._userSelectedPayload;
};
v1.__set__userResetPreAttack = function (_param) {
this._userResetPreAttack = _param;
return this.__get__userResetPreAttack();
};
v1.__get__userResetPreAttack = function () {
return this._userResetPreAttack;
};
v1.__set__userSelectedProductionInvestmentArr = function (_arr) {
this._userSelectedProductionInvestmentArr = _arr;
return this.__get__userSelectedProductionInvestmentArr();
};
v1.__set__userSelectedResearchArr = function (_arr) {
this._userSelectedResearchArr = _arr;
return this.__get__userSelectedResearchArr();
};
v1.__get__userSelectedResearchArr = function () {
return this._userSelectedResearchArr;
};
v1.productionInvestementPercLeft = function (_num) {
var v3 = 0;
var v4 = 1;
goto 13156;
for (;;) {
++v4;
label 13156:
if (v4 >= this.userSelectedProductionInvestmentArr.length) break;
if (v4 != _num) {
v3 += this.userSelectedProductionInvestmentArr[v4][1];
}
}
return 100 - v3;
};
v1.researchInvestementPercLeft = function (_num) {
var v3 = 0;
var v4 = 1;
goto 13309;
for (;;) {
++v4;
label 13309:
if (v4 >= this.userSelectedResearchInvestmentArr.length) break;
if (v4 != _num) {
v3 += this.userSelectedResearchInvestmentArr[v4][1];
}
}
return 100 - v3;
};
v1.__get__userSelectedProductionInvestmentArr = function () {
return this._userSelectedProductionInvestmentArr;
};
v1.__get__userSelectedProductionInvestmentArr_total_amount = function () {
var v2 = 0;
for (var i in this._userSelectedProductionInvestmentArr) {
if (this._userSelectedProductionInvestmentArr[i][1]) {
v2 += this._userSelectedProductionInvestmentArr[i][1];
}
}
return v2;
};
v1.__set__userSelectedDiplomacyArr = function (_arr) {
this._userSelectedDiplomacyArr = _arr;
return this.__get__userSelectedDiplomacyArr();
};
v1.__get__userSelectedDiplomacyArr = function () {
return this._userSelectedDiplomacyArr;
};
v1.__set__userSelectedResearchInvestmentArr = function (_arr) {
this._userSelectedResearchInvestmentArr[_arr[0]] = _arr[1];
return this.__get__userSelectedResearchInvestmentArr();
};
v1.__get__userSelectedResearchInvestmentArr = function () {
return this._userSelectedResearchInvestmentArr;
};
v1.__get__userSelectedResearchInvestmentArr_total_amount = function () {
var v2 = 0;
for (var i in this._userSelectedResearchInvestmentArr) {
v2 += this._userSelectedResearchInvestmentArr[i];
}
return v2;
};
v1.resetUserSelections = function () {
this._userSelectedActionBtn = undefined;
this.userSelectedWeapon = undefined;
this.userSelectedStockBtn = undefined;
this.userSelectedCity = undefined;
this.ship_attack_arr = [];
this.userSelectedPlayer = undefined;
this.userSelectedShipCityPlrNum = undefined;
if (this.human.preAttackStatus != 'ready') {
this.userSelectedCarrier = undefined;
}
this._userSelectedProductionInvestmentArr = [[], ['rockets', 0, 1], ['planes', 0, 6], ['special', 0, 7], ['warhead', 0, 2], ['bioload', 0, 3], ['soldier', 0, 4], ['spy', 0, 5], ['defense', 0, 8]];
for (var i in this.userSelectedResearchArr) {
var v2 = this.userSelectedResearchArr[i];
v2.preOrder = false;
}
this.userSelectedDiplomacyLeader = undefined;
this.userSelectedDiplomacyOption = undefined;
this.researchMoneySpend = 0;
this.userSelectedResearchArr = [];
this.userSelectedSpyBuilding = 'spyCenter';
};
v1.resetAfterCanceledTurnAction = function () {
this.userSelectedCarrier.inUse = 0;
this.userSelectedWeapon.inUse = 0;
switch (this.userSelectedActionBtn) {
case 'preAttack':
if (this.userSelectedCarrier.weaponName == 'ship') {
for (var i in this.ship_attack_arr) {
(this.getCityByID(this.ship_attack_arr[i].city)).deselectForShipAttack();
--(this.human.weaponStock.getWeaponByID(this.ship_attack_arr[i].wpn)).inUse;
}
} else {
if (this.human.preAttackStatus == 'ready') {
--this.userSelectedPayload.inUse;
this.deselectCities('preAttack');
}
}
break;
case 'attack':
break;
case 'propaganda':
}
this.resetUserSelections();
};
v1.setCeaseFire = function (_plrA, _plrB, _turns) {
this.playerArr[_plrA].ceaseFireArr[_plrB]._turnsLeft = _turns;
this.playerArr[_plrA].ceaseFireArr[_plrB]._status = true;
this.playerArr[_plrB].ceaseFireArr[_plrA]._turnsLeft = _turns;
this.playerArr[_plrB].ceaseFireArr[_plrA]._status = true;
};
v1.select_random_city = function (_plr) {
var v3 = new Array();
for (var i in _plr.cityArr) {
if (_plr.cityArr[i].population > 0) {
v3.push(_plr.cityArr[i]);
}
}
var v4 = v3[this.tools.randRange(0, v3.length - 1)];
return v4;
};
v1.deselectCities = function (_action) {
for (var i in this.playerArr) {
for (var j in this.playerArr[i].cityArr) {
this.playerArr[i].cityArr[j].removeSelection(_action);
}
}
};
v1.gameStatus = function (param_n) {
if (param_n !== 'worldPopulation') {
} else {
var v3 = 0;
for (var i in this.activePlayerArr) {
v3 += this.activePlayerArr[i].population;
}
return v3;
}
};
v1.createBioHazardArr = function (bioLevel) {
if (!bioLevel || _global.isNaN(bioLevel)) {
bioLevel = 1;
}
var v3 = 0;
var v4 = this.bioHazardDeactivateArray[bioLevel][1];
var v5 = new Array();
var v6 = 0;
while (v3 < bioLevel) {
v6 = this.tools.randRange(0, this.bioActions_arr.length - 1);
v5.push({'_action': this.bioActions_arr[v6]});
++v3;
}
v3 = 0;
while (v3 < v4) {
v6 = this.tools.randRange(0, this.human.weaponStock.weaponArr.length - 1);
if (this.human.weaponStock.weaponArr[v6].active) {
v5.push({'_stock': this.human.weaponStock.weaponArr[v6].weaponID, '_weaponName': this.human.weaponStock.weaponArr[v6].weaponName});
}
++v3;
}
return v5;
};
v1.next_ambient_sound_index = function () {
if (this.ambient_sound_index < 10) {
++this.ambient_sound_index;
} else {
this.ambient_sound_index = 1;
}
};
v1.addProperty('userSelectedCarrier', v1.__get__userSelectedCarrier, v1.__set__userSelectedCarrier);
v1.addProperty('userSelectedResearchArr', v1.__get__userSelectedResearchArr, v1.__set__userSelectedResearchArr);
v1.addProperty('userSelectedPayload', v1.__get__userSelectedPayload, v1.__set__userSelectedPayload);
v1.addProperty('userSelectedShipCityArr', v1.__get__userSelectedShipCityArr, v1.__set__userSelectedShipCityArr);
v1.addProperty('userSelectedStockBtn', v1.__get__userSelectedStockBtn, v1.__set__userSelectedStockBtn);
v1.addProperty('display_turnMoney', v1.__get__display_turnMoney, function () {});
v1.addProperty('userSelectedShipCityPlrNum', v1.__get__userSelectedShipCityPlrNum, v1.__set__userSelectedShipCityPlrNum);
v1.addProperty('userSelectedCity', v1.__get__userSelectedCity, v1.__set__userSelectedCity);
v1.addProperty('userSelectedDiplomacyArr', v1.__get__userSelectedDiplomacyArr, v1.__set__userSelectedDiplomacyArr);
v1.addProperty('userSelectedActionBtn', v1.__get__userSelectedActionBtn, v1.__set__userSelectedActionBtn);
v1.addProperty('userSelectedProductionInvestmentArr', v1.__get__userSelectedProductionInvestmentArr, v1.__set__userSelectedProductionInvestmentArr);
v1.addProperty('display_population', v1.__get__display_population, function () {});
v1.addProperty('userSelectedResearchInvestmentArr', v1.__get__userSelectedResearchInvestmentArr, v1.__set__userSelectedResearchInvestmentArr);
v1.addProperty('userSelectedProductionInvestmentArr_total_amount', v1.__get__userSelectedProductionInvestmentArr_total_amount, function () {});
v1.addProperty('userSelectedResearchInvestmentArr_total_amount', v1.__get__userSelectedResearchInvestmentArr_total_amount, function () {});
v1.addProperty('userSelectedShipCityWaitingForTurnAction', v1.__get__userSelectedShipCityWaitingForTurnAction, v1.__set__userSelectedShipCityWaitingForTurnAction);
v1.addProperty('userResetPreAttack', v1.__get__userResetPreAttack, v1.__set__userResetPreAttack);
v1.addProperty('userSelectedWeapon', v1.__get__userSelectedWeapon, v1.__set__userSelectedWeapon);
v1.addProperty('userSelectedPlayer', v1.__get__userSelectedPlayer, v1.__set__userSelectedPlayer);
v1.addProperty('broadcaster', function () {}, v1.__set__broadcaster);
ASSetPropFlags(v1, null, 1);
v1.demo_version_arr = ['Affiliates', 'Miniclip', 'Totallygame', 'NewGrounds', 'Arcadetown'];
v1.demo_version_url = ['Affiliates', 'http://www.miniclip.com/buy_worlddominationii.htm', 'http://www.youdagames.com/World+Domination+2-game-info-107/', 'https://secure.bmtmicro.com/servlets/Orders.ShoppingCart?CLR=0&CID=2249&PRODUCTID=22490032&AID=1071719', 'http://www.arcadetown.com/worlddomination2/ordergame.asp'];
v1.demo_version = 0;
v1.full_version_url = '';
v1.general_version_url = '';
v1.demo_mode = true;
v1.view_leader_MCs_played = 'false';
v1.view_leader_MCs_played_count = 0;
v1.difficulty_level = 1;
v1.actionNames_arr = ['resources', 'production', 'research', 'religion', 'preAttack', 'attack', 'defense', 'propaganda', 'diplomacy'];
v1.force_error_window = false;
v1.force_error_window_text = '';
v1.satellite_sound_playing = false;
v1.game_initiated = false;
v1.ambient_sound_index = 1;
v1.zs66hj8s = true;
v1.fullscreen = false;
v1.religion_arr = [['chr', 'Christian'], ['bhu', 'Bhudist'], ['com', 'Communist'], ['mus', 'Muslim'], ['jew', 'Jewish']];
v1.building_names_to_actions_arr = [{'building_name': 'resources', 'action_name': 'resources'}, {'building_name': 'factory', 'action_name': 'production'}, {'building_name': 'tech', 'action_name': 'research'}, {'building_name': 'technology', 'action_name': 'research'}, {'building_name': 'religion', 'action_name': 'religion'}, {'building_name': 'sub', 'action_name': 'preAttack'}, {'building_name': 'space', 'action_name': 'preAttack'}, {'building_name': 'ship', 'action_name': 'preAttack'}, {'building_name': 'base', 'action_name': 'attack'}, {'building_name': 'helipad', 'action_name': 'attack'}, {'building_name': '____', 'action_name': 'attack'}, {'building_name': 'hatch', 'action_name': 'attack'}, {'building_name': 'propaganda', 'action_name': 'propaganda'}, {'building_name': 'diplomacy', 'action_name': 'diplomacy'}, {'building_name': 'antiAir_still', 'action_name': 'defense'}, {'building_name': 'antiRocket_still', 'action_name': 'defense'}, {'building_name': 'silo', 'action_name': 'preAttack'}, {'building_name': 'airfield', 'action_name': 'preAttack'}];
v1.orderOfActions_arr = ['resources', 'production', 'produce', 'technology', 'research', 'religion', 'battle', 'preAttack', 'attack', 'propaganda', 'diplomacy'];
v1.spyActions_arr = ['diplomacy', 'factory', 'tech', 'religion', 'resources'];
v1.spyBuildings_arr = ['diplomacy', 'factory', 'tech', 'religion', 'resources'];
v1.bioActions_arr = ['resources', 'production', 'technology', 'religion', 'propaganda', 'diplomacy'];
v1.cityPositions = new Array([[377, 242], [308, 307], [418, 425], [478, 251], [546, 322]], [[36, 96], [229, 58], [126, 220], [28, 234], [191, 151]], [[546, 80], [703, 200], [620, 151], [764, 95], [770, 251]], [[26, 426], [136, 438], [41, 572], [308, 583], [237, 478]], [[758, 571], [642, 496], [697, 417], [532, 560], [764, 412]]);
v1.soldier_waypoints_arr = new Array([{'_wpArr': [0], '_endPos': 'RT'}, {'_wpArr': [1, 2], '_endPos': 'B'}, {'_wpArr': [1, 2, 3], '_endPos': 'L'}, {'_wpArr': [1, 6], '_endPos': 'B'}, {'_wpArr': [0], '_endPos': 'L'}], [{'_wpArr': [1], '_endPos': 'T'}, {'_wpArr': [1], '_endPos': 'LT'}, {'_wpArr': [2], '_endPos': 'LT'}, {'_wpArr': [2, 3, 5], '_endPos': 'LB'}, {'_wpArr': [4], '_endPos': 'LB'}], [{'_wpArr': [0], '_endPos': 'B'}, {'_wpArr': [1], '_endPos': 'RT'}, {'_wpArr': [1, 2], '_endPos': 'RT'}, {'_wpArr': [1, 2, 3], '_endPos': 'LT'}, {'_wpArr': [4], '_endPos': 'T'}], [{'_wpArr': [0], '_endPos': 'L'}, {'_wpArr': [2], '_endPos': 'L'}, {'_wpArr': [1, 2], '_endPos': 'LB'}, {'_wpArr': [1, 2, 3, 5], '_endPos': 'R'}, {'_wpArr': [4], '_endPos': 'R'}], [{'_wpArr': [0], '_endPos': 'T'}, {'_wpArr': [1], '_endPos': 'R'}, {'_wpArr': [2, 3], '_endPos': 'B'}, {'_wpArr': [2, 3, 4], '_endPos': 'B'}, {'_wpArr': [5], '_endPos': 'L'}]);
v1.soldier_fire_positions = new Array({'_pos': 'LB', '_arr': [[-55, -5], [-40, 40], [-10, 20]]}, {'_pos': 'LT', '_arr': [[-55, -5], [-40, -20], [-20, -40]]}, {'_pos': 'RT', '_arr': [[35, -5], [30, -20], [-20, -40]]}, {'_pos': 'R', '_arr': [[55, -5], [40, 15], [40, -15]]}, {'_pos': 'B', '_arr': [[-55, -5], [0, 25], [35, -5]]}, {'_pos': 'L', '_arr': [[-60, -5], [-55, 15], [-55, -15]]}, {'_pos': 'T', '_arr': [[-55, -20], [-40, -30], [25, -20]]});
v1.tank_waypoints_arr = new Array([{'_wpArr': [0], '_endPos': 'RT'}, {'_wpArr': [1, 2], '_endPos': 'B'}, {'_wpArr': [1, 2, 3], '_endPos': 'L'}, {'_wpArr': [1, 6], '_endPos': 'B'}, {'_wpArr': [1], '_endPos': 'LT'}], [{'_wpArr': [1], '_endPos': 'T'}, {'_wpArr': [1], '_endPos': 'LT'}, {'_wpArr': [2], '_endPos': 'LT'}, {'_wpArr': [2, 3, 5], '_endPos': 'LB'}, {'_wpArr': [4], '_endPos': 'LB'}], [{'_wpArr': [0], '_endPos': 'B'}, {'_wpArr': [1], '_endPos': 'RT'}, {'_wpArr': [1, 2], '_endPos': 'RT'}, {'_wpArr': [1, 2, 3], '_endPos': 'LT'}, {'_wpArr': [4], '_endPos': 'T'}], [{'_wpArr': [0], '_endPos': 'L'}, {'_wpArr': [0], '_endPos': 'LB'}, {'_wpArr': [1, 2], '_endPos': 'LB'}, {'_wpArr': [1, 2, 3], '_endPos': 'R'}, {'_wpArr': [4], '_endPos': 'R'}], [{'_wpArr': [0], '_endPos': 'T'}, {'_wpArr': [1], '_endPos': 'L'}, {'_wpArr': [2, 3], '_endPos': 'B'}, {'_wpArr': [2, 3, 4], '_endPos': 'B'}, {'_wpArr': [5], '_endPos': 'L'}]);
v1.tank_fire_positions = new Array({'_pos': 'LB', '_arr': [[-55, 20]]}, {'_pos': 'LT', '_arr': [[-55, -25]]}, {'_pos': 'RT', '_arr': [[55, -25]]}, {'_pos': 'R', '_arr': [[55, -5]]}, {'_pos': 'B', '_arr': [[0, 25]]}, {'_pos': 'L', '_arr': [[-55, -5]]}, {'_pos': 'T', '_arr': [[0, -20]]});
v1.boatWayPointPositions = new Array([380, 156], [474, 192], [578, 240], [655, 307], [582, 455], [493, 498], [400, 530], [337, 504], [254, 411], [200, 360], [217, 266], [240, 250], [295, 194]);
v1.boatStartingPosition = new Array([410, 474, 7], [179, 252, 11], [528, 145, 1], [311, 525, 7], [575, 510, 5]);
v1.landUnitsArr = new Array([420, 420], [160, 201], [563, 108], [260, 500], [562, 511]);
v1.marine_landUnitsArr = new Array([420, 420], [160, 201], [563, 108], [260, 500], [562, 511]);
v1.chinookStartPositions = new Array([420, 310], [88, 109], [708, 91], [105, 510], [730, 505]);
v1.marineFirePos = [[-55, -5], [0, 25], [35, -5], [0, -30]];
v1.bioHazardArr = [1, 8, 9, 14, 15, 17, 18, 32, 33, 34, 35, 36, 37];
v1.bioHazardDeactivateArray = [[], [3, 6], [7, 10], [14, 17], [17, 30]];
v1.suicide_spawn_array = [[420, 420], [160, 201], [563, 108], [260, 500], [562, 511]];
v1.submarine_surface_friendly_loc = [[370, 170], [300, 150], [425, 40], [33, 357], [400, 550]];
v1.submarine_surface_enemy_loc = [[450, 180], [340, 65], [490, 140], [170, 390], [437, 500]];
v1.satellite_height_arr = [158, 18, 18, 269, 169];
v1.satellite_pos_arr = [{'_x': 368, '_y': 75}, {'_x': 268, '_y': 104}, {'_x': 466, '_y': 111}, {'_x': 121, '_y': 321}, {'_x': 667, '_y': 291}];
v1.ship_plane_start_arr = new Array([28, -26], [-9, -3], [-38, 11]);
v1.spyBuildingArr = new Array(1, 'spyCenter', 'tech', 'religion', 'resources', 'factory');
v1.diplomacy_options_arr = [['offer', 3, 10], ['offer', 6, 50], ['offer', 10, 90], ['demand', 3, 10], ['demand', 6, 50], ['demand', 10, 90]];
v1.liftOff_location = [[327, 246], [230, 230], [570, 220], [200, 430], [620, 450]];
v1.attackingSubs_arr = new Array();
v1._broadcaster = new Object();
v1.errorHandling = false;
v1.curBattleMCAction = '';
v1._userSelectedActionBtn = undefined;
v1._userSelectedStockBtn = undefined;
v1._userSelectedCity = undefined;
v1._userSelectedPlayer = undefined;
v1._userSelectedCarrier = undefined;
v1._userSelectedWeapon = undefined;
v1._userSelectedPayload = undefined;
v1._userSelectedShipCityArr = new Array();
v1._userSelectedShipCityWaitingForTurnAction = false;
v1._userSelectedProductionInvestmentArr = new Array([], ['rockets', 0, 1, 0], ['planes', 0, 6, 0], ['special', 0, 7, 0], ['warhead', 0, 2, 0], ['bioload', 0, 3, 0], ['soldier', 0, 4, 0], ['spy', 0, 5, 0], ['defense', 0, 8, 0]);
v1._userSelectedResearchInvestmentArr = new Array([], ['rockets', 0, 1], ['planes', 0, 6], ['special', 0, 7], ['warhead', 0, 2], ['bioload', 0, 3], ['soldier', 0, 4], ['spy', 0, 5], ['defense', 0, 8]);
v1.ship_attack_arr = new Array();
v1.m11 = 'soldier_loop_9';
v1.soldierSpawnArr1 = new Array('soldier', 'soldier', 'soldier');
v1.soldierSpawnArr2 = new Array('soldier', 'soldier');
v1.soldierSpawnArr3 = new Array('soldier', 'soldier', 'soldier');
v1.soldierSpawnArr4 = new Array('soldier', 'soldier', 'soldier', 'soldier');
v1.interface_spawned_bioMC_array = new Array();
v1.battleCounter = 0;
v1.battleTimerIndex = 0;
v1.unitStartNum = 0;
v1.heliStart = [];
v1.cityDepthArr = new Array();
v1.lastUnitWasBuilding = false;
v1.maxCarrierCityAmount = 3;
v1.corrupt_highscore = false;
v1.AI_spy_required_stock_obj = new Object({'_level1': 10, '_level2': 8, '_level3': 5, '_level4': 3});
v1.ch_018 = [{'id_str': 'orca', 'str': 'free willy', 'active': false}, {'id_str': 'easter', 'str': 'rapa nui', 'active': false}, {'id_str': 'nessy', 'str': 'nessy', 'active': false}, {'id_str': 'disco', 'str': 'saturdaynight', 'active': false}, {'id_str': 'kill_all', 'str': 'psycho killer', 'active': false}, {'id_str': 'bush', 'str': 'I am Bush', 'active': false}, {'id_str': 'cash', 'str': 'trump', 'active': false}, {'id_str': 'tech', 'str': 'dexter', 'active': false}, {'id_str': 'stock', 'str': 'gimmegimme', 'active': false}];
v1.soundCount = 0;
v1.action_to_sound_arr = new Array({'_actionName': 'interface_noise', '_soundName': 'TV noise.wav'}, {'_actionName': 'interface_startup', '_soundName': 'interface_startup.wav'}, {'_actionName': 'interface_actionBtn_on', '_soundName': 'interface_Switch Action selection.wav', '_pan': -80}, {'_actionName': 'interface_actionBtn_off', '_soundName': 'interface_Switch Action selection2.wav', '_pan': -80}, {'_actionName': 'interface_acceptAction_btn', '_soundName': 'interface_Accept action bleep.wav'}, {'_actionName': 'interface_open_tube', '_soundName': 'interface_openactiondevice.wav'}, {'_actionName': 'interface_close_tube', '_soundName': 'interface_closeactiondevice.wav'}, {'_actionName': 'interface_close_turnBtn', '_soundName': 'interface_Closeconfirmbutton.wav'}, {'_actionName': 'interface_open_turnBtn', '_soundName': 'interface_Openconfirmbutton.wav'}, {'_actionName': 'interface_select_stock', '_soundName': 'interface_Switch Sounds 1.wav', '_pan': 80}, {'_actionName': 'interface_slider_bleep', '_soundName': 'interface_select unit bleep.wav'}, {'_actionName': 'interface_select_city', '_soundName': 'interface_select unit bleep.wav'}, {'_actionName': 'interface_select_tech', '_soundName': 'interface_select unit bleep.wav'}, {'_actionName': 'interface_deselect_tech', '_soundName': 'interface_select unit bleep.wav'}, {'_actionName': 'interface_cant_select_tech', '_soundName': 'interface_select unit bleep.wav'}, {'_actionName': 'interface_select_diplo_leader', '_soundName': 'interface_select unit bleep.wav'}, {'_actionName': 'interface_select_diplo_option', '_soundName': 'interface_select unit bleep.wav'}, {'_actionName': 'interface_select_spy_building', '_soundName': 'interface_select unit bleep.wav'}, {'_actionName': '--', '_soundName': '--'});
v1.ch_019 = [{'id_str': '#2dawgz', 'str': '#2dawgz', 'active': false, 'msg': '## 2 dawgz / 2 pirates. No ninja\'s. ##'}, {'id_str': '#thenizz', 'str': '#thenizz', 'active': false, 'msg': '## dawgz 4 life, homez 4e4 ##'}, {'id_str': '#lollerskates', 'str': '#lollerskates', 'active': false, 'msg': '## 2 long, 2 much ##'}, {'id_str': '#fc1', 'str': '#fc1', 'active': false, 'msg': '## It is only after you\'ve lost everything, that you are free to do anything... ## ~Chuck Palahniuk, Fight Club, Chapter 8 '}, {'id_str': '#sa1', 'str': '#sa1', 'active': false, 'msg': '## 4 teh goons, humor me with your witty sarcasm. As no one seems to get. ##'}, {'id_str': '#error', 'str': '#error', 'active': false, 'msg': '## get a life, you deserve it ##'}];
v1.building_to_sound_arr = new Array({'_buildingName': 'production', '_soundName': 'building_factory.wav'}, {'_buildingName': 'religion', '_varSoundName': 'religion'}, {'_buildingName': 'diplomacy', '_soundName': 'Diplomacy humans.wav'}, {'_buildingName': 'silo', '_soundName': 'building_silo.wav'}, {'_buildingName': 'airfield', '_soundName': 'building_airfield.wav'}, {'_buildingName': 'propaganda', '_soundName': 'building_Propaganda.wav'}, {'_buildingName': 'resources', '_soundName': 'building_Resource.wav'}, {'_buildingName': 'ambient_resources', '_soundName': 'Resources ambient loop.wav'}, {'_buildingName': 'space', '_soundName': 'building_space_launch_2.wav'}, {'_buildingName': 'research', '_soundName': 'building_tech.wav'}, {'_buildingName': 'helipad', '_soundName': 'building_helipad.wav'}, {'_buildingName': 'base', '_soundName': 'troops_marching_001.wav'}, {'_buildingName': 'sub', '_soundName': 'sub_ping.wav'}, {'_buildingName': 'base', '_soundName': 'building_base.wav'}, {'_buildingName': 'hatch', '_soundName': 'unit_Suicide Hatch.wav'}, {'_buildingName': '--', '_soundName': '--'});
v1.event_to_sound_arr = new Array({'_eventName': 'sub_surface', '_soundName': 'unit_Submarine water splash.wav'}, {'_eventName': 'stop_anti_rocket', '_soundName': 'building_Anti rocket rotate stop.wav'}, {'_eventName': 'satellite_flight', '_soundName': 'Satelite_flight.wav'}, {'_eventName': 'space_launch', '_soundName': 'building_space_launch.wav'}, {'_eventName': '--', '_soundName': '--'});
v1.explosion_MC_to_sound_arr = new Array({'_mcName': 'explosion_warhead_1', '_soundName': 'Explode small3.wav'}, {'_mcName': 'explosion_warhead_2', '_soundName': 'Explode medium 3.wav'}, {'_mcName': 'explosion_warhead_3', '_soundName': 'explode medium.wav'}, {'_mcName': 'explosion_warhead_4', '_soundName': 'Explode large2.wav'}, {'_mcName': 'explosion_bioload_1', '_soundName': 'Explode small3.wav'}, {'_mcName': 'explosion_bioload_2', '_soundName': 'Explode medium 3.wav'}, {'_mcName': 'explosion_bioload_3', '_soundName': 'explode medium.wav'}, {'_mcName': 'explosion_bioload_4', '_soundName': 'Explode large.wav'}, {'_mcName': 'explosion001', '_soundName': 'Explode small3.wav'}, {'_mcName': 'explosion002', '_soundName': 'Explode small3.wav'}, {'_mcName': 'explosion003', '_soundName': 'Explode small3.wav'}, {'_mcName': 'suicide', '_soundName': 'unit_Suicide explode.wav'}, {'_mcName': '', '_soundName': ''});
v1.ambient_sound_arr = new Array({'_building': 'resources', '_soundName': 'Resources ambient loop.wav'}, {'_building': 'production', '_soundName': 'Production Ambient loop.wav'}, {'_building': 'diplomacy', '_soundName': 'Ambience Diplomacy.wav'}, {'_building': 'defense', '_soundName': 'Defence.wav'}, {'_building': 'religion', '_soundName': 'Massmedia ambient loop.wav'}, {'_building': 'research', '_soundName': 'Technology ambient loop.wav'}, {'_building': 'game', '_soundName': 'General ambient.wav'});
}
#endinitclip
}
movieClip 5263 __Packages.Player {
#initclip
if (!Player) {
_global.Player = function (param_playedBy, param_num, param_startLocation) {
this.buildingSet_id = '__';
this.alive = true;
this.playerNum = param_num;
this.playedBy = param_playedBy;
this.turnAction_1 = new TurnAction(1);
this.turnAction_2 = new TurnAction(2);
this.turnActionArr = [this.turnAction_1, this.turnAction_2];
this.techTree = new TechTree();
this.weaponStock = new WeaponStock();
this.dualAttack = false;
this.cityArr = new Array();
this.regardArr = new Array();
this.decisionPointsArr = new Array();
this.preCounterEnemy = new Array();
this.startLocation = param_startLocation;
this.bioloadedActionsArr = new Array();
this.bioloadedStockArr = new Array();
this.turnMoney = 0;
this.bioloaded = false;
this.ceaseFireArr = new Array();
this.diplomacyPendingArr = new Array();
this.diplomacyAcceptedArr = new Array();
this.diplomacyRejectedArr = new Array();
this.shortMSG_arr = new Array();
this.turnBattleCasualties = 0;
this.turnPropagandaCasualties = 0;
this.turnBattleKills = 0;
this.turnResourcesGained = 0;
this.diplomacy_offeredLastTurn = [false, false, false, false, false];
this.specialization = new AI_specialization();
this.score = 0;
};
var v1 = _global.Player.prototype;
v1.__get__turnSpendings = function () {
var v2 = this.weaponStock.production_money_spent + this.techTree.researchMoneySpent;
return Number(v2);
};
v1.__get__nextActionBuilding = function () {
var v2 = 1;
if (this.building1Shown) {
v2 = 2;
} else {
this.building1Shown = true;
}
if (this.playerNum == 0) {
}
return v2;
};
v1.__get__preLocation = function () {
return this._preLocation;
};
v1.__set__preLocation = function (_num) {
this._preLocation = _num;
return this.__get__preLocation();
};
v1.resetBuildingsShown = function () {
this.building1Shown = false;
this.building2Shown = false;
};
v1.isBioloaded = function (param) {
var v3 = false;
for (var i in this.bioloadedActionsArr) {
if (param == this.bioloadedActionsArr[i] || (param == 'produce' && this.bioloadedActionsArr[i] == 'production' || param == 'research' && this.bioloadedActionsArr[i] == 'technology')) {
v3 = true;
}
}
return v3;
};
v1.approveAction = function () {};
v1.resetActions = function () {
if (this.preAttackStatus == 'inactive') {
this.turnAction_1.doReset();
this.turnAction_2.doReset();
}
if (!this.turnAction_1.preAttackPayload) {
this.turnAction_1.doReset();
}
if (!this.turnAction_2.preAttackPayload) {
this.turnAction_2.doReset();
} else {
this.turnAction_1 = this.turnAction_2;
this.turnAction_2.doReset();
}
};
v1.setNextTurnAction = function () {
if (!this.turnAction_1.action) {
var v2 = this.turnAction_1;
} else {
if (!this.turnAction_2.action) {
var v2 = this.turnAction_2;
}
}
};
v1.getNextTurnAction = function () {
if (!this.turnAction_1.action) {
return this.turnAction_1;
} else {
if (!this.turnAction_2.action) {
return this.turnAction_2;
} else {
return false;
}
}
};
v1.__resolve = function (param) {
if (param != 'debug' && param != '_visible') {
}
};
v1.__get__lowestRegardNum = function () {
var v2 = 100;
for (var i in this.regardArr) {
if (this.regardArr[i] < v2) {
v2 = this.regardArr[i];
}
}
return v2;
};
v1.__get__population = function () {
var v2 = 0;
for (var i in this.cityArr) {
v2 += this.cityArr[i].population;
}
return v2;
};
v1.largest_city = function () {
var v2 = 0;
for (var i in this.cityArr) {
var v4 = this.cityArr[i];
if (v2 < v4.population) {
v2 = v4.population;
var v3 = v4;
}
}
return v3;
};
v1.__get__religion = function () {
return this.religionLevel;
};
v1.__set__religion = function (n) {
this.religionLevel = n;
return this.__get__religion();
};
v1.__get__techLevel = function () {
return this.techTree.techLevel;
};
v1.__get__weaponStockStrength = function () {
var v2 = 0;
for (var i in this.weaponStock.weaponArr) {
var v3 = this.weaponStock.weaponArr[i];
v2 += v3.inStock * v3.weaponLevel;
}
return v2;
};
v1.__get__weaponStockLevel = function () {
var v2 = 0;
var v3 = 0;
for (var i in this.weaponStock.weaponArr) {
if ((this.techTree.getTechByName(this.weaponStock.weaponArr[i].relatedTechName)).invented) {
++v2;
if (this.weaponStock.weaponArr[i].inStock >= this.weaponStock.weaponArr[i].desire) {
++v3;
}
}
}
return (v3 / v2) * 100;
};
v1.__get__strength = function () {
return this.techLevel + this.weaponStockStrength + this.money;
};
v1.setChars = function () {
if (this.desireArr.length != this.weaponStock.weaponArr.length) {
} else {
for (var i in this.desireArr) {
this.weaponStock.weaponArr[i].desire = this.desireArr[i];
(this.techTree.getTechByName(this.weaponStock.weaponArr[i].relatedTechName)).desire = this.desireArr[i];
}
}
};
v1.__get__counterWeapon = function () {
for (var i in this.turnActionArr) {
if (this.turnActionArr[i].action == 'counterPre') {
return this.turnActionArr[i].attackWeapon;
}
}
};
v1.__get__allActionsSet = function () {
var v2 = 0;
if (this.turnAction_1.action != undefined) {
++v2;
}
if (this.turnAction_2.action != undefined) {
++v2;
}
if (v2 == 2) {
return true;
} else {
return false;
}
};
v1.kill = function () {
this.shortMSG_arr = [];
this.alive = false;
};
v1.addProperty('allActionsSet', v1.__get__allActionsSet, function () {});
v1.addProperty('counterWeapon', v1.__get__counterWeapon, function () {});
v1.addProperty('lowestRegardNum', v1.__get__lowestRegardNum, function () {});
v1.addProperty('strength', v1.__get__strength, function () {});
v1.addProperty('weaponStockLevel', v1.__get__weaponStockLevel, function () {});
v1.addProperty('nextActionBuilding', v1.__get__nextActionBuilding, function () {});
v1.addProperty('religion', v1.__get__religion, v1.__set__religion);
v1.addProperty('techLevel', v1.__get__techLevel, function () {});
v1.addProperty('preLocation', v1.__get__preLocation, v1.__set__preLocation);
v1.addProperty('turnSpendings', v1.__get__turnSpendings, function () {});
v1.addProperty('weaponStockStrength', v1.__get__weaponStockStrength, function () {});
v1.addProperty('population', v1.__get__population, function () {});
ASSetPropFlags(v1, null, 1);
v1.religionLevel = 0;
v1.preAttackStatus = 'inactive';
v1.alive = false;
v1.building1Shown = false;
v1.building2Shown = false;
v1._preLocation = undefined;
v1._propagandaMC = undefined;
v1.shipFrame = 1;
v1.diplomacy_offeredLastTurn = [false, false, false, false, false];
v1.special_person = false;
v1.suicide_person = false;
v1.dead_avatar_played = false;
v1.production_money_returned = 0;
v1._technology_money_spent = 0;
v1._anti_spy_money_spent = 0;
v1.satellites_used = 0;
}
#endinitclip
}
movieClip 5264 __Packages.TechTree {
#initclip
if (!TechTree) {
_global.TechTree = function () {
var v2 = 1;
var v3 = new Tech('rocket1', v2, 5, false, 0, undefined, 1, 1, 'ROCKET (10 MEG)', true);
var v4 = new Tech('rocket2', v2++, 10, false, 3, v3, 1, 2, 'ROCKET (25 MEG)', true);
var v5 = new Tech('rocket3', v2++, 15, false, 5, v4, 1, 3, 'ROCKET (50 MEG)', false);
var v6 = new Tech('rocket4', v2++, 20, false, 8, v5, 1, 4, 'ROCKET (95 MEG)', false);
var v7 = new Tech('warhead1', v2++, 5, false, 0, undefined, 2, 1, 'WARHEAD (10 MEG)', true);
var v8 = new Tech('warhead2', v2++, 10, false, 3, v7, 2, 2, 'WARHEAD (25 MEG)', true);
var v9 = new Tech('warhead3', v2++, 15, false, 5, v8, 2, 3, 'WARHEAD (50 MEG)', false);
var v10 = new Tech('warhead4', v2++, 20, false, 8, v9, 2, 4, 'WARHEAD (95 MEG)', false);
var v11 = new Tech('bioload1', v2++, 5, false, 0, undefined, 3, 1, 'BIOLOAD (10 MEG)', true);
var v12 = new Tech('bioload2', v2++, 10, false, 3, v11, 3, 2, 'BIOLOAD (25 MEG)', true);
var v13 = new Tech('bioload3', v2++, 15, false, 5, v12, 3, 3, 'BIOLOAD (50 MEG)', false);
var v14 = new Tech('bioload4', v2++, 20, false, 8, v13, 3, 4, 'BIOLOAD (95 MEG)', false);
var v15 = new Tech('soldier1', v2++, 5, false, 0, undefined, 4, 1, 'SOLDIER', true);
var v16 = new Tech('soldier2', v2++, 10, false, 3, v15, 4, 2, 'SEALS', true);
var v17 = new Tech('soldier3', v2++, 15, false, 5, v16, 4, 3, 'TANK', false);
var v18 = new Tech('soldier4', v2++, 20, false, 8, v17, 4, 4, 'SPECIAL', false);
var v19 = new Tech('spy1', v2++, 5, false, 0, undefined, 5, 1, 'SPY (LEVEL 1)', true);
var v20 = new Tech('spy2', v2++, 10, false, 3, v19, 5, 2, 'SPY (LEVEL 2)', true);
var v21 = new Tech('spy3', v2++, 15, false, 5, v20, 5, 3, 'SPY (LEVEL 3)', false);
var v22 = new Tech('spy4', v2++, 20, false, 8, v21, 5, 4, 'SPY (LEVEL 4)', false);
var v23 = new Tech('plane1', v2++, 5, false, 0, undefined, 6, 1, 'FIGHTER', true);
var v24 = new Tech('plane2', v2++, 10, false, 4, v23, 6, 2, 'BOMBER', false);
var v25 = new Tech('sub', v2++, 20, false, 3, undefined, 7, 1, 'SUBMARINE', true);
var v26 = new Tech('ship', v2++, 40, false, 5, v25, 7, 2, 'AIRCRAFT CARRIER', false);
var v27 = new Tech('space', v2++, 50, false, 8, v26, 7, 3, 'SPACE ROCKET', false);
var v28 = new Tech('antiAir', v2++, 20, true, 8, undefined, 8, 1, 'ANTI AIR', true);
var v29 = new Tech('antiRocket', v2++, 20, true, 8, undefined, 8, 1, 'ANTI ROCKET', true);
var v30 = new Tech('specialLoad', v2++, 50, false, 8, v27, 7, 4, 'SATELLITE', false);
if (_global.model.zs66hj8s) {
v5 = undefined;
v6 = undefined;
v9 = undefined;
v10 = undefined;
v17 = undefined;
v18 = undefined;
v13 = undefined;
v14 = undefined;
v21 = undefined;
v22 = undefined;
v24 = undefined;
v26 = undefined;
v27 = undefined;
v30 = undefined;
}
this.techArr = [v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30];
};
var v1 = _global.TechTree.prototype;
v1.inventAll = function () {
for (var i in this.techArr) {
this.techArr[i].invented = true;
}
};
v1.inventTechByID = function (param_id) {
for (var i in this.techArr) {
if (this.techArr[i].techID == param_id) {
if (this.techArr[i].invented == false) {
this.techArr[i].invented = true;
}
}
}
};
v1.inventTechByName = function (param_name) {
for (var i in this.techArr) {
if (this.techArr[i].techName == param_name) {
if (this.techArr[i].invented == false) {
this.techArr[i].invented = true;
return 'success';
break;
} else {
return 'tech already invented...';
}
}
}
};
v1.unInventTechByName = function (param_name) {
for (var i in this.techArr) {
if (this.techArr[i].techName == param_name) {
if (this.techArr[i].invented == true) {
this.techArr[i].invented = false;
return 'success';
} else {
return 'tech already unInvented...';
}
}
}
};
v1.unInventTechByID = function (param_id) {
for (var i in this.techArr) {
if (this.techArr[i].techID == param_id) {
if (this.techArr[i].invented == false) {
this.techArr[i].invented = true;
}
}
}
};
v1.__get__turnTechArr = function () {
var v2 = new Array();
for (var i in this.techArr) {
var v3 = this.techArr[i];
if (v3.preOrder) {
v2.push(v3);
}
}
return v2;
};
v1.__get__researchMoneySpent = function () {
var v2 = 0;
for (var i in this.techArr) {
if (this.techArr[i].preOrder) {
v2 += this.techArr[i].cost;
}
}
return v2;
};
v1.__set__researchMoneySpent = function (_param) {
return this.__get__researchMoneySpent();
};
v1.resetPreOrder = function () {
for (var i in this.techArr) {
this.techArr[i].preOrder = false;
}
};
v1.getTechByID = function (param_nr) {
for (var i in this.techArr) {
if (this.techArr[i].techID == param_nr) {
return this.techArr[i];
break;
}
}
};
v1.getTechByName = function (param_name) {
for (var i in this.techArr) {
if (this.techArr[i].techName == param_name) {
return this.techArr[i];
break;
}
}
};
v1.__get__allInvented = function () {
var v2 = true;
for (var i in this.techArr) {
if (!this.techArr[i].invented) {
v2 = false;
}
}
return v2;
};
v1.__get__cheapestUninventedTech = function () {
var v3 = 9000;
for (var i in this.techArr) {
if (this.techArr[i].cost < v3) {
var v2 = this.techArr[i];
v3 = v2.cost;
}
}
return v2;
};
v1.__get__techLevel = function () {
var v2 = 0;
for (var i in this.techArr) {
if (this.techArr[i].invented == true) {
v2 += this.techArr[i].weight;
}
}
return v2;
};
v1.__get__shortMSG = function () {
var v2 = 'Technologies invented: ';
for (var i in this.techArr) {
var v4 = this.techArr[i];
if (v4.inventedInLastTurn) {
if (!storedv3) {
var v3 = true;
v2 += v4.prettyName;
} else {
v2 += ', ' + v4.prettyName;
}
}
}
if (storedv3) {
return v2;
} else {
return '';
}
};
v1.resetInventedLastTurn = function () {
for (var i in this.techArr) {
this.techArr[i].inventedInLastTurn = false;
}
};
v1.__get__maxTexLevel = function () {
var v2 = 0;
for (var i in this.techArr) {
v2 += this.techArr[i].weight;
}
return v2;
};
v1.__get__allow_special = function () {
var v2 = 0;
var v3 = false;
for (var i in this.techArr) {
var v4 = this.techArr[i];
if (v4.techLevel == 4 && v4.invented) {
++v2;
}
if (_global.model.zs66hj8s && (v4.techLevel == 2 && v4.invented)) {
++v2;
}
if (_global.model.zs66hj8s && (v4.techName == 'plane1' && v4.invented)) {
++v2;
}
}
if ((this.getTechByName('plane2')).invented) {
++v2;
}
if (v2 >= 4) {
v3 = true;
}
return v3;
};
v1.allow_production_by_group = function (a_nr) {
var v4 = false;
if (a_nr == 8) {
return true;
}
for (var i in this.techArr) {
var v3 = this.techArr[i];
if (v3.invented && v3.desireGroup == a_nr) {
return true;
}
}
return v4;
};
v1.force_invent_tech_ch = function () {
for (var i in this.techArr) {
this.techArr[i].invented = true;
}
};
v1.invent_below_tech_level = function (a_techLevel) {
for (var i in this.techArr) {
var v3 = this.techArr[i];
if (v3.techLevel <= a_techLevel && (v3.desireGroup != 7 && (!_global.model.zs66hj8s || v3.allow_in_demo))) {
v3.invented = true;
v3.inventedInLastTurn = false;
}
}
};
v1.__get__roc_invented = function () {
if (this.techArr[3].invented) {
return true;
}
return false;
};
v1.addProperty('shortMSG', v1.__get__shortMSG, function () {});
v1.addProperty('researchMoneySpent', v1.__get__researchMoneySpent, v1.__set__researchMoneySpent);
v1.addProperty('allow_special', v1.__get__allow_special, function () {});
v1.addProperty('roc_invented', v1.__get__roc_invented, function () {});
v1.addProperty('turnTechArr', v1.__get__turnTechArr, function () {});
v1.addProperty('cheapestUninventedTech', v1.__get__cheapestUninventedTech, function () {});
v1.addProperty('techLevel', v1.__get__techLevel, function () {});
v1.addProperty('allInvented', v1.__get__allInvented, function () {});
v1.addProperty('maxTexLevel', v1.__get__maxTexLevel, function () {});
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5265 __Packages.Tech {
#initclip
if (!Tech) {
_global.Tech = function (param_name, param_id, param_cost, param_invented, param_weight, param_requiredTech, param_desireGroup, param_techLevel, param_pretty_name, p_allow_in_demo) {
this.techName = param_name;
this.techID = param_id;
this.cost = param_cost;
this._invented = param_invented;
this.weight = param_weight;
this.requiredTech = param_requiredTech;
this.desireGroup = param_desireGroup;
this.techLevel = param_techLevel;
this.inventedInLastTurn = false;
this.prettyName = param_pretty_name;
this.allow_in_demo = p_allow_in_demo;
};
var v1 = _global.Tech.prototype;
v1.__set__invented = function (_bln) {
this._invented = _bln;
if (_bln) {
this.inventedInLastTurn = true;
}
return this.__get__invented();
};
v1.__get__invented = function () {
return this._invented;
};
v1.addProperty('invented', v1.__get__invented, v1.__set__invented);
ASSetPropFlags(v1, null, 1);
v1.preOrder = false;
}
#endinitclip
}
movieClip 5266 __Packages.WeaponStock {
#initclip
if (!WeaponStock) {
_global.WeaponStock = function () {
var v2 = 0;
this._availableWeaponsArr = new Array();
this._productionArr = new Array();
this.roc1 = new WeaponSlot('rocket', 'carrier', 1, 'rocket1', v2++, 5, 'rocket1', 'antiRocket', false, 0, 0, 100, 'lib_rocketMC', 0, 1, 'none', 'ROCKET (10 MEG)');
this.roc2 = new WeaponSlot('rocket', 'carrier', 2, 'rocket2', v2++, 10, 'rocket2', 'antiRocket', false, 0, 0, 100, 'lib_rocketMC', 0, 1, 'none', 'ROCKET (25 MEG)');
this.roc3 = new WeaponSlot('rocket', 'carrier', 3, 'rocket3', v2++, 15, 'rocket3', 'antiRocket', false, 0, 0, 100, 'lib_rocketMC', 0, 1, 'none', 'ROCKET (50 MEG)');
this.roc4 = new WeaponSlot('rocket', 'carrier', 4, 'rocket4', v2++, 20, 'rocket4', 'antiRocket', false, 0, 0, 100, 'lib_rocketMC', 0, 1, 'none', 'ROCKET (95 MEG)');
this.war1 = new WeaponSlot('rocketload', 'payload', 1, 'warhead1', v2++, 5, 'warhead1', 'none', false, 15, 0, 100, 'none', 0, 2, 'explosion_warhead_1', 'WARHEAD (10 MEG)');
this.war2 = new WeaponSlot('rocketload', 'payload', 2, 'warhead2', v2++, 10, 'warhead2', 'none', false, 40, 0, 100, 'none', 0, 2, 'explosion_warhead_2', 'WARHEAD (25 MEG)');
this.war3 = new WeaponSlot('rocketload', 'payload', 3, 'warhead3', v2++, 15, 'warhead3', 'none', false, 90, 0, 100, 'none', 0, 2, 'explosion_warhead_3', 'WARHEAD (50 MEG)');
this.war4 = new WeaponSlot('rocketload', 'payload', 4, 'warhead4', v2++, 20, 'warhead4', 'none', false, 150, 0, 100, 'none', 0, 2, 'explosion_warhead_4', 'WARHEAD (95 MEG)');
this.bio1 = new WeaponSlot('rocketload', 'payload', 1, 'bioload1', v2++, 5, 'bioload1', 'none', false, 10, 0, 100, 'none', 0, 3, 'explosion_bioload_1', 'BIOLOAD (10 MEG)');
this.bio2 = new WeaponSlot('rocketload', 'payload', 2, 'bioload2', v2++, 10, 'bioload2', 'none', false, 35, 0, 100, 'none', 0, 3, 'explosion_bioload_2', 'BIOLOAD (25 MEG)');
this.bio3 = new WeaponSlot('rocketload', 'payload', 3, 'bioload3', v2++, 15, 'bioload3', 'none', false, 60, 0, 100, 'none', 0, 3, 'explosion_bioload_3', 'BIOLOAD (50 MEG)');
this.bio4 = new WeaponSlot('rocketload', 'payload', 4, 'bioload4', v2++, 20, 'bioload4', 'none', false, 80, 0, 100, 'none', 0, 3, 'explosion_bioload_4', 'BIOLOAD (95 MEG)');
this.sol1 = new WeaponSlot('soldier', 'conventional', 1, 'soldier1', v2++, 5, 'soldier1', 'none', false, 4, 0, 100, 'lib_boat001', 0, 4, 'explosion_soldier_1', 'SOLDIER');
this.sol2 = new WeaponSlot('soldier', 'conventional', 2, 'soldier2', v2++, 10, 'soldier2', 'none', false, 10, 0, 100, 'lib_soldier1MC', 0, 4, 'explosion_soldier_2', 'SEAL');
this.sol3 = new WeaponSlot('soldier', 'conventional', 3, 'soldier3', v2++, 15, 'soldier3', 'none', false, 21, 0, 100, 'lib_soldier1MC', 0, 4, 'explosion_soldier_3', 'TANK');
this.sol4 = new WeaponSlot('soldier', 'conventional', 4, 'soldier4', v2++, 20, 'soldier4', 'none', false, 35, 0, 100, 'lib_soldier1MC', 0, 4, 'explosion_soldier_4', 'SPECIAL UNIT');
this.spy1 = new WeaponSlot('spy', 'conventional', 1, 'spy1', v2++, 5, 'spy1', 'none', false, 0, 1, 100, 'none', 0, 5, 'none', 'SPY (LEVEL 1)');
this.spy2 = new WeaponSlot('spy', 'conventional', 2, 'spy2', v2++, 10, 'spy2', 'none', false, 0, 0, 100, 'none', 0, 5, 'none', 'SPY (LEVEL 2)');
this.spy3 = new WeaponSlot('spy', 'conventional', 3, 'spy3', v2++, 15, 'spy3', 'none', false, 0, 0, 100, 'none', 0, 5, 'none', 'SPY (LEVEL 3)');
this.spy4 = new WeaponSlot('spy', 'conventional', 4, 'spy4', v2++, 20, 'spy4', 'none', false, 0, 0, 100, 'none', 0, 5, 'none', 'SPY (LEVEL 4)');
this.plane1 = new WeaponSlot('plane', 'carrier', 2, 'plane1', v2++, 5, 'plane1', 'antiAir', true, 0, 0, 100, 'lib_plane1MC', 0, 6, 'none', 'FIGHTER JET');
this.plane2 = new WeaponSlot('plane', 'carrier', 4, 'plane2', v2++, 10, 'plane2', 'antiAir', false, 0, 0, 100, 'lib_plane2MC', 0, 6, 'none', 'BOMBER');
this.spe1 = new WeaponSlot('sub', 'specialCarrier', 3, 'sub', v2++, 50, 'sub', 'none', false, 0, 0, 100, 'lib_carrierMC', 0, 7, 'none', 'SUBMARINE');
this.spe2 = new WeaponSlot('ship', 'specialCarrier', 3, 'ship', v2++, 65, 'ship', 'antiAir', false, 0, 0, 100, 'lib_submarineMC', 0, 7, 'none', 'AIRCRAFT CARRIER');
this.spe3 = new WeaponSlot('space', 'specialCarrier', 3, 'space', v2++, 70, 'space', 'none', false, 0, 0, 100, 'lib_spaceMC', 0, 7, 'none', 'SPACE ROCKET');
this.antiAir = new WeaponSlot('anti', 'anti', 1, 'antiAir', v2++, 15, 'antiAir', 'none', true, 1, 2, 100, 'none', 0, 8, 'none', 'ANTI AIR');
this.antiRocket = new WeaponSlot('anti', 'anti', 1, 'antiRocket', v2++, 15, 'antiRocket', 'none', true, 1, 2, 100, 'none', 0, 8, 'none', 'ANTI ROCKET');
this.specialLoad = new WeaponSlot('specialLoad', 'specialLoad', 4, 'specialLoad', v2++, 80, 'specialLoad', 'none', false, 200000, 0, 100, 'lib_spaceMC', 0, 7, 'explosion_bioload_4', 'SATELLITE');
if (_global.model.zs66hj8s) {
this.roc3 = undefined;
this.roc4 = undefined;
this.war3 = undefined;
this.war4 = undefined;
this.sol3 = undefined;
this.sol4 = undefined;
this.bio3 = undefined;
this.bio4 = undefined;
this.spy3 = undefined;
this.spy4 = undefined;
this.plane2 = undefined;
this.spe2 = undefined;
this.spe3 = undefined;
this.specialLoad = undefined;
}
this.weaponArr = [this.roc1, this.roc2, this.roc3, this.roc4, this.war1, this.war2, this.war3, this.war4, this.bio1, this.bio2, this.bio3, this.bio4, this.sol1, this.sol2, this.sol3, this.sol4, this.spy1, this.spy2, this.spy3, this.spy4, this.plane1, this.plane2, this.spe1, this.spe2, this.spe3, this.specialLoad];
this.counterArr = [this.antiAir, this.antiRocket];
};
var v1 = _global.WeaponStock.prototype;
v1.getWeaponByID = function (param_id) {
for (var i in this.weaponArr) {
if (this.weaponArr[i].weaponID == param_id) {
return this.weaponArr[i];
return this.weaponArr[i];
break;
}
}
if (param_id == this.antiAir.weaponID) {
return this.antiAir;
} else {
if (param_id == this.antiRocket.weaponID) {
return this.antiRocket;
} else {}
}
};
v1.select_spy_by_level = function (_lvl) {
for (var i in this.weaponArr) {
if (this.weaponArr[i].weaponName == 'spy' + _lvl) {
return this.weaponArr[i];
}
}
};
v1.activeWeaponByTechName = function (param_name) {
for (var i in this.weaponArr) {
var v3 = this.weaponArr[i];
if (v3.relatedTechName == param_name) {
v3.active = true;
}
}
};
v1.getWeaponByName = function (param_name) {
for (var i in this.weaponArr) {
if (this.weaponArr[i].weaponName == param_name) {
return this.weaponArr[i];
}
}
if (param_name == this.antiAir.weaponName) {
return this.antiAir;
} else {
if (param_name == this.antiRocket.weaponName) {
return this.antiRocket;
}
}
};
v1.produceWeaponByName = function (param_name, param_amount) {
(this.getWeaponByName(param_name)).inStock += param_amount;
};
v1.reduceWeaponByName = function (param_name, param_amount) {
(this.getWeaponByName(param_name)).inStock -= param_amount;
};
v1.reduceWeaponByID = function (param_id, param_amount) {
(this.getWeaponByID(param_id)).inStock -= param_amount;
};
v1.getAvailableCarrier = function (wp) {
for (var i in this.weaponArr) {
if (this.weaponArr[i].active && (this.weaponArr[i].weaponLevel >= wp.weaponLevel && (this.weaponArr[i].inStock > 0 && this.weaponArr[i].weaponCategory == 'carrier'))) {
var v3 = this.weaponArr[i];
}
}
return v3;
};
v1.__get__allowPre = function () {
for (var i in this.weaponArr) {
var v2 = this.weaponArr[i];
if (v2.inStock > 0 && (v2.active && (v2.weaponCategory == 'carrier' || v2.weaponCategory == 'specialCarrier'))) {
return true;
}
}
return false;
};
v1.__get__allowDir = function () {
for (var i in this.weaponArr) {
var v2 = this.weaponArr[i];
if (v2.weaponCategory == 'conventional' && (v2.inStock > 0 && v2.active)) {
return true;
}
}
return false;
};
v1.__get__availableWeaponsArr = function () {
this._availableWeaponsArr = [];
for (var i in this.weaponArr) {
if (this.weaponArr[i].active && (this.weaponArr[i].inStock > 0 && (this.weaponArr[i].weaponType != 'spy' && (this.weaponArr[i].weaponCategory != 'carrier' && this.weaponArr[i].weaponCategory != 'specialCarrier')))) {
if (this.weaponArr[i].weaponCategory == 'payload') {
if (this['roc' + this.weaponArr[i].weaponLevel].inStock > 0) {
this._availableWeaponsArr.push(this.weaponArr[i]);
} else {
if (this.weaponArr[i].weaponLevel <= this.plane1.weaponLevel && this.plane1.inStock > 0) {
this._availableWeaponsArr.push(this.weaponArr[i]);
} else {
if (this.weaponArr[i].weaponLevel <= this.plane2.weaponLevel && this.plane2.inStock > 0) {
this._availableWeaponsArr.push(this.weaponArr[i]);
} else {
if (this.weaponArr[i].weaponName == 'ship' && (this.spe1.inStock > 0 && this.stocked_for_ship_attack)) {
this._availableWeaponsArr.push(this.weaponArr[i]);
} else {
if (this.weaponArr[i].weaponName == 'sub' && (this.spe2.inStock > 0 && this.stocked_for_ship_attack)) {
this._availableWeaponsArr.push(this.weaponArr[i]);
} else {
if (this.weaponArr[i].weaponLevel <= this.spe2.weaponLevel && this.spe2.inStock > 0) {
this._availableWeaponsArr.push(this.weaponArr[i]);
} else {
if (this.weaponArr[i].weaponLevel <= this.spe1.weaponLevel && this.spe1.inStock > 0) {
this._availableWeaponsArr.push(this.weaponArr[i]);
}
}
}
}
}
}
}
} else {
if (this.weaponArr[i].weaponCategory == 'specialLoad' && this.spe3.inStock > 0) {
this._availableWeaponsArr.push(this.weaponArr[i]);
} else {
if (this.weaponArr[i].weaponCategory != 'specialLoad' && this.weaponArr[i].weaponCategory != 'payLoad') {
this._availableWeaponsArr.push(this.weaponArr[i]);
}
}
}
}
}
trace(' available WeaponsArr : ' + this._availableWeaponsArr);
return this._availableWeaponsArr;
};
v1.payloadInStock = function (_wpn) {
if (_wpn.weaponCategory == 'payload' && _wpn.inStock > 0) {
return true;
} else {
return false;
}
};
v1.get_MaxKillPayload = function (carrierWeapon) {
var v3 = 0;
var v4 = this.instock_active_payloads;
for (var i in v4) {
var v6 = v4[i];
if (v6.maxKills > v3 && (v6.weaponLevel <= carrierWeapon.weaponLevel && (carrierWeapon.weaponName != 'space' && (v6.weaponName != 'specialLoad' && v6.active)))) {
var v5 = v6;
v3 = v6.maxKills;
} else {
if (carrierWeapon.weaponName == 'space' && (v6.weaponName == 'specialLoad' && (v6.inStock > 0 && v6.active))) {
var v5 = v6;
v3 = v6.maxKills == 2000;
}
}
}
return v5;
};
v1.__get__stocked_for_ship_attack = function () {
if (this.war1.inStock > 0 || (this.war2.inStock > 0 || (this.war3.inStock > 0 || (this.bio1.inStock > 0 || (this.bio2.inStock > 0 || this.bio3.inStock > 0))))) {
return true;
}
return false;
};
v1.payloadAvailable = function (_wpn) {
var v3 = false;
for (var i in this.weaponArr) {
var v4 = this.weaponArr[i];
if (_wpn.weaponType == 'rocket' && v4.weaponLevel >= _wpn.weaponLevel) {
v3 = true;
} else {
if (_wpn.weaponType == 'plane' && this.payloadInStock(v4)) {
if (_wpn.weaponLevel >= v4.weaponLevel) {
v3 = true;
}
} else {
if (_wpn.weaponType == 'sub' && this.payloadInStock(v4)) {
v3 = true;
} else {
if (_wpn.weaponType == 'ship' && this.payloadInStock(v4)) {
v3 = true;
}
}
}
}
}
if (_wpn.weaponType == 'space' && this.specialLoad.inStock > 0) {
v3 = true;
}
return v3;
};
v1.__get__logicalCarrierArr = function () {
this._logicalCarrierArr = [];
for (var i in this.weaponArr) {
var v2 = this.weaponArr[i];
if (this.payloadAvailable(v2) && v2.inStock > 0) {
this._logicalCarrierArr.push(v2);
}
}
return this._logicalCarrierArr;
};
v1.__get__highWeaponCount = function () {
var v2 = 0;
var v3 = new Array(undefined, 0, 0, 0, 0);
var v4 = 0;
for (var i in this.weaponArr) {
var v5 = this.weaponArr[i];
if (v5.inStock > 0) {
++v3[v5.weaponLevel];
}
}
var v6 = 0;
goto 9844;
for (;;) {
++v6;
label 9844:
if (v6 >= 5) break;
if (v3[v6] >= v4) {
v4 = v3[v6];
v2 = v6;
}
}
return v2;
};
v1.__get__inStock_perLevel_obj = function () {
var v2 = new Object();
v2._level1 = 0;
v2._level2 = 0;
v2._level3 = 0;
v2._level4 = 0;
for (var i in this.weaponArr) {
v2['_level' + this.weaponArr[i].weaponLevel] += this.weaponArr[i].inStock;
}
return v2;
};
v1.__get__spyAvailable = function () {
for (var i in this.weaponArr) {
if (this.weaponArr[i].weaponType == 'spy' && (this.weaponArr[i].inStock > 0 && this.weaponArr[i].active)) {
return true;
}
}
return false;
};
v1.activateAll = function (_amount) {
var v3 = _amount || 1;
for (var i in this.weaponArr) {
var v4 = this.weaponArr[i];
v4.active = true;
v4.bioloaded = false;
v4.inStock = v3;
}
};
v1.__get__availableSpies_obj = function () {
var v2 = new Object();
v2._level1 = 0;
v2._level2 = 0;
v2._level3 = 0;
v2._level4 = 0;
for (var i in this.weaponArr) {
var v3 = this.weaponArr[i];
if (v3.weaponType == 'spy') {
v2['_level' + v3.weaponLevel] += v3.inStock;
}
}
return v2;
};
v1.get_highest_spy_level = function () {
var v2 = 0;
var v3 = 0;
goto 10705;
for (;;) {
++v3;
label 10705:
if (v3 >= this.weaponArr.length) break;
var v4 = this.weaponArr[v3];
if (v4.weaponType == 'spy' && (v4.inStock > 0 && v4.active)) {
if (v4.weaponLevel > v2) {
v2 = v4.weaponLevel;
}
}
}
return v2;
};
v1.__get__instock_active_payloads = function () {
var v2 = new Array();
for (var i in this.weaponArr) {
var v3 = this.weaponArr[i];
if ((v3.weaponCategory == 'payload' || v3.weaponCategory == 'specialLoad') && (v3.inStock > 0 && v3.active)) {
v2.push(v3);
}
}
return v2;
};
v1.__get__instock_active_payloads_perStock = function () {
var v2 = new Array();
for (var i in this.weaponArr) {
var v3 = this.weaponArr[i];
if ((v3.weaponCategory == 'payload' || v3.weaponCategory == 'specialLoad') && (v3.inStock > 0 && v3.active)) {
var v4 = 0;
goto 11244;
for (;;) {
++v4;
label 11244:
if (v4 >= v3.inStock) break;
v2.push(v3);
}
}
}
return v2;
};
v1.__get__randomAvailableCarrier = function () {
var v2 = _global.model.tools.randRange(1, 3);
var v3 = new Object();
v3.rocket = false;
v3.plane = false;
v3.sub = false;
v3.ship = false;
v3.space = false;
var v4 = new Array();
var v5 = '';
for (var i in this.logicalCarrierArr) {
var v6 = this.logicalCarrierArr[i];
switch (v6.weaponType) {
case 'rocket':
v3.rocket = true;
break;
case 'plane':
v3.plane = true;
break;
case 'sub':
v3.sub = true;
break;
case 'ship':
v3.ship = true;
break;
case 'space':
v3.space = true;
}
}
if (v3.rocket == true) {
v4.push('rocket');
}
if (v3.plane == true) {
v4.push('plane');
}
if (v3.sub == true) {
v4.push('sub');
}
if (v3.ship == true) {
v4.push('ship');
}
if (v3.space == true) {
v4.push('space');
}
v5 = v4[_global.model.tools.randRange(0, v4.length - 1)];
var v7 = 0;
for (var i in this.logicalCarrierArr) {
var v8 = this.logicalCarrierArr[i];
if (v8.weaponType == v5 && v7 < v8.weaponLevel) {
return v8;
}
}
};
v1.__get__weaponStocklevel = function () {};
v1.__get__productionArray = function () {
var v2 = new Array();
for (var i in this.weaponArr) {
var v3 = this.weaponArr[i];
if (v3.preOrder > 0) {
v2.push({'weapon': v3, 'amount': v3.preOrder});
}
}
for (var i in this.counterArr) {
var v4 = this.counterArr[i];
if (v4.preOrder > 0) {
v2.push({'weapon': v4, 'amount': v4.preOrder});
}
}
return v2;
};
v1.__get__production_money_spent = function () {
var v2 = 0;
for (var i in this.weaponArr) {
v2 += this.weaponArr[i].preOrder * this.weaponArr[i].cost;
}
v2 += this.antiAir.preOrder * this.antiAir.cost;
v2 += this.antiRocket.preOrder * this.antiRocket.cost;
return v2;
};
v1.resetPreOrder = function () {
for (var i in this.weaponArr) {
this.weaponArr[i].preOrder = 0;
}
this.antiAir.preOrder = 0;
this.antiRocket.preOrder = 0;
};
v1.resetInUse = function () {
for (var i in this.weaponArr) {
this.weaponArr[i].inUse = 0;
}
this.antiAir.inUse = 0;
this.antiRocket.inUse = 0;
};
v1.__get__highestRocketLoad = function () {
var v2 = 0;
for (var i in this.weaponArr) {
if (this.weaponArr[i].active && this.weaponArr[i].weaponLevel > v2.weaponLevel) {
v2 = this.weaponArr[i];
}
}
};
v1.__set__boughtMSG = function (_str) {
return this.__get__boughtMSG();
};
v1.__get__boughtMSG = function () {
var v2 = 'Weapons produced: ' + ' <br />';
var v3 = false;
for (var i in this.weaponArr) {
var v4 = this.weaponArr[i];
if (v4.boughtInLastTurn > 0) {
if (!v3) {
v3 = true;
v2 += ' -- ' + v4.prettyName + ' x' + v4.boughtInLastTurn + ' <br />';
} else {
v2 += ' -- ' + v4.prettyName + ' x' + v4.boughtInLastTurn + ' <br />';
}
}
}
if (this.antiAir.boughtInLastTurn > 0) {
if (!v3) {
v3 = true;
v2 += ' -- ' + 'Anti Aircraft' + ' x' + this.antiAir.boughtInLastTurn + ' <br />';
} else {
v2 += ' -- ' + 'Anti Aircraft' + ' x' + this.antiAir.boughtInLastTurn + ' <br />';
}
}
if (this.antiRocket.boughtInLastTurn > 0) {
if (!v3) {
v3 = true;
v2 += ' -- ' + 'Anti Rocket' + ' x' + this.antiRocket.boughtInLastTurn + ' <br />';
} else {
v2 += ' -- ' + 'Anti Rocket' + ' x' + this.antiRocket.boughtInLastTurn + ' <br />';
}
}
if (v3) {
return v2;
} else {
return '';
}
};
v1.removeBioload = function () {
for (var i in this.weaponArr) {
if (this.weaponArr[i].bioloaded) {
this.weaponArr[i].active = true;
this.weaponArr[i].bioloaded = false;
}
}
};
v1.resetBought = function () {
for (var i in this.weaponArr) {
this.weaponArr[i].boughtInLastTurn = 0;
}
this.antiAir.boughtInLastTurn = 0;
this.antiRocket.boughtInLastTurn = 0;
};
v1.is_activeCategory = function (_num) {
for (var i in this.weaponArr) {
if (this.weaponArr[i].desireGroup == _num && this.weaponArr[i].active) {
return true;
}
}
return false;
};
v1.active_dCat_count = function () {
var v2 = 0;
var v3 = 0;
goto 13938;
for (;;) {
++v3;
label 13938:
if (v3 >= 8) break;
if (this.is_activeCategory(v3)) {
++v2;
}
}
return v2;
};
v1.set_wpn_stock_per_level = function (a_level, a_stock) {
for (var i in this.weaponArr) {
var v4 = this.weaponArr[i];
if (v4.weaponLevel == a_level) {
v4.inStock = a_stock;
}
}
};
v1.set_easy_wpn_stock = function () {};
v1.max_stock = function () {
for (var i in this.weaponArr) {
if (this.weaponArr[i].active) {
this.weaponArr[i].inStock = 4;
}
this.counterArr[0].inStock = 4;
this.counterArr[1].inStock = 4;
}
};
v1.addProperty('randomAvailableCarrier', v1.__get__randomAvailableCarrier, function () {});
v1.addProperty('boughtMSG', v1.__get__boughtMSG, v1.__set__boughtMSG);
v1.addProperty('highWeaponCount', v1.__get__highWeaponCount, function () {});
v1.addProperty('availableWeaponsArr', v1.__get__availableWeaponsArr, function () {});
v1.addProperty('spyAvailable', v1.__get__spyAvailable, function () {});
v1.addProperty('production_money_spent', v1.__get__production_money_spent, function () {});
v1.addProperty('allowDir', v1.__get__allowDir, function () {});
v1.addProperty('logicalCarrierArr', v1.__get__logicalCarrierArr, function () {});
v1.addProperty('highestRocketLoad', v1.__get__highestRocketLoad, function () {});
v1.addProperty('allowPre', v1.__get__allowPre, function () {});
v1.addProperty('availableSpies_obj', v1.__get__availableSpies_obj, function () {});
v1.addProperty('productionArray', v1.__get__productionArray, function () {});
v1.addProperty('instock_active_payloads_perStock', v1.__get__instock_active_payloads_perStock, function () {});
v1.addProperty('inStock_perLevel_obj', v1.__get__inStock_perLevel_obj, function () {});
v1.addProperty('instock_active_payloads', v1.__get__instock_active_payloads, function () {});
v1.addProperty('weaponStocklevel', v1.__get__weaponStocklevel, function () {});
v1.addProperty('stocked_for_ship_attack', v1.__get__stocked_for_ship_attack, function () {});
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5267 __Packages.WeaponSlot {
#initclip
if (!WeaponSlot) {
_global.WeaponSlot = function (param_type, param_category, param_level, param_name, param_ID, param_cost, param_techName, param_counteredBy, param_active, param_maxKills, param_initStock, param_maxStock, param_mcLinkage, param_inUse, param_desireGroup, param_explosion_mc_name, param_prettyName) {
this.investment = 0;
this.weaponType = param_type;
this.weaponCategory = param_category;
this.weaponLevel = param_level;
this.weaponName = param_name;
this.weaponID = param_ID;
this.cost = param_cost;
this.relatedTechName = param_techName;
this.counteredBy = param_counteredBy;
this.active = param_active;
this.maxKills = param_maxKills;
this._inStock = param_initStock;
this.maxStock = param_maxStock;
this.mcLinkage = param_mcLinkage;
this.inUse = param_inUse;
this.desireGroup = param_desireGroup;
this.prettyName = param_prettyName;
this.boughtInLastTurn = 0;
this.bioloaded = false;
this.explosion_mc_name = param_explosion_mc_name;
};
var v1 = _global.WeaponSlot.prototype;
v1.buy = function () {
++this.inStock;
++this.boughtInLastTurn;
};
v1.__set__inStock = function (_nr) {
this._inStock = _nr;
return this.__get__inStock();
};
v1.__get__inStock = function () {
return this._inStock;
};
v1.addProperty('inStock', v1.__get__inStock, v1.__set__inStock);
ASSetPropFlags(v1, null, 1);
v1.preOrder = 0;
v1.inUse = 0;
}
#endinitclip
}
movieClip 5268 __Packages.TurnAction {
#initclip
if (!TurnAction) {
_global.TurnAction = function (param_num) {
this.turnMoney = 0;
this.num = param_num;
this.productionInvestmentArr = new Array([], ['rockets', 0, 1, 0, 1], ['planes', 0, 6, 0, 2], ['special', 0, 7, 0, 3], ['warhead', 0, 2, 0, 4], ['bioload', 0, 3, 0, 5], ['soldier', 0, 4, 0, 6], ['spy', 0, 5, 0, 7], ['defense', 0, 8, 0, 8]);
};
var v1 = _global.TurnAction.prototype;
v1.doReset = function () {
this.attackWeapon.inUse = 0;
this.preAttackCarrier.inUse = 0;
this.preAttackPayload.inUse = 0;
this.action = undefined;
this.targetPlayer = undefined;
this.targetCity = undefined;
this.preAttackCarrier = undefined;
this.preAttackPayload = undefined;
this.attackWeapon = undefined;
this.inventTech = undefined;
this.buyArr = [];
this.humanBuyArr = [];
this.humanResearchArr = [];
this.inventArr = [];
this.forceCity = undefined;
this.ship_attack_arr = undefined;
this.productionInvestmentArr = new Array([], ['rockets', 0, 1, 0, 1], ['planes', 0, 6, 0, 2], ['special', 0, 7, 0, 3], ['warhead', 0, 2, 0, 4], ['bioload', 0, 3, 0, 5], ['soldier', 0, 4, 0, 6], ['spy', 0, 5, 0, 7], ['defense', 0, 8, 0, 8]);
this.researchArr = [];
this.diplomacyArr = [];
_global.model.human.turnMoney += this.turnMoney;
this.researchMoneySpend = 0;
this.turnMoney = 0;
this.diplomacyLeader = undefined;
this.diplomacyOption = undefined;
this.spyBuilding = 'spyCenter';
};
v1.__set__action = function (_str) {
if (_str == 'reset') {
if (this.action == '_attack' || (this._action == 'preAttack' || this._action == 'attack')) {
this._action = 'reset';
}
return this.__get__action();
}
this._action = _str;
return this.__get__action();
};
v1.__get__action = function () {
return this._action;
};
v1.__get__actionNames = function () {
var v2 = '';
if (this.action) {
v2 += '<b> ' + this.action + ' </b><br/>';
}
if (this.targetPlayer) {
v2 += ' targetPlayer: ' + this.targetPlayer.playerNum + '<br/>';
}
if (this.targetCity) {
v2 += ' targetCity: ' + this.targetCity.cityID + '<br/>';
}
if (this.preAttackCarrier) {
v2 += ' carrier: ' + this.preAttackCarrier.weaponName + '<br/>';
}
if (this.preAttackPayload) {
v2 += ' payload: ' + this.preAttackPayload.weaponName + '<br/>';
}
if (this.attackWeapon) {
v2 += ' attackWeapon: ' + this.attackWeapon.weaponName + '<br/>';
}
if (this.inventTech) {
v2 += ' inventTech: ' + this.inventTech.techName + '<br/>';
}
if (this.buyArr.length > 0) {
v2 += ' buyArr: ';
for (var i in this.buyArr) {
v2 += this.buyArr[i].weapon.weaponName + ' - ';
}
v2 += ' <br/> ';
}
return v2;
};
v1.__get__productionMoneySpend = function () {
var v2 = 0;
for (var i in this.productionInvestmentArr) {
if (this.productionInvestmentArr[i][3] > 0) {
v2 += this.productionInvestmentArr[i][3];
}
}
return v2;
};
v1.addProperty('productionMoneySpend', v1.__get__productionMoneySpend, function () {});
v1.addProperty('action', v1.__get__action, v1.__set__action);
v1.addProperty('actionNames', v1.__get__actionNames, function () {});
ASSetPropFlags(v1, null, 1);
v1.reset = false;
}
#endinitclip
}
movieClip 5269 __Packages.City {
#initclip
if (!City) {
_global.City = function (param_num, param_population, param_plr) {
this.num = param_num;
this.cityID = param_num;
this.prevPopulation = param_population;
this.population = param_population;
this.plr = param_plr;
this.selectionObj = new Object();
this.selectionObj.mcArray = [];
this.selectionObj.attack = false;
this.selectionObj.attackMC = undefined;
this.selectionObj.preAttack = false;
this.selectionObj.preAttackMC = undefined;
this.selectionObj.preAttackWeapon = undefined;
this.selectionObj.propaganda = false;
this.selectionObj.propagandaMC = undefined;
this.selectionObj.ship = false;
this.selectionObj.shipCount = 0;
this.selectionObj.shipMC_arr = new Array();
this.total_battle_casualties = 0;
this.propagandaMin = [];
this.propagandaMinIndex = 0;
this.propagandaPlus = 0;
this.hideForSelection = false;
this.showForSelection = false;
this.bioloaded = false;
this.bioload_in_battle = undefined;
this.bioCloud_container = undefined;
this.bioCloud_arr = [];
this.battle_loop_casualties = 0;
this.propaganda_exclude = false;
};
var v1 = _global.City.prototype;
v1.selectForShipAttack = function () {
++this.selectionObj.shipCount;
this.selectionObj.ship = true;
};
v1.deselectForShipAttack = function () {
this.selectionObj.shipMC_arr[0].removeMovieClip();
this.selectionObj.shipMC_arr.splice(0, 1);
--this.selectionObj.shipCount;
if (this.selectionObj.shipCount <= 0) {
this.removeSelection('ship');
}
};
v1.setMapVars = function (param_mapMC, param_depth, param_xPos, param_yPos) {
this.mapMC = param_mapMC;
this.yPos = param_yPos;
this.xPos = param_xPos;
this.image_depth = Math.floor((this.yPos + 15) / 10) * 500 + (4 + this.cityID);
var v6 = false;
var v7 = 0;
while (!v6) {
if (this.checkDepth(this.image_depth)) {
v6 = true;
} else {
--this.image_depth;
}
++v7;
if (v7 > 90) {
v6 = true;
}
}
_global.model.cityDepthArr.push(this.image_depth);
};
v1.checkDepth = function (_nr) {
var v3 = true;
for (var i in _global.model.cityDepthArr) {
if (_global.model.cityDepthArr[i] == _nr) {
return false;
}
}
return v3;
};
v1.__set__theme = function (_param) {
this.citySet = _param;
return this.__get__theme();
};
v1.__get___isSelected = function () {
var v2 = false;
this.selectionCount = 0;
if (this.selectionObj.attack) {
v2 = true;
++this.selectionCount;
}
if (this.selectionObj.preAttack) {
v2 = true;
++this.selectionCount;
}
if (this.selectionObj.propaganda) {
v2 = true;
++this.selectionCount;
}
if (this.selectionObj.ship) {
v2 = true;
this.selectionCount += this.selectionObj.shipCount;
}
return v2;
};
v1.removeSelection = function (_action) {
switch (_action) {
case 'preAttack':
this.selectionObj.preAttack = false;
this.selectionObj.preAttackWeapon = undefined;
--this.selectionCount;
this.selectionObj.preAttackMC.removeMovieClip();
break;
case 'attack':
this.selectionObj.attack = false;
--this.selectionCount;
this.selectionObj.attackMC.removeMovieClip();
break;
case 'propaganda':
this.selectionObj.propaganda = false;
--this.selectionCount;
this.selectionObj.propagandaMC.removeMovieClip();
break;
case 'ship':
this.selectionObj.ship = false;
this.selectionObj.shipMC_arr = [];
this.selectionObj.shipCount = 0;
break;
case 'all':
this.selectionMC.removeMovieClip();
this.selectionCount = 0;
this.selectionObj.attack = false;
this.selectionObj.attackMC.removeMovieClip();
this.selectionObj.preAttack = false;
this.selectionObj.preAttackMC.removeMovieClip();
this.selectionObj.propaganda = false;
this.selectionObj.propagandaMC.removeMovieClip();
this.selectionObj.ship = false;
this.selectionObj.shipMC_arr = [];
this.selectionObj.shipCount = 0;
}
if (!this._isSelected) {
this._selected = false;
this.selectionMC.removeMovieClip();
this.selectionMC = undefined;
}
};
v1.alignSelectionMC = function () {
this.selectionMC._x = this.xPos;
this.selectionMC._y = this.yPos - 25;
var v2 = 0;
for (var i in this.selectionObj.mcArray) {
v2 += this.selectionObj.mcArray[i]._width;
}
var v3 = 0;
goto 3375;
for (;;) {
++v3;
label 3375:
if (v3 >= this.selectionObj.mcArray.length) break;
if (v3 == 0) {
this.selectionObj.mcArray[v3]._x = -(v2 / 2);
} else {
this.selectionObj.mcArray[v3]._x = this.selectionObj.mcArray[v3 - 1]._x + this.selectionObj.mcArray[v3 - 1]._width;
}
this.selectionObj.mcArray[v3]._y = 25;
}
};
v1.updateIMG = function () {
this.image.gotoAndStop(this.size_and_frame);
};
v1.__get__size_and_frame = function () {
var v2 = Math.ceil((this.population / this.frame_divider) * 6);
this.debugTextField.text = 'pop: ' + this.population;
if (this.deathFrame && this.population <= 0) {
return this.deathFrame;
}
if (this.population <= 0 && this._prevFrame != 99) {
this.population = 0;
var v3 = this._prevFrame + 9;
this._prevFrame = 99;
return v3;
}
if (this.population < 0) {
this.population = 0;
}
if (v2 <= 6) {
this._prevFrame = v2;
return v2;
} else {
this._prevFrame = 6;
return 6;
}
};
v1.removeBioload = function () {
this.bioloaded = false;
for (var i in this.bioCloud_arr) {
this.bioCloud_arr[i].removeMovieClip();
}
this.bioCloud_arr = [];
this.bioCloud_container.removeMovieClip();
};
v1.propagandaMin_func = function () {
this.size_and_frame_in_battle(this.propagandaMin[this.propagandaMinIndex], true, 'propaganda');
++this.propagandaMinIndex;
};
v1.propagandaPlus_func = function () {
this.curCasualties -= this.propagandaPlus;
this.size_and_frame_in_battle(0, true);
};
v1.size_and_frame_in_battle = function (casualties, play_sequence, extra_string) {
if (this.deathFrame && this.population <= 0) {
return this.deathFrame;
}
this.curCasualties += casualties;
var v5 = Math.ceil(((this.prevPopulation - this.curCasualties) / this.frame_divider) * 6);
if (this.prevPopulation - this.curCasualties <= 0) {
if (!this._prevFrame) {
this._prevFrame = this.image._currentframe;
}
this.deathFrame = this._prevFrame + 9;
this.population = 0;
_global.view.city_shrink_sequence(this.image, this.deathFrame);
return this.deathFrame;
}
if (this.population < 0) {
this.population = 0;
}
this.debugTextField.text = 'pop: ' + this.population;
if (v5 <= 6) {
if (v5 != this._prevFrame && play_sequence) {
_global.view.city_shrink_sequence(this.image, v5, extra_string, this.propagandaMinIndex);
}
this._prevFrame = v5;
return v5;
} else {
this._prevFrame = 6;
return 6;
}
};
v1.__set__size_and_frame = function (_param) {
return this.__get__size_and_frame();
};
v1.addProperty('size_and_frame', v1.__get__size_and_frame, v1.__set__size_and_frame);
v1.addProperty('_isSelected', v1.__get___isSelected, function () {});
v1.addProperty('theme', function () {}, v1.__set__theme);
ASSetPropFlags(v1, null, 1);
v1._theme = 'string';
v1.curCasualties = 0;
v1.prevPopulation = 0;
v1.selectionCount = 0;
v1.frame_divider = 90;
v1.carrierAttackCount = 0;
}
#endinitclip
}
movieClip 5270 __Packages.Unit {
#initclip
if (!Unit) {
_global.Unit = function (param_unitID, param_container, param_targetType, param_newName, param_startX, param_startY, param_wayPointArr, param_result, param_tail, param_tailNum, param_force_MC, param_colorTrans, param_startNum, param_depth, param_targetPlayer, param_tr, param_playerNum, param_colorName, param_wildCard, param_explosion_mc_name) {
this.xTargetStep = 0;
this.yTargetStep = 0;
this.targetX = 0;
this.targetY = 0;
this.curX = 0;
this.curY = 0;
this.prevX = 0;
this.prevY = 0;
this.adjside = 0;
this.oppside = 0;
this.angle = 0;
this.xDist = 0;
this.yDist = 0;
this.step = 0;
this.xStep = 0;
this.yStep = 0;
this.unloadTimer = 0;
this.curWayPoint = 0;
this.curShootOffset = 0;
this.maxShootOffset = 0;
this.unloadTailCount = 0;
this.unloadNum = 0;
this.multiFrame = false;
this.atTarget = false;
this.visible = true;
this.countDownToStop = 250;
this.shotCount = 0;
this.dropCount = 0;
this.trailActive = false;
this.framesActive = 0;
this.trailStart = false;
this.curCountToStop = 0;
this.unitStatus = 'alive';
this.activeAndMoving = true;
this.anti_initiated = false;
this.anti_life_count = 0;
this.anti_pos = [0, 0];
this.anti_mc_name = '';
this.xyArr = new Array([0, 0], [0, 0]);
this.unitID = param_unitID;
this.startX = param_startX;
this.startY = param_startY;
this.targetPlayer = param_targetPlayer;
this.tr = param_tr;
this.trailArr = new Array();
this.playerNum = param_playerNum;
this.colorName = param_colorName;
this.wildCard = param_wildCard;
this.explosion_mc_name = param_explosion_mc_name;
if (param_force_MC) {
param_targetType = param_force_MC;
}
if (this.wildCard.anti) {
this.anti_active = true;
this.anti_num = this.wildCard.antiNum;
} else {
this.anti_active = false;
}
this.colorTrans = param_colorTrans;
this.shadowXOffset = 0;
this.shadowYOffset = 0;
this.startNum = param_startNum;
this.plane_angle_step = param_wildCard.plane_angle_step;
this.plane_cur_angle_in_circular_flight = param_wildCard.plane_angle_start;
this.plane_angle_start = this.plane_cur_angle_in_circular_flight;
this.plane_circular_modifier = this.wildCard.circular_modifier_center;
this.plane_circular_radius = this.wildCard.circular_radius || 100;
switch (param_targetType) {
case 'plane1':
this.action = 'liftOff';
this.mcID = 'plane001';
this.step = 12;
this.range = 40;
this.x_multiplier = this.wildCard.x_multiplier || 0.5;
this.y_multiplier = this.wildCard.y_multiplier || 2;
this.frameCount = 24;
this.liftOff = true;
this.hasShadow = true;
this.tintMC_id = 'plane001_tint';
this.shadowMC_id = 'plane001_shadow';
this.shadowXOffset = 0;
this.shadowYOffset = 0;
this.activeAndMoving = true;
this.trailCount = 1;
this.trailCountDown = 5;
this.trailSize = 50;
this.trail_offset = 25;
this.anti_type = 'air';
this.anti_offset = 0;
break;
case 'plane2':
this.action = 'liftOff';
this.mcID = 'plane002';
this.tintMC_id = 'plane002_tint';
this.shadowMC_id = 'plane002_shadow';
this.step = 12;
this.range = 40;
this.x_multiplier = this.wildCard.x_multiplier || 0.5;
this.y_multiplier = this.wildCard.y_multiplier || 2;
this.frameCount = 24;
this.liftOff = true;
this.trailCountDown = 1;
this.trailCount = 2;
this.trailSize = 22;
this.hasShadow = true;
this.anti_type = 'air';
this.anti_offset = 0;
break;
case 'ship_plane':
this.action = 'waitForLiftOff';
this.mcID = 'ship_plane';
this.trailCount = 2;
this.trailSize = 8;
this.trailMultiplier = 4;
this.step = 10;
this.range = 40;
this.x_multiplier = 1;
this.y_multiplier = 2;
this.frameCount = 24;
this.liftOff = true;
this.hasShadow = true;
this.tintMC_id = 'plane001_tint';
this.shadowMC_id = 'plane001_shadow';
this.activeAndMoving = true;
this.trailCount = 1;
this.trailCountDown = 5;
this.anti_type = 'air';
this.trailSize = 50;
this.wildCard.liftOffCount = 0;
this.idleFrame = 4;
break;
case 'boat':
this.unloadMax = 4;
this.range = 15;
this.action = 'default';
this.mcID = 'boat001';
this.tintMC_id = 'boat001_tint';
this.step = 7;
this.x_multiplier = 2;
this.y_multiplier = 2;
this.frameCount = 18;
this.hasShadow = false;
this.depthSwap = true;
this.startSoundOnAAM = true;
this.startSoundAction = 'boat_start';
this.floorFrame = true;
this.cancelBib = true;
break;
case 'chinook':
this.unloadMax = 2;
this.range = 25;
this.action = 'waitForHeliStart';
this.mcID = 'chinook';
this.shadowMC_id = 'chinook_shadow';
this.step = 8;
this.x_multiplier = 2;
this.y_multiplier = 2;
this.frameCount = 18;
this.multiFrame = true;
this.frameOffset = 0;
this.hasShadow = true;
this.shadowXOffset = 0;
this.shadowYOffset = 70;
this.offsetFrames = 2;
this.heliStartPlusX = 15;
this.heliStartPlusY = -100;
this.fixedFrame = 4;
break;
case 'apache':
this.unloadMax = 4;
this.range = 25;
this.action = 'waitForHeliStart';
this.mcID = 'apache';
this.hasShadow = true;
this.step = 8;
this.x_multiplier = 2;
this.y_multiplier = 2;
this.frameCount = 18;
this.multiFrame = true;
this.frameOffset = 0;
this.offsetFrames = 2;
this.tintMC_id = 'apache_tint';
this.shadowMC_id = 'apache_shadow';
this.shadowXOffsetMax = 0;
this.shadowYOffsetMax = 70;
this.shadowXOffset = 0;
this.shadowYOffset = 0;
this.shadowStartAtUnitBase = true;
this.heliStartPlusX = 25;
this.heliStartPlusY = -25;
this.startSoundOnAAM = true;
this.startSoundAction = 'apache_start';
break;
case 'soldier':
this.range = 2;
this.action = 'default';
this.mcID = 'soldier001';
this.step = 4;
this.x_multiplier = 0.5;
this.y_multiplier = 0.4;
this.frameCount = 18;
this.multiFrame = true;
this.frameOffset = 1;
this.hasShadow = false;
this.offsetFrames = 12;
this.visible = false;
this.activeAndMoving = false;
this.maxShotCount = 75;
this.maxShootOffset = 4;
this.schootMCID = 'soldier001_shoot';
this.tintMC_id = 'soldier001_tint';
this.shootTintMC_id = 'soldier001_shoot_tint';
this.depthSwap = true;
this.startSoundOnAAM = true;
this.startSoundAction = 'soldier_running';
this.instantTurn = true;
break;
case 'tank_noShade':
this.range = 10;
this.action = 'tail';
this.mcID = 'tank_noShade';
this.step = 2;
this.x_multiplier = 2;
this.y_multiplier = 2;
this.frameCount = 18;
this.multiFrame = false;
this.frameOffset = 1;
this.hasShadow = false;
this.activeAndMoving = false;
this.dropDistance = 20;
this.depthSwap = true;
this.instantTurn = false;
this.floorFrame = true;
this.cancelBib = true;
this.maxShotCount = 60;
break;
case 'tankTop':
this.action = 'tail';
this.mcID = 'tankTop';
this.step = 4;
this.x_multiplier = 0.5;
this.y_multiplier = 0.4;
this.frameCount = 18;
this.multiFrame = false;
this.frameOffset = 1;
this.hasShadow = false;
this.activeAndMoving = false;
this.depthSwap = true;
this.instantTurn = true;
break;
case 'marine':
this.range = 10;
this.action = 'default';
this.mcID = 'marine';
this.step = 4;
this.x_multiplier = 0.5;
this.y_multiplier = 0.4;
this.frameCount = 18;
this.multiFrame = true;
this.frameOffset = 1;
this.hasShadow = false;
this.offsetFrames = 12;
this.visible = false;
this.activeAndMoving = false;
this.maxShotCount = 60;
this.maxShootOffset = 4;
this.schootMCID = 'soldier001_shoot';
this.tintMC_id = 'soldier001_tint';
this.shootTintMC_id = 'soldier001_shoot_tint';
this.depthSwap = true;
this.startSoundOnAAM = true;
this.startSoundAction = 'soldier_running';
this.instantTurn = false;
break;
case 'suicide_bomber':
this.range = 10;
this.action = 'waitForHeliStart';
this.mcID = 'suicide_bomber';
this.step = 4;
this.x_multiplier = 0.5;
this.y_multiplier = 0.4;
this.frameCount = 18;
this.multiFrame = true;
this.frameOffset = 1;
this.hasShadow = false;
this.offsetFrames = 12;
this.activeAndMoving = false;
this.maxShotCount = 60;
this.maxShootOffset = 4;
this.tintMC_id = 'suicide_bomber_tint';
this.heliStartPlusX = 25;
this.heliStartPlusY = -50;
this.depthSwap = true;
break;
case 'rocket':
this.range = 14;
this.action = 'default';
this.mcID = 'rocket';
this.step = 4;
this.x_multiplier = 3;
this.y_multiplier = 2;
this.frameCount = 18;
this.multiFrame = false;
this.hasShadow = false;
this.visible = true;
this.activeAndMoving = true;
this.trailCount = 1;
this.trailSize = 50;
this.trailMultiplier = 20;
this.trailCountDown = 5;
this.startSoundOnAAM = true;
this.startSoundAction = 'rocket_launch';
this.anti_type = 'rocket';
break;
case 'sub_rocket':
this.range = 14;
this.action = 'default';
this.mcID = 'sub_rocket';
this.step = 4;
this.x_multiplier = 3;
this.y_multiplier = 2;
this.frameCount = 18;
this.multiFrame = false;
this.hasShadow = false;
this.visible = true;
this.activeAndMoving = true;
this.trailCount = 1;
this.trailSize = 50;
this.trailMultiplier = 20;
this.trailCountDown = 5;
this.startSoundOnAAM = true;
break;
case 'plane2':
this.action = 'liftOff';
this.mcID = 'plane002';
this.tintMC_id = 'plane002_tint';
this.shadowMC_id = 'plane002_shadow';
this.step = 10;
this.range = 60;
this.x_multiplier = 0.5;
this.y_multiplier = 0.7;
this.frameCount = 24;
this.liftOff = true;
this.trailCountDown = 1;
this.trailCount = 2;
this.trailSize = 22;
this.hasShadow = true;
break;
case 'space':
this.action = 'wait';
this.mcID = 'satellite';
}
this.container = param_container;
this.unitName = param_newName;
if (this.depthSwap) {
this.depth_ = param_depth;
} else {
if (this.mcID == 'sattelite') {
this.depth_ = this.container.getNextHighestDepth();
} else {
this.depth_ = 800000 + param_depth;
}
}
if (this.mcID == 'tankTop') {
this.MC = this.container.attachMovie(this.mcID + '_' + this.colorName, this.unitName, this.depth_);
} else {
if (this.wildCard._number) {
this.MC = this.container.attachMovie(this.mcID, this.unitName, this.depth_ + this.wildCard._number);
} else {
if (this.mcID == 'sub_rocket') {
this.MC = this.container.attachMovie('rocket', this.unitName, this.container.getNextHighestDepth());
this.MC._yscale = 50;
this.MC._x = 50;
this.action = 'wait_for_sub_launch';
} else {
this.MC = this.container.attachMovie(this.mcID, this.unitName, this.container.getNextHighestDepth());
}
}
}
if (this.mcID == 'suicide_bomber') {
this.MC.swapDepths(this.container.getNextHighestDepth());
}
this.activeAndMoving = false;
this.curX = param_startX;
this.curY = param_startY;
if (param_targetType == 'rocket' || param_targetType == 'sub_rocket') {
this.prevX = this.curX;
this.prevY = this.curY + 5;
this.tintMC = this.MC.tintMC;
this.colorObj = new Color(this.tintMC);
this.colorObj.setTransform(this.colorTrans);
this.ellipseWidth = this.wildCard.ellipseWidth;
this.ellipseHeight = this.wildCard.ellipseHeight;
this.ellipseCenterX = this.wildCard.ellipseCenterX;
this.ellipseCenterY = this.wildCard.ellipseCenterY;
this.ellipseRadiusX = this.ellipseWidth / 2;
this.ellipseRadiusY = this.ellipseHeight / 2;
this.ellipseAngle = this.wildCard.startAngle;
this.ellipseDirectionMultiplier = this.wildCard.directionMultiplier;
this.ellipseSpeed = 3;
this.ellipseTargetAngle = this.wildCard.targetAngle;
this.ellipseFinalAction = this.wildCard.finalAction;
}
this.tail = param_tail;
this.tailNum = param_tailNum;
if (this.hasShadow) {
this.shadowMC = this.container.attachMovie(this.shadowMC_id, 'shadow_' + this.unitName, this.container.getNextHighestDepth());
this.shadowMC._x = param_startX;
this.shadowMC._y = param_startY;
this.shadowMC._alpha = this.shadowStartAlpha;
}
if (this.tintMC_id) {
this.tintMC = this.container.attachMovie(this.tintMC_id, 'tint' + this.unitName, this.container.getNextHighestDepth());
this.colorObj = new Color(this.tintMC);
this.colorObj.setTransform(this.colorTrans);
}
if (this.mcID == 'apache') {
this.MC._yscale = 50;
this.MC._xscale = 50;
this.shadowMC._yscale = 50;
this.shadowMC._xscale = 50;
this.tintMC._yscale = 50;
this.tintMC._xscale = 50;
}
if (this.mcID == 'ship_plane') {
this.MC._yscale = 10;
this.MC._xscale = 10;
this.tintMC._yscale = 10;
this.tintMC._xscale = 10;
this.shadowMC._yscale = 10;
this.shadowMC._xscale = 10;
this.shadowMC._visible = false;
}
this.targetDot = this.container.attachMovie('redDot', 'targetDot' + this.unitName, param_container.getNextHighestDepth());
var v22 = new Color(this.targetDot);
v22.setTransform(this.colorTrans);
this.wayPointArr = param_wayPointArr;
if (this.liftOff) {
this.MC._yscale = 50;
this.MC._xscale = 50;
this.MC._alpha = 0;
this.shadowMC._yscale = 50;
this.shadowMC._xscale = 50;
this.tintMC._yscale = this.MC._xscale;
this.tintMC._xscale = this.tintMC._yscale;
}
this.result = param_result;
this.MC._visible = this.visible;
this.tintMC._visible = this.visible;
if (this.mcID == 'tank_noShade') {
this.MC.shadowMC._visible = false;
this.MC.shadowMC._y += 40;
}
if (this.wildCard.satelliteFrame) {
this.MC.gotoAndStop(this.wildCard.satelliteFrame);
}
this.laserStartMC = this.MC.mc.laserStartMC;
if (this.mcID == 'chinook') {
this.soundAction('chinook_start');
}
if (this.mcID == 'suicide_bomber') {
this.MC.swapDepths(this.container.getNextHighestDepth());
}
};
var v1 = _global.Unit.prototype;
v1.__get__appMC_depth = function () {
var v2 = this.container.getNextHighestDepth();
if (this.mcID != 'tankTop') {
v2 = Math.floor(this.curY / 10) * 500 + 120 + this.depth_;
} else {
v2 = this.tail.MC.getDepth() + 1;
}
if (this.tail.mcID == 'chinook') {
v2 = this.tail.MC.getDepth() - 2;
}
if (this.mcID == 'soldier001' && this.playerNum == 0) {
}
return v2;
};
v1.__set__appMC_depth = function (_param) {
return this.__get__appMC_depth();
};
v1.moveUnit = function () {
if (this.unit_live_countdown_status) {
if (--this.cur_unit_live >= this.max_unit_live) {
this.action = 'stop';
}
}
if (this.mcID == 'tankTop' && this.tail.action == 'tank_shoot') {
this.action = 'tank_top_shoot';
}
switch (this.action) {
case 'shoot':
if (this.mcID == 'soldier001') {
this.soundAction('soldier_shoot');
} else {
this.soundAction('marine_shoot');
}
if (this.shotCount == 0) {
this.constantDir = this.unitDirection;
this.setStep();
this.activeAndMoving = false;
this.MC.removeMovieClip();
this.tintMC.removeMovieClip();
this.MC = this.container.attachMovie(this.schootMCID, this.unitName, this.container.getNextHighestDepth());
this.tintMC = this.container.attachMovie(this.shootTintMC_id, 'tint' + this.unitName, this.MC.getDepth() + 1);
this.colorObj = new Color(this.tintMC);
this.colorObj.setTransform(this.colorTrans);
this.offsetFrames = this.maxShootOffset;
this.MC.gotoAndStop(5);
this.tintMC.gotoAndStop(5);
}
if (this.shotCount < this.maxShotCount) {
(_global.model.getCityByID(this.tr._city)).image.bulletHoles.play();
if (this.curShootOffset == 0) {
this.curShootOffset = 1;
} else {
this.curShootOffset = 0;
}
this.MC.gotoAndStop(this.constantDir);
this.tintMC.gotoAndStop(this.constantDir);
++this.shotCount;
} else {
_global.presenter.updateSingleCity_byID(this.tr._city, this.tr._casualties / 3);
this.action = 'stop';
}
break;
break;
case 'tank_shoot':
case 'tank_top_shoot':
this.tail.activeAndMoving = false;
this.tail.sound.stop('unit_Tank.wav');
if (this.tail.shotCount < this.tail.maxShotCount) {
var v2 = this.MC._currentframe;
if (v2 == this.tankTopDirection * 2 - 1 && this.tank_preshot_count > 25) {
this.MC.nextFrame();
this.tank_preshot_count = 0;
this.soundAction('tank_shoot');
} else {
if (this.tank_preshot_count > 3) {
this.MC.gotoAndStop(this.tankTopDirection * 2 - 1);
}
}
++this.tail.shotCount;
++this.tank_preshot_count;
} else {
_global.presenter.updateSingleCity_byID(this.tail.tr._city, this.tail.tr._casualties);
this.tail.action = 'stop';
this.action = 'stop';
}
break;
case 'tank_reset_range':
this.range = 40;
break;
case 'soldier_reset_range':
if (this.curX < this.wayPointArr[this.curWayPoint]._x) {
this.range = 100;
} else {
this.range = 25;
}
break;
case 'suicide_fade_out':
if (this.MC._alpha > 0 && this.activeAndMoving) {
this.MC._alpha -= 2;
this.tintMC._alpha = this.MC._alpha;
}
break;
case 'suicide_dissapear':
this.soundAction('suicide_scream');
this.activeAndMoving = false;
this.MC.gotoAndStop(17);
this.tintMC.gotoAndStop(17);
if (this.suicide_commando_wait_countDown_cur >= this.suicide_commando_wait_countDown_max) {
this.suicide_commando_wait_countDown_max = 0;
this.activeAndMoving = true;
} else {
++this.suicide_commando_wait_countDown_cur;
}
this.curX = this.wayPointArr[this.curWayPoint]._x;
this.curY = this.wayPointArr[this.curWayPoint]._y;
break;
case 'suicide_appear':
this.action = 'suicide_fade_in';
break;
case 'suicide_fade_in':
if (this.MC._alpha < 100) {
++this.MC._alpha;
this.tintMC._alpha = this.MC._alpha;
}
break;
case 'speedup_success':
this.action = 'default';
this.range = 70;
this.step = 15;
this.x_multiplier = 2;
this.y_multiplier = 1;
this.MC.gotoAndStop(2);
this.tintMC = this.MC.tintMC;
this.colorObj = new Color(this.tintMC);
this.colorObj.setTransform(this.colorTrans);
break;
case 'speedup_die':
_global.presenter.fireDefense(this.targetPlayer, 'antiAir_fire');
_global.presenter.updateSingleCity_byID(this.tr._city, this.tr._casualties);
_global.model.playerArr[this.targetPlayer].anti_inBattle_target = undefined;
_global.explosion_sound_by_mc_name('explosion003', this.MC._x);
this.killUnit('rocket_self');
break;
case 'explode':
_global.presenter.updateSingleCity_byID(this.tr._city, this.tr._casualties);
this.killUnit('default');
break;
case 'suicide_explode':
_global.explosion_sound_by_mc_name('suicide', this.MC._x);
_global.presenter.updateSingleCity_byID(this.tr._city, this.tr._casualties);
this.killUnit('suicide');
break;
case 'rocket_follow_ellipse_with_anti':
this.MC.gotoAndStop(3);
this.colorObj = new Color(this.tintMC);
this.colorObj.setTransform(this.colorTrans);
_global.presenter.fireDefense(this.targetPlayer, 'antiRocket_fire');
this.rocket_follow_ellipse = true;
this.action = 'none';
break;
case 'rocket_follow_ellipse':
this.MC.gotoAndStop(3);
this.colorObj = new Color(this.tintMC);
this.colorObj.setTransform(this.colorTrans);
this.rocket_follow_ellipse = true;
this.action = 'none';
break;
case 'rocket_explode_self':
_global.presenter.updateSingleCity_byID(this.tr._city, this.tr._casualties);
_global.model.playerArr[this.targetPlayer].anti_inBattle_target = undefined;
this.killUnit('rocket_self');
_global.explosion_sound_by_mc_name('explosion002', this.MC._x);
break;
case 'rocket_explode_city':
_global.presenter.updateSingleCity_byID(this.tr._city, this.tr._casualties);
_global.explosion_sound_by_mc_name(this.explosion_mc_name, this.MC._x);
this.explosionMC = this.container.attachMovie(this.explosion_mc_name, this.unitName + 'explosion', this.container.getNextHighestDepth());
this.explosionMC._x = this.wayPointArr[this.wayPointArr.length - 1]._x;
this.explosionMC._y = this.wayPointArr[this.wayPointArr.length - 1]._y;
if (this.wildCard.bioload && (_global.model.getCityByID(this.tr._city)).bioload_in_battle) {
_global.view.createBioCloud(_global.model.getCityByID(this.tr._city));
}
this.killUnit(undefined);
break;
case 'rocket_explode_city_from_sub':
_global.presenter.updateSingleCity_byID(this.tr._city, this.tr._casualties);
_global.explosion_sound_by_mc_name(this.explosion_mc_name, this.MC._x);
this.explosionMC = this.container.attachMovie(this.explosion_mc_name, this.unitName + 'explosion', this.container.getNextHighestDepth());
this.explosionMC._x = this.wayPointArr[this.wayPointArr.length - 1]._x;
this.explosionMC._y = this.wayPointArr[this.wayPointArr.length - 1]._y;
if (this.wildCard.bioload && (_global.model.getCityByID(this.tr._city)).bioload_in_battle) {
_global.view.createBioCloud(_global.model.getCityByID(this.tr._city));
}
this.killUnit(undefined);
break;
case 'bomb':
_global.explosion_sound_by_mc_name(this.explosion_mc_name, this.MC._x);
_global.presenter.updateSingleCity_byID(this.tr._city, this.tr._casualties);
this.action = 'flyOff';
this.explosionMC = this.container.attachMovie(this.explosion_mc_name, this.unitName + 'explosion', this.container.getNextHighestDepth());
this.explosionMC._x = this.wayPointArr[this.wayPointArr.length - 1]._x;
this.explosionMC._y = this.wayPointArr[this.wayPointArr.length - 1]._y + 100;
if (this.wildCard.bioload && (_global.model.getCityByID(this.wildCard.city)).bioload_in_battle) {
_global.view.createBioCloud(_global.model.getCityByID(this.wildCard.city));
}
this.removeTrail();
break;
case 'ship_plane_bomb':
_global.presenter.updateSingleCity_byID(this.wildCard._city, this.wildCard._casualties);
this.action = 'flyOff';
if (!this.explosion_mc_name) {
this.explosion_mc_name = 'explosion_warhead_1';
}
_global.explosion_sound_by_mc_name(this.explosion_mc_name, this.MC._x);
this.explosionMC = this.container.attachMovie(this.explosion_mc_name, this.unitName + 'explosion', this.container.getNextHighestDepth());
this.explosionMC._x = this.wayPointArr[this.wayPointArr.length - 1]._x;
this.explosionMC._y = this.wayPointArr[this.wayPointArr.length - 1]._y + 104;
if (this.wildCard.bioload && (_global.model.getCityByID(this.wildCard.city)).bioload_in_battle) {
_global.view.createBioCloud(_global.model.getCityByID(this.wildCard.city));
}
this.removeTrail();
break;
case 'heli_unload':
this.activeAndMoving = true;
this.soundAction('apache_flyOff');
if (!this.heli_unload_initial_y) {
this.heli_unload_initial_y = this.MC._y;
}
if (this.curY < this.heli_unload_initial_y + 20) {
this.curY += 2;
this.shadowYOffset -= 2;
}
if (this.unloadTimer >= 10) {
this.resetTailUnload('flyOff');
} else {
++this.unloadTimer;
}
break;
case 'unload':
this.soundAction('boat_stop');
this.tintMC._x = this.MC._x;
this.tintMC._y = this.MC._y;
this.activeAndMoving = false;
if (this.unloadTimer == 0 && (this.unloadNum == 0 && !this.bool1)) {
this.bool1 = true;
this.MC.removeMovieClip();
this.tintMC.removeMovieClip();
this.MC = this.container.attachMovie('boat001_still', this.unitName, this.depth_);
this.tintMC = this.container.attachMovie('boat001_still_tint', 'tint' + this.unitName, this.MC.getDepth() + 1);
this.tintMC._x = this.prevX;
this.tintMC._y = this.prevY;
this.colorObj = new Color(this.tintMC);
this.colorObj.setTransform(this.colorTrans);
}
if (this.unloadTimer >= 10 && this.unloadNum < 5) {
this.resetTailUnload('stop');
this.MC.gotoAndStop(this.unloadNum + 2);
this.tintMC.gotoAndStop(this.unloadNum + 2);
} else {
++this.unloadTimer;
}
break;
case 'flyOff':
if (this.unitID == 'boat001') {
this.action = 'stop';
} else {
if (this.curCountToStop <= 0) {
this.activeAndMoving = true;
} else {
if (this.curCountToStop < this.countDownToStop) {
++this.curCountToStop;
} else {
if (this.curCountToStop >= this.countDownToStop) {
this.sound.stop();
delete this.sound;
this.action = 'stop';
}
}
}
++this.curCountToStop;
if (this.sound.getVolume() > 0) {
this.sound.setVolume(this.sound.getVolume() - 2);
}
break;
case 'liftOff':
break;
case 'taxi_a':
if (this.TAXI_COUNT_MAX > this.cur_taxi_count) {
++this.cur_taxi_count;
this.curX += 0.2;
this.curY -= 0.5;
} else {
this.action = 'liftOff';
}
break;
case 'taxi_b':
if (this.TAXI_COUNT_MAX > this.cur_taxi_count) {
++this.cur_taxi_count;
this.curX -= 0.2;
this.curY -= 0.5;
} else {
this.action = 'liftOff';
}
break;
case 'plane_circular_flight':
if (this.plane_airTime > 70) {
this.action = 'default';
}
++this.plane_airTime;
break;
case 'sub_rocket_launch':
if (this.sub_launch_timer > 34) {
this.action = 'default';
this.soundAction('rocket_launch');
} else {
++this.sub_launch_timer;
}
}
}
if ((this.mcID == 'plane001' || (this.mcID == 'plane002' || this.mcID == 'ship_plane')) && (this.activeAndMoving && (this.action != 'taxi_a' && (this.action != 'taxi_b' && this.action != 'waitForLiftOff')))) {
if (this.PLANE_COUNT_TO_FREE_FLIGHT > this.cur_count_to_free_flight) {
++this.cur_count_to_free_flight;
this.soundAction(this.mcID + '_takeOff');
} else {
if (this.shadowYOffset < 90) {
this.shadowYOffset += 2;
}
}
}
if (this.activeAndMoving) {
++this.framesActive;
if (this.framesActive == this.trailCountDown) {
this.trailActive = true;
}
if (!this.rocket_follow_ellipse && (!this.rocket_do_drop && (this.action != 'heli_unload' && (this.action != 'taxi_a' && (this.action != 'taxi_b' && this.action != 'plane_circular_flight'))))) {
this.setStep();
this.prevX = this.curX;
this.prevY = this.curY;
this.curX += this.xStep;
this.curY += this.yStep;
} else {
if (this.rocket_follow_ellipse) {
this.ellipse_step();
} else {
if (this.rocket_do_drop) {
this.rocket_drop();
}
}
}
if (this.action != 'taxi_a' && this.action != 'taxi_b') {
this.updateTrail();
}
if (this.atTarget) {
this.action = this.wayPointArr[this.curWayPoint]._type;
++this.curWayPoint;
this.atTarget = false;
}
if (this.action == 'plane_circular_flight') {
--this.plane_countdown_default;
if (!this.plane_angle_center) {
this.plane_angle_center = [this.curX + this.plane_circular_modifier[0], this.curY + this.plane_circular_modifier[1]];
}
this.setStep();
this.plane_circular_step();
if (this.distanceBetween([this.targetX, this.targetY], this.plane_coords_at_cur_direction) < 40 && this.plane_countdown_default < 0) {
this.action = 'default';
}
}
} else {
if (!this.activeAndMoving) {
if (this.mcID == 'soldier001') {
if (this.tail.action == 'unload' && this.tail.unloadNum == this.tailNum) {
this.action = 'default';
this.prevX = this.tail.curX;
this.prevY = this.tail.curY;
this.curX = this.wayPointArr[0]._x + _global.model.tools.randRange(0, 5);
this.curY = this.wayPointArr[0]._y + _global.model.tools.randRange(0, 5);
this.frameOffset = _global.model.tools.randRange(0, 6);
this.MC._visible = true;
this.tintMC._visible = true;
this.activeAndMoving = true;
this.tail = false;
this.range = _global.model.tools.randRange(5, 8);
this.traceMe = true;
this.soundAction('soldier_running');
}
} else {
if (this.mcID == 'marine') {
if (this.tail.action == 'heli_unload' && this.tail.unloadNum == this.tailNum) {
this.prevX = this.tail.curX;
this.prevY = this.tail.curY;
this.curX = this.wayPointArr[0]._x + _global.model.tools.randRange(0, 20);
this.frameOffset = _global.model.tools.randRange(0, 6);
this.curY = this.wayPointArr[0]._y + _global.model.tools.randRange(0, 15);
this.MC._visible = true;
this.tintMC._visible = true;
this.activeAndMoving = true;
this.tail = false;
this.range = _global.model.tools.randRange(5, 10);
this.soundAction('marine_running');
}
} else {
if (this.mcID == 'tank_noShade') {
if (this.action == 'tail' && this.tail.action != 'drop') {
this.prevX = this.curX;
this.prevY = this.curY;
this.curX = this.tail.curX + 2;
this.curY = this.tail.curY + 30;
this.MC.gotoAndStop(this.unitDirection);
} else {
if (this.tail.action == 'drop') {
this.unit_live_countdown_status = true;
this.tail.soundAction('chinook_flyOff');
if (this.dropDistance > this.dropCount) {
++this.dropCount;
this.curY += 2;
this.MC.shadowMC._y -= 2;
this.MC.shadowMC._visible = true;
} else {
this.MC.removeMovieClip();
this.MC = this.container.attachMovie('tankBase', this.unitName, this.depth_);
this.soundAction('tank_drive');
this.activeAndMoving = true;
this.tail.action = 'flyOff';
this.tail = undefined;
}
}
}
} else {
if (this.mcID == 'tankTop') {
this.curX = this.tail.curX;
this.curY = this.tail.curY;
if (this.action != 'tank_top_shoot') {
this.MC.gotoAndStop(this.tankTopDirection * 2 - 1);
if (this.tail.action == 'stop') {
this.action = 'stop';
}
}
}
}
}
}
}
}
};
v1.setStep = function () {
if (_global.isNaN(this.curX)) {
this.curX = this.MC._x;
}
if (_global.isNaN(this.curY)) {
this.curY = this.MC._y;
}
if (!this.tail) {
this.targetX = this.wayPointArr[this.curWayPoint]._x;
this.targetY = this.wayPointArr[this.curWayPoint]._y;
} else {
this.targetX = this.tail.curX;
this.targetY = this.tail.curY;
}
if (this.targetX > this.curX) {
this.xDist = this.targetX - this.curX;
this.xTargetStep = Math.floor((this.step / 100) * ((100 / (this.xDist + this.yDist)) * this.xDist));
if (this.xTargetStep > this.xStep && !this.instantTurn) {
this.xStep += this.x_multiplier;
}
} else {
this.xDist = this.curX - this.targetX;
this.xTargetStep = Math.floor((this.step / 100) * ((100 / (this.xDist + this.yDist)) * this.xDist)) * -1;
if (this.xTargetStep < this.xStep && !this.instantTurn) {
this.xStep -= this.x_multiplier;
}
}
if (this.targetY > this.curY) {
this.yDist = this.targetY - this.curY;
this.yTargetStep = Math.floor((this.step / 100) * ((100 / (this.xDist + this.yDist)) * this.yDist));
if (this.yTargetStep > this.yStep && !this.instantTurn) {
this.yStep += this.y_multiplier;
}
} else {
this.yDist = this.curY - this.targetY;
this.yTargetStep = Math.floor((this.step / 100) * ((100 / (this.xDist + this.yDist)) * this.yDist)) * -1;
if (this.yTargetStep < this.yStep && !this.instantTurn) {
this.yStep -= this.y_multiplier;
}
}
if (this.instantTurn) {
this.xStep = this.xTargetStep;
this.yStep = this.yTargetStep;
}
if (this.curX < this.targetX + this.range && (this.curX > this.targetX - this.range && (this.curY < this.targetY + this.range && this.curY > this.targetY - this.range))) {
this.atTarget = true;
}
if (this.mcID == 'rocket' || this.mcID == 'sub_rocket') {
if (this.action == 'default' && this.MC.maskMC) {
this.MC.maskMC._x -= this.yStep;
} else {}
}
if (this.mcID == 'apache') {
if (this.MC._xscale < 100) {
this.MC._xscale += 1;
this.MC._yscale = this.MC._xscale;
this.tintMC._yscale = this.MC._yscale;
this.tintMC._xscale = this.MC._yscale;
}
if (this.action == 'liftOff' && this.heli_direction_set == 2) {
this.prevY = this.fixedPrevY;
this.prevX = this.fixedPrevX;
this.MC.gotoAndStop(this.fixedFrame);
if (this.apache_liftOffCount < this.apache_liftOffCountMax - 8) {
this.xStep = 0;
this.yStep = -3;
} else {
this.xStep = 0;
this.yStep = -1;
}
this.shadowYOffset -= this.yStep;
++this.apache_liftOffCount;
if (this.apache_liftOffCount >= this.apache_liftOffCountMax) {
this.action = 'default';
}
}
if (this.heli_direction_set < 2) {
++this.heli_direction_set;
this.fixedFrame = this.unitDirection;
this.fixedPrevX = this.curX;
this.fixedPrevY = this.curY;
}
}
if (this.mcID == 'chinook') {
if (this.action == 'liftOff') {
this.action = 'default';
}
}
this.updatePan();
};
v1.deg2rad = function (degree) {
return degree * (Math.PI / 180);
};
v1.rocket_drop = function () {
this.prevX = this.curX;
this.prevY = this.curY;
this.curY += 10;
this.targetY = this.wayPointArr[this.curWayPoint]._y;
if (this.curY >= this.targetY - 20) {
this.atTarget = true;
}
};
v1.ellipse_step = function () {
var v2 = this.deg2rad(this.ellipseAngle);
this.prevX = this.curX;
this.prevY = this.curY;
this.curX = this.ellipseCenterX + this.ellipseRadiusX * Math.cos(v2);
this.curY = this.ellipseCenterY + this.ellipseRadiusY * Math.sin(v2);
this.ellipseAngle += Math.round((this.xStep + this.yStep) / 1.5) * this.ellipseDirectionMultiplier;
this.ellipseAngle %= 360;
if (this.ellipseDirectionMultiplier == -1 && (this.ellipseAngle >= this.ellipseTargetAngle || this.ellipseAngle < 50) || this.ellipseDirectionMultiplier == 1 && (this.ellipseAngle <= this.ellipseTargetAngle || this.ellipseAngle < -180)) {
this.rocket_follow_ellipse = false;
this.rocket_do_drop = true;
}
this.MC.maskMC._x += 1;
};
v1.randRange = function (min, max) {
var v4 = Math.floor(Math.random() * (max - min + 1)) + min;
return v4;
};
v1.resetTailUnload = function (param_next) {
++this.unloadNum;
this.unloadTimer = 0;
if (this.unloadNum == this.unloadMax) {
switch (param_next) {
case 'flyOff':
this.action = 'flyOff';
this.activeAndMoving = true;
break;
case 'stop':
this.action = 'stop';
}
}
};
v1.__get__tankTopDirection = function () {
this.adjside = this.wayPointArr[0]._x - this.curX;
this.oppside = -1 * (this.wayPointArr[0]._y - this.curY);
this.angle = Math.atan2(this.oppside, this.adjside);
this.angle = Math.round((this.angle / Math.PI) * 180);
this.angle += 181;
this.frame = Math.round(((this.angle / 360) * 100 / 100) * this.frameCount);
return this.frame;
};
v1.__get__unitDirection = function () {
this.adjside = this.curX - this.prevX;
this.oppside = -1 * (this.curY - this.prevY);
this.angle = Math.atan2(this.oppside, this.adjside);
this.angle = Math.round((this.angle / Math.PI) * 180);
this.angle += 181;
var v2 = true;
if (this.instantTurn && this.mcID != 'soldier001') {
if (this.prev_prev_angle == this.prev_angle && this.prev_angle != this.angle) {
v2 = true;
} else {
v2 = false;
}
}
this.prev_prev_angle = this.prev_angle;
this.prev_angle = this.angle;
if (v2) {
this.frame = Math.round(((this.angle / 360) * 100 / 100) * this.frameCount);
}
if (this.mcID == 'suicide_bomber' && !this.activeAndMoving) {
this.frame = 50;
}
if (this.mcID == 'apache') {
if (this.frameFixedAfterLiftOff < 3 && this.action != 'liftOff') {
++this.frameFixedAfterLiftOff;
this.frame = this.fixedFrame;
}
}
this.prev_targetX = this.targetX;
return this.frame;
};
v1.__get__rocketRotation = function () {
this.adjside = this.curX - this.prevX;
this.oppside = -1 * (this.curY - this.prevY);
this.angle = Math.atan2(this.oppside, this.adjside);
this.angle = Math.round((this.angle / Math.PI) * 180);
this.angle += 181;
return this.angle * -1;
};
v1.__get__anti_distance = function () {
var v2 = Math.sqrt((this.curX - this.anti_pos[0]) * (this.curX - this.anti_pos[0]) + (this.curY - this.anti_pos[1]) * (this.curY - this.anti_pos[1]));
return v2;
};
v1.__get__anti_direction = function () {
var v2 = this.curX - this.anti_pos[0];
var v3 = -1 * (this.curY - this.anti_pos[1]);
this.angle = Math.atan2(v3, v2);
this.angle = Math.round((this.angle / Math.PI) * 180);
this.angle += 181;
var v4 = Math.round(((this.angle / 360) * 100 / 100) * 18);
return v4;
};
v1.__get__plane_distance_to_target = function () {
this.targetX = this.wayPointArr[this.curWayPoint]._x;
this.targetY = this.wayPointArr[this.curWayPoint]._y;
var v2 = Math.sqrt((this.curX - this.targetX) * (this.curX - this.targetX) + (this.curY - this.targetY) * (this.curY - this.targetY));
return v2;
};
v1.__get__plane_coords_at_cur_direction = function () {
var v2 = this.curX - this.prevX;
var v3 = -1 * (this.curY - this.prevY);
var v4 = Math.atan2(this.adjside, this.oppside) + 5;
this.plane_potential_target_x = Math.cos(v4) * this.plane_distance_to_target + this.curX;
this.plane_potential_target_y = Math.sin(v4) * this.plane_distance_to_target + this.curY;
return [this.plane_potential_target_x, this.plane_potential_target_y];
};
v1.distanceBetween = function (_arr1, _arr2) {
var v4 = Math.sqrt((_arr1[0] - _arr2[0]) * (_arr1[0] - _arr2[0]) + (_arr1[1] - _arr2[1]) * (_arr1[1] - _arr2[1]));
return v4;
};
v1.distanceTo = function (_arr) {
var v3 = _arr[0];
var v4 = _arr[1];
var v5 = Math.sqrt((this.curX - v3) * (this.curX - v3) + (this.curY - v4) * (this.curY - v4));
return v5;
};
v1.plane_circular_step = function () {
this.prevX = this.curX;
this.prevY = this.curY;
var v2 = this.plane_cur_angle_in_circular_flight * Math.PI / 180;
this.curX = this.plane_angle_center[0] + this.plane_circular_radius * Math.cos(v2);
this.curY = this.plane_angle_center[1] + this.plane_circular_radius * Math.sin(v2);
this.plane_cur_angle_in_circular_flight %= 360;
this.plane_circular_radius -= 0.5;
this.plane_cur_angle_in_circular_flight += 8 * this.plane_angle_step;
};
v1.satellite_explosion = function () {
if (!this.satellite_eplosion_initiated) {
this.satellite_eplosion_initiated = true;
this.explosionMC = this.container.attachMovie('explosion_warhead_4', this.unitName + 'explosion', this.container.getNextHighestDepth());
this.explosionMC._x = this.wildCard.cityX;
this.explosionMC._y = this.wildCard.cityY;
_global.presenter.updateSingleCity_byID(this.tr._city, this.tr._casualties);
}
};
v1.killUnit = function (_explosionType) {
this.removeTrail();
this.sound.stop();
this.action = 'dying';
this.MC.removeMovieClip();
this.shadowMC.removeMovieClip();
this.tintMC.removeMovieClip();
if (_explosionType) {
switch (_explosionType) {
case 'rocket_self':
this.explosionMC = this.container.attachMovie('explosion003', this.unitName + 'explosion', this.container.getNextHighestDepth());
this.explosionMC._x = this.curX;
this.explosionMC._y = this.curY;
break;
default:
this.explosionMC = this.container.attachMovie('explosion001', this.unitName + 'explosion', this.container.getNextHighestDepth());
this.explosionMC._x = this.curX;
this.explosionMC._y = this.curY;
}
}
this.unitStatus = 'dead';
if (this.anti_type) {
this.anti_offset = 2;
_global.view.updateAnti(this);
}
};
v1.removeUnit = function () {};
v1.removeTrail = function () {
this.trailActive = false;
if (this.trailSize > 0) {
var v2 = 0;
goto 27665;
for (;;) {
++v2;
label 27665:
if (v2 >= this.trailSize + 5) break;
if (this.container[this.unitName + 'trailLeft' + v2]) {
this.container[this.unitName + 'trailLeft' + v2].removeMovieClip();
this.container[this.unitName + 'trailRight' + v2].removeMovieClip();
} else {
if (this.container[this.unitName + 'trail' + v2]) {
this.container[this.unitName + 'trail' + v2].removeMovieClip();
}
}
}
}
};
v1.updateTrail = function () {
this.bool1 = false;
this.bool2 = false;
this.bool3 = false;
this.bool4 = false;
var v2 = 0;
goto 27992;
for (;;) {
++v2;
label 27992:
if (v2 >= this.trailSize) break;
if (this.trailCount == 2) {
if (this.trailActive) {
if (!this.container[this.unitName + 'trailLeft' + v2] && (!this.trailArr[v2] && !this.bool1)) {
var v3 = this.container.attachMovie('trail', this.unitName + 'trailLeft' + v2, this.container.getNextHighestDepth());
var v4 = this.container.attachMovie('trail', this.unitName + 'trailRight' + v2, this.container.getNextHighestDepth());
this.trailArr[v2] = true;
this.bool1 = true;
var v5 = this.container[this.unitName + 'trailLeft' + v2];
var v6 = this.container[this.unitName + 'trailRight' + v2];
var v7 = ((this.angle - 90) / 180) * Math.PI * -1;
var v8 = ((this.angle + 90) / 180) * Math.PI * -1;
v5._alpha -= _global.model.tools.randRange(this.trailSize - v2, 100 - v2);
v6._alpha -= _global.model.tools.randRange(this.trailSize - v2, 100 - v2);
v5._x = this.curX + Math.cos(v7) * 15;
v5._y = this.curY + Math.sin(v7) * 15;
v6._x = this.curX + Math.cos(v8) * 15;
v6._y = this.curY + Math.sin(v8) * 15;
v5._sizePlus = _global.model.tools.randRange(1, 2);
v5._alphaMin = _global.model.tools.randRange(1, 4);
v6._sizePlus = _global.model.tools.randRange(1, 2);
v6._alphaMin = _global.model.tools.randRange(1, 4);
}
}
if (this.container[this.unitName + 'trailLeft' + v2]) {
var v9 = this.container[this.unitName + 'trailLeft' + v2];
var v10 = this.container[this.unitName + 'trailRight' + v2];
v9._height += v9._sizePlus;
v9._width += v9._sizePlus;
v9._alpha -= v9._alphaMin;
if (v9._alpha <= 0) {
v9.removeMovieClip();
v10.removeMovieClip();
}
v10._height += v10._sizePlus;
v10._width += v10._sizePlus;
v10._alpha -= v10._alphaMin;
if (v10._alpha <= 0) {
v9.removeMovieClip();
v10.removeMovieClip();
}
}
} else {
if (this.trailCount == 1) {
--this.countDown_to_rocket_smoke;
if (this.trailActive && (this.mcID == 'rocket' && this.countDown_to_rocket_smoke <= 0 || this.mcID != 'rocket')) {
if (!this.container[this.unitName + 'trail' + v2] && (!this.trailArr[v2] && (!this.bool4 && (this.action != 'rocket_follow_ellipse' && this.action != 'rocket_follow_ellipse_with_anti')))) {
this.trailArr[v2] = true;
this.bool1 = true;
if (this.bool1 && !this.bool2) {
this.bool2 = true;
} else {
if (this.bool2 && !this.bool3) {
this.bool3 = true;
} else {
if (this.bool3 && !this.bool4) {
this.bool4 = true;
}
}
}
var v11 = this.container.attachMovie('trail', this.unitName + 'trail' + v2, this.container.getNextHighestDepth());
v11._height = 8;
v11._width = 8;
v11.stop();
if (v2 == this.trailSize) {
}
var v12 = (this.angle / 180) * Math.PI * -1;
var v13 = _global.model.tools.randRange(20, 45);
var v14 = _global.model.tools.randRange(28, 32);
if (this.mcID == 'rocket' || this.mcID == 'sub_rocket') {
var v15 = {'x': this.MC.smokeBase._x, 'y': this.MC.smokeBase._y};
this.MC.localToGlobal(v15);
v11._x = v15.x + 4;
v11._y = v15.y;
} else {
if (this.mcID == 'ship_plane') {
v11._x = this.curX + Math.cos(v12) * this.trail_offset;
v11._y = this.curY + 5 + Math.sin(v12) * this.trail_offset;
} else {
v11._x = this.prevX;
v11._y = this.prevY;
}
}
v11._sizePlus = _global.model.tools.randRange(5, 11);
v11._alphaMin = _global.model.tools.randRange(3, 15);
v11._sizePlus /= 12;
v11._alphaMin /= 3;
v11._alpha = _global.model.tools.randRange(this.trailSize - v2, 100 - v2);
}
}
if (this.container[this.unitName + 'trail' + v2]) {
var v16 = this.container[this.unitName + 'trail' + v2];
v16._height += v16._sizePlus;
v16._width += v16._sizePlus;
v16._alpha -= v16._alphaMin;
if (this.mcID == 'rocket') {
v16._y -= 0.3;
}
if (v16._alpha <= 0) {
v16.removeMovieClip();
}
}
}
}
}
};
v1.startSound = function () {
if (!this.soundPlaying) {
this.soundAction(this.startSoundAction);
this.soundPlaying = true;
}
};
v1.__get__soundPan = function () {
return Math.round((this.MC._x / 8 - 50) * 2);
};
v1.updatePan = function () {
this.sound.setPan(this.soundPan);
};
v1.plane_flight_sound = function () {
this.soundAction(this.mcID + '_flight');
};
v1.sound_anti_shoot = function (mc) {
if (this.anti_shoot_sound.done || !this.anti_shoot_sound) {
this.anti_shoot_sound = new Anti_sound(mc);
this.anti_shoot_sound.done = false;
if (_global.model.option.playSound) {
if (this.anti_type == 'air') {
this.anti_shoot_sound.attachSound('building_Anti air gun.wav');
this.anti_shoot_sound.start(0, 8);
} else {
this.anti_shoot_sound.attachSound('building_Anti rocket fire 4.wav');
this.anti_shoot_sound.start();
}
this.anti_shoot_sound.onSoundComplete = function () {
this.attachSound('');
this.done = true;
};
}
}
};
v1.sound_anti = function (_str, x) {
if (!_global.model.option.playSound) {
return undefined;
}
if (!this.anti_sound) {
var v4 = _global.view.srcMC.createEmptyMovieClip('sound_mc', _global.view.srcMC.getNextHighestDepth());
this.anti_sound = new Anti_sound(v4);
_global.model.playedSounds_arr.push({'soundObj': this.anti_sound, 'mc': v4});
}
if (this.anti_type == 'air' && !this.anti_sound.curSound) {
this.anti_sound.curSound = 'rotate_anti';
this.anti_sound.attachSound('building_Anti air rotate.wav');
this.anti_sound.onSoundComplete = function () {
this.curSound = undefined;
};
this.anti_sound.start();
} else {
if (this.anti_type == 'rocket' && !this.anti_sound.curSound) {
this.anti_sound.curSound = 'rotate_anti';
this.anti_sound.attachSound('building_Anti air rotate.wav');
this.anti_sound.onSoundComplete = function () {
this.curSound = undefined;
};
this.anti_sound.start();
}
}
};
v1.soundAction = function (_str) {
if (this.lastPlayedSoundAction != _str && _global.model.option.playSound) {
this.lastPlayedSoundAction = _str;
switch (_str) {
case 'boat_start':
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_Soldier Motorboat loop.wav');
this.sound.start(0, 999);
break;
case 'boat_stop':
this.sound.stop();
delete this.sound;
break;
case 'soldier_running':
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_Soldier running.wav');
this.sound.start(0, 999);
break;
case 'soldier_shoot':
this.sound.stop();
delete this.sound;
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_Soldier gun.wav');
this.sound.start(0, 11);
break;
case 'marine_running':
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_seal running.wav');
this.sound.start(0, 999);
break;
case 'marine_shoot':
this.sound.stop();
delete this.sound;
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_seal gun.wav');
this.sound.start(0, 5);
break;
case 'apache_start':
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_seal chopper.wav');
this.sound.start(0, 999);
break;
case 'apache_flyOff':
this.sound.stop();
delete this.sound;
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_seal chopper.wav');
this.sound.start(0, 2);
break;
case 'chinook_start':
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_Tank chopper.wav');
this.sound.start(0, 999);
break;
case 'chinook_flyOff':
this.sound.stop();
delete this.sound;
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_Tank chopper.wav');
this.sound.start(0, 2);
break;
case 'tank_drive':
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_Tank.wav');
this.sound.start(0, 6);
break;
case 'tank_shoot':
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_Tank gun.wav');
this.sound.start(0, 2);
break;
case 'tank_stop':
this.sound.stop();
delete this.sound;
break;
case 'suicide_scream':
this.sound.stop();
delete this.sound;
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_Suicide scream.wav');
this.sound.start();
break;
case 'suicide_explode':
this.sound.start();
break;
case 'rocket_launch':
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_Warrocket.wav');
this.sound.start();
break;
case 'plane001_takeOff':
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_Fightertakeoff.wav');
this.sound.start();
this.sound.onSoundComplete = function () {
this.attachSound('unit_fighterflight.wav');
this.start();
};
break;
case 'plane001_flight':
break;
case 'plane002_takeOff':
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_Carrierjet take off.wav');
this.sound.start();
this.sound.onSoundComplete = function () {
this.attachSound('unit_Carrierjet flight.wav');
this.start(0, 999);
};
break;
case 'plane002_flight':
break;
case 'ship_plane_takeOff':
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_Fightertakeoff.wav');
this.sound.start();
this.sound.onSoundComplete = function () {
this.attachSound('unit_fighterflight.wav');
this.start();
};
break;
case 'sat_laser':
this.sound = new Sound(this.MC);
this.sound.attachSound('unit_Sattelite Lasershot.wav');
this.sound.start();
this.sound.onSoundComplete = function () {
this.attachSound('Sattelite attack.wav');
this.start();
this.onSoundComplete = function () {};
};
break;
case '_':
}
}
};
v1.addProperty('soundPan', v1.__get__soundPan, function () {});
v1.addProperty('rocketRotation', v1.__get__rocketRotation, function () {});
v1.addProperty('plane_distance_to_target', v1.__get__plane_distance_to_target, function () {});
v1.addProperty('appMC_depth', v1.__get__appMC_depth, v1.__set__appMC_depth);
v1.addProperty('anti_distance', v1.__get__anti_distance, function () {});
v1.addProperty('anti_direction', v1.__get__anti_direction, function () {});
v1.addProperty('tankTopDirection', v1.__get__tankTopDirection, function () {});
v1.addProperty('plane_coords_at_cur_direction', v1.__get__plane_coords_at_cur_direction, function () {});
v1.addProperty('unitDirection', v1.__get__unitDirection, function () {});
ASSetPropFlags(v1, null, 1);
v1.debug = false;
v1.liftOff = false;
v1.maxShotCount = 10;
v1.depthSet = false;
v1.depthSwap = false;
v1.scale_up = false;
v1.scale_down = false;
v1.trailCountDown = 0;
v1.bool1 = false;
v1.bool2 = false;
v1.bool3 = false;
v1.bool4 = false;
v1.apache_liftOffCount = 0;
v1.apache_liftOffCountMax = 25;
v1.heliStartPlusX = 0;
v1.heliStartPlusY = 0;
v1.suicide_commando_wait_countDown_max = 25;
v1.suicide_commando_wait_countDown_cur = 0;
v1.rocket_follow_ellipse = false;
v1.rocket_do_drop = false;
v1.anti_fire_start_distance = 25;
v1.shadowStartAlpha = 100;
v1.shadowStartAtUnitBase = false;
v1.heli_direction_set = 0;
v1.frameFixedAfterLiftOff = 0;
v1.TAXI_COUNT_MAX = 30;
v1.cur_taxi_count = 0;
v1.PLANE_COUNT_TO_FREE_FLIGHT = 8;
v1.cur_count_to_free_flight = 0;
v1.plane_cur_angle_in_circular_flight = 100;
v1.plane_cur_angle_on_map = 0;
v1.plane_potential_target_x = 0;
v1.plane_potential_target_y = 0;
v1.plane_circular_flight_center_x = 0;
v1.plane_circular_flight_center_y = 0;
v1.PLANE_COUNTDOWN_TO_SET_DIRECTION_MAX = 5;
v1.plane_cur_countdown_to_set_direction = 0;
v1.plane_circular_radius = 100;
v1.countDown_antiStart = 50;
v1.satellite_lineAlphaStart = 0;
v1.satellite_alphaPlus = true;
v1.satellite_eplosion_initiated = false;
v1.soundPlaying = false;
v1.instantTurn = false;
v1.floorFrame = false;
v1.prev_angle = 0;
v1.prev_prev_angle = 0;
v1.plane_countdown_default = 6;
v1.cancelBib = false;
v1.max_unit_live = 5000;
v1.cur_unit_live = 0;
v1.unit_live_countdown_status = false;
v1.traceMe = false;
v1.countDown_to_rocket_smoke = 500;
v1.plane_circFlight_frames_count = 0;
v1.sub_launch_timer = 0;
v1.trail_offset = 20;
v1.has_fired_laser_sound = false;
v1.tank_preshot_count = 0;
v1.plane_airTime = 0;
}
#endinitclip
}
movieClip 5271 __Packages.Anti_sound {
#initclip
if (!Anti_sound) {
_global.Anti_sound = function () {
super();
};
_global.Anti_sound extends Sound;
var v1 = _global.Anti_sound.prototype;
ASSetPropFlags(v1, null, 1);
v1.done = true;
}
#endinitclip
}
movieClip 5272 __Packages.AI_specialization {
#initclip
if (!AI_specialization) {
_global.AI_specialization = function (_randomize) {
if (_randomize) {
var v3 = _global.model.tools.randRange(1, 2);
if (v3 == 1) {
this.p_carrier = 'rocket';
} else {
this.p_carrier = 'plane';
}
v3 = _global.model.tools.randRange(1, 2);
if (v3 == 1) {
this.p_common_payload = 'warhead';
} else {
this.p_common_payload = 'bioload';
}
v3 = _global.model.tools.randrange(1, 3);
if (v3 == 1) {
this.p_special_unit = 'submarine';
} else {
if (v3 == 2) {
this.p_special_unit = 'carrier';
} else {
this.p_special_unit = 'space';
}
}
}
};
var v1 = _global.AI_specialization.prototype;
v1.create_desire_arr = function () {
var v2 = new Array();
if (this.p_carrier == 'rocket') {
v2.push(2, 2, 2, 5);
} else {
v2.push(0, 0, 0, 0);
}
if (this.p_common_payload == 'warhead') {
v2.push(2, 2, 2, 5, 0, 0, 0, 0);
} else {
v2.push(0, 0, 0, 0, 2, 2, 2, 5);
}
if (_global.model.tools.randRange(1, 2) == 1) {
v2.push(1, 1, 1, 5);
} else {
v2.push(0, 0, 0, 0);
}
v2.push(1, 1, 1, 5);
if (this.p_carrier == 'plane') {
v2.push(2, 5);
} else {
v2.push(0, 0);
}
if (this.p_special_unit == 1) {
v2.push(5, 0, 0, 0);
} else {
if (this.p_special_unit == 2) {
v2.push(1, 5, 0, 0);
} else {
v2.push(1, 1, 5, 5);
}
}
this.desireArr = v2;
};
v1.__set__carrier = function (_str) {
this.p_carrier = _str;
return this.__get__carrier();
};
v1.__get__carrier = function () {
return this.p_carrier;
};
v1.__set__common_payload = function (_str) {
this.p_common_payload = _str;
return this.__get__common_payload();
};
v1.__get__common_payload = function () {
return this.p_common_payload;
};
v1.__set__special_unit = function (_str) {
this.p_special_unit = _str;
return this.__get__special_unit();
};
v1.__get__special_unit = function () {
return this.p_special_unit;
};
v1.addProperty('special_unit', v1.__get__special_unit, v1.__set__special_unit);
v1.addProperty('common_payload', v1.__get__common_payload, v1.__set__common_payload);
v1.addProperty('carrier', v1.__get__carrier, v1.__set__carrier);
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5273 __Packages.DecisionPoints {
#initclip
if (!DecisionPoints) {
_global.DecisionPoints = function () {};
var v1 = _global.DecisionPoints.prototype;
v1.DeciosionPoints = function () {};
v1.set_points_to_difficulty = function (a_nr) {
switch (a_nr) {
case 1:
this.attack.base = 80;
break;
case 2:
this.attack.base = 86;
break;
case 3:
this.attack.base = 90;
break;
default:
this.attack.base = 86;
}
};
ASSetPropFlags(v1, null, 1);
v1.attack = new Object({'base': 89, 'retalBonus': 20});
v1.preCounter = new Object({'base': 86, 'lastAttackAB_bonus': 10, 'lastAttackBA_bonus': 10, 'minPopForBonus': 20, 'lowPopBonus': 10, 'otherTargetsBonus': 5});
v1.religion = new Object({'base': 40});
v1.propaganda = new Object({'base': 42, 'highReligionBonus': 10});
v1.diplomacy = new Object({'base': 60});
v1.resources = new Object({'base': 50, 'reserveBase': 25, 'maxFunds': 100});
v1.production = new Object({'base': 55, 'enemy_stock_bonus': 15});
v1.research = new Object({'base': 60, 'turnCap': 60, 'techTurnRatioMultiplier': 9});
}
#endinitclip
}
movieClip 5274 __Packages.Tools {
#initclip
if (!Tools) {
_global.Tools = function () {};
var v1 = _global.Tools.prototype;
v1.randRange = function (min, max) {
var v4 = Math.floor(Math.random() * (max - min + 1)) + min;
return v4;
};
v1.reverse_string = function (a_str) {
var v3 = new Array();
var v4 = '';
var v5 = a_str.length;
goto 344;
for (;;) {
--v5;
label 344:
if (v5 < 0) break;
v3.push(a_str.charAt(v5));
}
var v6 = 0;
goto 425;
for (;;) {
++v6;
label 425:
if (v6 >= v3.length) break;
v4 += v3[v6];
}
return v4;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5275 __Packages.View {
#initclip
if (!View) {
_global.View = function (param_model, param_presenter, param_srcMC, param_battleSrcMC) {
var v6 = new Cloud();
this.model = param_model;
AsBroadcaster.initialize(this.model._broadcaster);
this.presenter = param_presenter;
this.model._broadcaster.addListener(this);
this.textFormats = new TextFormats();
this.srcMC = param_srcMC;
this.srcMC.view = this;
this.srcMC.bg.swapDepths(this.interfaceBGDepth);
this.srcMC.infoText.swapDepths(this.infoTextDepth);
this.srcMC.infoLine.swapDepths(this.scrollTextDepth);
this.srcMC.statsMC.swapDepths(this.statBarDepth);
this.srcMC.hatch46.swapDepths(this.exBtnSrcDepth);
this.srcMC.btn49.swapDepths(this.exBtnOvrDepth);
this.battleSrcMC = param_battleSrcMC;
this.fadeClipsTicker = this.srcMC.createEmptyMovieClip('fadeClipsTicker', this.ticker2Depth);
this.popupTicker = this.srcMC.createEmptyMovieClip('popupTicker', this.ticker3Depth);
this.typeEffectTicker = this.srcMC.createEmptyMovieClip('typeEffectTicker', this.ticker4Depth);
this.scrollTicker = this.srcMC.createEmptyMovieClip('scrollTicker', this.ticker5Depth);
this.hatchTicker = this.srcMC.createEmptyMovieClip('hatchticker', this.ticker6Depth);
AsBroadcaster.initialize(this.btnBroadcaster);
this.actionTextMCArr = [undefined, this.srcMC.action_text_resources, this.srcMC.action_text_production, this.srcMC.action_text_research, this.srcMC.action_text_religion, this.srcMC.action_text_preAttack, this.srcMC.action_text_attack, this.srcMC.action_text_defense, this.srcMC.action_text_propaganda, this.srcMC.action_text_diplomacy];
};
var v1 = _global.View.prototype;
v1.__set__clipSrc = function (param) {
this._clipSrc = param;
return this.__get__clipSrc();
};
v1.fadeClip = function (param_clip, param_targetAlpha, param_fade, param_amount, param_isStockBtn) {
if (param_fade == 'unset') {
if (param_clip._alpha > param_targetAlpha) {
param_fade = 'out';
} else {
param_fade = 'in';
}
}
if (this.fadeClipsArr.length == 0) {
this.fadeClipsArr.push({'clip': param_clip, 'targetAlpha': param_targetAlpha, 'fade': param_fade, 'amount': param_amount, 'isStockBtn': param_isStockBtn});
this.fadeClipsTicker.onEnterFrame = function () {
this.view = this._parent.view;
var v2 = 0;
var v3 = 0;
goto 9336;
for (;;) {
++v3;
label 9336:
if (v3 >= this.view.fadeClipsArr.length) break;
var v4 = this.view.fadeClipsArr[v3].clip;
var v5 = this.view.fadeClipsArr[v3].targetAlpha;
var v6 = this.view.fadeClipsArr[v3].amount;
var v7 = this.view.fadeClipsArr[v3].fade;
var v8 = this.view.fadeClipsArr[v3].isStockBtn;
if (v8) {
++v2;
}
if (v7 == 'in') {
if (v5 > v4._alpha) {
if (v4._alpha + v6 > v5) {
v4._alpha = v5;
} else {
v4._alpha += v6;
}
} else {
this.view.fadeClipsArr.splice(v3, 1);
}
} else {
if (v7 == 'out') {
if (v5 < v4._alpha) {
if (v4._alpha - v6 < v5) {
v4._alpha = v5;
} else {
v4._alpha -= v6;
}
} else {
this.view.fadeClipsArr.splice(v3, 1);
}
}
}
}
if (_global.view.fadeStockActive && v2 == 0) {
_global.view.fadeStockBtn_update();
_global.view.fadeStockActive = false;
}
if (_global.view.fadeClipsArr.length == 0 && !_global.view.fadeStockActive) {
delete this.onEnterFrame;
}
};
} else {
var v7 = 0;
goto 10007;
for (;;) {
++v7;
label 10007:
if (v7 >= this.fadeClipsArr.length) break;
if (this.fadeClipsArr[v7].clip == param_clip) {
this.fadeClipsArr.splice(v7, 1);
} else {}
}
this.fadeClipsArr.push({'clip': param_clip, 'targetAlpha': param_targetAlpha, 'fade': param_fade, 'amount': param_amount, 'isStockBtn': param_isStockBtn});
}
};
v1.updateView = function () {
if (this.presenter.allow_curAction_approve()) {
this.presenter.approveAction();
}
this.updateCities();
};
v1.error = function (param1) {
this.createMessageWindow('Error occured!', param1);
};
v1.welcomeWindow = function () {
this.createMessageWindow('Welcome', 'Welcome to the original World Domination II [tm] AI TEST application! ');
};
v1.createMessageWindow = function (param_header, param_txt) {
this._messageWindow = this._clipSrc.attachMovie('messageWindow', 'messageWindow', 9001);
this._messageWindow._x = 238;
this._messageWindow._y = 313;
this._messageWindow.header.htmlText = param_header;
this._messageWindow.drag.onPress = function () {
this._parent._alpha = 75;
this._parent.startDrag();
};
this._messageWindow.drag.onRelease = function () {
this._parent._alpha = 100;
this._parent.stopDrag();
};
this._messageWindow.fadeOutAndRemove = function () {
this.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha -= 20;
} else {
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
};
};
this._messageWindow.btn.onPress = function () {
this._parent.fadeOutAndRemove();
};
this._messageWindow.btn.onRollOver = function () {
this.gotoAndStop(2);
};
this._messageWindow.btn.onRollOut = function () {
this.gotoAndStop(1);
};
this._messageWindow.txt.htmlText = param_txt;
};
v1.updateSingleCity = function (city, casualties) {
city.size_and_frame_in_battle(casualties, true);
};
v1.city_shrink_sequence = function (MC, p_targetFrame, extra_string, propaganda_count) {
MC.targetFrame = p_targetFrame;
MC.step = 1;
MC.explosionPlayed = false;
MC.extra_string = extra_string;
MC.propaganda_count = propaganda_count;
MC.randString = _global.model.tools.randRange(10000, 99999);
MC.onEnterFrame = function () {
if (!this.explosionPlayed) {
if (!this.explosion) {
this.explosion = this.attachMovie('explosion_dust', 'explosion_dust' + this.randString, this.getNextHighestDepth());
if (!this.explosion) {
}
this.explosion._x -= 10;
this.explosion._y -= 3;
this.explosion._yscale = 130;
this.explosion._xscale = 130;
_global.model.battle._toDeleteExplosionMC_arr.push(this.explosion);
}
this.explosionPlayed = true;
this.explosion = undefined;
}
switch (this.step) {
case 1:
if (this._alpha > 0) {
this._alpha -= 15;
} else {
this.step = 2;
}
break;
case 2:
this.gotoAndStop(this.targetFrame);
if (this.extra_string == 'propaganda') {
this.propagandaBeams.play();
if (this.propaganda_count > 1) {
this.propagandaBeams2.gotoAndPlay(3);
}
}
this.step = 3;
break;
case 3:
if (this._alpha < 100) {
this._alpha += 15;
} else {
delete this.onEnterFrame;
}
}
};
};
v1.spawnCity = function (city, mapType) {
city.image = city.mapMC.attachMovie(city.citySet, 'city' + city.num, city.image_depth);
city.image.mc.obj = city;
city.image.mc.btnSet = 'city';
city.image.mc.onPress = function () {
_global.presenter.citySelect(this.obj);
};
city.image._x = city.xPos;
city.image._y = city.yPos;
city.image.gotoAndStop(city.size_and_frame);
city.image._yscale = 80;
city.image._xscale = 80;
city.debugTextField = city.image.debugTXT;
city.debugTextField.text = 'pop.: ' + city.population;
city.debugTextField.embedFonts = true;
};
v1.update_flags = function () {
var v2 = 0;
goto 12115;
for (;;) {
++v2;
label 12115:
if (v2 >= 6) break;
this.battleSrcMC['flag' + v2].gotoAndStop('empty');
}
var v3 = 0;
goto 12197;
for (;;) {
++v3;
label 12197:
if (v3 >= this.model.playerArr.length) break;
if (!this.model.playerArr[v3].alive) {
var v4 = this.model.playerArr[v3];
this.battleSrcMC['flag' + v3].gotoAndStop(this.model.playerArr[v4.lastAttackedBy_num].religion_code);
var v5 = new Color(this.battleSrcMC['flag' + v3].tintMC);
v5.setTransform(this.model.playerArr[v4.lastAttackedBy_num].playerColorTint1);
}
}
var v6 = 0;
goto 12458;
for (;;) {
++v6;
label 12458:
if (v6 >= this.model.activePlayerArr.length) break;
var v7 = this.model.activePlayerArr[v6];
this.battleSrcMC['flag' + v7.playerNum].gotoAndStop(v7.religion_code);
var v8 = new Color(this.battleSrcMC['flag' + v7.playerNum].tintMC);
v8.setTransform(v7.playerColorTint1);
}
};
v1.remove_city_popups = function () {
for (var i in this.model.human.cityArr) {
this.model.human.cityArr[i].image.citizensMovie.gotoAndStop(1);
}
};
v1.updateCities = function () {
this.update_flags();
for (var i in this.model.playerArr) {
for (var j in this.model.playerArr[i].cityArr) {
var v2 = this.model.playerArr[i].cityArr[j];
v2.image.gotoAndStop(v2.size_and_frame);
v2.image.population = v2.population;
if (this.model.playerArr[i] == this.model.human) {
v2.image.useHandCursor = false;
v2.image.population = v2.population;
v2.image.onRollOver = function () {
if (_global.view.currentViewType == 'interface' && this.population > 0) {
this.citizensMovie.gotoAndStop(2);
this.citizensMovie.txt1.text = this.population;
this.citizensMovie._yscale = 200;
this.citizensMovie._xscale = 200;
}
};
v2.image.onRollOut = function () {
this.citizensMovie.gotoAndStop(1);
};
} else {
v2.image.mc.roll_num = i;
v2.image.mc.onRollOver = function () {
if (_global.view.currentViewType == 'interface') {
_global.presenter_interface.roll_over_map(this.roll_num);
}
};
}
v2.curCasualties = 0;
v2.prevPopulation = v2.population;
v2.explosion.removeMovieClip();
v2.explosion = undefined;
v2.debugTextField.text = 'pop: ' + v2.population;
if (!this.battleSrcMC['city' + v2.num]) {
v2.setMapVars(this.battleSrcMC, this.smallMapCityDepthStart + v2.num, this.model.cityPositions[i][j][0], this.model.cityPositions[i][j][1]);
v2.theme = v2.plr.buildingSet_id;
this.spawnCity(v2, 'battleMap');
}
if (v2.population < 0) {
v2.population = 0;
}
if (v2._isSelected) {
if (!v2.selectionMC) {
v2.selectionMC = v2.mapMC.attachMovie('map_icon_crosshair', 'crosshair' + v2.cityID, v2.image_depth + this.citySelectionDepthStart);
}
v2.selectionMC._yscale = 200;
v2.selectionMC._xscale = 200;
v2.selectionObj.mcArray = [];
if (v2.selectionObj.attack && !v2.selectionObj.attackMC) {
v2.selectionObj.attackMC = v2.selectionMC.attachMovie('map_icon_soldier', 'map_icon_soldier', 1);
v2.selectionObj.mcArray.push(v2.selectionObj.attackMC);
}
if (v2.selectionObj.preAttack && !v2.selectionObj.preAttackMC) {
v2.selectionObj.preAttackMC = v2.selectionMC.attachMovie('map_icon_' + v2.selectionObj.preAttackWeapon, 'map_icon_pre', 2);
v2.selectionObj.mcArray.push(v2.selectionObj.preAttackMC);
}
if (v2.selectionObj.propaganda && !v2.selectionObj.preAttackMC) {
v2.selectionObj.propagandaMC = v2.selectionMC.attachMovie('map_icon_propaganda', 'map_icon_propaganda', 3);
v2.selectionObj.mcArray.push(v2.selectionObj.propagandaMC);
}
if (v2.selectionObj.ship && v2.selectionObj.shipMC_arr.length != v2.selectionObj.shipCount) {
var v4 = 0;
goto 14273;
for (;;) {
++v4;
label 14273:
if (v4 >= v2.selectionObj.shipCount) break;
var v3 = v2.selectionMC.attachMovie('map_icon_special', 'map_icon_special', v4 + 4);
v2.selectionObj.shipMC_arr.push(v3);
v2.selectionObj.mcArray.push(v3);
}
}
v2.alignSelectionMC();
} else {
if (v2.hideForSelection) {
v2.colorIMG_red = new Color(v2.image);
v2.colorIMG_red.setTransform(_global.model.wd_colors.city_red);
} else {
if (v2.showForSelection && v2.population > 0) {
v2.colorIMG_green = new Color(v2.image);
v2.colorIMG_green.setTransform(_global.model.wd_colors.city_green);
} else {
v2.image._alpha = 100;
v2.colorIMG_red = new Color(v2.image);
v2.colorIMG_red.setTransform(_global.model.wd_colors._default);
}
}
}
if (v2.bioloaded && !v2.image.bioCloud_container) {
this.createBioCloud(v2);
}
}
}
};
v1.resetActionBuildings = function () {
var v2 = 0;
goto 14812;
for (;;) {
++v2;
label 14812:
if (v2 > 4) break;
var v3 = _global.model.playerArr[v2];
if (v3.preAttackStatus != 'ready') {
this.battleSrcMC['ab' + v2 + '_1'].gotoAndStop(1);
this.battleSrcMC['ab' + v2 + '_2'].gotoAndStop(1);
} else {
if (v3.preLocation != 1) {
this.battleSrcMC['ab' + v2 + '_1'].gotoAndStop(1);
} else {
if (v3.preLocation != 2) {
this.battleSrcMC['ab' + v2 + '_2'].gotoAndStop(1);
}
}
}
}
};
v1.changeOver = function (_param) {
_global.clearInterval(this.presenter_interface.debug_automate_interval_ID);
for (var i in this.model.playerArr) {
var v3 = this.model.playerArr[i];
var v4 = 0;
goto 15254;
for (;;) {
++v4;
label 15254:
if (v4 >= v3.regardArr.length) break;
if (v3.regardArr[v4] > 100) {
v3.regardArr[v4] = 100;
} else {
if (v3.regardArr[v4] < 0) {
v3.regardArr[v4] = 0;
}
}
}
if (v3.preAttackWeapon.weaponName == 'ship') {
this.battleSrcMC['carrier' + v3.playerNum].gotoAndStop(2);
}
this.battleSrcMC['carrier' + v3.playerNum].gotoAndStop(v3.shipFrame);
var v5 = new Color(this.battleSrcMC['carrier' + v3.playerNum].mc.carrier_tint);
v5.setTransform(v3.playerColorTint1);
}
this.setMapFrames();
this.setFaceFrames();
this.curActionText('none');
this.presenter.remove_played_sound_objects();
switch (_param) {
case 'toBattle':
_global.model.satellite_sound_playing = false;
this.view_interface.interfaceMC._visible = false;
this.currentViewType = 'battle';
this.battleSrcMC._yscale = 100;
this.battleSrcMC._xscale = 100;
this.battleSrcMC._x = 0;
this.battleSrcMC._y = 0;
this.setABDepth();
_global.model.deselectCities('all');
if (this.presenter.check_ch_active('kill_all')) {
this.presenter.explode_all();
}
if (this.presenter.check_ch_active('tech')) {
this.presenter.deactivate_ch('tech');
this.model.human.techTree.force_invent_tech_ch();
this.model.human.weaponStock.activateAll();
}
if (this.presenter.check_ch_active('stock')) {
this.presenter.deactivate_ch('stock');
this.model.human.weaponStock.max_stock();
}
if (this.presenter.check_ch_active('cash')) {
this.presenter.deactivate_ch('cash');
this.model.human.money = 1000;
}
if (this.presenter.check_ch_active('nessy')) {
this.battleSrcMC.nessy.play();
}
if (this.presenter.check_ch_active('orca')) {
this.battleSrcMC.orca.play();
}
if (this.presenter.check_ch_active('bush')) {
this.presenter.deactivate_ch('bush');
this.presenter.explode_self();
}
break;
case 'toInterface':
_global.view_interface.interfaceMC.shortMSG_textField.scroll = 0;
this.model.active_ambient_sounds = new Array();
this.presenter_interface.blockAllBtns = false;
this.view_interface.interfaceMC._visible = true;
this.battleSrcMC._yscale = 46;
this.battleSrcMC._xscale = 46;
this.battleSrcMC._x = 205;
this.battleSrcMC._y = 135;
this.currentViewType = 'interface';
if (this.model.human.preAttackStatus == 'ready' || this.model.human.preAttackStatus == 'active') {
this.model.userSelectedActionBtn = 'preAttack';
}
this.presenter_interface.removeBioClips();
this.presenter_interface.attachBioClips();
this.presenter.stop_continues_sound_objects();
this.presenter_interface.resetBtns();
_global.presenter.allUnitsDone_intervalID = _global.setInterval(_global.view, 'to_interface_timed_3', 5);
break;
case 'toPlayerLost':
this.interface_before_end_game_sequence('lost');
break;
case 'toPlayerWin':
this.interface_before_end_game_sequence('win');
}
};
v1.to_interface_timed_3 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
for (var i in _global.view_interface.actionBtn_arr) {
var v2 = this.view_interface.actionBtn_arr[i];
if (v2.actionName != this.model.human.turnAction_1.action && v2.actionName != this.model.human.turnAction_2.action) {
v2.isSetAction = false;
} else {
if (!v2.isSetAction) {
v2.state = 1;
v2.updateBtn();
}
}
_global.view_interface.btn_arr[i].pressed = false;
}
_global.presenter.allUnitsDone_intervalID = _global.setInterval(_global.view, 'to_interface_timed_3_A', 5);
};
v1.to_interface_timed_3_A = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
this.model.deselectCities(this.model.userSelectedActionBtn);
this.model.userSelectedStockBtn = undefined;
this.model.userSelectedActionBtn = undefined;
_global.presenter.allUnitsDone_intervalID = _global.setInterval(_global.view, 'to_interface_timed_3_B', 5);
};
v1.to_interface_timed_3_B = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
this.model.resetUserSelections();
_global.model_interface.cur_pressed_action_btn = undefined;
_global.presenter.allUnitsDone_intervalID = _global.setInterval(_global.view, 'to_interface_timed_3_C', 5);
};
v1.to_interface_timed_3_C = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
_global.presenter_interface.updateView_debug_1();
};
v1.to_interface_timed_4 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
this.presenter_interface.update_leaderFaces();
};
v1.to_interface_timed_5 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
_global.presenter.allUnitsDone_intervalID = _global.setInterval(_global.view, 'to_interface_timed_6', 5);
};
v1.interface_before_end_game_sequence = function (a_status) {
_level0.endGameMC.presenter_interface.blockAllBtns = true;
this.view_interface.interfaceMC._visible = true;
this.battleSrcMC._yscale = 46;
this.battleSrcMC._xscale = 46;
this.battleSrcMC._x = 205;
this.battleSrcMC._y = 135;
this.presenter_interface.updateView();
_global.clearInterval(this.endgame_interval_1_id);
this.endgame_interval_1_id = _global.setInterval(this, 'end_game_sequence', 3000, a_status);
this.presenter.stop_continues_sound_objects();
};
v1.end_game_sequence = function (a_status) {
_global.clearInterval(this.endgame_interval_1_id);
_level0.endGameMC._visible = true;
_level0.endGameMC.gotoAndStop(a_status);
this.view_interface.interfaceMC._visible = false;
this.endgame_interval_1_id = _global.setInterval(this, 'end_game_sequence_2', 2000, a_status);
};
v1.end_game_sequence_2 = function (a_status) {
_root.hs_score = _global.model.human.score;
_global.clearInterval(this.endgame_interval_1_id);
if (a_status == 'lost') {
var v3 = _level0.createEmptyMovieClip('loose_sound', _level0.getNextHighestDepth());
var v4 = new Sound(v3);
v4.attachSound('Loose.Mp3');
v4.start();
}
if (this.model.corrupt_highscore) {
this.model.human.score = 0;
}
var v5 = new Object({'win': 'After killing most of the world\'s population, your country stands victorious in its quest for world domination. ', 'lost': 'Your country was destroyed. <br/> You lost the war for World Domination. '});
var v6 = new Object({'win': '', 'lost': ''});
_level0.endGameMC.gotoAndStop(a_status + 2);
_level0.endGameMC.txt1.htmlText = v5[a_status];
_level0.endGameMC.txt2.text = 0;
_level0.endGameMC.txt3.htmlText = '';
_level0.endGameMC.score_count = 0;
_level0.endGameMC.satellite_multiplier_count = this.model.human.satellites_used;
_level0.endGameMC.cur_satellite_count = 0;
_level0.endGameMC.flag_bonus = 0;
for (var i in this.model.playerArr) {
if (this.model.playerArr[i].lastAttackedBy_num == 0) {
++_level0.endGameMC.flag_bonus;
}
}
_level0.endGameMC.cur_flag_bonus = 0;
_level0.endGameMC.txt_1 = '';
_level0.endGameMC.txt_2 = '';
_level0.endGameMC.sound.stop();
_level0.endGameMC.sound = new Sound(_level0.endGameMC);
_level0.endGameMC.sound.attachSound('Score counter.Mp3');
_level0.endGameMC.sound.start(0, 9999);
_level0.endGameMC.cur_sequence = 1;
_level0.endGameMC.winloose = a_status;
_level0.endGameMC.count1 = 0;
_level0.endGameMC.count2 = 0;
if (!this.model.corrupt_highscore) {
_level0.endGameMC.onEnterFrame = function () {
switch (this.cur_sequence) {
case 1:
this.maxPlus = _global.model.human.score / 100;
this.score_count += _global.model.tools.randRange(1, this.maxPlus);
if (this.score_count >= _global.model.human.score) {
this.score_count = _global.model.human.score;
this.sound.stop();
this.cur_sequence = 2;
}
this.txt2.text = _global.presenter_interface.display_format_dot_notation(this.score_count);
break;
case 2:
if (this.satellite_multiplier_count) {
++this.count1;
if (this.count1 > 40) {
this.sound.attachSound('Satelite multiplier.Mp3');
this.sound.start();
this.count1 = 0;
++this.cur_satellite_count;
this.txt_1 = 'Space satellite multiplier: x ' + this.cur_satellite_count + ' <br/> ';
}
if (this.count1 == 2 && this.cur_satellite_count > 0) {
this.txt2.text = '';
this.score_count *= 2;
}
if (this.count1 == 6 && this.cur_satellite_count > 0) {
this.txt2.text = _global.presenter_interface.display_format_dot_notation(this.score_count);
}
if (this.cur_satellite_count == this.satellite_multiplier_count && this.count1 > 7) {
this.cur_sequence = 3;
}
} else {
this.cur_sequence = 3;
}
break;
case 3:
if (this.flag_bonus) {
++this.count2;
if (this.count2 > 40) {
this.sound.attachSound('Country domination bonus.Mp3');
this.sound.start();
this.count2 = 0;
++this.cur_flag_bonus;
this.txt_2 = 'Flag bonus (250.000): x ' + this.cur_flag_bonus + ' <br/> ';
}
if (this.count2 == 2 && this.cur_flag_bonus > 0) {
this.txt2.text = '';
this.score_count += 250000 * this.cur_flag_bonus;
}
if (this.count2 == 6 && this.cur_flag_bonus > 0) {
this.txt2.text = _global.presenter_interface.display_format_dot_notation(this.score_count);
}
if (this.cur_flag_bonus == this.flag_bonus && this.count2 > 7) {
delete this.onEnterFrame;
}
} else {
this.cur_sequence = 4;
}
break;
case 4:
this.btnMC_submitScore.gotoAndStop(2);
this.btnMC_submitScore.txtMC_submit.txt.text = 'Submit highscore';
this.btnMC_submitScore.btn_submit.onPress = function () {
if (_global.model.get_demo_version_name() == 'Miniclip') {
this._parent._parent.highscore.gotoAndStop(2);
} else {
this._parent._parent.highscore.loadMovie('http://www.youdagames.com/highscores/flash.php');
this._parent._parent.fade_out._alpha = 55;
}
};
delete this.onEnterFrame;
}
_level0.endGameMC.txt3.htmlText = this.txt_1 + this.txt_2;
};
} else {
_level0.endGameMC.txt2.text = '!!CHEATED!!';
}
if (_global.model.zs66hj8s) {
_level0.endGameMC.demo_MC.txtMC_buy.txt.text = 'BUY FULL VERSION';
_level0.endGameMC.demo_MC.btn_buy.onPress = function () {
_global.presenter_interface.btn_pressed_full();
};
} else {
_level0.endGameMC.demo_MC._visible = false;
}
_level0.endGameMC.btn_website.onPress = function () {
getURL(_global.model.full_version_url, '_blank');
};
_level0.endGameMC.txtMC_website.txt.text = 'Website';
_level0.endGameMC.txtMC_new.txt.text = 'New Game';
_level0.endGameMC.btn_new.onPress = function () {
_global.presenter.btn_pressed_new_game();
};
};
v1.setMapFrames = function () {
var v2 = 0;
goto 21270;
for (;;) {
++v2;
label 21270:
if (v2 >= 6) break;
this.battleSrcMC['land0' + v2].gotoAndStop(1);
this.battleSrcMC['water_overlay_' + v2].gotoAndStop(2);
}
for (var i in _global.model.playerArr) {
var v3 = _global.model.playerArr[i];
var v4 = this.battleSrcMC['land0' + v3.mapSide];
this.battleSrcMC['land0' + v3.mapSide].gotoAndStop(v3.religion_code);
this.battleSrcMC['water_overlay_' + v3.mapSide].gotoAndStop(1);
}
};
v1.setFaceFrames = function () {
var v2 = 0;
goto 21594;
for (;;) {
++v2;
label 21594:
if (v2 >= 6) break;
this.srcMC['face' + v2].gotoAndStop('empty');
}
for (var i in _global.model.playerArr) {
var v3 = _global.model.playerArr[i];
var v4 = this.srcMC['face' + v3.playerNum];
v4.gotoAndStop(v3.faceFrame);
}
};
v1.playSubMC = function (_obj) {
_global.model.cur_sub_launch_num = _obj._player;
var v3 = this.battleSrcMC['sub_' + _obj._locPlr + '_' + _obj._locPos].tintMC;
var v4 = new Color(v3);
v4.setTransform(_global.model.playerArr[_obj._player].playerColorTint1);
this.battleSrcMC['sub_' + _obj._locPlr + '_' + _obj._locPos].subMC.play();
v3.play();
_global.play_sound_by_event('sub_surface', v3._x);
};
v1.playCarrierMC = function (_obj) {
if (_obj._locPlr) {
this.battleSrcMC['carrier' + _obj._locPlr].gotoAndStop(2);
}
if (_obj._player || _obj._player == 0) {
this.battleSrcMC['carrier' + _obj._player].gotoAndStop(2);
}
var v3 = new Color(this.battleSrcMC['carrier' + _obj._player].mc.carrier_tint);
v3.setTransform(_global.model.playerArr[_obj._player].playerColorTint1);
};
v1.reset_schemeMC = function () {
this.battleSrcMC.curActionDisplay.schemeMC.gotoAndStop(2);
this.battleSrcMC.curActionDisplay.schemeMC.gotoAndStop(1);
var v2 = 0;
goto 22423;
for (;;) {
++v2;
label 22423:
if (v2 >= 5) break;
if (!this.model.playerArr[v2].alive) {
this.battleSrcMC.curActionDisplay.schemeMC['mc' + v2]._alpha = 30;
} else {
this.battleSrcMC.curActionDisplay.schemeMC['mc' + v2]._alpha = 100;
}
}
};
v1.curActionText = function (_str, _plrNum) {
switch (_str) {
case 'factory':
_str = 'production';
break;
case 'silo':
break;
case 'airfield':
break;
break;
case 'Air_still':
case 'antiRocket_still':
}
if (_str != this.cur_actionDisplay_frame) {
this.cur_actionDisplay_frame = _str;
this.reset_schemeMC();
}
if (_str != 'none') {
if (this.battleSrcMC.curActionDisplay._alpha < 20) {
this.fadeClip(this.battleSrcMC.curActionDisplay, 80, 'in', 20, false);
}
this.battleSrcMC.curActionDisplay.gotoAndStop(_str);
} else {
this.battleSrcMC.curActionDisplay.gotoAndStop(1);
this.fadeClip(this.battleSrcMC.curActionDisplay, 0, 'out', 20, false);
}
this.battleSrcMC.curActionDisplay.schemeMC['mc' + _plrNum].gotoAndStop(2);
this.battleSrcMC.curActionDisplay.schemeMC['mc' + _plrNum].gotoAndStop(1);
var v4 = new Color(this.battleSrcMC.curActionDisplay.schemeMC['mc' + _plrNum]);
v4.setTransform(_global.model.playerArr[_plrNum].playerColorTint1);
};
v1.updateAnti = function (unit) {
if (!unit.anti_mc_name) {
unit.anti_mc_name = 'ab' + unit.anti_num + '_' + _global.model.playerArr[unit.targetPlayer].anti_loc;
}
if (!unit.anti_active) {
return undefined;
}
var v3 = this.battleSrcMC[unit.anti_mc_name].mc.mc;
var v4 = v3._currentframe;
var v5 = unit.anti_direction;
if (v3._currentframe != v5) {
unit.sound_anti('move');
}
v3.gotoAndPlay(v5 * 2 - 1);
if (unit.anti_distance < 170) {
if (unit.anti_offset == 1) {
unit.anti_offset = 2;
} else {
unit.anti_offset = 1;
}
}
if (unit.anti_offset == 1) {
v3.nextFrame();
unit.sound_anti_shoot(v3);
}
if (unit.countDown_antiStart <= 0) {
if (v3._alpha < 100) {
v3._alpha += 10;
}
} else {
--unit.countDown_antiStart;
}
if (unit.unitStatus == 'dead' || !unit) {
if (v3._currentframe / Math.floor(v3._currentframe / 2) == 2) {
v3.prevFrame();
}
}
};
v1.createBioCloud = function (city) {
city.bioloaded = true;
if (!city.image.bioCloud_container) {
city.bioCloud_container = city.image.createEmptyMovieClip('bioCloud_container', city.image.getNextHighestDepth());
city.bioCloud_container.city = city;
var v4 = 0;
goto 23901;
for (;;) {
++v4;
label 23901:
if (v4 >= this.cloudMax) break;
city.bioCloud_arr.push(city.bioCloud_container.attachMovie('bioCloud', 'bioCloud_' + v4, city.image.bioCloud_container.getNextHighestDepth()));
}
for (var i in city.bioCloud_arr) {
var v5 = city.bioCloud_arr[i];
v5.spawn();
}
}
};
v1.createClouds = function () {
var v3 = 0;
goto 24123;
for (;;) {
++v3;
label 24123:
if (v3 >= this.cloudPacks) break;
var v4 = 0;
goto 24170;
for (;;) {
++v4;
label 24170:
if (v4 >= this.cloudMax) break;
var v2 = this.battleSrcMC.attachMovie('cloud', 'cloud' + v3 + '_' + v4, this.battleSrcMC.getNextHighestDepth());
v2.startLoc = {'_x': this.cloudCenterPositions[v3][0] + _global.model.tools.randRange(-30, 30), '_y': this.cloudCenterPositions[v3][1] + _global.model.tools.randRange(-30, 30)};
v2.initialLoc();
v2._alpha = 30;
v2._yscale = _global.model.tools.randRange(800, 1100);
v2._xscale = v2._yscale;
v2.yRadius = _global.model.tools.randRange(10, 30);
v2.xRadius = v2.yRadius;
v2.angleChange = _global.model.tools.randRange(-9, 9);
this.cloudArr.push(v2);
}
}
};
v1.cloud_interval_func = function () {
for (var i in this.cloudArr) {
var v2 = this.cloudArr[i];
v2.frame_step();
}
};
v1.cloudTicker_initiate = function () {
if (!this.cloudArr[0]) {
this.createClouds();
this.cloudIntervalID = _global.setInterval(this, 'cloud_interval_func', 3500);
}
};
v1.createUnitTicker = function () {
this.battleSrcMC.ticker_count = 0;
this.battleSrcMC.onEnterFrame = function () {
++this.ticker_count;
if (_global.model.battle._activeUnitsArr.length == 0 && _global.model.attackingSubs_arr.length == 0 || this.ticker_count > 800) {
if (!_global.presenter.check_ch_active('kill_all')) {
delete _global.view.battleSrcMC.onEnterFrame;
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
_global.presenter.allUnitsDone_intervalID = _global.setInterval(_global.presenter, 'allUnitsDone', 2500);
return undefined;
}
} else {
if (_global.model.battleMC_units_active) {
if (_global.model.battleCounter <= 0) {
if (!_global.model.lastUnitWasBuilding) {
_global.model.battleCounter = 1;
_global.model.battleTimerArr[_global.model.battleTimerIndex];
++_global.model.unitStartNum;
} else {
_global.model.battleCounter = 1;
++_global.model.unitStartNum;
}
}
--_global.model.battleCounter;
}
for (var i in _global.model.battle._activeUnitsArr) {
var v2 = _global.model.battle._activeUnitsArr[i];
if (!_global.model.battle._activeUnitsArr[i]._building) {
if (!v2.tail && (v2.startNum == _global.model.unitStartNum && (!v2.activeAndMoving && v2.action != 'stop'))) {
_global.view.curActionText('none');
v2.activeAndMoving = true;
if (v2.startSoundOnAAM) {
v2.startSound();
}
_global.model.lastUnitWasBuilding = false;
}
if (v2.unitStatus == 'dead' || v2.action == 'stop') {
if (v2.mcID == 'boat001') {
v2.MC.gotoAndStop(6);
}
_global.model.battle._toDeleteUnitsArr.push(v2);
_global.model.battle._activeUnitsArr.splice(i, 1);
if (v2.mcID == 'marine' || v2.mcID == 'soldier001') {
v2.activeAndMoving = false;
return undefined;
}
}
if (v2.action == 'die') {
v2.killUnit();
}
if (v2.action == 'dying') {
if (v2.shadowMC._x == 0) {
}
}
if (v2.activeAndMoving && v2.wildCard.satellite) {
_global.presenter_interface.play_satellite_sound();
if (v2.MC._x < v2.wildCard.targetX) {
v2.curX += 3;
++v2.curY;
v2.MC.mc.gotoAndStop(Math.round(v2.MC._x / 26));
} else {
if (v2.action != 'fire' && (v2.action != 'idle' && v2.action != 'firing_clear')) {
v2.action = 'fire';
v2.satellite_explosion();
} else {
if (v2.action == 'fire') {
v2.MC.mc.clear();
if (!v2.has_fired_laser_sound) {
v2.soundAction('sat_laser');
v2.has_fired_laser_sound = true;
}
v2.satellite_lineAlpha = v2.satellite_lineAlphaStart;
if (v2.satellite_lineAlphaStart < 100 && v2.satellite_alphaPlus) {
v2.satellite_lineAlphaStart += 15;
} else {
if (v2.satellite_lineAlphaStart >= 100) {
v2.satellite_alphaPlus = false;
}
}
if (!v2.satellite_alphaPlus) {
v2.satellite_lineAlphaStart -= 5;
if (v2.satellite_lineAlphaStart <= 0) {
v2.action = 'stop';
break;
}
}
v2.satellite_line_xOffset = -4;
v2.satellite_line_xLocation = v2.wildCard.cityX - v2.MC._x - v2.MC.mc._x;
v2.satellite_line_yLocation = v2.wildCard.cityY - v2.MC._y - v2.MC.mc._y;
var v3 = v2.wildCard.laser_hex_color;
var v4 = _global.presenter.brighter_hex_by_steps(v3, 2);
var v5 = _global.presenter.brighter_hex_by_steps(v4, 2);
var v6 = _global.presenter.brighter_hex_by_steps(v5, 3);
var v7 = new Array(v4, v4, v5, v6, v6, '0xFFFFFF', '0xFFFFFF', '0xFFFFFF');
var v8 = 0;
goto 27056;
for (;;) {
++v8;
label 27056:
if (v8 >= 4) break;
var v9 = v2.MC.mc.laserStartMC._x;
var v10 = v2.MC.mc.laserStartMC._y;
v2.MC.mc.moveTo(v9, v10 - v8);
v2.MC.mc.lineStyle(1, Number(v7[6 - v8]), v2.satellite_lineAlpha);
v2.MC.mc.lineTo(v2.satellite_line_xLocation + v8, v2.satellite_line_yLocation - v8);
v2.MC.mc.moveTo(v9, v10 + v8);
v2.MC.mc.lineStyle(1, Number(v7[6 - v8]), v2.satellite_lineAlpha);
v2.MC.mc.lineTo(v2.satellite_line_xLocation, v2.satellite_line_yLocation + v8);
v2.MC.lineAlpha -= 15;
}
if (v2.satellite_line_xOffset >= 4) {
v2.satellite_line_xOffset = -4;
} else {
++v2.satellite_line_xOffset;
}
}
}
}
}
if (v2.action == 'waitForLiftOff' && v2.activeAndMoving) {
++v2.wildCard.liftOffCount;
if (Number(v2.wildCard.liftOffCount) >= Number(v2.wildCard._number * 20)) {
v2.action = 'liftOff';
}
} else {
if (v2.mcID == 'sub_rocket' && v2.action == 'wait_for_sub_launch') {
if (_global.model.cur_sub_launch_num == v2.wildCard.sub_launch_num) {
v2.action = 'sub_rocket_countDown_1';
}
} else {
if (v2.action == 'sub_rocket_countDown_1') {
if (v2.sub_launch_timer > 34) {
v2.action = 'sub_rocket_launch';
}
++v2.sub_launch_timer;
} else {
v2.moveUnit();
v2.MC._y = v2.curY;
v2.MC._x = v2.curX;
if (v2.MC._xscale < 100 && (v2.activeAndMoving && (!v2.scale_down && (!v2.scale_up && (v2.action != 'taxi_a' && (v2.action != 'taxi_b' && (v2.mcID != 'ship_plane' && (v2.mcID != 'plane001' && v2.mcID != 'plane002' || v2.PLANE_COUNT_TO_FREE_FLIGHT <= v2.cur_count_to_free_flight)))))))) {
if ((v2.mcID == 'plane001' || v2.mcID == 'plane002') && v2.MC._xscale < 80) {
v2.MC._xscale += 2;
v2.MC._yscale += 2;
if (v2.hasShadow) {
v2.shadowMC._xscale += 2;
v2.shadowMC._yscale += 2;
}
if (v2.tintMC_id) {
v2.tintMC._yscale = v2.MC._xscale;
v2.tintMC._xscale = v2.tintMC._yscale;
}
}
}
if (v2.scale_up && (v2.MC._xscale > 50 && v2.activeAndMoving)) {
v2.MC._xscale -= 1;
}
if (v2.scale_down && (v2.MC._xscale < 100 && v2.activeAndMoving)) {
v2.MC._xscale += 2;
}
if (v2.MC._alpha < 100 && (v2.activeAndMoving && v2.mcID != 'suicide_bomber')) {
v2.MC._alpha += 10;
if (v2.tintMC_id) {
}
}
if (v2.mcID == 'ship_plane' && (v2.MC._xscale < 70 && v2.action != 'waitForLiftOff')) {
++v2.MC._xscale;
++v2.MC._yscale;
++v2.tintMC._xscale;
++v2.tintMC._yscale;
++v2.shadowMC._xscale;
++v2.shadowMC._yscale;
}
}
}
}
if (v2.action == 'waitForHeliStart') {
if (_global.model.heliStart[v2.playerNum][0]) {
v2.curX = _global.model.heliStart[v2.playerNum][0] + v2.heliStartPlusX;
v2.MC._x = v2.curX;
v2.curY = _global.model.heliStart[v2.playerNum][1] + v2.heliStartPlusY;
v2.MC._y = v2.curY;
if (v2.mcID != 'suicide_bomber') {
v2.action = 'liftOff';
} else {
if (v2.mcID == 'suicide_bomber') {
v2.action = 'suicide_fade_out';
v2.wayPointArr[0]._x = _global.model.heliStart[v2.playerNum][0];
v2.wayPointArr[0]._y = _global.model.heliStart[v2.playerNum][1] - 70;
v2.wayPointArr[1]._x = _global.model.heliStart[v2.playerNum][0];
v2.wayPointArr[1]._y = _global.model.heliStart[v2.playerNum][1] - 70;
}
}
}
if (v2.mcID == 'suicide_bomber') {
v2.MC.swapDepths(v2.container.getNextHighestDepth());
}
}
if (v2.action != 'unload') {
if (v2.action == 'plane_circular_flight') {
++v2.plane_circFlight_frames_count;
}
if (v2.multiFrame && v2.activeAndMoving) {
var v11 = 0;
if (v2.action == 'liftOff') {
v11 = v2.fixedFrame * v2.offsetFrames - (v2.offsetFrames - 1) + v2.frameOffset;
} else {
v11 = v2.unitDirection * v2.offsetFrames - (v2.offsetFrames - 1) + v2.frameOffset;
}
v2.MC.gotoAndStop(v11);
if (v2.frameOffset < v2.offsetFrames) {
++v2.frameOffset;
} else {
v2.frameOffset = 1;
}
} else {
if (v2.mcID != 'tankTop' && (v2.mcID != 'rocket' && (v2.mcID != 'sub_rocket' && v2.action != 'plane_circular_flight'))) {
if ((v2.mcID == 'soldier001' || v2.mcID == 'marine') && v2.activeAndMoving || v2.mcID != 'soldier001' && v2.mcID != 'marine') {
v2.MC.gotoAndStop(v2.unitDirection);
}
}
}
if (v2.action == 'plane_circular_flight' && v2.plane_circFlight_frames_count > 3) {
v2.MC.gotoAndStop(v2.unitDirection);
} else {
if (v2.mcID == 'rocket' || v2.mcID == 'sub_rocket') {
v2.MC._rotation = v2.rocketRotation;
if (v2.anti_distance < 150 && !v2.result) {
v2.action = 'rocket_explode_self';
}
if (v2.anti_active && (v2.activeAndMoving && (v2.anti_pos[0] == 0 && !_global.model.playerArr[v2.targetPlayer].anti_inBattle_target))) {
v2.anti_pos[0] = _global.model.playerArr[v2.targetPlayer].anti_pos_arr[0];
v2.anti_pos[1] = _global.model.playerArr[v2.targetPlayer].anti_pos_arr[1];
_global.model.playerArr[v2.targetPlayer].anti_inBattle_target = v2;
}
if (_global.model.playerArr[v2.targetPlayer].anti_inBattle_target == v2 && (!v2.anti_initiated && (v2.anti_active && v2.anti_distance < 400))) {
_global.view.updateAnti(v2);
}
}
}
if (v2.mcID == 'ship_plane') {
if (v2.action == 'waitForLiftOff') {
v2.MC.gotoAndStop(v2.idleFrame);
} else {
v2.MC.gotoAndStop(v2.unitDirection);
v2.shadowMC._visible = true;
}
if (v2.anti_active && (v2.activeAndMoving && (v2.anti_pos[0] == 0 && !_global.model.playerArr[v2.targetPlayer].anti_inBattle_target))) {
v2.anti_pos[0] = _global.model.playerArr[v2.targetPlayer].anti_pos_arr[0];
v2.anti_pos[1] = _global.model.playerArr[v2.targetPlayer].anti_pos_arr[1];
_global.model.playerArr[v2.targetPlayer].anti_inBattle_target = v2;
}
if (_global.model.playerArr[v2.targetPlayer].anti_inBattle_target == v2 && (!v2.anti_initiated && (v2.anti_active && v2.anti_distance < 400))) {
_global.view.updateAnti(v2);
}
v2.MC._x = v2.curX;
v2.MC._y = v2.curY;
v2.MC._alpha = 100;
}
if (v2.hasShadow) {
v2.shadowMC.mc.gotoAndStop(v2.MC._currentframe);
v2.shadowMC._x = v2.curX + v2.shadowXOffset;
v2.shadowMC._y = v2.curY + v2.shadowYOffset;
}
if (v2.tintMC_id) {
v2.tintMC.gotoAndStop(v2.MC._currentframe);
v2.tintMC._x = v2.curX;
v2.tintMC._y = v2.curY;
}
}
if (v2.depthSwap) {
if (v2.MC.getDepth() != v2.appMC_depth) {
v2.MC.swapDepths(v2.appMC_depth);
}
if (v2.tintMC) {
v2.tintMC.swapDepths(v2.MC.getDepth() + 1);
}
}
}
if (v2.anti_type == 'air') {
if (v2.anti_active && (v2.activeAndMoving && (v2.anti_pos[0] == 0 && !_global.model.playerArr[v2.targetPlayer].anti_inBattle_target))) {
v2.anti_pos[0] = _global.model.playerArr[v2.targetPlayer].anti_pos_arr[0];
v2.anti_pos[1] = _global.model.playerArr[v2.targetPlayer].anti_pos_arr[1];
_global.model.playerArr[v2.targetPlayer].anti_inBattle_target = v2;
}
if (_global.model.playerArr[v2.targetPlayer].anti_inBattle_target == v2 && (!v2.anti_initiated && v2.anti_active)) {
_global.view.updateAnti(v2);
}
}
if (v2.action == 'shoot') {
var v12 = v2.unitDirection * v2.offsetFrames - (v2.offsetFrames - 1) + v2.frameOffset;
v2.MC.gotoAndStop(v12);
v2.tintMC.gotoAndStop(v12);
if (v2.frameOffset < v2.offsetFrames) {
++v2.frameOffset;
} else {
v2.frameOffset = 1;
}
}
if (v2.mcID == 'chinook' && !v2.activeAndMoving) {
var v13 = v2.fixedFrame * v2.offsetFrames - (v2.offsetFrames - 1) + v2.frameOffset;
v2.MC.gotoAndStop(v13);
if (v2.frameOffset < v2.offsetFrames) {
++v2.frameOffset;
} else {
v2.frameOffset = 1;
}
}
if (_global.model.battle._activeUnitsArr[i]._building && _global.model.battleMC_units_active) {
_global.model.battleCounter = 0;
var v14 = _global.model.battle._activeUnitsArr[i].obj;
if (_global.model.unitStartNum == v14._startNum) {
_global.model.battle._activeUnitsArr.splice(i, 1);
if (v14._building == 'sub' && !v14._addToSubArr) {
_global.view.playSubMC(v14);
} else {
if (v14._building == 'ship') {
}
}
}
}
}
}
};
};
v1.play_AB_selectMC = function (_str) {
_global.play_sound_by_building(_str);
var v3 = false;
var v4 = false;
var v5 = false;
var v6 = false;
for (var j in _global.model.playerAB_position_arr) {
var v7 = _global.model.playerAB_position_arr[j].building_name;
if (_str == 'preAttack') {
if (v7 == 'airfield' && !v3) {
v3 = true;
_global.play_sound_by_building('airfield');
} else {
if (v7 == 'silo' && !v4) {
v4 = true;
_global.play_sound_by_building('silo');
} else {
if (v7 == 'sub' && !v5) {
v5 = true;
_global.play_sound_by_building('sub');
} else {
if (v7 == 'space' && !v6) {
v6 = true;
_global.play_sound_by_building('space');
}
}
}
}
} else {
if (_str == 'attack') {
if (v7 == 'hatch') {
_global.play_sound_by_building('hatch');
}
}
}
}
if (_str == 'propaganda') {
this.presenter.doPropaganda();
}
var v8 = 0;
goto 33386;
for (;;) {
++v8;
label 33386:
if (v8 >= 5) break;
var v9 = this.model.get_playerAB_mc(v8, _str);
var v10 = v9.citySelectMC;
if (v10) {
switch (_str) {
case 'diplomacy':
v9.mc.mc.play();
break;
case 'production':
v9.mc.mc.play();
break;
case 'tech':
v9.mc.mc.play();
break;
case 'religion':
v9.mc.mc.play();
break;
case 'tech':
v9.mc.mc.play();
break;
case 'hatch':
v9.mc.mc.play();
break;
case 'attack':
v9.mc.mc.play();
break;
case 'preAttack':
v9.mc.mc.play();
}
v10.play();
this.curActionText(_str, v8);
}
}
};
v1.initiate_AB_interval = function () {
var v2 = this.AB_interval_start_index;
goto 33912;
for (;;) {
++v2;
label 33912:
if (v2 >= this.model.actionNames_arr.length) break;
++this.AB_interval_start_index;
if (this.model.string_is_used_action(this.model.actionNames_arr[v2])) {
this.play_AB_selectMC(this.model.actionNames_arr[v2]);
return undefined;
}
}
this.submarine_interval_ID = _global.setInterval(this, 'submarineSequence', 8000);
this.presenter.stop_continues_sound_objects();
this.model.battleMC_units_active = true;
_global.clearInterval(this.AB_interval_ID);
};
v1.timedSubmarine = function (obj) {
this.playSubMC(obj);
};
v1.submarineSequence = function () {
var v2 = this.model.attackingSubs_arr[0];
if (v2) {
this.model.attackingSubs_arr.splice(0, 1);
this.timedSubmarine(v2);
} else {
_global.clearInterval(this.submarine_interval_ID);
this.model.attackingSubs_arr = [];
}
};
v1.interval_func = function () {
this.initiate_AB_interval();
};
v1.showActionBuildingFromObj = function (_obj) {
var v3 = _obj;
var v4 = _global.model.playerArr[v3._player];
if (!v3._fixedLoc) {
if (v4 == this.model.human) {
}
if (!v4.preLocation || !v4.preBuilding_this_turn) {
var v5 = v4.nextActionBuilding;
} else {
if (v4.preLocation == 1) {
v4.building1Shown = true;
var v5 = 2;
} else {
if (v4.preLocation == 2) {
v4.building2Shown = true;
var v5 = 1;
}
}
}
var v6 = this.battleSrcMC['ab' + v3._player + '_' + v5];
} else {
var v6 = this.battleSrcMC['ab' + v3._player + '_' + v4.preLocation];
}
if (v4 == this.model.human) {
for (var i in _obj) {
}
}
v6.gotoAndStop(v3._frame);
v6.mc.gotoAndStop(v4.religion_code);
if (v3._frame == 'airfield' && (v4.playerNum == 2 || v4.playerNum == 3)) {
v6.mc.mc_.gotoAndStop(2);
}
if (v3._frame == 'propaganda') {
v4._propagandaMC = v6;
}
if (v3._frame == 'religion' && _global.presenter.check_ch_active('disco')) {
v6.mc.gotoAndStop('disco');
}
_global.presenter_interface.play_ambient_sound_by_building_frame(v3._frame);
if (v3._frame == 'propaganda_2') {
var v7 = new Color(v6.mc.beamMC);
v7.setTransform(_global.model.playerArr[v3._player].playerColorTint1);
_global.presenter.updateSingleCity_byID(v3._targetCity_id, 0, true, v3._player);
_global.presenter.update_propaganda_plus(v3._player);
}
v6.mc.gotoAndStop(v4.religion_code);
this.fadeClip(v6, 100, 'in', 5, false);
if (v3._setHeliStart) {
v4.heliStart = [v6._x - 15, v6._y + 25];
_global.model.heliStart[v3._player] = [v6._x - 15, v6._y + 25];
}
if (v3._frame == 'ship') {
this.playCarrierMC(v3);
}
if (v3._setPreStart && !v4.preLocation) {
v4.preStart = [v6._x, v6._y + 25];
v4.preLocation = storedv5;
}
if (v3._anti_arr[0]) {
v4.anti_active = v3._anti_arr[0];
v4.anti_type = v3._anti_arr[1];
v4.anti_pos_arr = [v6._x, v6._y];
v4.anti_loc = storedv5;
}
if (v3._frame == 'religion' && _global.presenter.check_ch_active('disco')) {
v6.mc.gotoAndStop('disco');
}
return v6;
};
v1.getIntervalBuildingsArray = function () {
if (!this.showBuildingsFromArray(_global.model.battle.toShowLastABArr)) {
_global.clearInterval(_global.model.actionBuildingInterval);
this.presenter.endBattle();
}
};
v1.showBuildingsFromArray = function (_array) {
_global.view.curActionText(_array._frame, _array._player);
var v3 = _array;
if (!v3._empty) {
var v4 = _global.model.playerArr[v3._player];
if (v4.playerNum == 0) {
}
if (!v3._fixedLoc) {
var v5 = v4.nextActionBuilding;
var v6 = this.battleSrcMC['ab' + v3._player + '_' + v5];
} else {
var v6 = this.battleSrcMC['ab' + v3._player + '_' + v4.preLocation];
}
v6.gotoAndStop(v3._frame);
v6.mc.gotoAndStop(v4.religion_code);
if (v3._frame == 'airfield' && (v4.playerNum == 2 || v4.playerNum == 3)) {
v6.mc.mc.gotoAndStop(2);
}
this.fadeClip(v6, 100, 'in', 5, false);
if (v3._setPreStart) {
v4.preStart = [v6._x, v6._y + 25];
v4.preLocation = storedv5;
}
if (v3._anti_arr[0]) {
v4.anti_active = v3._anti_arr[0];
v4.anti_type = v3._anti_arr[1];
v4.anti_pos_arr = [v6._x, v6._y];
v4.anti_loc = storedv5;
v6.mc._alpha = 0;
}
_global.model.heliStart[v3._player] = [v6._x - 15, v6._y + 25];
return true;
} else {
return false;
}
};
v1.set_crash_text = function (a_str) {
_level0.crashText.text = 'Code report: ' + a_str;
};
v1.setABDepth = function () {
for (var i in _global.model.playerArr) {
var v2 = _global.model.playerArr[i];
var v3 = this.battleSrcMC['ab' + v2.playerNum + '_' + 1];
var v4 = this.battleSrcMC['ab' + v2.playerNum + '_' + 2];
var v5 = this.battleSrcMC['flag' + v2.playerNum];
v3.swapDepths(Math.floor(v3._y / 10) * 500 + 2);
v4.swapDepths(Math.floor(v4._y / 10) * 500 + 1);
v5.swapDepths(Math.floor(v4._y / 10) * 500 + 3);
}
};
v1.addProperty('clipSrc', function () {}, v1.__set__clipSrc);
ASSetPropFlags(v1, null, 1);
v1.someString = 'blaat';
v1.interfaceBGDepth = 210;
v1.actionLightDepthStart = 211;
v1.actionTextDepthStart = 221;
v1.ticker1Depth = 250;
v1.ticker2Depth = 251;
v1.infoTextDepth = 252;
v1.scrollTextDepth = 253;
v1.ticker3Depth = 254;
v1.ticker4Depth = 255;
v1.ticker5Depth = 256;
v1.ticker6Depth = 257;
v1.statBarDepth = 258;
v1.exBtnSrcDepth = 259;
v1.exBtnOvrDepth = 260;
v1.smallMapCityDepthStart = 270;
v1.playerOutlineDepthStart = 350;
v1.cloudTickerDepth = 360;
v1.citySelectionDepthStart = 1500;
v1.nextUnusedDepthPleaseRenameThisVarBecauseItsTooLong = 1500;
v1.popupDepthStart = 4000;
v1.btnArr = [0, 0];
v1.btnSet_actions = new Array();
v1.btnSet_stock = new Array();
v1.actionTextMCArr = new Array();
v1.fadeClipsArr = new Array();
v1.openPopupsArr = new Array();
v1.btnBroadcaster = new Object();
v1.fadeStockBtnArr = new Array();
v1.fadeStockActive = false;
v1.typeEffectArr = new Array();
v1.scrollTextStartIndex = 0;
v1.scrollTickerActive = false;
v1.scrollMaxChars = 60;
v1.currentViewType = 'interface';
v1.allowTextEffect = false;
v1.textEffectInterval = 12;
v1.curTextEffectIntervalCount = 0;
v1.cloudArr = [];
v1.cloudPacks = 0;
v1.cloudMax = 17;
v1.cloudCenterPositions = new Array([416, 350], [180, 180], [650, 150], [180, 480], [640, 470]);
v1.AB_interval_start_index = 0;
}
#endinitclip
}
movieClip 5276 __Packages.View_interface {
#initclip
if (!View_interface) {
_global.View_interface = function (_interfaceMC) {
_interfaceMC.btn1.onPress = function () {};
this.interfaceMC = _interfaceMC;
this.stockRequirements_list = new StockRequirements_list();
this.stockBtn_data = new StockBtn_data();
this.stockBtn_arr = new Array();
this.actionBtn_arr = new Array();
this.btn_arr = new Array();
this.actionBtn_arr[0] = undefined;
this.stockBtn_arr[0] = undefined;
this.shortMSG_textField = this.interfaceMC.shortMSG_textField;
var v3 = 1;
goto 3249;
for (;;) {
++v3;
label 3249:
if (v3 >= this.stockBtn_data.dataArr.length) break;
var v4 = this.stockBtn_data.dataArr[v3];
var v5 = new Btn_stock(v4.id, v4.name, v4.label, this.interfaceMC['stockPanel' + v4.stockPanelNum][v4.overlayMC_name], this.interfaceMC['stockPanel' + v4.stockPanelNum][v4.labelTF_name], this.interfaceMC['stockPanel' + v4.stockPanelNum][v4.scrnMC_name], this.interfaceMC['stockPanel' + v4.stockPanelNum][v4.scrnTF_name], this.interfaceMC['stockPanel' + v4.stockPanelNum][v4.btnSwitchMC_name], v4.weaponName, v4.stockPanelNum, v4.deactivate_in_demo);
v5.overlayMC._btnObj = v5;
v5.overlayMC.onPress = function () {
_global.presenter_interface.btnPress(this._btnObj.index_in_arr);
};
v5.overlayMC.onRollOver = function () {
_global.presenter_interface.btnRoll_on(this._btnObj.index_in_arr);
};
v5.overlayMC.onRollOut = function () {
_global.presenter_interface.btnRoll_on(-1);
};
v5.resetClips();
this.stockBtn_arr.push(v5);
this.infoLine = 'welcome';
}
var v6 = 1;
goto 3788;
for (;;) {
++v6;
label 3788:
if (v6 >= 10) break;
this.actionBtn_arr[v6] = new Btn_action(this.actionNames_arr[v6], this.actionLabels_arr[v6], this.interfaceMC['btn' + v6], this.interfaceMC['scrn' + v6], this.interfaceMC['switch' + v6], this.interfaceMC['txtMC' + v6].txt);
var v7 = this.actionBtn_arr[v6];
v7.overlayMC._btnObj = v7;
v7.overlayMC.onPress = function () {
_global.presenter_interface.btnPress(this._btnObj.index_in_arr);
};
v7.overlayMC.onRollOver = function () {
_global.presenter_interface.btnRoll_on(this._btnObj.index_in_arr);
};
v7.overlayMC.onRollOut = function () {
_global.presenter_interface.btnRoll_off(-1);
};
v7.setLabelText();
v7.updateBtn();
}
this.actionTube1 = new Btn_tube(this.interfaceMC.btn44, this.interfaceMC.tubeMC1);
this.actionTube1.btnMC._btnObj = this.actionTube1;
this.actionTube1.actionNum = 1;
this.actionTube1.associatedTA = _global.model.human.turnAction_1;
this.actionTube1.btnMC.onPress = function () {
_global.presenter_interface.btnPressed_tube(this._btnObj);
};
this.actionTube2 = new Btn_tube(this.interfaceMC.btn45, this.interfaceMC.tubeMC2);
this.actionTube2.btnMC._btnObj = this.actionTube2;
this.actionTube2.actionNum = 2;
this.actionTube2.associatedTA = _global.model.human.turnAction_2;
this.actionTube2.btnMC.onPress = function () {
_global.presenter_interface.btnPressed_tube(this._btnObj);
};
this.turnBtn = new Btn_turn(this.interfaceMC.btn46, this.interfaceMC.actionHatch3);
var v8 = 1;
goto 4622;
for (;;) {
++v8;
label 4622:
if (v8 >= this.actionBtn_arr.length) break;
var v9 = this.actionBtn_arr[v8];
v9.index_in_arr = Math.max(this.btn_arr.push({'_btn': v9}) - 1, 0);
}
var v10 = 1;
goto 4766;
for (;;) {
++v10;
label 4766:
if (v10 >= this.stockBtn_arr.length) break;
var v11 = this.stockBtn_arr[v10];
v11.index_in_arr = this.btn_arr.push({'_btn': this.stockBtn_arr[v10]}) - 1;
}
this.btn_sound = new Btn_musicSwitch(this.interfaceMC.btn38, this.interfaceMC.switch38, 'sound');
this.btn_sound.overlayMC._obj = this.btn_sound;
this.btn_sound.overlayMC.onPress = function () {
_global.presenter_interface.btnPressed_option(this._obj.option);
};
this.btn_music = new Btn_musicSwitch(this.interfaceMC.btn39, this.interfaceMC.switch39, 'music');
this.btn_music.overlayMC._obj = this.btn_music;
this.btn_music.overlayMC.onPress = function () {
_global.presenter_interface.btnPressed_option(this._obj.option);
};
this.scrollBtn_msg_up = new Btn_simple(this.interfaceMC.btn_scroll_MSG_up_overlay, this.interfaceMC.btn_scroll_MSG_up);
this.scrollBtn_msg_down = new Btn_simple(this.interfaceMC.btn_scroll_MSG_down_overlay, this.interfaceMC.btn_scroll_MSG_down);
this.interfaceMC.btn_scroll_MSG_up_overlay.onPress = function () {
_global.presenter_interface.btnPressed_scroll_MSG('up');
};
this.interfaceMC.btn_scroll_MSG_down_overlay.onPress = function () {
_global.presenter_interface.btnPressed_scroll_MSG('down');
};
this.interfaceMC.btn40.onPress = function () {
if (_global.model.userSelectedActionBtn != 'diplomacy') {
_global.presenter_interface.btnPress(8);
}
if (_global.model.playerArr[1].alive && !_global.model.human.ceaseFireArr[1]._status) {
_global.model.userSelectedDiplomacyLeader = 1;
}
_global.presenter_interface.updateView();
};
this.interfaceMC.btn41.onPress = function () {
if (_global.model.userSelectedActionBtn != 'diplomacy') {
_global.presenter_interface.btnPress(8);
}
if (_global.model.playerArr[2].alive && !_global.model.human.ceaseFireArr[2]._status) {
_global.model.userSelectedDiplomacyLeader = 2;
}
_global.presenter_interface.updateView();
};
this.interfaceMC.btn42.onPress = function () {
if (_global.model.userSelectedActionBtn != 'diplomacy') {
_global.presenter_interface.btnPress(8);
}
if (_global.model.playerArr[3].alive && !_global.model.human.ceaseFireArr[3]._status) {
_global.model.userSelectedDiplomacyLeader = 3;
}
_global.presenter_interface.updateView();
};
this.interfaceMC.btn43.onPress = function () {
if (_global.model.userSelectedActionBtn != 'diplomacy') {
_global.presenter_interface.btnPress(8);
}
if (_global.model.playerArr[4].alive && !_global.model.human.ceaseFireArr[4]._status) {
_global.model.userSelectedDiplomacyLeader = 4;
}
_global.presenter_interface.updateView();
};
var v12 = 1;
goto 6282;
for (;;) {
++v12;
label 6282:
if (v12 >= 5) break;
this.interfaceMC['stat' + v12 + '1'].num = v12;
this.interfaceMC['stat' + v12 + '1'].onRollOver = function () {
_global.presenter_interface.roll_over_stat('regard', this.num);
_global.view_interface.interfaceMC['leaderStar_roll_' + this.num + '1'].play();
};
this.interfaceMC['stat' + v12 + '1'].onRollOut = function () {
_global.view_interface.infoLine = 'null';
};
this.interfaceMC['stat' + v12 + '2'].num = v12;
this.interfaceMC['stat' + v12 + '2'].onRollOver = function () {
_global.presenter_interface.roll_over_stat('population');
_global.view_interface.interfaceMC['leaderStar_roll_' + this.num + '2'].play();
};
this.interfaceMC['stat' + v12 + '2'].onRollOut = function () {
_global.view_interface.infoLine = 'null';
};
}
this.interfaceMC.txtMC_help.txt.text = 'HELP';
this.interfaceMC.btn_help.onPress = function () {
_global.model.userSelectedActionBtn = 'help';
_global.model.userSelectedHelpTopic = 'help_index';
_global.presenter_interface.updateView();
};
this.interfaceMC.txtMC_fullscreen.txt.text = 'FULL SCREEN';
this.interfaceMC.btn_fullscreen.onPress = function () {
if (_global.model.fullscreen) {
_global.model.fullscreen = false;
fscommand('' add 'fullscreen', 'false');
} else {
_global.model.fullscreen = true;
fscommand('' add 'fullscreen', 'true');
}
};
var v13 = 1;
goto 7036;
for (;;) {
++v13;
label 7036:
if (v13 >= 6) break;
this.interfaceMC['map_overlay_btn' + v13].gotoAndStop(2);
}
this.infoLine = 'welcome';
};
var v1 = _global.View_interface.prototype;
v1.update_stockPanelMask = function (_num, _frm) {
this.interfaceMC.stockPanel.maskMC['mc' + _num].gotoAndStop(_frm);
};
v1.actionName2TubeLabel = function (_str) {
for (var i in this.actionNames_arr) {
if (this.actionNames_arr[i] == _str) {
return this.actionTubeLabels_arr[i];
}
}
};
v1.actionName2label = function (_str) {
for (var i in this.actionNames_arr) {
if (this.actionNames_arr[i] == _str) {
return this.actionLabels_arr[i];
}
}
};
v1.update_stockPanel_alpha = function (_num, __alpha) {
this.interfaceMC['stockPanel' + _num].targetAlpha = __alpha;
this.interfaceMC['stockPanel' + _num].onEnterFrame = function () {
if (this._alpha > this.targetAlpha + 5) {
this._alpha -= 20;
} else {
if (this._alpha < this.targetAlpha - 5) {
this._alpha += 20;
}
}
if (Math.max(this._alpha, this.targetAlpha) - Math.min(this._alpha, this.targetAlpha) < 21) {
this._alpha = this.targetAlpha;
delete this.onEnterFrame;
}
};
};
v1.infoLine_interfal_func = function () {
_global.clearInterval(this.infoLine_interval_id);
this.infoLine_interval_id = undefined;
this.interfaceMC.infoLine.gotoAndStop(1);
};
v1.__set__infoLine = function (_str) {
_global.clearInterval(this.infoLine_interval_id);
this.infoLine_interval_id = _global.setInterval(this, 'infoLine_interfal_func', 4500);
this.interfaceMC.infoLine.gotoAndStop(_str);
return this.__get__infoLine();
};
v1.update_statBar = function (_num, _val) {
this.interfaceMC['statBar' + _num].statMask._xscale = _val;
};
v1.update_statMoney = function (_val) {
if (_val <= 0) {
this.interfaceMC.statTxt.text = '$ out of funds';
} else {
this.interfaceMC.statTxt.text = '$ ' + Math.round(_val) + '.000.000 ';
}
};
v1.update_hover_states = function (_index) {};
v1.__set__shortMSG_text = function (_arr) {
this.shortMSG_textField.text = '';
var v3 = 0;
goto 8216;
for (;;) {
++v3;
label 8216:
if (v3 >= _arr.length) break;
var v4 = _arr[v3];
if (v4._msg != '' && v4._msg) {
this.shortMSG_textField.htmlText += v4._msg + '<br />';
}
}
this.scroll_msg_txt();
return this.__get__shortMSG_text();
};
v1.set_color_dot = function (a_num, a_frame) {
this.interfaceMC['colorDotMC' + a_num].gotoAndStop(a_frame);
};
v1.update_leaderFace = function (_playerNum, _frame, _alive, _inactive, _played_noise) {
var v7 = this.interfaceMC['leaderMC' + _playerNum];
if (_inactive) {
v7._visible = false;
return undefined;
} else {
v7._visible = true;
}
if (_alive) {
v7.gotoAndStop('leaderLife');
v7._visible = true;
v7.aliveMC.gotoAndStop(_frame);
v7.deadMC.gotoAndStop(_frame);
} else {
v7.aliveMC._visible = false;
v7.gotoAndStop('leaderDead');
if (_played_noise) {
v7.aliveMC.gotoAndStop(20);
v7.deadMC._visible = true;
v7.deadMC.gotoAndStop(_frame);
} else {
v7.playDead = true;
v7.deadMC._visible = true;
v7.deadMC.gotoAndStop(_frame);
_global.play_sound_by_action('interface_noise');
v7.gotoAndPlay(24);
}
}
};
v1.set_centerScreenFunc = function (_type) {
switch (_type) {
case 'default':
this.set_centerScreen_btns_default();
break;
case 'hide':
this.set_centerScreen_btns_hide();
}
};
v1.set_centerScreen_btns_hide = function () {
this.interfaceMC.centerScreen.btnAccept.gotoAndStop('empty');
this.interfaceMC.centerScreen.btnCancel.gotoAndStop('empty');
};
v1.set_centerScreen_btns_default = function () {
this.interfaceMC.centerScreen.btnAccept.gotoAndStop('off');
this.interfaceMC.centerScreen.btnCancel.gotoAndStop('off');
this.interfaceMC.centerScreen.btnAccept.onRollOver = function () {
this.gotoAndStop('over');
};
this.interfaceMC.centerScreen.btnAccept.onRollOut = function () {
this.gotoAndStop('off');
};
this.interfaceMC.centerScreen.btnAccept.onPress = function () {
_global.presenter_interface.btnPressed_accept();
};
this.interfaceMC.centerScreen.btnCancel.onPress = function () {
_global.play_sound_by_action('interface_acceptAction_btn');
_global.presenter_interface.btnPressed_cancel();
};
this.interfaceMC.centerScreen.btnCancel.onRollOver = function () {
this.gotoAndStop('over');
};
this.interfaceMC.centerScreen.btnCancel.onRollOut = function () {
this.gotoAndStop('off');
};
};
v1.set_production_specialStats = function (_arr) {
var v3 = 0;
goto 9526;
for (;;) {
++v3;
label 9526:
if (v3 >= _arr.length) break;
this.interfaceMC.centerScreen.slide3['stat' + v3].maskMC._xscale = (_arr[v3][0] / _arr[v3][1]) * 100;
}
};
v1.set_productionText = function (_str1, _str2, _str3) {
this.interfaceMC.centerScreen.txt1.htmlText = _str1;
this.interfaceMC.centerScreen.txt2.htmlText = _str2;
this.interfaceMC.centerScreen.txt2.setTextFormat(_global.view.textFormats.interface_production_1);
this.interfaceMC.centerScreen.txt3.htmlText = _str3;
};
v1.set_researchText = function (_str1, _str2, _str3) {
this.interfaceMC.centerScreen.txt1.htmlText = _str1;
this.interfaceMC.centerScreen.txt1.setTextFormat(_global.view.textFormats.interface_production_2);
this.interfaceMC.centerScreen.txt2.htmlText = _str2;
this.interfaceMC.centerScreen.txt2.setTextFormat(_global.view.textFormats.interface_production_1);
this.interfaceMC.centerScreen.txt3.htmlText = _str3;
this.interfaceMC.centerScreen.txt3.setTextFormat(_global.view.textFormats.interface_production_1);
};
v1.set_top_plrColor = function (_num, _clr) {
this.interfaceMC['plrColor' + _num].gotoAndStop(_clr);
return undefined;
};
v1.set_centerScreenFunc_help = function (a_info) {
var v3 = this.interfaceMC.centerScreen;
v3.gotoAndStop(a_info.pgName);
if (a_info._btnIndex) {
v3.btnIndex._visible = true;
v3.btnIndex.onPress = function () {
_global.model.userSelectedHelpTopic = 'help_index';
_global.presenter_interface.updateView();
};
} else {
v3.btnIndex._visible = false;
}
if (a_info._btnPrev) {
v3.btnPrev._visible = true;
v3.btnPrev._str = a_info._pgName;
v3.btnPrev.onPress = function () {
_global.model.userSelectedHelpTopic = _global.presenter_interface.help_data.get_prev(this._str);
_global.presenter_interface.updateView();
};
} else {
v3.btnPrev._visible = false;
}
if (a_info._btnNext) {
v3.btnNext._visible = true;
v3.btnNext._str = a_info._pgName;
v3.btnNext.onPress = function () {
_global.model.userSelectedHelpTopic = _global.presenter_interface.help_data.get_next(this._str);
_global.presenter_interface.updateView();
};
} else {
v3.btnNext._visible = false;
}
for (var i in a_info._btnArr) {
var v4 = a_info._btnArr[i];
v3[v4._mcName].goto = v4._trgtString;
v3[v4._mcName].onPress = function () {
_global.model.userSelectedHelpTopic = this.goto;
_global.presenter_interface.updateView();
};
}
v3.mc1.stop();
};
v1.scroll_msg_txt = function (_str) {
switch (_str) {
case 'up':
--this.interfaceMC.shortMSG_textField.scroll;
break;
case 'down':
++this.interfaceMC.shortMSG_textField.scroll;
}
var v3 = this.interfaceMC.shortMSG_textField.scroll;
if (v3 == 1) {
this.scrollBtn_msg_up.img.gotoAndStop(2);
} else {
this.scrollBtn_msg_up.img.gotoAndStop(1);
}
if (v3 == this.interfaceMC.shortMSG_textField.maxscroll) {
this.scrollBtn_msg_down.img.gotoAndStop(2);
} else {
this.scrollBtn_msg_down.img.gotoAndStop(1);
}
};
v1.play_leaderMC_sequence = function (num) {};
v1.update_highScore = function (a_amnt) {
this.interfaceMC.txtMC_score.txt.text = a_amnt;
};
v1.addProperty('shortMSG_text', function () {}, v1.__set__shortMSG_text);
v1.addProperty('infoLine', function () {}, v1.__set__infoLine);
ASSetPropFlags(v1, null, 1);
v1.actionNames_arr = new Array(undefined, 'resources', 'production', 'research', 'religion', 'attack', 'preAttack', 'defense', 'propaganda', 'diplomacy', 'skip_action');
v1.actionLabels_arr = new Array(undefined, 'RESOURCES', 'PRODUCTION', 'TECHNOLOGY', 'MASS MEDIA', 'DIRECT ATTACK', 'PREPARED ATTACK', 'DEFENSE', 'PROPAGANDA', 'DIPLOMACY', 'SKIP');
v1.actionTubeLabels_arr = new Array(undefined, 'RESOURCES', 'PRODUCTION', 'TECHNOLOGY', 'MASS MEDIA', 'DIRECT <br />ATTACK', 'PREPARED <br /> ATTACK', 'DEFENSE', 'PROPAGANDA', 'DIPLOMACY');
v1.stockPanel_mask_states_arr = new Array([0], [3], [0], [0], [3], [2, 2, 2, 2, 2, 2, 1, 1, 2], [1, 1, 1, 1, 2, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2, 2, 1], [3], [3]);
}
#endinitclip
}
movieClip 5277 __Packages.StockRequirements_list {
#initclip
if (!StockRequirements_list) {
_global.StockRequirements_list = function () {
this._default = new Object();
this._default.active = false;
this._default.state2_arr = ['false'];
this._default.state4_arr = ['false'];
this.resources = new Object();
this.resources.active = false;
this.resources.state4_arr = ['false'];
this.production = new Object();
this.production.active = false;
this.production.state2_arr = ['false'];
this.production.state4_arr = ['false'];
this.research = new Object();
this.research.active = false;
this.research.state2_arr = ['nextInvention'];
this.research.state3_arr = ['nextInvention'];
this.research.state4_arr = ['false'];
this.religion = new Object();
this.religion.active = false;
this.religion.state2_arr = ['false'];
this.religion.state4_arr = ['false'];
this.preAttack = new Object();
this.preAttack.active = true;
this.preAttack.state2_arr = ['preAttackRelated', 'isActive', 'weaponInStock', 'isPayload_pre', 'isCarrier_pre'];
this.preAttack.state3_arr = ['??'];
this.preAttack.state4_arr = ['inactive'];
this.attack = new Object();
this.attack.active = true;
this.attack.state2_arr = ['attackRelated', 'isActive', 'weaponInStock', 'spy_allowed'];
this.attack.state4_arr = ['inactive'];
this.defense = new Object();
this.defense.active = true;
this.defense.state2_arr = ['defenseRelated', 'weaponInStock'];
this.defense.state4_arr = ['inactive'];
this.propaganda = new Object();
this.propaganda.active = false;
this.propaganda.state2_arr = ['false'];
this.propaganda.state4_arr = ['false'];
this.diplomacy = new Object();
this.diplomacy.active = false;
this.diplomacy.state2_arr = ['false'];
this.diplomacy.state4_arr = ['false'];
};
var v1 = _global.StockRequirements_list.prototype;
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5278 __Packages.StockBtn_data {
#initclip
if (!StockBtn_data) {
_global.StockBtn_data = function () {
this.dataArr = new Array();
this.dataArr[0] = undefined;
this.dataArr[1] = new StockBtn_data_obj(1, 'roc1', '10 meg', 'rocket1', 1, false);
this.dataArr[2] = new StockBtn_data_obj(2, 'roc2', '25 meg', 'rocket2', 1, false);
this.dataArr[3] = new StockBtn_data_obj(3, 'roc3', '50 meg', 'rocket3', 1, true);
this.dataArr[4] = new StockBtn_data_obj(4, 'roc4', '95 meg', 'rocket4', 1, true);
this.dataArr[5] = new StockBtn_data_obj(5, 'Air1', 'Fighter', 'plane1', 2, false);
this.dataArr[6] = new StockBtn_data_obj(6, 'Air2', 'Bomber', 'plane2', 2, true);
this.dataArr[7] = new StockBtn_data_obj(7, 'SpeC1', 'Submarine', 'sub', 3, false);
this.dataArr[8] = new StockBtn_data_obj(8, 'SpeC2', 'Aircraft Carrier', 'ship', 3, true);
this.dataArr[9] = new StockBtn_data_obj(9, 'SpeC3', 'Space Rocket', 'space', 3, true);
this.dataArr[10] = new StockBtn_data_obj(10, 'SpeC4', 'Satellite', 'specialLoad', 3, true);
this.dataArr[11] = new StockBtn_data_obj(11, 'war1', '10 meg', 'warhead1', 4, false);
this.dataArr[12] = new StockBtn_data_obj(12, 'war2', '25 meg', 'warhead2', 4, false);
this.dataArr[13] = new StockBtn_data_obj(13, 'war3', '50 meg', 'warhead3', 4, true);
this.dataArr[14] = new StockBtn_data_obj(14, 'war4', '95 meg', 'warhead4', 4, true);
this.dataArr[15] = new StockBtn_data_obj(15, 'bio1', '10 meg', 'bioload1', 5, false);
this.dataArr[16] = new StockBtn_data_obj(16, 'bio2', '25 meg', 'bioload2', 5, false);
this.dataArr[17] = new StockBtn_data_obj(17, 'bio3', '50 meg', 'bioload3', 5, true);
this.dataArr[18] = new StockBtn_data_obj(18, 'bio4', '95 meg', 'bioload4', 5, true);
this.dataArr[19] = new StockBtn_data_obj(19, 'sol1', 'Soldiers', 'soldier1', 6, false);
this.dataArr[20] = new StockBtn_data_obj(20, 'sol2', 'Seals', 'soldier2', 6, false);
this.dataArr[21] = new StockBtn_data_obj(21, 'sol3', 'Tank', 'soldier3', 6, true);
this.dataArr[22] = new StockBtn_data_obj(22, 'sol4', 'Specials', 'soldier4', 6, true);
this.dataArr[23] = new StockBtn_data_obj(23, 'spy1', 'spy 1', 'spy1', 7, false);
this.dataArr[24] = new StockBtn_data_obj(24, 'spy2', 'spy 2', 'spy2', 7, false);
this.dataArr[25] = new StockBtn_data_obj(25, 'spy3', 'spy 3', 'spy3', 7, true);
this.dataArr[26] = new StockBtn_data_obj(25, 'spy4', 'spy 4', 'spy4', 7, true);
this.dataArr[27] = new StockBtn_data_obj(25, 'anti1', 'Aircraft', 'antiAir', 8, false);
this.dataArr[28] = new StockBtn_data_obj(25, 'anti2', 'Rocket', 'antiRocket', 8, false);
var v2 = 1;
goto 2003;
for (;;) {
++v2;
label 2003:
if (v2 >= this.dataArr.length) break;
this.dataArr[v2].overlayMC_name = 'btn' + (v2 + 9);
this.dataArr[v2].scrnMC_name = 'scrn' + (v2 + 9);
this.dataArr[v2].btnSwitchMC_name = 'switch' + (v2 + 9);
this.dataArr[v2].scrnTF_name = 'scrnTxt' + (v2 + 9);
this.dataArr[v2].labelTF_name = 'stockTxt' + v2;
}
};
var v1 = _global.StockBtn_data.prototype;
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5279 __Packages.StockBtn_data_obj {
#initclip
if (!StockBtn_data_obj) {
_global.StockBtn_data_obj = function (_id, _name, _label, _weaponName, _stockPanelNum, _deactivate_in_demo) {
this.id = _id;
this.name = _name;
this.label = _label;
this.weaponName = _weaponName;
this.stockPanelNum = _stockPanelNum;
this.deactivate_in_demo = _deactivate_in_demo;
};
var v1 = _global.StockBtn_data_obj.prototype;
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5280 __Packages.Sub_sub_presenter_interface {
#initclip
if (!Sub_sub_presenter_interface) {
_global.Sub_sub_presenter_interface = function () {};
var v1 = _global.Sub_sub_presenter_interface.prototype;
v1.updateView_debug_1 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
_global.view.remove_city_popups();
if (this.model.human.diplomacyPendingArr[0]) {
this.model.userSelectedActionBtn = 'diplomacyPending';
}
if (_global.model.zs66hj8s) {
_global.view.srcMC.get_full_version_btn.onPress = function () {
getURL(_global.model.get_demo_version_url(), '_blank');
};
} else {
_global.view.srcMC.get_full_version_btn._visible = false;
_global.view.srcMC.get_full_version_text._visible = false;
_global.view.srcMC.demo_stock_overlay.gotoAndStop(1);
_global.view.srcMC.demo_stock_overlay._visible = false;
}
this.view_interface.shortMSG_text = this.model.human.shortMSG_arr;
_global.presenter.allUnitsDone_intervalID = _global.setInterval(this, 'updateView_debug_2', 5);
};
v1.updateView_debug_2 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
for (var i in this.view_interface.stockBtn_arr) {
var v2 = this.view_interface.stockBtn_arr[i];
var v3 = this.model.human.weaponStock.getWeaponByName(v2.relatedWeapon);
var v4 = true;
var v5 = true;
var v6 = true;
if (v3.active) {
v2.stockAmount = v3.inStock - v3.inUse;
} else {
v2.stockAmount = -1;
}
for (var j in this.view_interface.stockRequirements_list[this.model_interface.selected_action_name].state2_arr) {
if (!this.stock_req_check_single(this.view_interface.stockRequirements_list[this.model_interface.selected_action_name].state2_arr[j], v2)) {
v4 = false;
break;
}
}
for (var j in this.view_interface.stockRequirements_list[this.model_interface.selected_action_name].state4_arr) {
if (!this.stock_req_check_single(this.view_interface.stockRequirements_list[this.model_interface.selected_action_name].state4_arr[j], v2)) {
v6 = false;
break;
}
}
if (v6) {
v2.state = 4;
} else {
if (v4) {
v2.state = 2;
} else {
v2.state = 1;
}
}
if (v2.relatedWeapon == this.model.userSelectedStockBtn) {
v2.state = 3;
}
if (v3.weaponName == 'specialLoad' && this.model.userSelectedCarrier != 'space') {
v2.state = 1;
}
}
_global.presenter.allUnitsDone_intervalID = _global.setInterval(this, 'updateView_debug_3', 5);
};
v1.updateView_debug_3 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
for (var i in this.view_interface.actionBtn_arr) {
var v2 = this.view_interface.actionBtn_arr[i];
if (!this.model.human.getNextTurnAction()) {
if (v2.actionName != this.model.human.turnAction_1.action && v2.actionName != this.model.human.turnAction_2.action) {
v2.handCursor = false;
}
} else {
v2.handCursor = true;
}
if (v2.isSetAction) {
v2.state = 3;
} else {
if (v2.pressed) {
v2.state = 2;
} else {
if (v2.actionName == 'preAttack' && this.model.human.preAttackStatus == 'ready') {
v2.state = 4;
} else {
v2.state = 1;
}
}
}
}
_global.presenter.allUnitsDone_intervalID = _global.setInterval(this, 'updateView_debug_4', 5);
};
v1.updateView_debug_4 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
if ((this.model.human.getNextTurnAction()).num == 1) {
if (this.model.userSelectedActionBtn) {
this.view_interface.actionTube1.state = 'open';
} else {
this.view_interface.actionTube1.state = 'closed';
}
if (this.model.human.turnAction_2.action) {
this.view_interface.actionTube2.state = 'set';
} else {
this.view_interface.actionTube2.state = 'closed';
}
} else {
if ((this.model.human.getNextTurnAction()).num == 2) {
if (this.model.userSelectedActionBtn) {
this.view_interface.actionTube2.state = 'open';
} else {
this.view_interface.actionTube2.state = 'closed';
}
if (this.model.human.turnAction_1.action) {
this.view_interface.actionTube1.state = 'set';
} else {
this.view_interface.actionTube1.state = 'closed';
}
} else {
if (!this.model.human.getNextTurnAction() && !this.blockAllBtns) {
this.view_interface.actionTube1.state = 'set';
this.view_interface.actionTube2.state = 'set';
this.view_interface.turnBtn.state = 'open';
this.view_interface.turnBtn.btnMC.gotoAndStop(1);
this.view_interface.turnBtn.btnMC.onPress = function () {
_global.presenter_interface.blockAllBtns = true;
_global.presenter_interface.btnPressed_turn();
};
}
}
}
_global.presenter.allUnitsDone_intervalID = _global.setInterval(this, 'updateView_debug_5', 5);
};
v1.updateView_debug_5 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
if (this.model.human.getNextTurnAction()) {
this.view_interface.turnBtn.state = 'closed';
}
var v2 = 0;
goto 4790;
for (;;) {
++v2;
label 4790:
if (v2 >= this.view_interface.actionNames_arr.length) break;
if (this.view_interface.actionNames_arr[v2] == this.model.userSelectedActionBtn) {
switch (this.view_interface.stockPanel_mask_states_arr[v2][0]) {
case 0:
var v4 = 1;
goto 4989;
for (;;) {
++v4;
label 4989:
if (v4 >= 9) break;
var v5 = Number(v4);
this.view_interface.update_stockPanel_alpha(v5, 100);
}
break;
case 1:
var v6 = 1;
goto 5083;
for (;;) {
++v6;
label 5083:
if (v6 >= 9) break;
var v7 = Number(v6);
if (this.view_interface.stockPanel_mask_states_arr[v2][v7] == 1) {
var v3 = 100;
} else {
var v3 = 0;
}
this.view_interface.update_stockPanel_alpha(v7, v3);
}
break;
case 2:
var v8 = 1;
goto 5246;
for (;;) {
++v8;
label 5246:
if (v8 >= 9) break;
var v9 = Number(v8);
if (this.view_interface.stockPanel_mask_states_arr[v2][v9] == 1) {
var v3 = 100;
} else {
var v3 = 0;
}
this.view_interface.update_stockPanel_alpha(v9, v3);
}
break;
case 3:
var v10 = 1;
goto 5409;
for (;;) {
++v10;
label 5409:
if (v10 >= 9) break;
var v11 = Number(v10);
this.view_interface.update_stockPanel_alpha(v11, 0);
}
continue;
}
}
}
_global.presenter.allUnitsDone_intervalID = _global.setInterval(this, 'updateView_debug_6', 5);
};
v1.updateView_debug_6 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
if (_global.model.view_leader_MCs_played == 'done') {
var v2 = 1;
goto 5634;
for (;;) {
++v2;
label 5634:
if (v2 >= this.model.playerArr.length) break;
var v3 = this.model.playerArr[v2];
var v4 = this.view_interface.interfaceMC['leaderMC' + v2];
v4.num = v2;
var v6 = 0;
v4.cfIcon1.gotoAndStop(1);
v4.cfIcon2.gotoAndStop(1);
v4.cfIcon3.gotoAndStop(1);
var v7 = 1;
goto 5843;
for (;;) {
++v7;
label 5843:
if (v7 >= v3.ceaseFireArr.length) break;
if (v3.ceaseFireArr[v7]._status) {
++v6;
v4['cfIcon' + v6].gotoAndStop(2);
var v8 = new Color(v4['cfIcon' + v6]);
v8.setTransform(this.model.playerArr[v7].playerColorTint1);
}
}
if (this.model.human.ceaseFireArr[v2]._status) {
var v9 = new Color(v4.iconCeaseFire);
v9.setTransform(this.model.human.playerColorTint1);
v4.iconCeaseFire.gotoAndStop(2);
v4.iconCeaseFire.txt.text = this.model.human.ceaseFireArr[v2]._turnsLeft;
} else {
v4.iconCeaseFire.gotoAndStop(1);
}
if (v3.bioloaded) {
v4.iconBio.gotoAndStop(2);
} else {
v4.iconBio.gotoAndStop(1);
}
var v5 = this.view_interface.interfaceMC['leaderStat' + v2 + '_' + 1].maskMC;
v5._yscale = v3.regardArr[0];
v5 = this.view_interface.interfaceMC['leaderStat' + v2 + '_' + 2].maskMC;
v5._yscale = this.model.populationPercentage(v3);
}
} else {
if (_global.model.view_leader_MCs_played == 'false') {
this.set_leader_face_MC_sequence();
}
}
_global.presenter.allUnitsDone_intervalID = _global.setInterval(this, 'updateView_debug_7', 9);
};
v1.updateView_debug_7 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
if (this.model.userSelectedActionBtn == 'preAttack') {
if (this.model.human.preAttackStatus == 'ready') {
this.view_interface.update_stockPanel_alpha(0, 0);
this.view_interface.update_stockPanel_alpha(1, 0);
this.view_interface.update_stockPanel_alpha(2, 0);
this.view_interface.update_stockPanel_alpha(3, 0);
this.view_interface.update_stockPanel_alpha(4, 100);
this.view_interface.update_stockPanel_alpha(5, 100);
}
}
if (this.model.userSelectedCarrier.weaponName == 'space') {
this.view_interface.update_stockPanel_alpha(3, 100);
this.view_interface.update_stockPanel_alpha(4, 0);
this.view_interface.update_stockPanel_alpha(5, 0);
}
if (this.model.human.preAttackStatus == 'ready') {
}
if (this.model.userSelectedActionBtn == 'attack') {
if (this.model.human.spy_readiness >= 25) {
}
}
_global.presenter.allUnitsDone_intervalID = _global.setInterval(this, 'updateView_debug_8', 9);
};
v1.updateView_debug_8 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
this.view_interface.btn_sound.state = this.model.option.sound;
this.view_interface.btn_music.state = this.model.option.music;
_global.presenter.allUnitsDone_intervalID = _global.setInterval(this, 'updateView_debug_9', 9);
};
v1.updateView_debug_9 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
this.view.updateCities();
_global.presenter.allUnitsDone_intervalID = _global.setInterval(this, 'updateView_debug_10', 9);
};
v1.updateView_debug_10 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
_global.presenter_interface.update_statistics();
_global.presenter.allUnitsDone_intervalID = _global.setInterval(this, 'updateView_debug_11', 9);
};
v1.updateView_debug_11 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
_global.presenter_interface.update_centerScreenContent();
_global.presenter.allUnitsDone_intervalID = _global.setInterval(this, 'updateView_debug_12', 9);
};
v1.updateView_debug_12 = function () {
_global.clearInterval(_global.presenter.allUnitsDone_intervalID);
_global.presenter_interface.view_interface.update_highScore(_global.model.human.score);
_global.presenter.allUnitsDone_intervalID = _global.setInterval(_global.view, 'to_interface_timed_4', 9);
};
v1.stock_req_check_single = function (_req, _btn) {
var v4 = false;
var v5 = _global.model.human.weaponStock.getWeaponByName(_btn.relatedWeapon);
switch (_req) {
return v4;
case 'isActive':
if (v5.active) {
v4 = true;
}
return v4;
case 'weaponInStock':
if (v5.inStock > 0) {
v4 = true;
}
return v4;
case 'isPayload_pre':
if (v5.weaponCategory == 'payload') {
if (this.model.human.preAttackStatus == 'ready') {
v4 = true;
} else {
v4 = false;
}
} else {
v4 = true;
}
return v4;
case 'isCarrier_pre':
if (v5.weaponCategory == 'carrier') {
if (this.model.human.preAttackStatus != 'ready') {
v4 = true;
} else {
v4 = false;
}
} else {
v4 = true;
}
return v4;
case 'preAttackRelated':
if (v5.weaponCategory == 'carrier' || (v5.weaponCategory == 'payload' || (v5.weaponCategory == 'specialCarrier' || v5.weaponCategory == 'specialLoad'))) {
if (v5.weaponCategory == 'payload') {
if (this.model.userSelectedCarrier.weaponLevel >= v5.weaponLevel) {
v4 = true;
} else {
v4 = false;
}
} else {
v4 = true;
}
} else {
v4 = false;
}
return v4;
case 'attackRelated':
if (v5.weaponCategory == 'conventional') {
v4 = true;
} else {
v4 = false;
}
return v4;
case 'inactive':
if (!v5.active) {
v4 = true;
} else {
v4 = false;
}
return v4;
case 'defenseRelated':
if (v5.weaponCategory == 'anti') {
v4 = true;
} else {
v4 = false;
}
return v4;
case 'spy_allowed':
if (v5.weaponCategory == 'spy') {
if (this.model.human.spy_readiness / 25 >= v5.weaponLevel) {
v4 = true;
}
} else {
return true;
}
return v4;
case 'false':
return false;
return v4;
}
return v4;
};
v1.update_leaderFaces = function () {
if (this.model.view_leader_MCs_played == 'done') {
var v2 = 0;
goto 8768;
for (;;) {
++v2;
label 8768:
if (v2 >= 6) break;
this.view_interface.update_leaderFace(v2, 1, true, true);
}
var v3 = 0;
goto 8850;
for (;;) {
++v3;
label 8850:
if (v3 >= this.model.playerArr.length) break;
var v4 = this.model.playerArr[v3];
this.view_interface.update_leaderFace(v4.playerNum, v4.faceFrame, v4.alive, false, v4.dead_avatar_played);
if (!v4.dead_avatar_played && !v4.alive) {
v4.dead_avatar_played = true;
}
}
} else {
if (this.model.view_leader_MCs_played == 'false') {
var v5 = 0;
goto 9065;
for (;;) {
++v5;
label 9065:
if (v5 >= 6) break;
this.view_interface.interfaceMC['leaderMC' + v5].gotoAndPlay(v5);
}
}
}
};
v1.set_leader_face_MC_sequence = function () {
this.update_leaderFaces();
this.model.view_leader_MCs_played = 'pending';
this.model.view_leader_MCs_played_max = this.model.playerArr.length;
this.model.view_leader_MCs_sequence_interval_id = _global.setInterval(this, 'do_leader_face_MC_sequence_itteration', 500);
};
ASSetPropFlags(v1, null, 1);
v1.testVar = 'test';
v1.minimalProductionInvestment = 0;
v1.megaton_by_level_arr = ['', '10 megaton', '25 megaton', '50 megaton', '95 megaton'];
v1.blockAllBtns = false;
v1.block_start_btn = false;
}
#endinitclip
}
movieClip 5281 __Packages.Model_interface {
#initclip
if (!Model_interface) {
_global.Model_interface = function () {};
var v1 = _global.Model_interface.prototype;
v1.__set__selected_action_name = function (_str) {
this._selected_action_name = _str;
return this.__get__selected_action_name();
};
v1.__get__selected_action_name = function () {
return _global.model.userSelectedActionBtn;
};
v1.__set__cur_pressed_action_btn = function (_btn) {
if (this.cur_pressed_action_btn) {
this.cur_pressed_action_btn.pressed = false;
}
this._cur_pressed_action_btn = _btn;
return this.__get__cur_pressed_action_btn();
};
v1.__get__cur_pressed_action_btn = function () {
return this._cur_pressed_action_btn;
};
v1.addProperty('cur_pressed_action_btn', v1.__get__cur_pressed_action_btn, v1.__set__cur_pressed_action_btn);
v1.addProperty('selected_action_name', v1.__get__selected_action_name, v1.__set__selected_action_name);
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5282 __Packages.Btn_action {
#initclip
if (!Btn_action) {
_global.Btn_action = function (_str1, _str2, _overlayMC, _mc1, _mc2, _tf) {
this.overlayMC = _overlayMC;
this.actionName = _str1;
this.label = _str2;
this.scrnMC = _mc1;
this.btnSwitch = _mc2;
this.tf = _tf;
this.p_bioloaded = false;
};
var v1 = _global.Btn_action.prototype;
v1.__set__pressed = function (_bln) {
this._pressed = _bln;
if (this.isSetAction) {
this.state = 3;
return this.__get__pressed();
}
if (_bln) {
this.state = 2;
return this.__get__pressed();
}
this.state = 1;
return this.__get__pressed();
};
v1.__get__pressed = function () {
return this._pressed;
};
v1.__set__btnStatus = function (_str) {
this._btnStatus = _str;
return this.__get__btnStatus();
};
v1.__get__btnStatus = function () {
return this._btnStatus;
};
v1.setLabelText = function () {
this.tf.text = this.label;
this.tf.setTextFormat(_global.view.textFormats.interface_actionText_1);
this.tf.embedFonts = true;
};
v1.__set__btnState = function (_nr) {
this._btnState = _nr;
return this.__get__btnState();
};
v1.__get__btnState = function () {
return this._btnState;
};
v1.__set__hover = function (_bln) {
this._hover = _bln;
this.updateBtn();
return this.__get__hover();
};
v1.__get__hover = function () {
return this._hover;
};
v1.__set__state = function (_nr) {
this._state = _nr;
this.updateBtn();
return this.__get__state();
};
v1.updateBtn = function () {
switch (this._state) {
case 1:
if (this.hover) {
this.tf.textColor = 16777215;
this.scrnMC.gotoAndStop(4);
} else {
this.tf.textColor = 11184810;
this.scrnMC.gotoAndStop(1);
}
this.btnSwitch.gotoAndStop(1);
break;
case 2:
if (this.hover) {
this.tf.textColor = 16777215;
} else {
this.tf.textColor = 0;
}
this.scrnMC.gotoAndStop(2);
this.btnSwitch.gotoAndStop(2);
break;
case 3:
if (this.hover) {
this.tf.textColor = 16777215;
} else {
this.tf.textColor = 0;
}
this.scrnMC.gotoAndStop(3);
this.btnSwitch.gotoAndStop(3);
break;
case 4:
this.tf.textColor = 16777215;
this.scrnMC.gotoAndStop(4);
this.btnSwitch.gotoAndStop(1);
}
};
v1.__get__state = function () {
return this._state;
};
v1.__set__handCursor = function (_bln) {
if (_bln) {
this.overlayMC.gotoAndStop(1);
return this.__get__handCursor();
}
this.overlayMC.gotoAndStop(2);
return this.__get__handCursor();
};
v1.__set__bioloaded = function (_bln) {
this.p_bioloaded = _bln;
if (_bln) {
this.scrnMC.bioMC1.gotoAndPlay(2);
this.scrnMC.bioMC2.gotoAndPlay(2);
return this.__get__bioloaded();
}
this.scrnMC.bioMC1.gotoAndStop(1);
this.scrnMC.bioMC2.gotoAndStop(1);
return this.__get__bioloaded();
};
v1.__get__bioloaded = function () {
return this.p_bioloaded;
};
v1.addProperty('pressed', v1.__get__pressed, v1.__set__pressed);
v1.addProperty('hover', v1.__get__hover, v1.__set__hover);
v1.addProperty('state', v1.__get__state, v1.__set__state);
v1.addProperty('btnState', v1.__get__btnState, v1.__set__btnState);
v1.addProperty('btnStatus', v1.__get__btnStatus, v1.__set__btnStatus);
v1.addProperty('bioloaded', v1.__get__bioloaded, v1.__set__bioloaded);
v1.addProperty('handCursor', function () {}, v1.__set__handCursor);
ASSetPropFlags(v1, null, 1);
v1.type = 'action';
v1.hoverable = true;
v1._hover = false;
v1._btnState = 0;
v1._pressed = false;
v1._state = 1;
}
#endinitclip
}
movieClip 5283 __Packages.Sub_presenter {
#initclip
if (!Sub_presenter) {
_global.Sub_presenter = function () {};
var v1 = _global.Sub_presenter.prototype;
v1.turnResults = function () {
this.model.reset_playerAB_position_arr();
this.model.attackingSubs_arr = [];
this.model.attackingSubs_arr_index = 0;
this.model.turnResultsArr = [];
this.model.battleMC_units_active = false;
for (var i in this.model.activePlayerArr) {
var v2 = true;
var v3 = this.model.activePlayerArr[i];
v3.shortMSG_arr = [];
v3.turnBattleCasualties = 0;
v3.turnBattleKills = 0;
v3.turnPropagandaCasualties = 0;
v3.turnResourcesGained = 0;
if (v3.spy_readiness < 0) {
v3.spy_readiness = 0;
}
if (_global.isNaN(v3.spy_readiness)) {
v3.spy_readiness = 50;
}
v3.spy_readiness = Math.min(v3.spy_readiness + 25, 100);
var v4 = 0;
goto 2677;
for (;;) {
++v4;
label 2677:
if (v4 >= v3.regardArr.length) break;
if (v3.ceaseFireArr[v4]._status) {
v3.regardArr[v4] += 2;
}
if (v3.regardArr[v4] < 100) {
++v3.regardArr[v4];
if (this.model.difficulty_level == 0) {
++v3.regardArr[v4];
++v3.regardArr[v4];
}
if (this.model.difficulty_level == 1) {
++v3.regardArr[v4];
}
}
if (v3.regardArr[v4] < 50) {
++v3.regardArr[v4];
if (this.model.difficulty_level == 0) {
++v3.regardArr[v4];
}
}
if (v3.regardArr[v4] < 30) {
++v3.regardArr[v4];
}
if (v3.regardArr[v4] > 100) {
v3.regardArr[v4] = 100;
}
if (v3.playedBy == 'AI') {
var v5 = 1;
goto 3213;
for (;;) {
++v5;
label 3213:
if (v5 >= v3.regardArr.length) break;
v3.regardArr[v5] += this.model.difficulty_level;
}
}
}
if (!this.model.playerArr[v3.primary_enemy].alive) {
v3.primary_enemy = this.model.get_random_set_enemy(v3, v3.secundary_enemy);
}
if (!this.model.playerArr[v3.secundary_enemy].alive) {
v3.secundary_enemy = this.model.get_random_set_enemy(v3, v3.primary_enemy);
}
if (v3.religion > 11) {
v3.religion -= this.model.tools.randRange(5, 10);
}
if (v3.money < -1 && v3.playedBy == 'human') {
this.model.error('money', v3.playerNum, v3.money);
}
if (v3.money < 0) {
v3.money = 1;
}
if (v3.special_person) {
v3.money += 3;
}
if (v3.preAttackStatus == 'ready' && (v3.turnAction_1.action != 'preAttack' && v3.turnAction_2.action != 'preAttack')) {
this.model.turnResultsArr.push({'_plr': v3.playerNum, '_item': 'cancel_pre'});
v3.preAttackStatus = 'inactive';
}
if (v3.turnAction_1.action != 'preAttack' && v3.turnAction_2.action != 'preAttack') {
v3.preLocation = undefined;
}
if (v3.preLocation && v3.preAttackStatus != 'ready') {
v3.preLocation = undefined;
}
for (var j in v3.diplomacyAcceptedArr) {
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'diplomacyAccepted', '_arr': v3.diplomacyAcceptedArr[j]});
}
for (var j in v3.diplomacyRejectedArr) {
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'diplomacyRejected', '_arr': v3.diplomacyRejectedArr[j]});
}
for (var j in v3.cityArr) {
var v6 = v3.cityArr[j];
if (v6.bioloaded) {
v6.removeBioload();
}
}
v3.weaponStock.removeBioload();
v3.bioloadedActionsArr = [];
v3.bioloadedStockArr = [];
v3.bioloaded = false;
v3.diplomacyAcceptedArr = [];
v3.diplomacyRejectedArr = [];
v3.preBuilding_this_turn = false;
for (var j in v3.diplomacy_offeredLastTurn) {
var v7 = v3.diplomacy_offeredLastTurn[j];
if (v7 > 0) {
--v3.diplomacy_offeredLastTurn[j];
} else {
if (v7 <= 0) {
v3.diplomacy_offeredLastTurn[j] = false;
}
}
}
for (var j in v3.weaponStock.weaponArr) {
v3.weaponStock.weaponArr[j].inUse = 0;
}
this.view.AB_interval_start_index = 0;
for (var j in v3.turnActionArr) {
var v8 = v3.turnActionArr[j];
switch (v8.action) {
case 'resources':
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'resources', '_value': '0', '_plusmin': 'plus'});
break;
case 'production':
for (var k in v8.productionInvestmentArr) {
if (v8.productionInvestmentArr[k][1] > 0) {
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'produce2', '_value': v8.productionInvestmentArr[k][0], '_amount': v8.productionInvestmentArr[k][1], '_group': v8.productionInvestmentArr[k][2], '_money': v8.productionInvestmentArr[k][3]});
}
}
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'production_building'});
break;
case 'produce':
break;
case 'research':
for (var k in v8.researchArr) {
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'research', '_value': v8.researchArr[k].techID, 'amount': 1});
}
for (var k in v8.inventArr) {
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'research', '_value': v8.inventArr[k].techID, 'amount': 1});
}
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'research_building'});
break;
case 'religion':
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'religion', '_value': 0, '_plusmin': 'plus'});
break;
case 'preAttack':
if (v3.preAttackStatus == 'active' || v3.preAttackStatus == 'inactive') {
v2 = false;
var v9 = v8.preAttackCarrier.weaponID;
var v10 = v8.preAttackPayload.weaponID;
var v11 = v8.targetCity.cityID;
if (v8.preAttackCarrier.weaponType == 'rocket') {
var v12 = 'silo';
} else {
if (v8.preAttackCarrier.weaponType == 'plane') {
var v12 = 'airfield';
} else {
if (v8.preAttackCarrier.weaponType == 'sub') {
var v12 = 'sub';
this.model.turnResultsArr.push({'_item': 'battle', '_player': v3.playerNum, '_weapon': v8.preAttackCarrier.weaponID, '_action': 1, '_dontReduce': true});
} else {
if (v8.preAttackCarrier.weaponType == 'ship') {
var v12 = 'ship';
this.model.turnResultsArr.push({'_item': 'battle', '_player': v3.playerNum, '_weapon': v8.preAttackCarrier.weaponID, '_action': 1, '_dontReduce': true, '_dontBeAnAss': true});
} else {
var v12 = v8.preAttackCarrier.weaponType;
}
}
}
}
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'setPreAttack', '_value': 'ready', '_a': v3.playerNum, '_b': v8.targetPlayer.playerNum, '_weapon': v8.preAttackCarrier.weaponID, '_carrier': v9, '_payload': v10, '_city': v8.targetCity.cityID, '_frame': v12, '_blocked': false});
} else {
if (v3.preAttackStatus == 'ready') {
v3.preBuilding_this_turn = true;
var v13 = v8.preAttackCarrier.weaponID;
var v14 = v8.preAttackPayload.weaponID;
var v15 = v8.targetCity.cityID;
var v17 = false;
var v18;
var v19;
var v20;
if (v8.preAttackCarrier.weaponType == 'rocket') {
var v16 = 'silo';
} else {
if (v8.preAttackCarrier.weaponType == 'plane') {
var v16 = 'airfield';
} else {
if (v8.preAttackCarrier.weaponType == 'sub') {
v20 = 2;
} else {
if (v8.preAttackCarrier.weaponType == 'ship') {
v17 = true;
v18 = new Array();
v19 = 2;
} else {
var v16 = v8.preAttackCarrier.weaponType;
}
}
}
}
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'battle', '_value': 'preAttack', '_a': v3.playerNum, '_b': v8.targetPlayer.playerNum, '_weapon': v13, '_carrier': v13, '_payload': v14, '_city': v8.targetCity.cityID, '_blocked': false, '_casualties': 0, '_frame': v16, '_result': true, '_isShip': v17, '_attack_arr': v8.ship_attack_arr, '_result_arr': v18, '_action': v20});
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'setPreAttack', '_value': 'inactive'});
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'regard', '_a': v3.playerNum, '_b': v8.targetPlayer.playerNum});
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'regard', '_value': 'preAttack', '_a': v3.playerNum, '_b': v8.targetPlayer.playerNum, '_wpnLevel': v8.preAttackPayload.weaponLevel});
}
}
break;
case 'attack':
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'battle', '_value': 'attack', '_a': v3.playerNum, '_b': v8.targetPlayer.playerNum, '_weapon': v8.attackWeapon.weaponID, '_city': v8.targetCity.cityID, '_casualties': 0, '_result': true, '_spyArr': undefined, '_spyBuilding': v8.spyBuilding});
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'regard', '_value': 'attack', '_a': v3.playerNum, '_b': v8.targetPlayer.playerNum, '_wpnLevel': v8.attackWeapon.weaponLevel});
if (v8.attackWeapon.weaponType == 'spy') {
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'reset_spy_readiness', '_value': 0});
}
break;
case 'preCounter':
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'defense', '_value': v8.attackWeapon.weaponID, '_result': false, '_frame': v8.attackWeapon.weaponName});
break;
case 'defense':
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'defense', '_value': v8.attackWeapon.weaponID, '_results': false, '_frame': v8.attackWeapon.weaponName});
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'regard', '_value': 'propaganda', '_a': v3.playerNum, '_b': v8.targetPlayer.playerNum});
break;
case 'propaganda':
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'propaganda', '_a': v3.playerNum, '_b': v8.targetPlayer.playerNum, '_city': v8.targetCity.cityID, '_value': 0});
break;
case 'diplomacy':
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'diplomacy', '_value': 'call', '_leader': v8.diplomacyLeader, '_option': v8.diplomacyOption});
this.model.turnResultsArr.push({'_player': v3.playerNum, '_item': 'regard', '_value': 'diplomacy', '_a': v3.playerNum, '_b': v8.diplomacyLeader, '_diplomacy': true});
}
}
}
for (var i in this.model.turnResultsArr) {
var v21 = this.model.turnResultsArr[i];
switch (v21._item) {
case 'resources':
if (_global.model.playerArr[v21._player].playedBy == 'human') {
v21._value = Math.round(_global.model.playerArr[v21._player].population / this.model.difficulty_level_specific_vars.player_resources_divider[this.model.difficulty_level]);
} else {
v21._value = Math.round(_global.model.playerArr[v21._player].population / this.model.difficulty_level_specific_vars.enemy_resources_divider[this.model.difficulty_level]);
}
v21._plusmin = 'plus';
break;
case 'religion':
if (_global.model.playerArr[v21._player].playedBy == 'human') {
v21._value = this.model.difficulty_level_specific_vars.player_religion_addition[this.model.difficulty_level];
} else {
v21._value = this.model.difficulty_level_specific_vars.enemy_religion_addition[this.model.difficulty_level];
}
break;
case 'battle':
if (v21._value == 'preAttack' && !v21._isShip) {
var v22 = _global.model.playerArr[v21._player].weaponStock.getWeaponByID(v21._payload);
var v23 = v22.maxKills;
if (this.model.playerArr[v21._a].playedBy == 'AI' && this.model.playerArr[v21._b].playedBy == 'human') {
v21._casualties = Math.round(_global.model.tools.randRange(v23, v23 * 1.2));
} else {
v21._casualties = Math.round(_global.model.tools.randRange(v23 / 1.5, v23));
}
if (!v21._casualties || _global.isNaN(v21._casualties)) {
v21._casualties = 0;
}
for (var j in this.model.turnResultsArr) {
if (this.model.turnResultsArr[j]._item == 'defense') {
var v24 = this.model.turnResultsArr[j];
if ((_global.model.playerArr[v24._player].weaponStock.getWeaponByID(v24._value)).weaponName == (_global.model.playerArr[v21._player].weaponStock.getWeaponByID(v21._carrier)).counteredBy && v21._b == v24._player) {
if (v21._isShip) {
var v25 = 0;
goto 8780;
for (;;) {
++v25;
label 8780:
if (v25 >= 3) break;
if (this.model.tools.randRange(0, 3) == 3) {
v21._result_arr.push({'_num': v25, '_result': false, '_casualties': 0});
v24._restult = true;
} else {
v21._result_arr.push({'_num': v25, '_result': true, '_casualties': _global.model.tools.randRange(v22.maxKills / 2, v22.maxKills)});
}
}
break;
} else {
if (this.model.tools.randRange(1, 9) != 5) {
v21._casualties = 0;
v21._result = false;
v24._result = true;
break;
} else {
v21._result = true;
v24._result = true;
v21._pass_anti = true;
break;
}
}
}
}
}
var v26 = this.model.human.weaponStock.getWeaponByID(v21._payload);
if (v26.weaponName.slice(0, -1) == 'bioload' && v21._result) {
if ((this.model.human.weaponStock.getWeaponByID(v21._weapon)).weaponName == 'sub') {
for (var q in this.model.turnResultsArr) {
var v27 = this.model.turnResultsArr[q];
if (v27._player == v21._player && v27._isSub) {
v27._bioload = true;
}
}
}
v21._bioload = true;
var v28 = this.model.createBioHazardArr(Number(v26.weaponName.substr(v26.weaponName.length - 1, 1)));
(this.model.getCityByID(v21._city)).bioload_in_battle = true;
this.model.turnResultsArr.push({'_item': 'bioload', '_value': 'deactivate', '_plr': v21._b, '_arr': v28});
}
} else {
if (v21._isShip) {
this.model.playerArr[v21._player].shipFrame = 2;
v21._action = 2;
var v29 = false;
for (var k2 in this.model.turnResultsArr) {
if (this.model.turnResultsArr[k2]._item == 'defense' && v21._b == this.model.turnResultsArr[k2]._player) {
var v30 = this.model.turnResultsArr[k2];
if ((this.model.playerArr[v21._a].weaponStock.getWeaponByID(v30._value)).weaponName == 'antiAir') {
v29 = true;
v30._result = true;
}
}
}
var v31 = 0;
goto 9950;
for (;;) {
++v31;
label 9950:
if (v31 >= 3) break;
var v32 = this.model.playerArr[v21._player].weaponStock.getWeaponByID(v21._attack_arr[v31].wpn);
var v33 = true;
var v34 = Math.round(this.model.tools.randRange(v32.maxKills / 2, v32.maxKills));
var v35 = this.model.tools.randRange(1, 3);
if (v29 && v35 == 2) {
v33 = false;
v34 = 0;
}
v21._result_arr.push({'_num': v31, '_result': v33, '_casualties': v34});
if (v32.weaponName.slice(0, -1) == 'bioload' && v33) {
v21._attack_arr[v31]._bioload = true;
var v36 = this.model.createBioHazardArr(Number(v32.weaponName.substr(v32.weaponName.length - 1, 1)));
(this.model.getCityByID(v21._attack_arr[v31].city)).bioload_in_battle = true;
this.model.turnResultsArr.push({'_item': 'bioload', '_value': 'deactivate', '_plr': v21._b, '_arr': v36});
}
}
} else {
if (v21._value == 'attack') {
var v37 = _global.model.human.weaponStock.getWeaponByID(v21._weapon);
if (v37.weaponType != 'spy') {
v21._casualties = Math.round(_global.model.tools.randRange(v37.maxKills / 2, v37.maxKills));
} else {
v21._spyArr = this.createSpyStealArray(v21._a, v21._b, v37.weaponLevel);
v21._casualties = 0;
v21._frame = v21._spyBuilding;
}
}
}
}
if (v21._attack_arr) {
for (var j in v21._attack_arr) {
var v38 = this.model.human.weaponStock.getWeaponByID(v21._attack_arr[j].wpn);
if (v38.weaponName.slice(0, -1) == 'bioload') {
v21._attack_arr[j]._bioload = true;
var v39 = this.model.createBioHazardArr(Number(v38.weaponName.substr(v38.weaponName.length - 1, 1)));
(this.model.getCityByID(v21._attack_arr[j].city)).bioload_in_battle = true;
this.model.turnResultsArr.push({'_item': 'bioload', '_value': 'deactivate', '_plr': v21._b, '_arr': v39});
}
}
}
if (!_global.isNaN(v21._casualties) && v21._casualties) {
var v40 = this.model.getCityByID(v21._city);
if (v21._casualties > v40.population - v40.battle_loop_casualties) {
v21._casualties = v40.population - v40.battle_loop_casualties;
v40.propaganda_exclude = true;
}
v40.battle_loop_casualties += v21._casualties;
_global.model.playerArr[v21._b].turnBattleCasualties += v21._casualties;
_global.model.playerArr[v21._a].turnBattleKills += v21._casualties;
if (!_global.model.playerArr[v21._b].lastAttackedBy_casualties || _global.model.playerArr[v21._b].lastAttackedBy_casualties < v21._casualties) {
_global.model.playerArr[v21._b].lastAttackedBy_num = v21._a;
_global.model.playerArr[v21._b].lastAttackedBy_casualties = v21._casualties;
}
_global.presenter.addToHighscore(v21._a, 1, v21._casualties);
}
if (v21._isShip) {
var v41 = 0;
goto 11659;
for (;;) {
++v41;
label 11659:
if (v41 >= v21._result_arr.length) break;
if (!_global.isNaN(v21._result_arr[v41]._casualties) && v21._result_arr[v41]._casualties) {
var v42 = _global.model.getCityByID(v21._attack_arr[v41].city);
if (v21._result_arr[v41]._casualties > v42.population - v42.battle_loop_casualties) {
v21._result_arr[v41]._casualties = v42.population - v42.battle_loop_casualties;
v42.propaganda_exclude = true;
}
v42.battle_loop_casualties += v21._result_arr[v41]._casualties;
_global.model.playerArr[v21._b].turnBattleCasualties += v21._result_arr[v41]._casualties;
_global.model.playerArr[v21._a].turnBattleKills += v21._result_arr[v41]._casualties;
if (!_global.model.playerArr[v21._b].lastAttackedBy_casualties || _global.model.playerArr[v21._b].lastAttackedBy_casualties < v21._result_arr[v41]._casualties) {
_global.model.playerArr[v21._b].lastAttackedBy_num = v21._a;
_global.model.playerArr[v21._b].lastAttackedBy_casualties = v21._result_arr[v41]._casualties;
}
_global.presenter.addToHighscore(v21._a, 1, v21._result_arr[v41]._casualties);
}
}
}
break;
break;
case 'propaganda':
case 'diplomacy':
}
}
for (var i in this.model.playerArr) {
var v43 = this.model.playerArr[i];
var v44 = true;
var v45 = true;
if (v43.preAttackStatus == 'ready' && v43.alive) {
if (v43.turnAction_1.action == 'preAttack') {
v44 = false;
}
if (v43.turnAction_2.action == 'preAttack') {
v45 = false;
}
if (v44) {
v43.turnAction_1.doReset();
} else {
if (v45) {
v43.turnAction_2.doReset();
}
}
v43.preAttackStatus = 'inactive';
}
if (v43.playerNum == 0) {
}
}
};
v1.createSpyStealArray = function (plr_a_nr, plr_b_nr, spyLevel) {
var v5 = new Array();
var v6 = new Array();
var v7 = new Array();
var v8 = this.model.playerArr[plr_b_nr];
var v10 = this.model.spy_stat_obj['spy' + spyLevel];
var v11 = this.model.tools.randRange(1, v10.weaponStealMax);
if (v8.special_person) {
v11 = 1;
}
var v12 = 0;
var v13 = 'resources';
var v14;
var v15 = Math.round((v8.money / 100) * this.model.tools.randRange(spyLevel * 10, v10.moneyStealPrcMax));
if (v15 > _global.model.difficulty_level_specific_vars.spy_steal_money_max[_global.model.difficulty_level]) {
v15 = _global.model.difficulty_level_specific_vars.spy_steal_money_max[_global.model.difficulty_level];
}
v7.push(v15);
if (v8.special_person && v15 > 20) {
v15 = 20;
}
for (var i in v8.weaponStock.weaponArr) {
var v9 = v8.weaponStock.weaponArr[i];
if (!v8.special_person) {
if (v9.weaponLevel <= spyLevel && (v9.inStock > 0 && v9.weaponType != 'spy')) {
v5.push(v9.weaponID);
}
} else {
if (v9.weaponLevel <= 1 && (v9.inStock > 0 && v9.weaponType != 'spy')) {
v5.push(v9.weaponID);
}
}
}
for (var k in this.model.turnResultsArr) {
if (this.model.turnResultsArr[k]._player == plr_a_nr) {
var v16 = 0;
goto 13535;
for (;;) {
++v16;
label 13535:
if (v16 >= this.model.spyActions_arr.length) break;
if (this.model.turnResultsArr[k]._item == this.model.spyActions_arr[v16]) {
v14 = this.model.spyActions_arr[v16];
} else {}
}
}
}
for (var m in this.model.spyActions_arr) {
if (this.model.spyActions_arr[m] != v14) {
v6.push(this.model.spyActions_arr[m]);
}
}
v7.push(v6[this.model.tools.randRange(0, v6.length - 1)]);
if (v5.length < v11) {
v11 = v5.length;
}
var v17 = 0;
goto 13895;
for (;;) {
++v17;
label 13895:
if (v17 >= v11) break;
v12 = this.model.tools.randRange(0, v5.length - 1);
v7.push(v5[v12]);
v5.splice(v12, 1);
_global.presenter.addToHighscore(plr_a_nr, 2, 1);
}
return v7;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5284 __Packages.Presenter {
#initclip
if (!Presenter) {
_global.Presenter = function (param_model) {
super();
this.model = param_model;
};
_global.Presenter extends Sub_presenter;
var v1 = _global.Presenter.prototype;
v1.__set__model = function (_param) {
this._model = _param;
return this.__get__model();
};
v1.__get__model = function () {
return this._model;
};
v1.__set__view = function (_param) {
this._view = _param;
return this.__get__view();
};
v1.__get__view = function () {
return this._view;
};
v1.updateMiniMap = function () {
this.view.updateCities();
};
v1.setOutlineColor = function () {
for (var i in this.model.playerArr) {
var v2 = this.model.playerArr[i];
this.view.mapOutlineColorObj['outlineTrans' + v2.playerNum].setTransform(v2.playerColorTint1);
this.view.faceOutlineColorObj['outlineTrans' + v2.playerNum].setTransform(v2.playerColorTint1);
}
};
v1.btn_pressed_new_game = function () {
_global.stopAllSounds();
_level0.endGameMC.sound.stop();
delete _level0.endGameMC.onEnterFrame;
delete _global.model;
delete _global.model_interface;
delete _global.model_gameMenu;
_root.gotoAndPlay(2);
};
v1.initBattle = function () {
this.model.battle.resetBattle();
this.model.battle.createToSpawnUnitsArr();
var v2 = 0;
var v3 = new Array();
var v4 = 0;
for (var i in this.model.battle._toSpawnUnitsArr) {
if (!this.model.battle._toSpawnUnitsArr[i]._building) {
var v5 = this.model.battle._toSpawnUnitsArr[i];
var v6 = this.model.playerArr[v5.player].playerColorTint1;
var v7 = this.model.playerArr[v5.player].playerColor;
v4 += 5;
this.model.battle._activeUnitsArr.push(new Unit(v5.unitID, this.view.battleSrcMC, (this.model.playerArr[v5.player].weaponStock.getWeaponByID(v5.weaponID)).weaponType, 'unit' + ++v2, v5.startX, v5.startY, v5.wayPointArr, v5.result, v5.tail, v5.tailNum, v5.force_MC, v6, v5.startNum, v4, v5.targetPlayer, v5.tr, v5.player, v7, v5.wildCard, v5.explosion_name));
if (v5.tail) {
v3.push(v5.unitID);
}
} else {
var v8 = this.model.battle._toSpawnUnitsArr[i];
this.model.battle._activeUnitsArr.push({'_building': true, 'obj': v8});
}
if (this.model.battle._toSpawnUnitsArr[i]._addToSubArr) {
this.model.attackingSubs_arr.push(this.model.battle._toSpawnUnitsArr[i]);
}
}
for (var i in v3) {
var v9 = v3[i];
for (var j in this.model.battle._activeUnitsArr) {
var v10 = this.model.battle._activeUnitsArr[j];
if (v10.unitID == v9) {
for (var k in this.model.battle._activeUnitsArr) {
var v11 = this.model.battle._activeUnitsArr[k];
if (v10.tail == v11.unitID) {
v10.tail = v11;
}
}
}
}
}
var v12 = 0;
var v13 = [];
var v14 = _global.model.battle.all_turn_buildings_arr;
var v15 = 0;
goto 7727;
for (;;) {
++v15;
label 7727:
if (v15 >= v14.length) break;
if (v14[v15].tr._spyBuilding) {
for (var k in v14) {
if (v14[k]._frame == v14[v15]._frame && (v14[v15] != v14[k] && v14[k]._player == v14[v15]._player)) {
v14[v15]._frame = 'spyCenter';
}
}
}
if (!this.model.loop_playerAB_position_arr('isDouble', v14[v15]._player, v14[v15]._frame)) {
if (v14[v15]._frame != 'propaganda_2') {
var v16 = this.view.showActionBuildingFromObj(v14[v15]);
this.add_to_playerAB_position_arr(v14[v15]._player, v14[v15]._frame, v16);
} else {
if (_global.model.playerArr[v14[v15]._player].preLocation) {
var v17 = this.get_preAB_mc(v14[v15]._player);
this.add_to_playerAB_position_arr(v14[v15]._player, v14[v15]._frame, v17);
}
}
}
}
this.set_playerAB_position_arr_action_names();
this.view.AB_interval_ID = _global.setInterval(this.view, 'interval_func', 1600);
if (_global.debug.skip_battle_animation) {
_global.presenter.allUnitsDone_intervalID = _global.setInterval(_global.presenter, 'allUnitsDone', 100);
} else {
this.view.createUnitTicker();
}
};
v1.add_to_playerAB_position_arr = function (_plrNum, _aname, _mc) {
for (var i in this.model.playerAB_position_arr) {
var v5 = this.model.playerAB_position_arr[i];
if (v5._num == _plrNum && (!v5.building_name || v5.building_name == '')) {
this.model.playerAB_position_arr[i].building_name = _aname;
this.model.playerAB_position_arr[i].building_MC = _mc;
break;
}
}
};
v1.set_playerAB_position_arr_action_names = function () {
for (var i in this.model.playerAB_position_arr) {
var v2 = this.model.playerAB_position_arr[i];
for (var j in this.model.building_names_to_actions_arr) {
if (this.model.building_names_to_actions_arr[j].building_name == v2.building_name) {
v2.action_name = this.model.building_names_to_actions_arr[j].action_name;
}
}
}
};
v1.get_preAB_mc = function (_plrNum) {
var v3 = this.view.battleSrcMC['ab' + _plrNum + '_' + _global.model.playerArr[_plrNum].preLocation];
return v3;
};
v1.allUnitsDone = function () {
_global.clearInterval(this.allUnitsDone_intervalID);
var v2 = 0;
for (var i in this.model.battle._toDeleteUnitsArr) {
var v3 = this.model.battle._toDeleteUnitsArr[i];
++v2;
v3.explosionMC.removeMovieClip();
v3.MC.removeMovieClip();
v3.tintMC.removeMovieClip();
v3.shadowMC.removeMovieClip();
if (v2 > 20) {
break;
}
}
var v4 = 0;
goto 9201;
for (;;) {
++v4;
label 9201:
if (v4 >= this.model.battle._toDeleteExplosionMC_arr.length) break;
this.model.battle._toDeleteExplosionMC_arr[v4].removeMovieClip();
this.model.battle._toDeleteExplosionMC_arr.splice(v4, 1);
if (v4 > 20) {
} else {}
}
_global.presenter.allUnitsDone_intervalID = _global.setInterval(_global.presenter, 'endBattle', 25);
};
v1.showLastActionBuildings = function () {
this.model.actionBuildingInterval = _global.setInterval(this.view, 'getIntervalBuildingsArray', 2000);
};
v1.endBattle = function () {
_global.clearInterval(this.allUnitsDone_intervalID);
_global.model.battleTimerArr = [];
_global.model.battleCounter = 20;
_global.model.battleTimerIndex = 0;
_global.model.unitStartNum = 0;
for (var i in this.model.playerArr) {
this.model.playerArr[i].resetBuildingsShown();
}
_global.presenter.allUnitsDone_intervalID = _global.setInterval(_global.presenter, 'initInterface_1', 25);
};
v1.doTR_from_battle = function (tr) {
var v5 = ' ok ';
switch (tr._item) {
case 'battle':
if (!tr._spyArr) {
for (var i in this.model.playerArr) {
for (var j in this.model.playerArr[i].cityArr) {
var v6 = this.model.playerArr[i].cityArr[j];
if (v6.cityID == tr._city && (!_global.isNaN(tr._casualties) && tr._casualties)) {
v6.total_battle_casualties += tr._casualties;
}
}
}
if (tr._isShip) {
var v7 = 0;
goto 10106;
for (;;) {
++v7;
label 10106:
if (v7 >= tr._attack_arr.length) break;
var v8 = tr._attack_arr[v7];
var v9 = tr._result_arr[v7];
(this.model.getCityByID(v8.city)).total_battle_casualties += v9._casualties;
}
}
} else {
var v10 = this.model.playerArr[tr._a];
var v11 = this.model.playerArr[tr._b];
var v12 = '';
var v13 = '';
if (v11.money >= tr._spyArr[0]) {
v10.money += tr._spyArr[0];
v11.money -= tr._spyArr[0];
} else {
tr._spyArr[0] = v11.money;
v11.money = 0;
v10.money += tr._spyArr[0];
}
var v14 = 2;
goto 10520;
for (;;) {
++v14;
label 10520:
if (v14 >= tr._spyArr.length) break;
var v4 = tr._spyArr[v14];
if ((v10.weaponStock.getWeaponByID(v4)).active) {
v12 += 'WEAPON: ' + (v10.weaponStock.getWeaponByID(v4)).prettyName + ' <br/> ';
v13 += 'STOLEN: ' + (v10.weaponStock.getWeaponByID(v4)).prettyName + ' <br/> ';
++(v10.weaponStock.getWeaponByID(v4)).inStock;
if ((v11.weaponStock.getWeaponByID(v4)).inStock) {
--(v11.weaponStock.getWeaponByID(v4)).inStock;
}
} else {
v12 += ' TECHNOLOGY: ' + (v10.weaponStock.getWeaponByID(v4)).prettyName + ' <br/> ';
(v10.weaponStock.getWeaponByID(v4)).active = true;
v10.techTree.inventTechByName((v10.weaponStock.getWeaponByID(v4)).relatedTechName);
}
}
if (tr._spyArr[0] > 0) {
v10.shortMSG_arr.push({'_type': 'spy', '_msg': 'YOUR SPY STOLE <br/> $' + tr._spyArr[0] + '.000.000,<br/> ' + v12});
v11.shortMSG_arr.push({'_type': 'spy', '_msg': 'AN ENEMY SPY STOLE <br/> $' + tr._spyArr[0] + '.000.000,<br/> ' + v13});
} else {
if (tr._spyArr[1]) {
v10.shortMSG_arr.push({'_type': 'spy', '_msg': 'YOUR SPY STOLE <br/>' + v12});
v11.shortMSG_arr.push({'_type': 'spy', '_msg': 'A ENEMY SPY STOLE <br/>' + v13});
} else {
if (tr._spyArr.length < 1) {
v10.shortMSG_arr.push({'_type': 'spy', '_msg': 'YOUR SPY DID NOT STEAL ANYTHING'});
v11.shortMSG_arr.push({'_type': 'spy', '_msg': 'AN ENEMY SPY WAS STOPPED'});
}
}
}
}
return v5;
case 'resources':
if (tr._plusmin == 'plus') {
this.model.playerArr[tr._player].money += tr._value;
this.model.playerArr[tr._player].turnResourcesGained += tr._value;
_global.presenter.addToHighscore(tr._player, 5, tr._value);
} else {
this.model.playerArr[tr._player].money -= tr._value;
}
return v5;
case 'religion':
this.model.playerArr[tr._player].religion += tr._value;
_global.presenter.addToHighscore(tr._player, 6, tr._value);
return v5;
case 'propaganda':
var v15 = this.model.playerArr[tr._a];
var v16 = this.model.playerArr[tr._b];
var v17 = this.model.getCityByID(tr._city);
var v20 = v15.religion - v16.religion;
if (v20 < 0) {
v20 = 0;
}
var v21 = 0;
if (v15.population - v16.population > 20) {
v21 = -1;
}
if (v15.population - v16.population > 40) {
v21 = -2;
}
if (v15.population - v16.population > 80) {
v21 = -4;
}
if (v16.population - v15.population > 20) {
v21 = 1;
}
if (v16.population - v15.population > 40) {
v21 = 2;
}
if (v16.population - v15.population > 80) {
v21 = 4;
}
if (v15.religion > v16.religion) {
var v19 = Math.round(v20);
} else {
var v19 = 0;
}
if (v15.playedBy == 'AI') {
if (v19 > 25) {
v19 = 25;
}
} else {
if (v19 > 15) {
v19 = 15;
}
}
v19 = Math.max(0, v19 + v21);
if (v16.religion == 100) {
v19 = 0;
}
var v22 = 0;
v22 = Math.min(Math.round(((v17.population - v17.total_battle_casualties) / 100) * (v19 + 5)), 40);
v22 = Math.round(v22 / 2);
v17.propagandaMin.push(v22);
if (v22 > 0) {
v15.shortMSG_arr.push({'_type': 'propagandaGained', '_msg': 'You gained ' + v22 + '.000.000 citizens from propaganda'});
v16.shortMSG_arr.push({'_type': 'propagandaLost', '_msg': 'You lost ' + v22 + '.000.000 citizens from propaganda'});
}
v16.turnPropagandaCasualties += v22;
_global.presenter.addToHighscore(v15, 7, v22);
var v23 = new Array();
for (var j in v15.cityArr) {
var v24 = v15.cityArr[j];
if (v24.population >= 1 && !v24.propaganda_exclude) {
v23.push(v24);
}
}
var v25 = Math.round(v22 / v23.length);
for (var j in v23) {
var v26 = v23[j];
v26.propagandaPlus += v25;
}
return v5;
}
v5 = ' error with string: ' + tr._value;
return v5;
};
v1.killPlayer = function (_plr) {
this.model.killPlayer(_plr);
if (_plr.playedBy == 'human') {
_global.clearInterval(this.allUnitsDone_intervalID);
this.view.changeOver('toPlayerLost');
}
this.view.battleSrcMC['ab' + _plr.playerNum + '_' + 1].gotoAndStop(1);
this.view.battleSrcMC['ab' + _plr.playerNum + '_' + 2].gotoAndStop(1);
_plr.alive = false;
if (this.model.activePlayerArr.length == 1 && this.model.human.alive) {
_global.clearInterval(this.allUnitsDone_intervalID);
this.view.changeOver('toPlayerWin');
}
};
v1.updatePlayerVars_1 = function () {
_global.clearInterval(this.allUnitsDone_intervalID);
for (var i in this.model.activePlayerArr) {
var v2 = this.model.activePlayerArr[i];
v2.heliStart = [];
v2.weaponStock.resetInUse();
v2.anti_active = undefined;
v2.anti_type = undefined;
v2.anti_pos_arr = [];
v2.anti_loc = undefined;
v2.anti_inBattle_target = undefined;
v2.shipFrame = 1;
v2.production_money_returned = 0;
if (v2.religion > 100) {
v2.religion = 100;
}
}
for (var i in this.model.playerArr) {
var v3 = this.model.playerArr[i];
for (var j in v3.cityArr) {
if (_global.isNaN(v3.cityArr[j].population)) {
v3.cityArr[j].population = 0;
}
}
if (v3.population <= 0) {
this.killPlayer(v3);
}
}
if (this.model.human.alive) {
this.updatePlayerVars_2();
}
};
v1.updatePlayerVars_2 = function () {
_global.clearInterval(this.allUnitsDone_intervalID);
var v2 = 0;
for (var i in this.model.turnResultsArr) {
if (v2 >= 50) {
break;
}
++v2;
var v3 = this.model.turnResultsArr[i];
var v4 = this.model.playerArr[v3._player];
switch (v3._item) {
case 'battle':
if ((this.model.human.weaponStock.getWeaponByID(v3._weapon)).weaponName == 'space') {
++this.model.playerArr[v3._a].satellites_used;
}
if (!v3._attack_arr[0] && !v3._dontReduce) {
if (v3._payload) {
v4.weaponStock.reduceWeaponByID(v3._payload, 1);
} else {
v4.weaponStock.reduceWeaponByID(v3._weapon, 1);
}
} else {
for (var j in v3._attack_arr) {
v4.weaponStock.reduceWeaponByID(v3._attack_arr[j].wpn, 1);
}
}
var v5 = v3._casualties;
if (v3._attack_arr) {
v5 = v3._attack_arr[0]._casualties + v3._attack_arr[1]._casualties + v3._attack_arr[2]._casualties;
}
if ((!v5 || _global.isNaN(v5)) && v5 != 0) {
v5 = 40;
}
if (v3._dontReduce) {
} else {
var v6 = this.model.playerArr[v3._a];
var v7 = this.model.playerArr[v3._b];
v6.regardArr[v3._b] -= v5;
v7.regardArr[v3._a] -= v5;
if (v7.special_person && v6.playedBy == 'AI') {
for (var sp_i in this.model.activePlayerArr) {
this.model.activePlayerArr[sp_i].regardArr[v6.playerNum] -= 7;
}
}
for (var k in this.model.activePlayerArr) {
var v8 = this.model.activePlayerArr[k];
if (v8 != v6 && (v8 != v7 && v8.ceaseFireArr[v3._a]._status)) {
if (v8.regardArr[v3._b] > v8.regardArr[v3._a]) {
v8.regardArr[v3._a] -= v5 / 20;
} else {
v8.regardArr[v3._a] += v5 / 20;
}
}
}
break;
case 'produce':
var v9 = v4.weaponStock.getWeaponByID(v3._value);
v4.weaponStock.produceWeaponByName(v9.weaponName, v3._amount);
v4.money -= Number(v9.cost) * Number(v3._amount);
break;
case 'propaganda':
var v10 = this.model.tools.randRange(5, 10);
this.model.playerArr[v3._a].regardArr[v3._b] -= v10;
this.model.playerArr[v3._b].regardArr[v3._a] -= v10;
for (var k in this.model.activePlayerArr) {
var v11 = this.model.activePlayerArr[k];
if (v11.playerNum != v3._a && v11.playerNum != v3._b) {
if (v11.regardArr[v3._a] > v11.regardArr[v3._b]) {
v11.regardArr[v3._a] += v10 / 5;
} else {
v11.regardArr[v3._a] -= v10 / 5;
}
}
}
break;
case 'research':
var v12 = v4.techTree.getTechByID(v3._value);
_global.presenter.addToHighscore(v4.playerNum, 4, v12.techLevel);
if (v4.money >= v12.cost && (!_global.model.zs66hj8s || v12.allow_in_demo)) {
v4.techTree.inventTechByID(v3._value);
v4.weaponStock.activeWeaponByTechName(v12.techName);
v4.money -= Number(v12.cost);
}
break;
case 'setPreAttack':
v4.weaponStock.reduceWeaponByID(v3._weapon, 1);
v4.preAttackStatus = v3._value;
v4.preAttackWeapon = this.model.human.weaponStock.getWeaponByID(v3._weapon);
if (v4.preAttackWeapon.weaponName == 'ship') {
v4.shipFrame = 2;
}
if (v4 == this.model.human) {
this.model.userSelectedCarrier = this.model.human.weaponStock.getWeaponByID(v3._weapon);
}
break;
case 'attack':
break;
case 'defense':
var v13 = v4.weaponStock.getWeaponByID(v3._value);
v4.weaponStock.reduceWeaponByID(v3._value, 1);
break;
case 'diplomacy':
this.model.playerArr[v3._leader].diplomacyPendingArr.push({'_leader': v4.playerNum, '_option': v3._option});
v4.diplomacy_offeredLastTurn[v3._leader] = 2;
var v14 = this.model.diplomacy_options_arr[v3._option];
if (v14[0] == 'offer') {
v4.money -= this.model.diplomacy_options_arr[v3._option][2];
}
if (v3._option < 3) {
this.model.playerArr[v3._leader].regardArr[v4.playerNum] += v3._option * 5;
this.model.playerArr[v4.playerNum].regardArr[v3._leader] += v3._option * 5;
} else {
this.model.playerArr[v3._leader].regardArr[v4.playerNum] -= v3._option;
this.model.playerArr[v4.playerNum].regardArr[v3._leader] -= v3._option;
}
break;
case 'diplomacyAccepted':
var v15 = v3._arr;
var v16 = this.model.diplomacy_options_arr[v15._option][1];
var v17 = this.model.diplomacy_options_arr[v15._option];
this.model.playerArr[v3._player].regardArr[v3._arr._leader] += this.model.regard_bonus_table_obj.diplomacyBonus;
this.model.playerArr[v3._arr._leader].regardArr[v3._player] += this.model.regard_bonus_table_obj.diplomacyBonus;
if (v17[0] == 'offer') {
this.model.playerArr[v3._player].money += v17[2];
this.model.playerArr[v3._arr._leader].shortMSG_arr.push({'_type': 'diplomacy', '_msg': 'Diplomacy was accepted.'});
} else {
if (v17[0] == 'demand') {
this.model.playerArr[v3._arr._leader].money += v17[2];
this.model.playerArr[v3._player].money -= v17[2];
this.model.playerArr[v3._arr._leader].shortMSG_arr.push({'_type': 'diplomacy', '_msg': 'Diplomacy was accepted. $ ' + v17[2] + '.000.000 was added to you bank account.'});
} else {}
}
this.model.setCeaseFire(v3._player, v15._leader, v16);
break;
case 'diplomacyRejected':
this.model.playerArr[v3._player].regardArr[v3._arr._leader] -= this.model.regard_bonus_table_obj.diplomacyBonus;
this.model.playerArr[v3._arr._leader].regardArr[v3._player] -= this.model.regard_bonus_table_obj.diplomacyBonus;
this.model.playerArr[v3._arr._leader].shortMSG_arr.push({'_type': 'diplomacy', '_msg': 'Diplomacy was rejected.'});
var v18 = this.model.diplomacy_options_arr[v3._arr._option];
if (v18[0] == 'offer') {
this.model.playerArr[v3._arr._leader].money += this.model.diplomacy_options_arr[v3._arr._option][2];
}
break;
case 'bioload':
this.deactivateAfterBio(v3._plr, v3._arr);
break;
case 'reset_spy_readiness':
this.model.playerArr[v3._player].spy_readiness = 0;
}
}
}
this.updatePlayerVars_3();
};
v1.updatePlayerVars_3 = function () {
_global.clearInterval(this.allUnitsDone_intervalID);
var v2 = 0;
for (var i in this.model.turnResultsArr) {
if (v2 >= 50) {
break;
}
++v2;
var v3 = this.model.turnResultsArr[i];
var v4 = this.model.playerArr[v3._player];
if (v3._item !== 'produce2') {
} else {
var v5 = new Array();
var v6 = v3._money;
if (v3._group == 8) {
v5.push(v4.weaponStock.antiAir);
v5.push(v4.weaponStock.antiRocket);
} else {
var v8 = 0;
goto 18589;
for (;;) {
++v8;
label 18589:
if (v8 >= v4.weaponStock.weaponArr.length) break;
var v7 = v4.weaponStock.weaponArr[v8];
if (v7.desireGroup == v3._group && (v7.active && v7.cost < v6)) {
v5.push(v7);
} else {
if (v7.desireGroup == 7 && (v3._group == 7 && v7.active)) {
v5.push(v7);
}
}
if (v8 > 40) {
} else {}
}
}
var v9 = v5[0].cost;
var v10 = 0;
goto 18889;
for (;;) {
++v10;
label 18889:
if (v10 >= v5.lengthl) break;
v9 = Math.min(v9, v5[v10].cost);
if (v10 > 30) {
} else {}
}
var v11 = 0;
var v12 = false;
var v13 = 0;
goto 19024;
for (;;) {
++v13;
label 19024:
if (v13 >= v5.length) break;
if (v5[v13].inStock >= this.model.difficulty_level_specific_vars.stock_cap_enm[this.model.difficulty_level] && v4.playedBy == 'AI' || v5[v13].inStock >= this.model.difficulty_level_specific_vars.stock_cap_plr[this.model.difficulty_level] && v4.playedBy == 'human') {
v5.splice(v13, 1);
}
if (v13 >= 30) {
} else {}
}
while (!v12) {
var v14 = this.model.tools.randRange(0, v5.length - 1);
v7 = v5[v14];
if (!v7) {
v6 = 0;
break;
}
if (v5.length == 0) {
v6 = 0;
break;
}
if (v7.inStock <= this.model.difficulty_level_specific_vars.stock_cap_enm[this.model.difficulty_level] && v4.playedBy == 'AI' || v7.inStock <= this.model.difficulty_level_specific_vars.stock_cap_plr[this.model.difficulty_level] && v4.playedBy == 'human') {
if (v7.cost <= v6 && v7.desireGroup != 7) {
if (v4.playedBy == 'human' || (this.model.difficulty_level != 0 || v7.weaponName != 'spy3' && v7.weaponName != 'spy4')) {
v6 -= v7.cost;
v4.money -= v7.cost;
v7.buy();
}
_global.presenter.addToHighscore(v4.playerNum, 3, v7.weaponLevel);
} else {
if (v7.desireGroup == 7) {
var v15 = Math.round(v6 / this.model.tools.randRange(2, 25));
v7.investment += v15;
var v16 = 0;
while (v7.investment >= v7.cost) {
++v16;
v7.buy();
v7.investment -= v7.cost;
if (v16 >= 15) {
break;
}
}
v6 -= v15;
v4.money -= v15;
}
}
}
if (v3._group != 7 && (v6 < v9 || v11 > 30) || v3._group == 7 && (v11 > 30 || v6 <= 0)) {
v4.production_money_returned += Math.round(v6);
v6 = 0;
v12 = true;
}
if (v11 > 30) {
v4.production_money_returned += Math.round(v6);
v6 = 0;
v12 = true;
break;
}
++v11;
}
}
}
this.updatePlayerVars_4();
};
v1.updatePlayerVars_4 = function () {
_global.clearInterval(this.allUnitsDone_intervalID);
for (var i in this.model.playerArr) {
var v2 = this.model.playerArr[i];
v2.shortMSG_arr.push({'_type': 'production', '_msg': v2.weaponStock.boughtMSG});
if (v2.production_money_returned) {
v2.shortMSG_arr.push({'_type': 'production', '_msg': 'Money returned from production: ' + v2.production_money_returned + '.000.000'});
}
v2.shortMSG_arr.push({'_type': 'research', '_msg': v2.techTree.shortMSG});
if (v2.turnBattleCasualties > 0) {
v2.shortMSG_arr.push({'_type': 'battle_casualties', '_msg': 'You LOST ' + v2.turnBattleCasualties + '.000.000 citizens in battle.'});
}
if (v2.turnBattleKills > 0) {
v2.shortMSG_arr.push({'_type': 'battle_kills', '_msg': 'You KILLED ' + v2.turnBattleKills + '.000.000 citizens in battle.'});
}
if (v2.turnResourcesGained > 0) {
v2.shortMSG_arr.push({'_type': 'resourcesGained', '_msg': 'You GAINED $ ' + v2.turnResourcesGained + '.000.000 from resources'});
}
v2.weaponStock.resetBought();
v2.techTree.resetInventedLastTurn();
}
for (var i in this.model.playerArr) {
var v3 = this.model.playerArr[i];
for (var j in v3.ceaseFireArr) {
if (v3.ceaseFireArr[j]._turnsLeft <= 0) {
v3.ceaseFireArr[j]._turnsLeft = 0;
v3.ceaseFireArr[j]._status = false;
}
if (v3.ceaseFireArr[j]._turnsLeft > 0) {
--v3.ceaseFireArr[j]._turnsLeft;
}
}
}
for (var i in this.model.playerArr) {
var v4 = this.model.playerArr[i];
for (var j in v4.cityArr) {
var v5 = v4.cityArr[j];
v5.population -= v5.total_battle_casualties;
for (var k in v5.propagandaMin) {
if (v5.population <= 0) {
break;
}
v5.population -= v5.propagandaMin[k];
}
v5.population += v5.propagandaPlus;
v5.total_battle_casualties = 0;
v5.propagandaMinIndex = 0;
v5.propagandaMin = [];
v5.propagandaPlus = 0;
v5.image.propagandaBeams.gotoAndStop(1);
v5.image.propagandaBeams2.gotoAndStop(1);
v5.battle_loop_casualties = 0;
v5.propaganda_exclude = false;
}
}
for (var i in this.model.playerArr) {
var v6 = this.model.playerArr[i];
if (v6.religion > 100) {
v6.religion = 100;
}
if (_global.isNaN(v6.money)) {
v6.money = 10;
}
if (_global.isNaN(v6.religion)) {
v6.religion = 40;
}
v6.lastAttackedBy_casualties = 0;
}
this.initInterface_2();
};
v1.initInterface_1 = function () {
_global.clearInterval(this.allUnitsDone_intervalID);
this.updatePlayerVars_1();
};
v1.initInterface_2 = function () {
_global.clearInterval(this.allUnitsDone_intervalID);
this.model.resetPlayersForNewturn();
this.view.changeOver('toInterface');
this.model.cur_sub_launch_num = undefined;
};
v1.check_ch_active = function (a_str) {
var v3 = false;
for (var i in this.model.ch_018) {
if (this.model.ch_018[i].id_str == a_str) {
if (this.model.ch_018[i].active) {
v3 = true;
}
}
}
for (var i in this.model.ch_019) {
if (this.model.ch_019[i].id_str == a_str) {
if (this.model.ch_019[i].active) {
v3 = true;
}
}
}
if (v3) {
_global.model.corrupt_higscore = true;
return true;
}
};
v1.deactivate_ch = function (a_str) {
for (var i in this.model.ch_018) {
if (this.model.ch_018[i].id_str == a_str) {
this.model.ch_018[i].active = false;
}
}
for (var i in this.model.ch_019) {
if (this.model.ch_019[i].id_str == a_str) {
this.model.ch_019[i].active = false;
}
}
};
v1.explode_all = function () {
this.model.explode_all_arr = new Array();
for (var i in this.model.activePlayerArr) {
if (this.model.activePlayerArr[i] == this.model.human) {
break;
}
for (var j in this.model.activePlayerArr[i].cityArr) {
var v2 = this.model.activePlayerArr[i].cityArr[j];
if (v2.population > 0) {
this.model.explode_all_arr.push(v2);
}
}
}
this.model.explode_all_interval_id = _global.setInterval(this, 'explode_all_iteration', 1500, true);
};
v1.explode_self = function () {
this.model.explode_all_arr = new Array();
for (var i in this.model.activePlayerArr) {
if (this.model.activePlayerArr[i] == this.model.human) {
for (var j in this.model.activePlayerArr[i].cityArr) {
var v2 = this.model.activePlayerArr[i].cityArr[j];
if (v2.population > 0) {
this.model.explode_all_arr.push(v2);
}
}
}
}
this.model.explode_all_interval_id = _global.setInterval(this, 'explode_all_iteration', 1500, false);
};
v1.explode_all_iteration = function (a_allDone) {
if (this.model.explode_all_arr.length == 0 && a_allDone) {
_global.clearInterval(this.model.explode_all_interval_id);
delete _global.view.battleSrcMC.onEnterFrame;
_global.presenter.allUnitsDone_intervalID = _global.setInterval(_global.presenter, 'allUnitsDone', 2500);
} else {
var v3 = this.model.explode_all_arr[0];
v3.image.attachMovie('explosion_warhead_4', 'boom', v3.image.getNextHighestDepth());
v3.size_and_frame_in_battle(v3.population, true);
v3.population = 0;
this.model.explode_all_arr.splice(0, 1);
}
};
v1.deactivateAfterBio = function (plr_num, arr) {
var v4 = this.model.playerArr[plr_num];
v4.bioloaded = true;
for (var i in arr) {
if (arr[i]._action) {
v4.bioloadedActionsArr.push(arr[i]._action);
} else {
if (arr[i]._stock) {
v4.bioloadedStockArr.push(arr[i]._weaponName);
(v4.weaponStock.getWeaponByID(arr[i]._stock)).bioloaded = true;
(v4.weaponStock.getWeaponByID(arr[i]._stock)).active = false;
}
}
}
};
v1.update_propaganda_plus = function (_plr) {
var v3 = this.model.playerArr[_plr];
for (var i in v3.cityArr) {
var v4 = v3.cityArr[i];
if (v4.population > 0 && !v4.propaganda_exclude) {
v4.propagandaPlus_func();
}
}
};
v1.updateSingleCity_byID = function (_ID, casualties, propagandaMin, attacker_ID) {
var v6 = this.model.getCityByID(_ID);
this.view.updateSingleCity(v6, casualties);
if (propagandaMin) {
v6.propagandaMin_func();
if (v6.propagandaMinIndex == 1) {
var v7 = v6.image.propagandaBeams;
} else {
var v7 = v6.image.propagandaBeams2;
}
var v8 = new Color(v7);
v8.setTransform(_global.model.playerArr[attacker_ID].playerColorTint1);
v7.gotoAndPlay(1);
if (v6.propagandaMinIndex != 0) {
v7.gotoAndPlay(3);
}
v6.updateIMG();
}
};
v1.allow_curAction_approve = function () {
var v2 = false;
switch (this.model.userSelectedActionBtn) {
return v2;
case 'resources':
v2 = true;
return v2;
case 'production':
if (this.model.human.weaponStock.production_money_spent > 0) {
v2 = true;
}
return v2;
case 'research':
if (this.model.human.techTree.researchMoneySpent > 0) {
v2 = true;
}
return v2;
case 'religion':
v2 = true;
return v2;
case 'preAttack':
if (this.model.userSelectedCarrier.weaponName == 'ship' && this.model.human.preAttackStatus == 'ready') {
if (this.model.ship_attack_arr.length == 3) {
v2 = true;
}
} else {
if (this.model.human.preAttackStatus == 'ready' && (this.model.userSelectedPayload && this.model.userSelectedCity)) {
v2 = true;
} else {
if (this.model.human.preAttackStatus == 'inactive' && this.model.userSelectedCarrier) {
v2 = true;
}
}
}
return v2;
case 'attack':
if (this.model.userSelectedWeapon && (this.model.userSelectedCity && this.model.userSelectedWeapon.weaponType != 'spy')) {
v2 = true;
}
if (this.model.userSelectedWeapon && (this.model.userSelectedPlayer && this.model.userSelectedWeapon.weaponType == 'spy')) {
v2 = true;
}
return v2;
case 'defense':
if (this.model.userSelectedWeapon) {
v2 = true;
}
return v2;
case 'propaganda':
if (this.model.userSelectedCity) {
v2 = true;
}
return v2;
case 'diplomacy':
if (this.model.userSelectedPlayer) {
v2 = true;
}
return v2;
}
return v2;
};
v1.doPropaganda = function () {
for (var i in _global.model.battle._activeUnitsArr) {
var v2 = _global.model.battle._activeUnitsArr[i];
if (v2.obj._frame == 'propaganda_2') {
var v3 = _global.model.battle._activeUnitsArr[i].obj;
var v4 = this.model.playerArr[v3._player];
var v5 = (this.model.get_playerAB_mc(v3._player, 'propaganda')).mc.beamMC;
var v6 = new Color(v5);
v6.setTransform(v4.playerColorTint1);
this.updateSingleCity_byID(v3._targetCity_id, 0, true, v3._player);
this.update_propaganda_plus(v3._player);
v5.play();
}
}
};
v1.approveAction = function () {
var v2 = this.model.human.getNextTurnAction();
if (this.model.userSelectedActionBtn != 'production' && this.model.userSelectedActionBtn != 'research') {
this.model.setHumanTurnAction();
this.model.userSelectedActionBtn = undefined;
this.model.userSelectedStockBtn = undefined;
}
};
v1.fireDefense = function (_plr, frm) {
var v4 = _global.model.playerArr[_plr];
this.view.battleSrcMC['ab' + _plr + '_' + v4.anti_loc].gotoAndStop(frm);
this.view.battleSrcMC['ab' + _plr + '_' + v4.anti_loc].mc.gotoAndStop(v4.religion_code);
};
v1.spawn_cities = function () {
this.model.set_city_position_to_array();
var v2 = 0;
var v3 = 0;
goto 26102;
for (;;) {
++v3;
label 26102:
if (v3 >= this.model.playerArr.length) break;
var v4 = this.model.playerArr[v3];
var v5 = 0;
goto 26185;
for (;;) {
++v5;
label 26185:
if (v5 >= 5) break;
v4.cityArr[v5] = new City(v2++, 100, v4);
v4.cityArr[v5].soldierWP_obj = this.model.soldier_waypoints_arr[v3][v5];
v4.cityArr[v5].tankWP_obj = this.model.tank_waypoints_arr[v3][v5];
}
}
this.model.soldier_wayPointMC_pos_arr = new Array();
var v6 = 0;
goto 26397;
for (;;) {
++v6;
label 26397:
if (v6 >= 7) break;
this.model.soldier_wayPointMC_pos_arr[v6] = new Array();
var v7 = 0;
goto 26472;
for (;;) {
++v7;
label 26472:
if (v7 >= 7) break;
this.model.soldier_wayPointMC_pos_arr[v6][v7] = {'_x': this.view.battleSrcMC['swp' + v6 + '_' + v7]._x, '_y': this.view.battleSrcMC['swp' + v6 + '_' + v7]._y};
}
}
this.model.tank_wayPointMC_pos_arr = new Array();
var v8 = 0;
goto 26676;
for (;;) {
++v8;
label 26676:
if (v8 >= 7) break;
this.model.tank_wayPointMC_pos_arr[v8] = new Array();
var v9 = 0;
goto 26751;
for (;;) {
++v9;
label 26751:
if (v9 >= 7) break;
this.model.tank_wayPointMC_pos_arr[v8][v9] = {'_x': this.view.battleSrcMC['twp' + v8 + '_' + v9]._x, '_y': this.view.battleSrcMC['twp' + v8 + '_' + v9]._y};
}
}
var v10 = 0;
for (var i in this.model.playerArr) {
var v11 = this.model.playerArr[i];
var v12 = 0;
if (v11.playedBy == 'AI') {
v12 = this.model.difficulty_level_specific_vars.enemy_start_population[this.model.difficulty_level];
} else {
v12 = this.model.difficulty_level_specific_vars.player_start_population[this.model.difficulty_level];
}
var v13 = v12;
var v14 = 0;
goto 27142;
for (;;) {
++v14;
label 27142:
if (v14 >= v11.cityArr.length) break;
var v15 = v11.cityArr[v14];
v10 = this.model.tools.randRange(Math.min(40, v13), Math.min(v12 / 4, v13));
if (v14 < v11.cityArr.length - 1) {
v15.population = v10;
v13 -= v10;
} else {
v15.population = v13;
}
}
for (var j in v11.weaponStock.weaponArr) {
var v16 = v11.weaponStock.weaponArr[j];
if ((v11.techTree.getTechByName(v16.relatedTechName)).invented) {
v16.active = true;
} else {
v16.active = false;
}
}
}
};
v1.set_player_vars = function () {
var v2 = 0;
goto 27533;
for (;;) {
++v2;
label 27533:
if (v2 >= this.model.playerArr.length) break;
var v3 = this.model.playerArr[v2];
var v4 = 0;
goto 27616;
for (;;) {
++v4;
label 27616:
if (v4 >= 5) break;
v3.regardArr[v4] = this.model.difficulty_level_specific_vars.start_regard_arr[this.model.difficulty_level][v4];
}
if (v3.playedBy == 'AI') {
v3.money = this.model.difficulty_level_specific_vars.enemy_start_money[this.model.difficulty_level];
v3.turnMoney = v3.money;
v3.religion = this.model.difficulty_level_specific_vars.enemy_start_religion[this.model.difficulty_level];
v3.spy_readiness = 25 * this.model.difficulty_level;
v3.specialization = new AI_specialization(true);
v3.specialization.create_desire_arr();
v3.desireArr = v3.specialization.desireArr;
v3.primary_enemy = this.model.get_random_set_enemy(v3);
v3.secundary_enemy = this.model.get_random_set_enemy(v3, v3.primary_enemy);
v3.regardArr[v3.primary_enemy] = 45;
v3.regardArr[v3.secundary_enemy] = 50;
if (v3.special_person) {
v3.desireArr = [0, 0, 0, 0, 1, 1, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 15, 0, 0];
}
if (v3.suicide_person) {
v3.desireArr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
}
} else {
v3.money = this.model.difficulty_level_specific_vars.player_start_money[this.model.difficulty_level];
v3.turnMoney = v3.money;
v3.religion = this.model.difficulty_level_specific_vars.player_start_money[this.model.difficulty_level];
v3.spy_readiness = 100 - 25 * this.model.difficulty_level;
v3.desireArr = [3, 2, 2, 15, 2, 3, 2, 15, 2, 3, 2, 15, 2, 3, 2, 15, 1, 2, 2, 2, 1, 15, 0, 2, 15, 15];
}
v3.setChars();
v3.ceaseFireArr = [{'_status': false, '_turnsLeft': 0}, {'_status': false, '_turnsLeft': 0}, {'_status': false, '_turnsLeft': 0}, {'_status': false, '_turnsLeft': 0}, {'_status': false, '_turnsLeft': 0}];
v3.spy_readiness = 25;
v3.mapSide = v2;
}
if (this.model.difficulty_level == 2) {
for (var i in this.model.playerArr) {
var v5 = this.model.playerArr[i];
if (v5 != this.model.human) {
v5.primary_enemy = 0;
v5.secundary_enemy = 0;
v5.regardArr[0] = this.model.tools.randRange(15, 60);
v5.techTree.invent_below_tech_level(2);
v5.weaponStock.set_wpn_stock_per_level(1, 2);
v5.weaponStock.set_wpn_stock_per_level(2, 1);
} else {
v5.techTree.invent_below_tech_level(1);
}
}
}
if (this.model.difficulty_level == 1) {
for (var i in this.model.playerArr) {
var v6 = this.model.playerArr[i];
if (v6 != this.model.human) {
v6.techTree.invent_below_tech_level(1);
v6.weaponStock.set_wpn_stock_per_level(1, 1);
} else {
v6.techTree.invent_below_tech_level(1);
v6.weaponStock.set_wpn_stock_per_level(1, 1);
}
}
}
if (this.model.difficulty_level == 0) {
for (var i in this.model.playerArr) {
var v7 = this.model.playerArr[i];
if (v7 == this.model.human) {
v7.techTree.invent_below_tech_level(2);
v7.weaponStock.set_easy_wpn_stock();
} else {
v7.techTree.invent_below_tech_level(1);
}
}
}
for (var i in this.model.playerArr) {
var v8 = this.model.playerArr[i];
if (v8.special_person) {
v8.regardArr = [70, 70, 70, 70, 70];
for (var j in this.model.playerArr) {
this.model.playerArr[j].regardArr[v8.playerNum] = 70;
}
}
}
};
v1.citySelect = function (city) {
_global.play_sound_by_action('interface_select_city');
if (city.population > 0 && (city.plr != this.model.human && (!this.model.human.ceaseFireArr[city.plr.playerNum]._status || this.model.userSelectedWeapon.weaponType == 'spy'))) {
if (this.model.userSelectedActionBtn == 'attack' && this.model.userSelectedStockBtn) {
this.model.deselectCities(this.model.userSelectedActionBtn);
this.model.userSelectedCity = city;
this.model.userSelectedPlayer = city.plr;
city.selectionObj.attack = true;
}
if (this.model.userSelectedActionBtn == 'preAttack' && this.model.human.preAttackStatus == 'ready') {
if (this.model.userSelectedCarrier.weaponName != 'ship' && this.model.userSelectedStockBtn) {
this.model.deselectCities(this.model.userSelectedActionBtn);
this.model.userSelectedCity = city;
this.model.userSelectedPlayer = city.plr;
city.selectionObj.preAttack = true;
city.selectionObj.preAttackWeapon = this.model.userSelectedCarrier.weaponName;
} else {
if (this.model.userSelectedCarrier.weaponName == 'ship') {
this.addToShipSelection(city);
}
}
}
if (this.model.userSelectedActionBtn == 'propaganda') {
this.model.deselectCities(this.model.userSelectedActionBtn);
this.model.userSelectedCity = city;
this.model.userSelectedPlayer = city.plr;
city.selectionObj.propaganda = true;
}
_global.presenter_interface.updateView();
}
if (this.model.human.ceaseFireArr[city.plr.playerNum]._status) {
_global.view_interface.infoLine = 'ceaseFire';
}
if (city.plr == this.model.human) {
_global.view_interface.infoLine = 'citySelf';
}
};
v1.addToShipSelection = function (city) {
var v3 = false;
if (this.model.userSelectedShipCityPlrNum && city.plr.playerNum == this.model.userSelectedShipCityPlrNum) {
v3 = true;
} else {
if (this.model.ship_attack_arr.length == 0) {
v3 = true;
this.model.userSelectedShipCityPlrNum = city.plr.playerNum;
}
}
if (city.plr == this.model.human || this.model.human.ceaseFireArr[city.plr.playerNum]._status) {
v3 = false;
}
if (v3) {
if (this.model.ship_attack_arr.length >= 3) {
this.model.ship_attack_arr[0].city.deSelectForShipAttack();
--this.model.ship_attack_arr[0].wpn.inUse;
this.model.ship_attack_arr.splice(0, 1);
}
this.model.ship_attack_arr.push({'city': city.cityID, 'wpn': this.model.userSelectedWeapon.weaponID});
++this.model.userSelectedWeapon.inUse;
city.selectForShipAttack();
this.model.userSelectedStockBtn = undefined;
this.model.userSelectedPlayer = city.plr;
this.model.userSelectedWeapon = undefined;
this.model.userSelectedPayload = undefined;
}
};
v1.removeShipSelection = function (_ta) {
var v3 = _ta.ship_attack_arr || this.model.ship_attack_arr;
for (var i in v3) {
var v4 = v3[i];
(this.model.getCityByID(v4.city)).removeSelection('ship');
--(this.model.human.weaponStock.getWeaponByID(v4.wpn)).inUse;
}
};
v1.remove_played_sound_objects = function () {
var v2 = 0;
goto 31606;
for (;;) {
++v2;
label 31606:
if (v2 >= this.model.playedSounds_arr.length) break;
delete this.model.playedSounds_arr[v2].soundObj;
this.model.playedSounds_arr[v2].mc.removeMovieClip();
}
this.model.playedSounds_arr = new Array();
};
v1.stop_continues_sound_objects = function () {
var v2 = 1;
goto 31782;
for (;;) {
++v2;
label 31782:
if (v2 >= 20) break;
this.model.playing_ambient_sound_arr[v2].stop();
}
};
v1.get_soldier_positions = function (city) {
var v3 = new Object();
var v4 = city.soldierWP_obj;
if (v4._wpArr[0] != 0) {
v3._wpArr = new Array();
var v5 = 0;
goto 31974;
for (;;) {
++v5;
label 31974:
if (v5 >= v4._wpArr.length) break;
v3._wpArr.push(this.model.soldier_wayPointMC_pos_arr[city.plr.playerNum][v4._wpArr[v5]]);
}
}
for (var i in this.model.soldier_fire_positions) {
var v6 = this.model.soldier_fire_positions[i];
if (v6._pos == v4._endPos) {
v3._endPosArr = v6._arr;
break;
}
}
return v3;
};
v1.get_tank_positions = function (city) {
var v3 = new Object();
var v4 = city.tankWP_obj;
if (v4._wpArr[0] != 0) {
v3._wpArr = new Array();
var v5 = 0;
goto 32339;
for (;;) {
++v5;
label 32339:
if (v5 >= v4._wpArr.length) break;
v3._wpArr.push(this.model.tank_wayPointMC_pos_arr[city.plr.playerNum][v4._wpArr[v5]]);
}
}
for (var i in this.model.tank_fire_positions) {
var v6 = this.model.tank_fire_positions[i];
if (v6._pos == v4._endPos) {
v3._endPosArr = v6._arr;
break;
}
}
return v3;
};
v1.btnIsSetAction = function (_nm) {
if (_nm == this.model.human.turnAction_1.action || _nm == this.model.human.turnAction_2.action) {
return true;
} else {
return false;
}
};
v1.addToHighscore = function (a_plr, a_index, a_multiplier) {
if (!a_multiplier || _global.isNaN(a_multiplier)) {
a_multiplier = 1;
}
var v5 = [151, 1213, 1001, 2001, 3002, 200, 101, 910];
var v6 = Math.round(v5[a_index] + this.model.tools.randRange(0, 50)) * a_multiplier;
v6 *= _global.model.difficulty_level;
if (!_global.isNaN(v6) && v6) {
this.model.playerArr[a_plr].score += v6;
}
};
v1.brighter_hex_by_steps = function (a_curHex, a_steps) {
var v4 = a_curHex;
var v5 = 0;
goto 33111;
for (;;) {
++v5;
label 33111:
if (v5 >= a_steps) break;
v4 = this.brighter_hex(v4);
}
return v4;
};
v1.brighter_hex = function (a_curHex) {
var v3 = ['9', 'A', 'B', 'C', 'D', 'E', 'F'];
var v4 = '0x';
var v5 = 2;
goto 33262;
for (;;) {
++v5;
label 33262:
if (v5 >= 9) break;
var v6 = a_curHex.charAt(v5);
if (!_global.isNaN(Number(v6)) && Number(v6) < 9) {
++v6;
} else {
if (v6 != 'F') {
var v7 = 0;
goto 33414;
for (;;) {
++v7;
label 33414:
if (v7 >= v3.length) break;
if (v3[v7] == v6) {
v6 = v3[v7 + 1];
} else {}
}
}
}
v4 += v6;
}
return v4;
};
v1.addProperty('view', v1.__get__view, v1.__set__view);
v1.addProperty('model', v1.__get__model, v1.__set__model);
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5285 __Packages.Help_data {
#initclip
if (!Help_data) {
_global.Help_data = function () {};
var v1 = _global.Help_data.prototype;
v1.get_data = function (a_current) {
for (var i in this.page_arr) {
if (this.page_arr[i]._pgName == a_current) {
return this.page_arr[i];
}
}
};
v1.get_next = function (a_current) {
for (var i in this.page_arr) {
if (this.page_arr[i]._pgName == a_current) {
var v3 = this.page_arr[i];
}
}
for (var i in this.page_arr) {
if (this.page_arr[i]._id == v3._id + 1) {
return this.page_arr[i]._pgName;
}
}
};
v1.get_prev = function (a_current) {
for (var i in this.page_arr) {
if (this.page_arr[i]._pgName == a_current) {
var v3 = this.page_arr[i];
}
}
for (var i in this.page_arr) {
if (this.page_arr[i]._id == v3._id - 1) {
return this.page_arr[i]._pgName;
}
}
};
ASSetPropFlags(v1, null, 1);
v1.page_arr = new Array({'_id': 0, '_pgName': 'help_index', '_btnArr': [{'_mcName': 'btn_overview', '_trgtString': 'help_overview'}, {'_mcName': 'btn_interface', '_trgtString': 'help_interface'}, {'_mcName': 'btn_attacking', '_trgtString': 'help_attacking'}, {'_mcName': 'btn_weapondetails', '_trgtString': 'help_weapondetail'}, {'_mcName': 'btn_actiondetails', '_trgtString': 'help_actiondetails'}]}, {'_id': 1, '_pgName': 'help_weapondetail', '_indexBtn': true, '_btnArr': [{'_mcName': 'btn_rockets', '_trgtString': 'help_rockets'}, {'_mcName': 'btn_aircraft', '_trgtString': 'help_aircraft'}, {'_mcName': 'btn_specialcarriers', '_trgtString': 'help_subs'}, {'_mcName': 'btn_warheads', '_trgtString': 'help_warheads'}, {'_mcName': 'btn_infanterie', '_trgtString': 'help_infanterie'}, {'_mcName': 'btn_intelligence', '_trgtString': 'help_intelligence'}, {'_mcName': 'btn_antiweapons', '_trgtString': 'help_antiweapons'}]}, {'_id': 2, '_pgName': 'help_actiondetails', '_indexBtn': true, '_btnArr': [{'_mcName': 'btn_resources', '_trgtString': 'help_resources'}, {'_mcName': 'btn_production', '_trgtString': 'help_production'}, {'_mcName': 'btn_technology', '_trgtString': 'help_technology'}, {'_mcName': 'btn_massmedia', '_trgtString': 'help_massmedia'}, {'_mcName': 'btn_directattack', '_trgtString': 'help_directattack'}, {'_mcName': 'btn_preparedattack', '_trgtString': 'help_preattack'}, {'_mcName': 'btn_defense', '_trgtString': 'help_defense'}, {'_mcName': 'btn_propaganda', '_trgtString': 'help_propaganda'}, {'_mcName': 'btn_diplomacy', '_trgtString': 'help_diplomacy'}]}, {'_id': 3, '_pgName': 'help_overview', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 4, '_pgName': 'help_interface', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 5, '_pgName': 'help_interface2', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 6, '_pgName': 'help_interface3', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 7, '_pgName': 'help_interface4', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 8, '_pgName': 'help_attacking', '_btnNext': true, '_btnNext': true, '_btnIndex': true}, {'_id': 9, '_pgName': 'help_attacking2', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 10, '_pgName': 'help_attacking3', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 11, '_pgName': 'help_rockets', '_btnNext': true, '_btnNext': true, '_btnIndex': true}, {'_id': 12, '_pgName': 'help_aircraft', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 13, '_pgName': 'help_subs', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 14, '_pgName': 'help_carrier', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 15, '_pgName': 'help_space', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 16, '_pgName': 'help_warheads', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 17, '_pgName': 'help_infantrie', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 18, '_pgName': 'help_intelligence', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 19, '_pgName': 'help_resources', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 20, '_pgName': 'help_production', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 21, '_pgName': 'help_technology', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 22, '_pgName': 'help_massmedia', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 23, '_pgName': 'help_directattack', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 24, '_pgName': 'help_preattack', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 25, '_pgName': 'help_defense', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 26, '_pgName': 'help_propaganda', '_btnNext': true, '_btnPrev': true, '_btnIndex': true}, {'_id': 27, '_pgName': 'help_diplomacy', '_btnPrev': true, '_btnPrev': true, '_btnIndex': true});
}
#endinitclip
}
movieClip 5286 __Packages.Btn_stock {
#initclip
if (!Btn_stock) {
_global.Btn_stock = function (_id, _name, _label, _overlayMC, _labelTF, _scrn, _scrnTF, _btnSwitch, _relatedWeapon, _stockPanelNum, _deactivate_in_demo) {
this.id = _id;
this.name = _name;
this.label = _label;
this.overlayMC = _overlayMC;
this.labelTF = _labelTF;
this.scrn = _scrn;
this.scrnTF = _scrnTF;
this.btnSwitch = _btnSwitch;
this.relatedWeapon = _relatedWeapon;
this.labelTF.text = this.label;
this.labelTF.setTextFormat(_global.view.textFormats.interface_stockText_1);
this.labelTF.embedFonts = true;
this.scrnTF.setTextFormat(_global.view.textFormats.interface_stockScrnText_1);
this.scrnTF.embedFonts = true;
this.stockPanelNum = _stockPanelNum;
this.deactivate_in_demo = _deactivate_in_demo;
};
var v1 = _global.Btn_stock.prototype;
v1.__set__stockAmount = function (_nr) {
this._stockAmount = _nr;
this.scrnTF.text = '' + _nr;
if (_nr == -1) {
this.scrnTF.text = '-';
}
return this.__get__stockAmount();
};
v1.resetClips = function () {
this.btnSwitch.gotoAndStop(1);
};
v1.__set__state = function (_nr) {
this._state = _nr;
switch (_nr) {
return this.__get__state();
case 1:
this.btnSwitch.gotoAndStop(1);
return this.__get__state();
case 2:
this.btnSwitch.gotoAndStop(2);
return this.__get__state();
case 3:
this.btnSwitch.gotoAndStop(3);
return this.__get__state();
case 4:
this.btnSwitch.gotoAndStop(1);
this.labelTF.textColor = 13421772;
return this.__get__state();
}
return this.__get__state();
};
v1.__get__state = function () {
return this._state;
};
v1.__set__hover = function (_bln) {
this._hover = _bln;
if (this._hover == true) {
this.labelTF.textColor = 16777215;
this.scrnTF.textColor = 16777215;
if (this.deactivate_in_demo && _global.model.zs66hj8s) {
this.labelTF.text = 'DEMO';
this.labelTF.textColor = 16776960;
}
return this.__get__hover();
}
if (this.deactivate_in_demo) {
this.labelTF.text = this.label;
}
this.labelTF.textColor = 13421772;
this.scrnTF.textColor = 13421772;
return this.__get__hover();
};
v1.__get__hover = function () {
return this._hover;
};
v1.__set__bioloaded = function (_bln) {
if (_bln) {
this.scrn.bioMC.gotoAndPlay(2);
return this.__get__bioloaded();
}
this.scrn.bioMC.gotoAndStop(1);
return this.__get__bioloaded();
};
v1.addProperty('hover', v1.__get__hover, v1.__set__hover);
v1.addProperty('state', v1.__get__state, v1.__set__state);
v1.addProperty('stockAmount', function () {}, v1.__set__stockAmount);
v1.addProperty('bioloaded', function () {}, v1.__set__bioloaded);
ASSetPropFlags(v1, null, 1);
v1.type = 'stock';
v1.hoverable = true;
v1._hover = false;
v1._state = 0;
v1.deactivate_in_demo = false;
}
#endinitclip
}
movieClip 5287 __Packages.Sub_Presenter_interface {
#initclip
if (!Sub_Presenter_interface) {
_global.Sub_Presenter_interface = function () {
super();
};
_global.Sub_Presenter_interface extends Sub_sub_presenter_interface;
var v1 = _global.Sub_Presenter_interface.prototype;
v1.resetBtns = function () {
for (var i in this.view_interface.actionBtn_arr) {
var v2 = this.view_interface.actionBtn_arr[i];
if (v2.actionName != this.model.human.turnAction_1.action && v2.actionName != this.model.human.turnAction_2.action) {
v2.isSetAction = false;
} else {
if (!v2.isSetAction) {
v2.state = 1;
v2.updateBtn();
}
}
this.view_interface.btn_arr[i].pressed = false;
}
this.model.deselectCities(this.model.userSelectedActionBtn);
this.model.userSelectedStockBtn = undefined;
this.model.userSelectedActionBtn = undefined;
this.model.resetUserSelections();
this.model_interface.cur_pressed_action_btn = undefined;
this.updateView();
};
v1.do_turn_backup = function () {
_global.clearInterval(this.doTurn_backup_intervalID);
_global.clearInterval(this.doTurn_intervalID);
this.view_interface.turnBtn.state = 'closed';
this.block_start_btn = false;
this.blockAllBtns = false;
};
v1.turnInterval_step1 = function () {
_global.clearInterval(this.doTurn_intervalID);
this.doTurn_intervalID = _global.setInterval(this, 'turnInterval_step2', 200);
this.view_interface.actionTube2.state = 'closed';
};
v1.turnInterval_step2 = function () {
_global.clearInterval(this.doTurn_intervalID);
this.doTurn_intervalID = _global.setInterval(this, 'turnInterval_step3', 200);
this.view_interface.turnBtn.btnMC.gotoAndStop(3);
};
v1.turnInterval_step3 = function () {
_global.clearInterval(this.doTurn_intervalID);
this.doTurn_intervalID = _global.setInterval(this, 'turnInterval_go', 200);
};
v1.turnInterval_go = function () {
if (this.model.human.turnAction_1.action && this.model.human.turnAction_2.action) {
this.block_start_btn = false;
_global.clearInterval(this.doTurn_intervalID);
_global.clearInterval(this.doTurn_backup_intervalID);
this.view.changeOver('toBattle');
this.model.doTurn();
this.presenter.turnResults();
this.view.updateCities();
this.presenter.initBattle();
this.model.interface_diplomacy_error = undefined;
this.model.interface_spy_error = undefined;
}
};
v1.updateView = function () {
_global.view.remove_city_popups();
if (this.model.human.diplomacyPendingArr[0]) {
this.model.userSelectedActionBtn = 'diplomacyPending';
}
if (_global.model.zs66hj8s) {
_global.view.srcMC.get_full_version_btn.onPress = function () {
getURL(_global.model.get_demo_version_url(), '_blank');
};
} else {
_global.view.srcMC.get_full_version_btn._visible = false;
_global.view.srcMC.get_full_version_text._visible = false;
_global.view.srcMC.demo_stock_overlay.gotoAndStop(1);
_global.view.srcMC.demo_stock_overlay._visible = false;
}
this.view_interface.shortMSG_text = this.model.human.shortMSG_arr;
for (var i in this.view_interface.stockBtn_arr) {
var v2 = this.view_interface.stockBtn_arr[i];
var v3 = this.model.human.weaponStock.getWeaponByName(v2.relatedWeapon);
var v4 = true;
var v5 = true;
var v6 = true;
if (v3.active) {
v2.stockAmount = v3.inStock - v3.inUse;
} else {
v2.stockAmount = -1;
}
for (var j in this.view_interface.stockRequirements_list[this.model_interface.selected_action_name].state2_arr) {
if (!this.stock_req_check_single(this.view_interface.stockRequirements_list[this.model_interface.selected_action_name].state2_arr[j], v2)) {
v4 = false;
break;
}
}
for (var j in this.view_interface.stockRequirements_list[this.model_interface.selected_action_name].state4_arr) {
if (!this.stock_req_check_single(this.view_interface.stockRequirements_list[this.model_interface.selected_action_name].state4_arr[j], v2)) {
v6 = false;
break;
}
}
if (v6) {
v2.state = 4;
} else {
if (v4) {
v2.state = 2;
} else {
v2.state = 1;
}
}
if (v2.relatedWeapon == this.model.userSelectedStockBtn) {
v2.state = 3;
}
if (v3.weaponName == 'specialLoad' && this.model.userSelectedCarrier != 'space') {
v2.state = 1;
}
}
for (var i in this.view_interface.actionBtn_arr) {
var v7 = this.view_interface.actionBtn_arr[i];
if (!this.model.human.getNextTurnAction()) {
if (v7.actionName != this.model.human.turnAction_1.action && v7.actionName != this.model.human.turnAction_2.action) {
v7.handCursor = false;
}
} else {
v7.handCursor = true;
}
if (v7.isSetAction) {
v7.state = 3;
} else {
if (v7.pressed) {
v7.state = 2;
} else {
if (v7.actionName == 'preAttack' && this.model.human.preAttackStatus == 'ready') {
v7.state = 4;
} else {
v7.state = 1;
}
}
}
}
if ((this.model.human.getNextTurnAction()).num == 1) {
if (this.model.userSelectedActionBtn) {
this.view_interface.actionTube1.state = 'open';
} else {
this.view_interface.actionTube1.state = 'closed';
}
if (this.model.human.turnAction_2.action) {
this.view_interface.actionTube2.state = 'set';
} else {
this.view_interface.actionTube2.state = 'closed';
}
} else {
if ((this.model.human.getNextTurnAction()).num == 2) {
if (this.model.userSelectedActionBtn) {
this.view_interface.actionTube2.state = 'open';
} else {
this.view_interface.actionTube2.state = 'closed';
}
if (this.model.human.turnAction_1.action) {
this.view_interface.actionTube1.state = 'set';
} else {
this.view_interface.actionTube1.state = 'closed';
}
} else {
if (!this.model.human.getNextTurnAction() && !this.blockAllBtns) {
this.view_interface.actionTube1.state = 'set';
this.view_interface.actionTube2.state = 'set';
this.view_interface.turnBtn.state = 'open';
this.view_interface.turnBtn.btnMC.gotoAndStop(1);
this.view_interface.turnBtn.btnMC.onPress = function () {
_global.presenter_interface.blockAllBtns = true;
_global.presenter_interface.btnPressed_turn();
};
}
}
}
if (this.model.human.getNextTurnAction()) {
this.view_interface.turnBtn.state = 'closed';
}
var v8 = 0;
goto 8920;
for (;;) {
++v8;
label 8920:
if (v8 >= this.view_interface.actionNames_arr.length) break;
if (this.view_interface.actionNames_arr[v8] == this.model.userSelectedActionBtn) {
switch (this.view_interface.stockPanel_mask_states_arr[v8][0]) {
case 0:
var v10 = 1;
goto 9119;
for (;;) {
++v10;
label 9119:
if (v10 >= 9) break;
var v11 = Number(v10);
this.view_interface.update_stockPanel_alpha(v11, 100);
}
break;
case 1:
var v12 = 1;
goto 9213;
for (;;) {
++v12;
label 9213:
if (v12 >= 9) break;
var v13 = Number(v12);
if (this.view_interface.stockPanel_mask_states_arr[v8][v13] == 1) {
var v9 = 100;
} else {
var v9 = 0;
}
this.view_interface.update_stockPanel_alpha(v13, v9);
}
break;
case 2:
var v14 = 1;
goto 9376;
for (;;) {
++v14;
label 9376:
if (v14 >= 9) break;
var v15 = Number(v14);
if (this.view_interface.stockPanel_mask_states_arr[v8][v15] == 1) {
var v9 = 100;
} else {
var v9 = 0;
}
this.view_interface.update_stockPanel_alpha(v15, v9);
}
break;
case 3:
var v16 = 1;
goto 9539;
for (;;) {
++v16;
label 9539:
if (v16 >= 9) break;
var v17 = Number(v16);
this.view_interface.update_stockPanel_alpha(v17, 0);
}
continue;
}
}
}
if (_global.model.view_leader_MCs_played == 'done') {
var v18 = 1;
goto 9668;
for (;;) {
++v18;
label 9668:
if (v18 >= this.model.playerArr.length) break;
var v19 = this.model.playerArr[v18];
var v20 = this.view_interface.interfaceMC['leaderMC' + v18];
v20.num = v18;
var v22 = 0;
v20.cfIcon1.gotoAndStop(1);
v20.cfIcon2.gotoAndStop(1);
v20.cfIcon3.gotoAndStop(1);
var v23 = 1;
goto 9877;
for (;;) {
++v23;
label 9877:
if (v23 >= v19.ceaseFireArr.length) break;
if (v19.ceaseFireArr[v23]._status) {
++v22;
v20['cfIcon' + v22].gotoAndStop(2);
var v24 = new Color(v20['cfIcon' + v22]);
v24.setTransform(this.model.playerArr[v23].playerColorTint1);
}
}
if (this.model.human.ceaseFireArr[v18]._status) {
var v25 = new Color(v20.iconCeaseFire);
v25.setTransform(this.model.human.playerColorTint1);
v20.iconCeaseFire.gotoAndStop(2);
v20.iconCeaseFire.txt.text = this.model.human.ceaseFireArr[v18]._turnsLeft;
} else {
v20.iconCeaseFire.gotoAndStop(1);
}
if (v19.bioloaded) {
v20.iconBio.gotoAndStop(2);
} else {
v20.iconBio.gotoAndStop(1);
}
var v21 = this.view_interface.interfaceMC['leaderStat' + v18 + '_' + 1].maskMC;
v21._yscale = v19.regardArr[0];
v21 = this.view_interface.interfaceMC['leaderStat' + v18 + '_' + 2].maskMC;
v21._yscale = this.model.populationPercentage(v19);
}
} else {
if (_global.model.view_leader_MCs_played == 'false') {
this.set_leader_face_MC_sequence();
}
}
if (this.model.userSelectedActionBtn == 'preAttack') {
if (this.model.human.preAttackStatus == 'ready') {
this.view_interface.update_stockPanel_alpha(0, 0);
this.view_interface.update_stockPanel_alpha(1, 0);
this.view_interface.update_stockPanel_alpha(2, 0);
this.view_interface.update_stockPanel_alpha(3, 0);
this.view_interface.update_stockPanel_alpha(4, 100);
this.view_interface.update_stockPanel_alpha(5, 100);
}
}
if (this.model.userSelectedCarrier.weaponName == 'space') {
this.view_interface.update_stockPanel_alpha(3, 100);
this.view_interface.update_stockPanel_alpha(4, 0);
this.view_interface.update_stockPanel_alpha(5, 0);
}
if ((this.model.userSelectedActionBtn == 'attack' || (this.model.userSelectedActionBtn == 'preAttack' || this.model.userSelectedActionBtn == 'propaganda')) && this.model.userSelectedWeapon.weaponType != 'spy') {
this.colorCities('attackable');
} else {
if (this.model.userSelectedWeapon.weaponType == 'spy') {
this.colorCities('allEnemy');
} else {
this.colorCities('default');
}
}
if (this.model.human.preAttackStatus == 'ready') {
}
if (this.model.userSelectedActionBtn == 'attack') {
if (this.model.human.spy_readiness >= 25) {
}
}
this.view_interface.btn_sound.state = this.model.option.sound;
this.view_interface.btn_music.state = this.model.option.music;
this.view.updateCities();
this.update_statistics();
this.update_centerScreenContent();
this.view_interface.update_highScore(_global.model.human.score);
};
v1.do_leader_face_MC_sequence_itteration = function () {
if (this.model.view_leader_MCs_played_count < this.model.view_leader_MCs_played_max) {
var v2 = this.model.playerArr[this.model.view_leader_MCs_played_count];
this.view_interface.update_leaderFace(v2.playerNum, v2.faceFrame, v2.alive, false);
this.play_sound_by_action('interface_noise');
} else {
this.play_sound_by_action('interface_startup');
_global.clearInterval(this.model.view_leader_MCs_sequence_interval_id);
_global.model.view_leader_MCs_played = 'done';
this.update_leaderFaces();
this.updateView();
}
++this.model.view_leader_MCs_played_count;
};
v1.update_top_plrColor = function () {
var v2 = 0;
goto 11656;
for (;;) {
++v2;
label 11656:
if (v2 >= 5) break;
this.view_interface.set_top_plrColor(v2, 'empty');
}
var v3 = 0;
goto 11731;
for (;;) {
++v3;
label 11731:
if (v3 >= this.model.playerArr.length) break;
this.view_interface.set_top_plrColor(v3, this.model.playerArr[v3].playerColor);
}
};
v1.update_color_dots = function () {
this.view_interface.set_color_dot(1, _global.model.human.playerColor);
this.view_interface.set_color_dot(2, _global.model.human.playerColor);
};
v1.update_statistics = function () {
var v2 = 0;
v2 = this.model.human.techTree.techLevel;
this.view_interface.update_statBar(1, v2);
v2 = this.model.human.religion;
this.view_interface.update_statBar(2, v2);
var v3 = 0;
for (var i in this.model.activePlayerArr) {
v3 += this.model.activePlayerArr[i].population;
}
v2 = (this.model.human.population / v3) * 100;
this.view_interface.update_statBar(3, v2);
v2 = this.model.human.spy_readiness;
this.view_interface.update_statBar(4, v2);
this.view_interface.update_statMoney(this.model.human.turnMoney);
};
v1.__get__display_textFunds = function () {
return 'Budget: ' + this.model.display_turnMoney;
};
v1.__get__display_population = function () {
return Math.round(this.model.human.population * 0.1) + '.000.000';
};
v1.update_centerScreenContent = function () {
if (this.model.userSelectedActionBtn) {
this.view_interface.interfaceMC.centerScreen.gotoAndStop(this.model.userSelectedActionBtn);
} else {
this.view_interface.interfaceMC.centerScreen.gotoAndStop(1);
}
var sc = this.view_interface.interfaceMC.centerScreen;
var v2 = false;
var v3 = this.model.userSelectedActionBtn;
if (_global.model.force_error_window) {
v3 = 'force_error';
}
switch (v3) {
case 'force_error':
sc.gotoAndStop('production_error');
sc.error_window.text1.text = _global.model.force_error_window_text;
sc.error_window.btnOK.onPress = function () {
_global.model.force_error_window = false;
_global.model.force_error_window_text = '';
_global.presenter_interface.update_centerScreenContent();
};
sc.btnAccept._visible = false;
sc.btnCancel._visible = false;
break;
case 'skip_action':
this.view_interface.set_centerScreenFunc('default');
break;
case 'cancelPreAttack':
sc.gotoAndStop('preCancel');
this.view_interface.set_centerScreenFunc('default');
break;
case 'resources':
this.view_interface.set_centerScreenFunc('default');
sc.text1.text = this.model.display_population;
sc.text2.text = Math.round(_global.model.human.population / _global.model.difficulty_level_specific_vars.player_resources_divider[_global.model.difficulty_level]) + '.000.000';
sc.textFunds.text = this.display_textFunds;
break;
case 'production':
if (!this.model.interface_production_error) {
if (this.model.userSelectedProductionInvestmentArr_total_amount == 0) {
this.view_interface.set_centerScreenFunc('hide');
} else {
this.view_interface.set_centerScreenFunc('default');
}
this.loadProductionFunc();
} else {
sc.gotoAndStop('production_error');
this.loadProductionFunc(this.model.interface_production_error);
}
break;
case 'research':
if (!this.model.interface_research_error) {
if (!this.model.userSelectedResearchArr[0]) {
this.view_interface.set_centerScreenFunc('hide');
} else {
this.view_interface.set_centerScreenFunc('default');
}
this.loadResearchFunc();
} else {
sc.gotoAndStop('research_error');
this.loadResearchFunc(this.model.interface_research_error);
}
sc.MC1.gotoAndStop(this.model.human.religion_code);
break;
case 'religion':
this.view_interface.set_centerScreenFunc('default');
var v4 = this.model.human.religion;
var v5 = this.model.difficulty_level_specific_vars.player_religion_addition[this.model.difficulty_level] - 10;
if (v4 + v5 > 100) {
v5 = 100 - v4;
}
if (v5 < 0) {
v5 = 0;
}
sc.text1.text = this.display_population;
sc.text2.text = this.model.human.religion + '%';
sc.MC1.gotoAndStop(this.model.human.religion_code);
sc.text3.text = '+' + v5 + ' %';
sc.stat1.maskMC._xscale = this.model.human.religion;
break;
case 'attack':
sc.gotoAndStop('attack1');
if (this.model.userSelectedWeapon) {
if (!this.model.userSelectedCity) {
v2 = true;
this.view_interface.infoLine = 'selectWeapon';
this.view_interface.set_centerScreenFunc('hide');
sc.gotoAndStop('attack1');
} else {
if (this.model.userSelectedWeapon.weaponType == 'spy') {
sc.gotoAndStop('attack_spy');
this.view_interface.set_centerScreenFunc('default');
sc.buildingsMC.gotoAndStop(this.model.userSelectedSpyBuilding || 'spyCenter');
var v6 = 1;
goto 14338;
for (;;) {
++v6;
label 14338:
if (v6 >= 6) break;
sc['btn' + v6].num = v6;
sc['btn' + v6].onPress = function () {
_global.presenter_interface.btnPressed_spyBuilding(this.num);
};
}
var v7 = 1;
goto 14476;
for (;;) {
++v7;
label 14476:
if (v7 >= 6) break;
sc.buildingsMC['mc' + v7].gotoAndStop(this.model.human.religion_code);
}
} else {
sc.gotoAndStop('attack2');
this.view_interface.set_centerScreenFunc('default');
if (this.model.userSelectedWeapon.weaponType == 'soldier') {
sc.MC1.gotoAndStop(this.model.userSelectedWeapon.weaponName);
} else {
sc.MC1.gotoAndStop('spy');
sc.MC1.statBar.statMask._xscale = this.model.human.spy_readiness;
}
var v8 = this.model.userSelectedWeapon.weaponLevel + 1;
if (v8 == 5) {
v8 = 1;
}
sc.MC2.gotoAndStop(v8);
}
}
} else {
sc.gotoAndStop('attackSelect');
this.view_interface.set_centerScreenFunc('hide');
}
if (this.model.interface_spy_error) {
sc.gotoAndStop('spy_error');
sc.error_window.text1.text = _global.model.interface_spy_error;
sc.statBar.statMask._xscale = this.model.human.spy_readiness;
sc.error_window.btnOK.onPress = function () {
_global.model.interface_spy_error = undefined;
_global.presenter_interface.update_centerScreenContent();
};
sc.error_window.btnOK.onRollOver = function () {
this.gotoAndStop(2);
};
sc.error_window.btnOK.onRollOut = function () {
this.gotoAndStop(1);
};
}
break;
case 'preAttack':
if (this.model.human.preAttackStatus == 'ready') {
if (this.model.userSelectedWeapon) {
if (!this.model.userSelectedCity && this.model.userSelectedCarrier.weaponName != 'ship') {
v2 = true;
this.view_interface.infoLine = 'selectWeapon';
this.view_interface.interfaceMC.centerScreen.gotoAndStop('preAttack4');
this.view_interface.set_centerScreenFunc('hide');
} else {
if (this.model.userSelectedCarrier.weaponName == 'ship') {
if (this.model.ship_attack_arr.length < 3) {
v2 = true;
this.view_interface.infoLine = 'selectWeapon';
this.view_interface.interfaceMC.centerScreen.gotoAndStop('preAttack4');
this.view_interface.set_centerScreenFunc('default');
} else {
this.view_interface.interfaceMC.centerScreen.gotoAndStop('ship2');
this.view_interface.set_centerScreenFunc('default');
}
} else {
if (this.model.userSelectedCity) {
this.view_interface.interfaceMC.centerScreen.gotoAndStop('preAttack3');
this.view_interface.set_centerScreenFunc('default');
sc.text1.text = this.megaton_by_level_arr[this.model.userSelectedWeapon.weaponLevel];
if (this.model.userSelectedWeapon.desireGroup == 2) {
sc.MC1.gotoAndStop(1);
sc.MC2.gotoAndStop(2);
} else {
sc.MC1.gotoAndStop(2);
sc.MC2.gotoAndStop(1);
}
if (this.model.userSelectedWeapon.weaponName == 'specialLoad') {
this.view_interface.interfaceMC.centerScreen.gotoAndStop('preAttack_space');
this.view_interface.set_centerScreenFunc('default');
}
}
}
}
} else {
if (this.model.userSelectedCarrier.weaponName != 'ship') {
this.view_interface.infoLine = 'selectCity';
this.view_interface.interfaceMC.centerScreen.gotoAndStop('preAttack2');
this.view_interface.set_centerScreenFunc('default');
} else {
this.view_interface.infoLine = 'selectCity';
this.view_interface.interfaceMC.centerScreen.gotoAndStop('ship1');
this.view_interface.set_centerScreenFunc('default');
this.view_interface.interfaceMC.centerScreen.planeCount.gotoAndStop(this.model.ship_attack_arr.length + 1);
if (this.model.ship_attack_arr.length == 3) {
this.view_interface.interfaceMC.centerScreen.mc_select.gotoAndStop(2);
}
}
}
} else {
if (this.model.userSelectedWeapon) {
sc.gotoAndStop('preAttack1');
sc.MC1.gotoAndStop(this.model.userSelectedWeapon.weaponName);
sc.MC2.gotoAndStop(this.model.userSelectedWeapon.weaponName);
this.view_interface.set_centerScreenFunc('default');
if (this.model.userSelectedWeapon.weaponName == 'space') {
sc.MC2.satIMG.gotoAndStop(this.model.human.religion);
}
} else {
this.view_interface.infoLine = 'selectWeapon';
this.view_interface.interfaceMC.centerScreen.gotoAndStop('preAttackSelect');
this.view_interface.set_centerScreenFunc('hide');
}
}
break;
case 'defense':
if (this.model.userSelectedWeapon) {
this.view_interface.set_centerScreenFunc('default');
sc.mc1.gotoAndStop(this.model.userSelectedWeapon.weaponName);
if (sc.mc1._currentframe == 2) {
sc.mc2.gotoAndStop(1);
} else {
sc.mc2.gotoAndStop(2);
}
} else {
this.view_interface.infoLine = 'selectWeapon';
sc.gotoAndStop('defenseSelect');
this.view_interface.set_centerScreenFunc('hide');
}
break;
case 'propaganda':
if (this.model.userSelectedCity) {
this.view_interface.set_centerScreenFunc('default');
sc.gotoAndStop('propaganda2');
sc.text1.text = 'Propaganda strength: ' + this.model.human.religion + ' %';
} else {
v2 = true;
this.view_interface.infoLine = 'selectCity';
sc.gotoAndStop('propaganda1');
this.view_interface.set_centerScreenFunc('hide');
}
break;
case 'diplomacy':
if (!_global.model.interface_diplomacy_error) {
var v9 = 1;
var v10 = 0;
goto 17142;
for (;;) {
++v10;
label 17142:
if (v10 >= 5) break;
sc['leaderMC' + v10].gotoAndStop('black');
}
var v11 = 0;
goto 17223;
for (;;) {
++v11;
label 17223:
if (v11 >= this.model.playerArr.length) break;
var v12 = this.model.playerArr[v11];
if (v12 != this.model.human) {
var v13 = sc['leaderMC' + v9];
if (!this.model.human.ceaseFireArr[v12.playerNum]._status && v12.alive) {
v13.gotoAndStop(v12.faceFrame);
v13.num = v11;
v13.onPress = function () {
_global.presenter_interface.btnPressed_diplomacy('leader', this.num);
};
} else {
v13.gotoAndStop('black');
}
if (v11 == this.model.userSelectedDiplomacyLeader) {
sc['leaderSelected' + v9].gotoAndStop(2);
} else {
sc['leaderSelected' + v9].gotoAndStop(1);
}
++v9;
}
}
var v14 = 0;
goto 17628;
for (;;) {
++v14;
label 17628:
if (v14 >= this.model.diplomacy_options_arr.length) break;
var v15 = this.model.diplomacy_options_arr[v14];
var v16 = sc['btn' + (v14 + 1)];
if (v15[0] == 'offer') {
sc['text' + (v14 + 1)].text = 'turns no attack, I pay $ ' + v15[2] + ' mln';
}
if (v15[0] == 'demand') {
sc['text' + (v14 + 1)].text = 'turns no attack pay me $ ' + v15[2] + ' mln';
}
if (v14 == this.model.userSelectedDiplomacyOption) {
v16.gotoAndStop(2);
sc['text' + (v14 + 1)].textColor = 65280;
} else {
v16.gotoAndStop(1);
sc['text' + (v14 + 1)].textColor = 16777215;
}
v16.gotoAndStop(1);
v16.text1.text = v15[1];
v16.option = v14;
v16.onPress = function () {
_global.presenter_interface.btnPressed_diplomacy('option', this.option);
};
}
if (!this.model.userSelectedDiplomacyLeader || this.model.userSelectedDiplomacyOption == undefined) {
this.view_interface.set_centerScreenFunc('hide');
} else {
this.view_interface.set_centerScreenFunc('default');
}
sc.textFunds.text = this.display_textFunds;
} else {
sc.gotoAndStop('diplomacy_error');
sc.error_window.text1.text = _global.model.interface_diplomacy_error;
sc.error_window.btnOK.onPress = function () {
_global.model.interface_diplomacy_error = undefined;
_global.presenter_interface.update_centerScreenContent();
};
sc.error_window.btnOK.onRollOver = function () {
this.gotoAndStop(2);
};
sc.error_window.btnOK.onRollOut = function () {
this.gotoAndStop(1);
};
}
break;
case 'diplomacyPending':
if (!_global.model.interface_diplomacy_error) {
this.curDiplomacyObj = this.model.human.diplomacyPendingArr[0];
this.curDiplomacyOptionArr = this.model.diplomacy_options_arr[this.curDiplomacyObj._option];
if (this.curDiplomacyOptionArr[0] == 'offer') {
sc.gotoAndStop('diplomacyOffer');
} else {
if (this.curDiplomacyOptionArr[0] == 'demand') {
sc.gotoAndStop('diplomacyDemand');
}
}
sc.leaderMC1.gotoAndStop(this.model.playerArr[this.curDiplomacyObj._leader].faceFrame);
sc.btn1.text1.text = this.curDiplomacyOptionArr[1];
sc.btn1.gotoAndStop(1);
sc.text1.text = ' $ ' + this.curDiplomacyOptionArr[2] + '.000.000';
this.view_interface.set_centerScreenFunc('default');
var v18 = {'ra': 0, 'rb': 0, 'ga': 0, 'gb': 0, 'ba': 0, 'bb': 0, 'aa': 0, 'ab': 0};
var v19 = 0;
goto 18981;
for (;;) {
++v19;
label 18981:
if (v19 >= 5) break;
var v17 = new Color(sc.mcapMC.schemeMC['mc' + v19]);
v17.setTransform({'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0});
}
var v20 = new Color(sc.mapMC.schemeMC['mc' + this.curDiplomacyObj._leader]);
v20.setTransform(_global.model.playerArr[this.curDiplomacyObj._leader].playerColorTint1);
sc.textFunds.text = this.display_textFunds;
} else {
sc.gotoAndStop('diplomacy_error');
sc.error_window.text1.text = _global.model.interface_diplomacy_error;
sc.error_window.btnOK.onPress = function () {
_global.model.interface_diplomacy_error = undefined;
_global.presenter_interface.update_centerScreenContent();
};
sc.error_window.btnOK.onRollOver = function () {
this.gotoAndStop(2);
};
sc.error_window.btnOK.onRollOut = function () {
this.gotoAndStop(1);
};
}
break;
case 'help':
if (!this.model.userSelectedHelpTopic) {
this.model.userSelectedHelpTopic = 'help_index';
} else {
sc.gotoAndStop(this.model.userSelectedHelpTopic);
this.view_interface.set_centerScreenFunc_help(this.help_data.get_data(this.model.userSelectedHelpTopic));
}
sc.btnIndex_c.onPress = function () {
_global.presenter_interface.btnPressed_index_c(this);
};
break;
case 'cheat':
sc.btnIndex_c.onPress = function () {
if (!_global.presenter_interface.do_ch_func(sc.chTXT.text)) {
_global.model.userSelectedActionBtn = undefined;
_global.presenter_interface.updateView();
} else {
_global.presenter_interface.update_centerScreenContent();
}
};
}
this.citiesSelectable = v2;
};
v1.do_ch_func = function (a_str) {
_global.model.corrupt_highscore = true;
for (var i in this.model.ch_018) {
if (this.model.ch_018[i].str == a_str) {
if (this.model.ch_018[i].active) {
this.model.ch_018[i].active = false;
} else {
this.model.ch_018[i].active = true;
}
_global.play_sound_by_action('interface_select_tech');
return false;
}
}
for (var i in this.model.ch_019) {
if (this.model.ch_019[i].str == a_str) {
_global.model.force_error_window = true;
_global.model.force_error_window_text = this.model.ch_019[i].msg;
_global.play_sound_by_action('interface_select_tech');
return true;
}
}
return false;
};
v1.colorCities = function (_str) {
var v3 = 0;
goto 20405;
for (;;) {
++v3;
label 20405:
if (v3 >= this.model.playerArr.length) break;
var v4 = this.model.playerArr[v3];
for (var j in v4.cityArr) {
var v5 = v4.cityArr[j];
v5.hideForSelection = false;
v5.showForSelection = false;
switch (_str) {
case 'default':
v5.hideForSelection = false;
v5.showForSelection = false;
break;
case 'attackable':
if (this.model.human.ceaseFireArr[v4.playerNum]._status || v4 == this.model.human) {
v5.hideForSelection = true;
} else {
v5.showForSelection = true;
}
if (this.model.userSelectedActionBtn == 'preAttack' && (this.model.userSelectedShipCityPlrNum && this.model.userSelectedShipCityPlrNum != v5.plr.playerNum)) {
v5.hideForSelection = true;
}
break;
case 'allEnemy':
if (v4 != this.model.human) {
v5.showForSelection = true;
} else {
v5.hideForSelection = true;
}
}
}
}
};
v1.__set__citiesSelectable = function (_bln) {
for (var i in this.model.playerArr) {
for (var j in this.model.playerArr[i].cityArr) {
if (_bln) {
this.model.playerArr[i].cityArr[j].image.mc.gotoAndStop(2);
} else {
this.model.playerArr[i].cityArr[j].image.mc.gotoAndStop(1);
}
}
}
return this.__get__citiesSelectable();
};
v1.__get__citiesSelectable = function () {
return true;
};
v1.setSliderValue = function () {
var v2 = '';
var v3 = '';
var v4 = '';
if (this.model.userSelectedActionBtn !== 'production') {
} else {
this.model._userSelectedProductionInvestmentArr[this.pressedSliderObj.num][1] = this.pressedSliderObj.curVal;
this.model._userSelectedProductionInvestmentArr[this.pressedSliderObj.num][3] = (this.model.human.turnMoney / 100) * this.pressedSliderObj.curVal;
var v5 = 0;
goto 21435;
for (;;) {
++v5;
label 21435:
if (v5 >= this.model._userSelectedProductionInvestmentArr.length) break;
if (this.model._userSelectedProductionInvestmentArr[v5][1] > 0) {
v2 += this.model._userSelectedProductionInvestmentArr[v5][0] + '<br />';
v3 += this.model._userSelectedProductionInvestmentArr[v5][1] + ' % ( $ ' + this.format_for_production((this.model.human.turnMoney / 100) * this.model._userSelectedProductionInvestmentArr[v5][1]) + ' )' + '<br />';
}
}
v4 = 'total estimated amount: ' + this.format_for_production(Math.round((this.model.human.turnMoney / 100) * this.model.userSelectedProductionInvestmentArr_total_amount));
this.view_interface.set_productionText(v2, v3, v4);
}
};
v1.format_for_production = function (a_nr) {
var v3 = a_nr * 1000000 + '';
v3 = _global.model.tools.reverse_string(v3);
var v4 = '';
var v5 = 0;
goto 21935;
for (;;) {
++v5;
label 21935:
if (v5 >= v3.length) break;
if (v5 == 3 || (v5 == 6 || v5 == 9)) {
v4 += '.';
}
v4 += v3.charAt(v5);
}
v4 = _global.model.tools.reverse_string(v4);
return v4;
};
v1.set_sliders_after_error = function () {
this.setSliderValue();
var v3 = 0;
goto 22156;
for (;;) {
++v3;
label 22156:
if (v3 >= 11) break;
var v2 = this.view_interface.interfaceMC.centerScreen['slide' + v3].sliderBtn;
v2._x = (v2._parent.maxW._width / 100) * this.model._userSelectedProductionInvestmentArr[v3][1];
}
};
v1.set_research_after_error = function () {
this.model.userSelectedResearchArr = [];
var v3 = ' ';
var v4 = ' ';
var v5 = '';
var v6 = 0;
var v7 = 0;
goto 22403;
for (;;) {
++v7;
label 22403:
if (v7 >= this.model.human.techTree.techArr.length) break;
var v2 = this.model.human.techTree.techArr[v7];
if (v2.preOrder) {
v3 += v2.techName + ' <br /> ';
v4 += v2.cost + '.000.000 <br /> ';
v6 += v2.cost;
this.model.userSelectedResearchArr.push({'techID': v2.techID});
}
}
this.model.researchMoneySpend = v6;
v5 = 'estimated total: ' + v6 + '.000.000';
this.view_interface.set_researchText(v3, v4, v5);
this.loadResearchFunc();
};
v1.slider_action = function (__obj) {
this.pressedSliderObj = __obj;
if (!__obj._bg) {
this.pressedSliderObj.regPoint = __obj._mc._xmouse;
} else {
this.pressedSliderObj.regPoint = 0;
}
this.pressedSliderObj.curVal = 0;
this.pressedSliderObj.type = __obj.type;
this.pressedSliderObj.num = __obj.num;
this.sliderListener.onMouseMove = function () {
var v2 = _global.presenter_interface.pressedSliderObj;
var v3 = v2._mc._parent._xmouse - v2.regPoint;
var v4 = v2._mc._parent.maxW._width;
var v5 = v2._mc._parent.maxW._x;
var v6 = 0;
if (v3 > v4 / 2) {
v6 = Math.round((v4 / 100) * v3 / 10) * 10;
} else {
v6 = Math.floor((v4 / 100) * v3 / 10) * 10;
}
if (v6 < 0) {
v6 = 0;
}
if (v6 > 100) {
v6 = 100;
}
if (v6 > _global.model[_global.model.userSelectedActionBtn + 'InvestementPercLeft'](v2.num)) {
v6 = _global.model[_global.model.userSelectedActionBtn + 'InvestementPercLeft'](v2.num);
}
v2._mc._x = (v4 / 100) * v6;
if (_global.presenter_interface.pressedSliderObj.curVal != v6) {
_global.play_sound_by_action('interface_slider_bleep');
}
_global.presenter_interface.pressedSliderObj.curVal = v6;
_global.presenter_interface.setSliderValue();
if (_global.model.productionInvestementPercLeft(99) != 100) {
_global.view_interface.set_centerScreenFunc('default');
} else {
_global.view_interface.set_centerScreenFunc('hide');
}
};
this.sliderListener.onMouseUp = function () {
_global.presenter_interface.setSliderValue();
_global.presenter_interface.pressedSliderObj = undefined;
Mouse.removeListener(_global.presenter_interface.sliderListener);
};
Mouse.addListener(this.sliderListener);
if (__obj._bg) {
this.sliderListener.onMouseMove();
}
};
v1.loadProductionFunc = function (a_error) {
if (a_error) {
var v3 = this.view_interface.interfaceMC.centerScreen;
v3.error_window.text1.htmlText = a_error;
v3.error_window.btnOK.onPress = function () {
_global.model.interface_production_error = undefined;
_global.presenter_interface.update_centerScreenContent();
_global.presenter_interface.set_sliders_after_error();
};
v3.error_window.btnOK.onRollOver = function () {
this.gotoAndStop(2);
};
v3.error_window.btnOK.onRollOut = function () {
this.gotoAndStop(1);
};
return undefined;
}
var v4 = new Array();
var v5 = 0;
goto 24113;
for (;;) {
++v5;
label 24113:
if (v5 >= this.model.human.weaponStock.weaponArr.length) break;
var v6 = this.model.human.weaponStock.weaponArr[v5];
if (v6.desireGroup == 7) {
v4.push([v6.investment, v6.cost]);
}
}
this.view_interface.set_production_specialStats(v4);
var v7 = 1;
goto 24315;
for (;;) {
++v7;
label 24315:
if (v7 >= 9) break;
var v8 = new Object();
v8.num = v7;
this.view_interface.interfaceMC.centerScreen['slide' + v7].sliderBtn._obj = v8;
this.view_interface.interfaceMC.centerScreen['slide' + v7].sliderBtn.onPress = function () {
if (!_global.model.human.techTree.allow_production_by_group(_global.model._userSelectedProductionInvestmentArr[this._obj.num][2])) {
_global.model.interface_production_error = 'You have not yet invented this Technology';
_global.presenter_interface.updateView();
} else {
this._obj._mc = this;
_global.presenter_interface.slider_action(this._obj);
}
};
this.view_interface.interfaceMC.centerScreen['slide' + v7].sliderBG._obj = v8;
this.view_interface.interfaceMC.centerScreen['slide' + v7].sliderBG.onPress = function () {
if (!_global.model.human.techTree.allow_production_by_group(_global.model._userSelectedProductionInvestmentArr[this._obj.num][2])) {
_global.model.interface_production_error = 'You have not yet invented this Technology';
_global.presenter_interface.updateView();
} else {
this._obj._mc = this._parent.sliderBtn;
this._obj._bg = true;
_global.presenter_interface.slider_action(this._obj);
}
};
}
};
v1.removeBioClips = function () {
for (var i in this.view_interface.actionBtn_arr) {
this.view_interface.actionBtn_arr[i].bioloaded = false;
}
for (var i in this.view_interface.stockBtn_arr) {
this.view_interface.stockBtn_arr[i].bioloaded = false;
}
};
v1.attachBioClips = function () {
for (var i in this.model.human.bioloadedActionsArr) {
var v2 = this.model.human.bioloadedActionsArr[i];
for (var j in this.view_interface.actionBtn_arr) {
var v3 = this.view_interface.actionBtn_arr[j];
if (v3.actionName == v2) {
v3.bioloaded = true;
}
}
}
for (var i in this.model.human.bioloadedStockArr) {
var v4 = this.model.human.bioloadedStockArr[i];
for (var j in this.view_interface.stockBtn_arr) {
var v5 = this.view_interface.stockBtn_arr[j];
if (v5.relatedWeapon == v4) {
v5.bioloaded = true;
}
}
}
};
v1.loadResearchFunc = function (a_error) {
if (a_error) {
var v3 = this.view_interface.interfaceMC.centerScreen;
v3.error_window.text1.htmlText = a_error;
v3.error_window.btnOK.onPress = function () {
_global.model.interface_research_error = undefined;
_global.presenter_interface.update_centerScreenContent();
_global.presenter_interface.set_research_after_error();
};
v3.error_window.btnOK.onRollOver = function () {
this.gotoAndStop(2);
};
v3.error_window.btnOK.onRollOut = function () {
this.gotoAndStop(1);
};
return undefined;
}
var v4 = 1;
goto 25833;
for (;;) {
++v4;
label 25833:
if (v4 >= 8) break;
var v5 = new Array();
var v6 = 0;
goto 25896;
for (;;) {
++v6;
label 25896:
if (v6 >= this.model.human.techTree.techArr.length) break;
var v7 = this.model.human.techTree.techArr[v6];
if (v7.desireGroup == this.model._userSelectedResearchInvestmentArr[v4][2]) {
v5.push(v7);
}
}
var v8;
var v9 = 0;
goto 26081;
for (;;) {
++v9;
label 26081:
if (v9 >= v5.length) break;
if (!v5[v9].invented && (!_global.model.zs66hj8s || v5[v9].allow_in_demo)) {
v8 = v5[v9];
} else {}
}
var v10 = this.view_interface.interfaceMC.centerScreen['tech' + v4];
v10.text1.text = '$ ' + v8.cost + '.000.000';
if (this.model.human.turnMoney < v8.cost + this.model.researchMoneySpend) {
v10.text1.textColor = 13369344;
} else {
v10.text1.textColor = 0;
}
if (!v8) {
v10.gotoAndStop('allInvented');
v10.text1.text = ' -- ';
if (_global.model.zs66hj8s) {
v10.gotoAndStop('demo');
}
} else {
if (!v8.preOrder) {
v10.gotoAndStop(v8.techLevel);
} else {
v10.gotoAndStop(v8.techLevel + 4);
if (_global.model.zs66hj8s) {
v10.gotoAndStop('demo');
}
}
}
v10._obj = {'_tech': v8, '_mc': v10};
v10.onPress = function () {
_global.presenter_interface.btnPressed_techBox(this._obj);
};
}
};
v1.play_sound_by_obj = function (_obj) {
var v3 = new Object();
var v4 = this.view.srcMC.createEmptyMovieClip('sound' + this.model.soundCount++, this.view.srcMC.getNextHighestDepth());
var v5 = new Sound(v4);
var v6 = 0;
var v7 = 0;
v5.attachSound(_obj._soundName);
if (_obj._pan) {
v5.setPan(_obj._pan);
}
if (_obj._loops) {
v6 = _obj._loops;
}
if (_obj._startAt) {
v7 = _obj._startAt;
}
if (_obj._vol) {
v5.setVolume(_obj._vol);
}
v5.start(v7, v6);
if (!_obj._continues) {
this.model.playedSounds_arr.push({'soundObj': v5, 'mc': v4});
}
return undefined;
};
v1.play_sound_by_action = function (_action) {
if (!_global.model.option.playSound) {
return undefined;
}
for (var i in this.model.action_to_sound_arr) {
var v3 = this.model.action_to_sound_arr[i];
if (v3._actionName == _action) {
this.play_sound_by_obj(v3);
return undefined;
}
}
return undefined;
};
v1.play_sound_by_building = function (_building, _plrNum) {
if (!_global.model.option.playSound) {
return undefined;
}
for (var i in this.model.building_to_sound_arr) {
var v4 = this.model.building_to_sound_arr[i];
if (v4._buildingName == _building) {
if (v4._varSoundName !== 'religion') {
} else {
v4._soundName = 'Massmedia ' + this.model.tools.randRange(1, 4) + '.wav';
}
this.play_sound_by_obj(v4);
return undefined;
}
}
return undefined;
};
v1.play_sound_by_event = function (_event, _panX) {
if (!_global.model.option.playSound) {
return undefined;
}
for (var i in this.model.event_to_sound_arr) {
var v4 = this.model.event_to_sound_arr[i];
if (v4._eventName == _event) {
v4._pan = this.getPanBy_x(_panX) || 0;
this.play_sound_by_obj(v4);
return undefined;
}
}
return undefined;
};
v1.getPanBy_x = function (_xNum) {
var v3 = (_xNum / 8 - 50) * 2;
return v3;
};
v1.explosion_sound_by_mc_name = function (_str, _mcx) {
for (var i in this.model.explosion_MC_to_sound_arr) {
var v4 = this.model.explosion_MC_to_sound_arr[i];
if (v4._mcName == _str) {
v4._pan = this.getPanBy_x(_mcx);
this.play_sound_by_obj(v4);
return undefined;
}
}
};
v1.reset_leader_stat_bars = function () {
var v3 = 0;
goto 28101;
for (;;) {
++v3;
label 28101:
if (v3 >= 6) break;
var v2 = this.view_interface.interfaceMC['leaderStat' + v3 + '_' + 1].maskMC;
v2._yscale = 0;
v2 = this.view_interface.interfaceMC['leaderStat' + v3 + '_' + 2].maskMC;
v2._yscale = 0;
}
};
v1.roll_over_stat = function (p_str, p_plr_num) {
switch (p_str) {
case 'regard':
var v4 = '';
for (var i in this.model.playerArr) {
if (this.model.playerArr[i].playerNum == p_plr_num) {
var v5 = this.model.playerArr[i];
var v6 = v5.regardArr[0];
if (v6 > 75) {
v4 = 'regard5';
} else {
if (v6 > 55) {
v4 = 'regard4';
} else {
if (v6 > 45) {
v4 = 'regard3';
} else {
if (v6 > 25) {
v4 = 'regard2';
} else {
v4 = 'regard1';
}
}
}
}
}
}
this.view_interface.infoLine = v4;
break;
case 'population':
this.view_interface.infoLine = p_str;
}
};
v1.addProperty('citiesSelectable', v1.__get__citiesSelectable, v1.__set__citiesSelectable);
v1.addProperty('display_population', v1.__get__display_population, function () {});
v1.addProperty('display_textFunds', v1.__get__display_textFunds, function () {});
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5288 __Packages.Presenter_interface {
#initclip
if (!Presenter_interface) {
_global.Presenter_interface = function () {
super();
this.sliderListener = new Object();
this.help_data = new Help_data();
};
_global.Presenter_interface extends Sub_Presenter_interface;
var v1 = _global.Presenter_interface.prototype;
v1.debug_automate_func = function (_nr) {
_global.clearInterval(this.debug_automate_interval_ID);
};
v1.btnPressed_accept = function () {
var v2 = this.model.userSelectedActionBtn;
if (v2 == 'skip_action' || (v2 == 'resources' || (v2 == 'production' && this.model.userSelectedProductionInvestmentArr_total_amount > 0 || (v2 == 'research' && this.model.userSelectedResearchArr.length > 0 || (v2 == 'religion' || (v2 == 'attack' && (this.model.userSelectedCity && this.model.userSelectedWeapon) || (v2 == 'preAttack' && (this.model.human.preAttackStatus == 'ready' && (this.model.userSelectedWeapon && this.model.userSelectedCity)) || (this.model.human.preAttackStatus != 'ready' && this.model.userSelectedWeapon || this.model.human.preAttackStatus == 'ready' && (this.model.userSelectedCarrier.weaponName == 'ship' && this.model.ship_attack_arr.length > 0)) || (v2 == 'defense' && this.model.userSelectedWeapon || (v2 == 'propaganda' && this.model.userSelectedCity || v2 == 'diplomacy' && (this.model.userSelectedDiplomacyLeader != undefined && (this.model.userSelectedDiplomacyOption != undefined && (this.model.diplomacy_options_arr[this.model.userSelectedDiplomacyOption][2] <= this.model.human.turnMoney || this.model.diplomacy_options_arr[this.model.userSelectedDiplomacyOption][0] == 'demand')))))))))))) {
for (var i in this.view_interface.actionBtn_arr) {
var v3 = this.view_interface.actionBtn_arr[i];
if (v3.actionName == this.model_interface.selected_action_name) {
v3.isSetAction = true;
}
}
this.model_interface.cur_pressed_action_btn.isSetAction = true;
this.model.setHumanTurnAction();
this.resetBtns();
this.play_sound_by_action('interface_acceptAction_btn');
} else {}
if (v2 == 'diplomacy' && (this.model.diplomacy_options_arr[this.model.userSelectedDiplomacyOption][2] > this.model.human.turnMoney && this.model.diplomacy_options_arr[this.model.userSelectedDiplomacyOption][0] == 'demand')) {
this.model.interface_diplomacy_error = 'Not enough money';
this.update_centerScreenContent();
return undefined;
}
if (v2 == 'diplomacyPending' && (this.curDiplomacyOptionArr[0] == 'demand' && this.model.human.turnMoney >= this.curDiplomacyOptionArr[2] || this.curDiplomacyOptionArr[0] == 'offer')) {
this.accept_pending_diplomacy();
this.play_sound_by_action('interface_acceptAction_btn');
return undefined;
}
if (v2 == 'diplomacyPending' && this.model.human.turnMoney < this.curDiplomacyOptionArr[2]) {
_global.model.interface_diplomacy_error = 'Not enough money';
this.update_centerScreenContent();
return undefined;
}
if (v2 == 'cancelPreAttack') {
this.play_sound_by_action('interface_acceptAction_btn');
this.model.userSelectedCarrier = undefined;
this.model.userSelectedWeapon = undefined;
this.model.human.preAttackStatus = 'inactive';
this.model.userSelectedActionBtn = undefined;
this.resetBtns();
}
};
v1.btnPress = function (_arrIndex) {
var v3 = this.view_interface.btn_arr[_arrIndex]._btn.type;
if (!this.blockAllBtns) {
switch (v3) {
case 'action':
if (this.model.userSelectedActionBtn == 'diplomacyPending') {
return undefined;
}
this.model.interface_research_error = undefined;
this.model.interface_production_error = undefined;
this.model.interface_diplomacy_error = undefined;
this.model.userSelectedWeapon.inUse = 0;
var v4 = this.view_interface.btn_arr[_arrIndex]._btn;
if (!this.model.human.allActionsSet && !v4.bioloaded) {
if (this.model.userSelectedActionBtn == v4.actionName) {
this.model.userSelectedActionBtn = undefined;
v4.pressed = false;
this.play_sound_by_action('interface_actionBtn_off');
} else {
if (!v4.isSetAction) {
this.play_sound_by_action('interface_actionBtn_on');
this.btnPressed_cancel();
this.model.userSelectedActionBtn = v4.actionName;
this.model_interface.cur_pressed_action_btn = v4;
v4.pressed = true;
}
}
}
if (v4.isSetAction) {
this.play_sound_by_action('interface_actionBtn_off');
if (v4.actionName == this.model.human.turnAction_1.action) {
this.btnPressed_tube(this.view_interface.actionTube1);
} else {
this.btnPressed_tube(this.view_interface.actionTube2);
}
}
break;
case 'stock':
if (this.model.human.allActionsSet) {
return undefined;
}
var v5 = this.view_interface.btn_arr[_arrIndex]._btn;
var v6 = v5.stockPanelNum;
var v7 = this.model.human.weaponStock.getWeaponByName(v5.relatedWeapon);
this.model.userSelectedCity.removeSelection('all');
this.model.userSelectedCity = undefined;
if ((this.model.userSelectedActionBtn == 'attack' && ((v6 == 6 || v6 == 7) && (v7.weaponType != 'spy' || v7.weaponType == 'spy' && this.model.human.spy_readiness / 25 >= v7.weaponLevel)) || (this.model.userSelectedActionBtn == 'preAttack' && (v7.weaponName != 'specialLoad' && (this.model.human.preAttackStatus == 'ready' && ((v6 == 4 || v6 == 5) && v7.weaponLevel <= this.model.userSelectedCarrier.weaponLevel) || this.model.human.preAttackStatus != 'ready' && (v6 == 1 || (v6 == 2 || v6 == 3)))) || (this.model.userSelectedCarrier.weaponName == 'space' && (v7.weaponName == 'specialLoad' && this.model.userSelectedActionBtn == 'preAttack') || this.model.userSelectedActionBtn == 'defense' && v6 == 8))) && (v7.inStock - v7.inUse > 0 && v7.active)) {
if (this.model.userSelectedStockBtn == v5.relatedWeapon) {
this.model.userSelectedWeapon.inUse = 0;
this.model.userSelectedStockBtn = undefined;
this.model.userSelectedWeapon = undefined;
} else {
if (this.model.userSelectedCarrier.weaponName != 'ship') {
this.model.userSelectedWeapon.inUse = 0;
++v7.inUse;
}
if (this.model.userSelectedCarrier.weaponName == 'ship' && this.model.ship_attack_arr.length < 3 || this.model.userSelectedCarrier.weaponName != 'ship') {
this.model.userSelectedWeapon = v7;
this.model.userSelectedStockBtn = v5.relatedWeapon;
_global.play_sound_by_action('interface_select_stock');
}
}
}
if (v7.weaponType == 'spy' && (this.model.human.spy_readiness / 25 < v7.weaponLevel && v7.inStock > 0)) {
this.model.interface_spy_error = 'Your spy readiness is not high enough to use this spy. <br> Choose a different spy or wait a few turns. ';
this.updateView();
}
if (!this.model.userSelectedActionBtn && (v7.inStock > 0 && v7.active)) {
if ((v6 == 6 || v6 == 7) && !this.model.human.allActionsSet) {
this.btnPress(4);
this.btnPress(_arrIndex);
_global.play_sound_by_action('interface_select_stock');
}
if (this.model.human.preAttackStatus != 'ready' && (v6 == 1 || (v6 == 2 || v6 == 3)) || this.model.human.preAttackStatus == 'ready' && ((v6 == 4 || v6 == 5) && v7.weaponLevel <= this.model.userSelectedCarrier.weaponLevel)) {
this.btnPress(5);
this.btnPress(_arrIndex);
_global.play_sound_by_action('interface_select_stock');
}
if (v6 == 8 && !this.model.human.allActionsSet) {
this.btnPress(6);
this.btnPress(_arrIndex);
_global.play_sound_by_action('interface_select_stock');
}
if (this.model.human.preAttackStatus == 'ready' && (v7.weaponName == 'specialLoad' && this.model.userSelectedCarrier.weaponName == 'space')) {
this.btnPress(5);
this.btnPress(_arrIndex);
_global.play_sound_by_action('interface_select_stock');
}
}
}
this.updateView();
}
};
v1.accept_pending_diplomacy = function () {
if (this.curDiplomacyOptionArr[0] == 'demand') {
this.model.human.turnMoney -= this.curDiplomacyOptionArr[2];
}
this.model.human.diplomacyAcceptedArr.push(this.model.human.diplomacyPendingArr.shift());
this.resetBtns();
this.updateView();
};
v1.reject_pending_diplomacy = function () {
this.model.human.diplomacyRejectedArr.push(this.model.human.diplomacyPendingArr.shift());
this.resetBtns();
this.updateView();
};
v1.btnPressed_cancel = function (_actionName) {
var v3 = _actionName || this.model.userSelectedActionBtn;
switch (v3) {
case 'research':
for (var i in this.model.human.techTree.techArr) {
var v4 = this.model.human.techTree.techArr[i];
v4.preOrder = false;
}
this.resetBtns();
break;
case 'production':
this.resetBtns();
break;
case 'diplomacyPending':
this.reject_pending_diplomacy();
this.resetBtns();
break;
case 'attack':
this.model.userSelectedWeapon.inUse = 0;
this.resetBtns();
break;
case 'preAttack':
this.model.userSelectedWeapon.inUse = 0;
if (this.model.human.preAttackStatus == 'ready' && this.model.userSelectedCarrier.weaponName != 'ship') {
this.model.userSelectedActionBtn = 'cancelPreAttack';
} else {
if (this.model.userSelectedCarrier.weaponName == 'ship') {
this.presenter.removeShipSelection();
}
this.resetBtns();
}
this.updateView();
break;
case 'cancelPreAttack':
this.presenter.removeShipSelection();
this.resetBtns();
break;
default:
this.resetBtns();
}
};
v1.btnPressed_turn = function () {
this.view_interface.turnBtn.state = 'green';
_global.clearInterval(this.doTurn_backup_intervalID);
this.doTurn_backup_intervalID = _global.setInterval(this, 'do_turn_backup', 2000);
if (!this.block_start_btn) {
if (this.model.human.turnAction_1.action && this.model.human.turnAction_2.action) {
_global.clearInterval(this.doTurn_intervalID);
this.doTurn_intervalID = _global.setInterval(this, 'turnInterval_step1', 200);
this.blockAllBtns = true;
this.block_start_btn = true;
this.view_interface.actionTube1.state = 'closed';
} else {
this.blockAllBtns = false;
}
}
};
v1.btnPressed_tube = function (_btn) {
if (_btn.associatedTA.action && !this.blockAllBtns) {
this.play_sound_by_action('interface_open_tube');
var v3 = _btn.associatedTA.action;
if (v3 == 'preAttack' && this.model.userSelectedCarrier.weaponName == 'ship') {
this.presenter.removeShipSelection(_btn.associatedTA);
}
this.model.deselectCities(v3);
this.model.human.turnMoney += _btn.associatedTA.researchMoneySpend;
this.model.human.turnMoney += _btn.associatedTA.productionMoneySpend;
if (this.model.diplomacy_options_arr[_btn.associatedTA.diplomacyOption][0] == 'offer') {
this.model.human.turnMoney += this.model.diplomacy_options_arr[_btn.associatedTA.diplomacyOption][2];
}
this.btnPressed_cancel(v3);
_btn.associatedTA.doReset();
this.model.resetUserSelections();
this.resetBtns();
this.updateView();
} else {
if (!this.model.userSelectedActionBtn && !this.blockAllBtns) {
this.model.userSelectedActionBtn = 'skip_action';
this.updateView();
this.play_sound_by_action('interface_open_tube');
}
}
};
v1.btnPressed_scroll_MSG = function (_str) {
this.view_interface.scroll_msg_txt(_str);
};
v1.btnRoll_on = function (_index) {
this.view_interface.btn_arr[this.model_interface.cur_hover_btn_array_index]._btn.hover = false;
if (this.model.human.getNextTurnAction()) {
this.model_interface.cur_hover_btn_array_index = _index;
this.view_interface.btn_arr[_index]._btn.hover = true;
}
};
v1.full_version_mc_sound_start = function () {
if (!this.model.option.music) {
this.btnPressed_option('music');
}
};
v1.btnPressed_option = function (_str, dont_update) {
switch (_str) {
case 'sound':
this.model.option.setSound();
break;
case 'music':
if (this.model.option.music) {
this.model.theme_sound.stop();
} else {
this.model.theme_sound.start(0, 1);
this.model.theme_sound.onSoundComplete = function () {
this.start(0, 1);
};
}
this.model.option.setMusic();
}
if (!dont_update) {
this.updateView();
}
};
v1.init_theme_snd = function () {
if (!this.model.option.music) {
this.btnPressed_option('music', true);
}
};
v1.btnPressed_diplomacy = function (_cat, _num) {
switch (_cat) {
case 'leader':
_global.play_sound_by_action('interface_select_diplo_leader');
this.model.userSelectedDiplomacyLeader = _num;
break;
case 'option':
var v4 = this.model.diplomacy_options_arr[_num];
if (this.model.human.turnMoney < v4[2] && v4[0] == 'offer') {
_global.model.interface_diplomacy_error = 'Not enough money';
this.update_centerScreenContent();
} else {
this.model.userSelectedDiplomacyOption = _num;
_global.play_sound_by_action('interface_select_diplo_option');
}
}
this.updateView();
};
v1.btnPressed_techBox = function (_obj) {
var v3 = _obj._tech;
var v4 = false;
var v5 = false;
if (!v3) {
return undefined;
}
if (v3.preOrder) {
v3.preOrder = false;
_global.play_sound_by_action('interface_select_tech');
} else {
if (this.model.human.turnMoney >= v3.cost + this.model.researchMoneySpend || this.model.human.turnMoney >= v3.cost && !this.model.researchMoneySpend) {
v4 = true;
} else {
v4 = false;
var v6 = 'Not enough money!';
_global.play_sound_by_action('interface_select_tech_false');
}
if (v3.desireGroup == 7 && this.model.human.techTree.allow_special) {
v5 = true;
} else {
if (v3.desireGroup != 7) {
v5 = true;
} else {
v5 = false;
v6 = 'You need to invent 4 complete technologies before you can start inventing special weapons.';
}
}
if (_global.model.zs66hj8s && !v3.allow_in_demo) {
v5 = false;
v6 = 'This technologie are only available in de FULL VERSION.';
}
if (v5 && v4) {
v3.preOrder = true;
} else {
if (v6) {
_global.model.interface_research_error = v6 + ' <br /> ';
}
if (storedv7) {
_global.model.interface_research_error += storedv7;
}
}
_global.play_sound_by_action('interface_select_tech');
}
var v8 = ' ';
var v9 = ' ';
var v10 = '';
var v11 = 0;
this.model.userSelectedResearchArr = [];
var v13 = 0;
goto 13050;
for (;;) {
++v13;
label 13050:
if (v13 >= this.model.human.techTree.techArr.length) break;
var v12 = this.model.human.techTree.techArr[v13];
if (v12.preOrder) {
v8 += v12.prettyName + '<br /> ';
v9 += v12.cost + '.000.000 <br /> ';
v11 += v12.cost;
this.model.userSelectedResearchArr.push({'techID': v12.techID});
}
}
this.model.researchMoneySpend = v11;
v10 = 'estimated total: ' + v11 + '.000.000';
this.view_interface.set_researchText(v8, v9, v10);
this.loadResearchFunc();
this.updateView();
};
v1.btn_pressed_full = function () {
_level0.full_version_MC._visible = true;
_level0.full_version_MC.play();
};
v1.load_full_version_btns = function (mc) {
mc.txtMC_buy.txt.text = 'BUY FULL VERSION';
mc.btn_buy.onPress = function () {
switch (_global.model.get_demo_version_name()) {
case 'Affiliates':
var v2 = _global.unescape(_root._url);
var v3 = v2.lastIndexOf('_');
var v4 = v2.lastIndexOf('.swf');
var v5 = v2.slice(0, v4);
var v6 = v5.slice(v3 + 1);
getURL('https://secure.bmtmicro.com/servlets/Orders.ShoppingCart?CLR=0&CID=2249&PRODUCTID=22490032&AID=' + v6, '_blank');
break;
case 'Miniclip':
getURL('http://www.miniclip.com/buy_worlddominationii.htm', '_blank');
break;
case 'Totallygame':
getURL('http://www.youdagames.com/World+Domination+2-game-info-107/', '_blank');
break;
case 'NewGrounds':
getURL('https://secure.bmtmicro.com/servlets/Orders.ShoppingCart?CLR=0&CID=2249&PRODUCTID=22490032&AID=1071719', '_blank');
break;
case 'Arcadetown':
getURL(_global.model.get_demo_version_url(), '_blank');
}
};
mc.txtMC_back.txt.text = 'BACK';
mc.btn_back.onPress = function () {
_level0.full_version_MC.gotoAndStop(1);
_level0.full_version_MC._visible = false;
};
_level0.full_version_MC.bg.onPress = function () {};
_level0.full_version_MC.bg.useHandCursor = false;
};
v1.btnPressed_spyBuilding = function (_num) {
_global.play_sound_by_action('interface_select_spy_building');
this.model.userSelectedSpyBuilding = this.model.spyBuildingArr[_num];
this.update_centerScreenContent();
};
v1.btnRoll_off = function () {
this.view_interface.btn_arr[this.model_interface.cur_hover_btn_array_index]._btn.hover = false;
this.model_interface.cur_hover_btn_array_index = -1;
};
v1.btnPressed_index_c = function (a_mc) {
if (this.model.m11 == 'xx1231') {
this.model.userSelectedActionBtn = 'cheat';
this.updateView();
}
if (a_mc._parent.input_.chTXT.text == 'youda') {
this.model.m11 = 'xx1231';
this.model.userSelectedActionBtn = 'cheat';
this.updateView();
}
a_mc._parent.input_.nextFrame();
};
v1.__set__citiesSelectable = function (_bln) {
for (var i in this.model.playerArr) {
for (var j in this.model.playerArr[i].cityArr) {
if (_bln) {
this.model.playerArr[i].cityArr[j].image.mc.gotoAndStop(2);
} else {
this.model.playerArr[i].cityArr[j].image.mc.gotoAndStop(1);
}
}
}
return this.__get__citiesSelectable();
};
v1.__get__citiesSelectable = function () {
return true;
};
v1.setSliderValue = function () {
var v2 = '';
var v3 = '';
var v4 = '';
if (this.model.userSelectedActionBtn !== 'production') {
} else {
this.model._userSelectedProductionInvestmentArr[this.pressedSliderObj.num][1] = this.pressedSliderObj.curVal;
this.model._userSelectedProductionInvestmentArr[this.pressedSliderObj.num][3] = (this.model.human.turnMoney / 100) * this.pressedSliderObj.curVal;
var v5 = 0;
goto 14866;
for (;;) {
++v5;
label 14866:
if (v5 >= this.model._userSelectedProductionInvestmentArr.length) break;
if (this.model._userSelectedProductionInvestmentArr[v5][1] > 0) {
v2 += this.model._userSelectedProductionInvestmentArr[v5][0] + '<br />';
v3 += this.model._userSelectedProductionInvestmentArr[v5][1] + ' % ( $ ' + this.format_for_production((this.model.human.turnMoney / 100) * this.model._userSelectedProductionInvestmentArr[v5][1]) + ' )' + '<br />';
}
}
v4 = 'total estimated amount: ' + this.format_for_production(Math.round((this.model.human.turnMoney / 100) * this.model.userSelectedProductionInvestmentArr_total_amount));
this.view_interface.set_productionText(v2, v3, v4);
}
};
v1.format_for_production = function (a_nr) {
var v3 = a_nr * 1000000 + '';
v3 = _global.model.tools.reverse_string(v3);
var v4 = '';
var v5 = 0;
goto 15350;
for (;;) {
++v5;
label 15350:
if (v5 >= v3.length) break;
if (v5 == 3 || (v5 == 6 || v5 == 9)) {
v4 += '.';
}
v4 += v3.charAt(v5);
}
v4 = _global.model.tools.reverse_string(v4);
return v4;
};
v1.display_format_dot_notation = function (a_nr) {
var v3 = a_nr + '';
v3 = _global.model.tools.reverse_string(v3);
var v4 = '';
var v5 = 0;
goto 15616;
for (;;) {
++v5;
label 15616:
if (v5 >= v3.length) break;
if (v5 == 3 || (v5 == 6 || v5 == 9)) {
v4 += '.';
}
v4 += v3.charAt(v5);
}
v4 = _global.model.tools.reverse_string(v4);
return v4;
};
v1.set_sliders_after_error = function () {
this.setSliderValue();
var v3 = 0;
goto 15831;
for (;;) {
++v3;
label 15831:
if (v3 >= 11) break;
var v2 = this.view_interface.interfaceMC.centerScreen['slide' + v3].sliderBtn;
v2._x = (v2._parent.maxW._width / 100) * this.model._userSelectedProductionInvestmentArr[v3][1];
}
};
v1.set_research_after_error = function () {
this.model.userSelectedResearchArr = [];
var v3 = ' ';
var v4 = ' ';
var v5 = '';
var v6 = 0;
var v7 = 0;
goto 16074;
for (;;) {
++v7;
label 16074:
if (v7 >= this.model.human.techTree.techArr.length) break;
var v2 = this.model.human.techTree.techArr[v7];
if (v2.preOrder) {
v3 += v2.prettyName + ' <br /> ';
v4 += v2.cost + '.000.000 <br /> ';
v6 += v2.cost;
this.model.userSelectedResearchArr.push({'techID': v2.techID});
}
}
this.model.researchMoneySpend = v6;
v5 = 'estimated total: ' + v6 + '.000.000';
this.view_interface.set_researchText(v3, v4, v5);
this.loadResearchFunc();
};
v1.slider_action = function (__obj) {
this.pressedSliderObj = __obj;
if (!__obj._bg) {
this.pressedSliderObj.regPoint = __obj._mc._xmouse;
} else {
this.pressedSliderObj.regPoint = 0;
}
this.pressedSliderObj.curVal = 0;
this.pressedSliderObj.type = __obj.type;
this.pressedSliderObj.num = __obj.num;
this.sliderListener.onMouseMove = function () {
var v2 = _global.presenter_interface.pressedSliderObj;
var v3 = v2._mc._parent._xmouse - v2.regPoint;
var v4 = v2._mc._parent.maxW._width;
var v5 = v2._mc._parent.maxW._x;
var v6 = 0;
if (v3 > v4 / 2) {
v6 = Math.round((v4 / 100) * v3 / 10) * 10;
} else {
v6 = Math.floor((v4 / 100) * v3 / 10) * 10;
}
if (v6 < 0) {
v6 = 0;
}
if (v6 > 100) {
v6 = 100;
}
if (v6 > _global.model[_global.model.userSelectedActionBtn + 'InvestementPercLeft'](v2.num)) {
v6 = _global.model[_global.model.userSelectedActionBtn + 'InvestementPercLeft'](v2.num);
}
v2._mc._x = (v4 / 100) * v6;
if (_global.presenter_interface.pressedSliderObj.curVal != v6) {
_global.play_sound_by_action('interface_slider_bleep');
}
_global.presenter_interface.pressedSliderObj.curVal = v6;
_global.presenter_interface.setSliderValue();
if (_global.model.productionInvestementPercLeft(99) != 100) {
_global.view_interface.set_centerScreenFunc('default');
} else {
_global.view_interface.set_centerScreenFunc('hide');
}
};
this.sliderListener.onMouseUp = function () {
_global.presenter_interface.setSliderValue();
_global.presenter_interface.pressedSliderObj = undefined;
Mouse.removeListener(_global.presenter_interface.sliderListener);
};
Mouse.addListener(this.sliderListener);
if (__obj._bg) {
this.sliderListener.onMouseMove();
}
};
v1.roll_over_map = function (a_num) {
if (this.model.playerArr[a_num].alive) {
var v3 = new Color(this.view_interface.interfaceMC['leader_flash' + a_num]);
v3.setTransform(this.model.playerArr[a_num].playerColorTint1);
this.view_interface.interfaceMC['leader_flash' + a_num].play();
}
};
v1.loadProductionFunc = function (a_error) {
if (a_error) {
var v3 = this.view_interface.interfaceMC.centerScreen;
v3.error_window.text1.htmlText = a_error;
v3.error_window.btnOK.onPress = function () {
_global.model.interface_production_error = undefined;
_global.presenter_interface.update_centerScreenContent();
_global.presenter_interface.set_sliders_after_error();
};
v3.error_window.btnOK.onRollOver = function () {
this.gotoAndStop(2);
};
v3.error_window.btnOK.onRollOut = function () {
this.gotoAndStop(1);
};
return undefined;
}
var v4 = new Array();
var v5 = 0;
goto 17947;
for (;;) {
++v5;
label 17947:
if (v5 >= this.model.human.weaponStock.weaponArr.length) break;
var v6 = this.model.human.weaponStock.weaponArr[v5];
if (v6.desireGroup == 7) {
v4.push([v6.investment, v6.cost]);
}
}
this.view_interface.set_production_specialStats(v4);
var v7 = 1;
goto 18147;
for (;;) {
++v7;
label 18147:
if (v7 >= 9) break;
var v8 = new Object();
v8.num = v7;
this.view_interface.interfaceMC.centerScreen['slide' + v7].sliderBtn._obj = v8;
this.view_interface.interfaceMC.centerScreen['slide' + v7].sliderBtn.onPress = function () {
if (!_global.model.human.techTree.allow_production_by_group(_global.model._userSelectedProductionInvestmentArr[this._obj.num][2])) {
_global.model.interface_production_error = 'You have not yet invented this Technology';
_global.presenter_interface.updateView();
} else {
this._obj._mc = this;
_global.presenter_interface.slider_action(this._obj);
}
};
this.view_interface.interfaceMC.centerScreen['slide' + v7].sliderBG._obj = v8;
this.view_interface.interfaceMC.centerScreen['slide' + v7].sliderBG.onPress = function () {
if (!_global.model.human.techTree.allow_production_by_group(_global.model._userSelectedProductionInvestmentArr[this._obj.num][2])) {
_global.model.interface_production_error = 'You have not yet invented this Technology';
_global.presenter_interface.updateView();
} else {
this._obj._mc = this._parent.sliderBtn;
this._obj._bg = true;
_global.presenter_interface.slider_action(this._obj);
}
};
}
};
v1.removeBioClips = function () {
for (var i in this.view_interface.actionBtn_arr) {
this.view_interface.actionBtn_arr[i].bioloaded = false;
}
for (var i in this.view_interface.stockBtn_arr) {
this.view_interface.stockBtn_arr[i].bioloaded = false;
}
};
v1.attachBioClips = function () {
for (var i in this.model.human.bioloadedActionsArr) {
var v2 = this.model.human.bioloadedActionsArr[i];
for (var j in this.view_interface.actionBtn_arr) {
var v3 = this.view_interface.actionBtn_arr[j];
if (v3.actionName == v2) {
v3.bioloaded = true;
}
}
}
for (var i in this.model.human.bioloadedStockArr) {
var v4 = this.model.human.bioloadedStockArr[i];
for (var j in this.view_interface.stockBtn_arr) {
var v5 = this.view_interface.stockBtn_arr[j];
if (v5.relatedWeapon == v4) {
v5.bioloaded = true;
}
}
}
};
v1.launch_space_rocket_sound = function () {
this.play_sound_by_event('space_launch');
};
v1.play_sound_by_obj = function (_obj) {
var v3 = new Object();
var v4 = this.view.srcMC.createEmptyMovieClip('sound' + this.model.soundCount++, this.view.srcMC.getNextHighestDepth());
var v5 = new Sound(v4);
var v6 = 0;
var v7 = 0;
v5.attachSound(_obj._soundName);
if (_obj._pan) {
v5.setPan(_obj._pan);
}
if (_obj._loops) {
v6 = _obj._loops;
}
if (_obj._startAt) {
v7 = _obj._startAt;
}
if (_obj._vol) {
v5.setVolume(_obj._vol);
}
v5.start(v7, v6);
if (!_obj._continues) {
this.model.playedSounds_arr.push({'soundObj': v5, 'mc': v4});
}
return undefined;
};
v1.play_ambient_sound_by_building_frame = function (_frame) {
if (!_global.model.option.playSound) {
return undefined;
}
for (var i in this.model.active_ambient_sounds) {
if (this.model.active_ambient_sounds[i] == _frame) {
return undefined;
}
}
if (!this.view.srcMC['ambient_sound_' + this.model.ambient_sound_index]) {
this.view.srcMC.createEmptyMovieClip('ambient_sound_' + this.model.ambient_sound_index, this.view.srcMC.getNextHighestDepth());
}
var v3 = this.view.srcMC['ambient_sound_' + this.model.ambient_sound_index];
var v4 = new Sound(v3);
for (var i in this.model.ambient_sound_arr) {
if (this.model.ambient_sound_arr[i]._building == _frame) {
this.model.playing_ambient_sound_arr[this.model.ambient_sound_index].stop();
v4.attachSound(this.model.ambient_sound_arr[i]._soundName);
v4.start(0, 9999);
v4.setVolume(21);
this.model.playing_ambient_sound_arr[this.model.ambient_sound_index] = v4;
this.model.next_ambient_sound_index();
}
}
};
v1.play_sound_by_action = function (_action) {
if (!_global.model.option.playSound) {
return undefined;
}
for (var i in this.model.action_to_sound_arr) {
var v3 = this.model.action_to_sound_arr[i];
if (v3._actionName == _action) {
this.play_sound_by_obj(v3);
return undefined;
}
}
return undefined;
};
v1.play_sound_by_building = function (_building, _plrNum) {
if (!_global.model.option.playSound) {
return undefined;
}
for (var i in this.model.building_to_sound_arr) {
var v4 = this.model.building_to_sound_arr[i];
if (v4._buildingName == _building) {
if (v4._varSoundName !== 'religion') {
} else {
v4._soundName = 'Massmedia ' + this.model.tools.randRange(1, 4) + '.wav';
}
this.play_sound_by_obj(v4);
return undefined;
}
}
return undefined;
};
v1.play_satellite_sound = function () {
if (_global.model.satellite_sound_playing) {
return undefined;
}
_global.model.satellite_sound_playing = true;
this.play_sound_by_event('satellite_flight');
};
v1.play_sound_by_event = function (_event, _panX) {
if (!_global.model.option.playSound) {
return undefined;
}
for (var i in this.model.event_to_sound_arr) {
var v4 = this.model.event_to_sound_arr[i];
if (v4._eventName == _event) {
v4._pan = this.getPanBy_x(_panX) || 0;
this.play_sound_by_obj(v4);
return undefined;
}
}
return undefined;
};
v1.getPanBy_x = function (_xNum) {
var v3 = (_xNum / 8 - 50) * 2;
return v3;
};
v1.explosion_sound_by_mc_name = function (_str, _mcx) {
for (var i in this.model.explosion_MC_to_sound_arr) {
var v4 = this.model.explosion_MC_to_sound_arr[i];
if (v4._mcName == _str) {
v4._pan = this.getPanBy_x(_mcx);
this.play_sound_by_obj(v4);
return undefined;
}
}
};
v1.reset_leader_stat_bars = function () {
var v3 = 0;
goto 21542;
for (;;) {
++v3;
label 21542:
if (v3 >= 6) break;
var v2 = this.view_interface.interfaceMC['leaderStat' + v3 + '_' + 1].maskMC;
v2._yscale = 0;
v2 = this.view_interface.interfaceMC['leaderStat' + v3 + '_' + 2].maskMC;
v2._yscale = 0;
var v4 = new Color(this.view_interface.interfaceMC['leaderStat' + v3 + '_' + 1]);
var v5 = _global.model.playerArr[v3];
v4.setTransform(v5.playerColorTint1);
}
};
v1.roll_over_stat = function (p_str, p_plr_num) {
switch (p_str) {
case 'regard':
var v4 = '';
for (var i in this.model.playerArr) {
if (this.model.playerArr[i].playerNum == p_plr_num) {
var v5 = this.model.playerArr[i];
var v6 = v5.regardArr[0];
if (v6 > 75) {
v4 = 'regard5';
} else {
if (v6 > 55) {
v4 = 'regard4';
} else {
if (v6 > 45) {
v4 = 'regard3';
} else {
if (v6 > 25) {
v4 = 'regard2';
} else {
v4 = 'regard1';
}
}
}
}
}
}
this.view_interface.infoLine = v4;
break;
case 'population':
this.view_interface.infoLine = p_str;
}
};
v1.addProperty('citiesSelectable', v1.__get__citiesSelectable, v1.__set__citiesSelectable);
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5289 __Packages.Btn_tube {
#initclip
if (!Btn_tube) {
_global.Btn_tube = function (_btnMC, _tubeMC) {
this.tubeMC = _tubeMC;
this.tubeMC.txtMC.txt.embedFonts = true;
this.tubeMC.txtMC._alpha = 65;
this.btnMC = _btnMC;
this.tubeMC.targetState = 1;
};
var v1 = _global.Btn_tube.prototype;
v1.__set__state = function (_str) {
if (this.state != _str) {
this.setOverlayText();
switch (_str) {
case 'closed':
this.tubeMC.targetFrame = 1;
break;
case 'open':
this.tubeMC.targetFrame = 10;
break;
case 'set':
this.handCursor = true;
this.tubeMC.targetFrame = 11;
}
this._state = _str;
this.tubeMC.onEnterFrame = function () {
if (this._currentframe > this.targetFrame) {
this.prevFrame();
if (this._currentframe == 9) {
_global.play_sound_by_action('interface_close_tube');
}
} else {
if (this._currentframe < this.targetFrame) {
this.nextFrame();
if (this._currentframe == 2) {
_global.play_sound_by_action('interface_open_tube');
}
} else {
this.gotoAndStop(this.targetFrame);
delete this.onEnterFrame;
}
}
};
}
return this.__get__state();
};
v1.__set__handCursor = function (_bln) {
if (!_bln) {
this.btnMC.gotoAndStop(2);
return this.__get__handCursor();
}
this.btnMC.gotoAndStop(1);
return this.__get__handCursor();
};
v1.setOverlayText = function () {
this._overlayText = '';
if (this.associatedTA.action) {
this._overlayText = _global.view_interface.actionName2label(this.associatedTA.action);
if (this._overlayText == 'DIRECT ATTACK' || this._overlayText == 'PREPARED ATTACK') {
this.tubeMC.txtMC.gotoAndStop(2);
} else {
this.tubeMC.txtMC.gotoAndStop(1);
}
} else {
if (_global.model.userSelectedActionBtn) {
this._overlayText = _global.view_interface.actionName2label(_global.model.userSelectedActionBtn);
if (this._overlayText == 'DIRECT ATTACK' || this._overlayText == 'PREPARED ATTACK') {
this.tubeMC.txtMC.gotoAndStop(2);
} else {
this.tubeMC.txtMC.gotoAndStop(1);
}
}
}
if (this._overlayText) {
this.tubeMC.txtMC.txt.htmlText = this._overlayText;
this.tubeMC.txtMC.txt.setTextFormat(_global.view.textFormats.interface_tubeText_1);
this.tubeMC.txtMC.txt.embedFonts = true;
}
};
v1.getPverlayText = function () {
return this._overlayText;
};
v1.__get__state = function () {
return this._state;
};
v1.addProperty('state', v1.__get__state, v1.__set__state);
v1.addProperty('handCursor', function () {}, v1.__set__handCursor);
ASSetPropFlags(v1, null, 1);
v1.type = 'tube';
v1._state = 'closed';
}
#endinitclip
}
movieClip 5290 __Packages.Btn_turn {
#initclip
if (!Btn_turn) {
_global.Btn_turn = function (_btnMC, _imgMC) {
this.btnMC = _btnMC;
this.imgMC = _imgMC;
};
var v1 = _global.Btn_turn.prototype;
v1.__set__state = function (_str) {
if (this._state != _str) {
switch (_str) {
case 'closed':
_global.play_sound_by_action('interface_open_turnBtn');
this.imgMC.targetFrame = 1;
this.handCursor = false;
break;
case 'open':
_global.play_sound_by_action('interface_close_turnBtn');
this.imgMC.targetFrame = 11;
this.handCursor = false;
break;
case 'green':
this.imgMC.targetFrame = 12;
this.handCursor = false;
}
this._state = _str;
this.imgMC.onEnterFrame = function () {
if (this._currentframe < this.targetFrame) {
this.nextFrame();
} else {
if (this._currentframe > this.targetFrame) {
this.prevFrame();
} else {
this.gotoAndStop(this.targetFrame);
delete this.onEnterFrame;
}
}
};
}
return this.__get__state();
};
v1.__set__handCursor = function (_bln) {
return this.__get__handCursor();
};
v1.__get__state = function () {
return this._state;
};
v1.addProperty('state', v1.__get__state, v1.__set__state);
v1.addProperty('handCursor', function () {}, v1.__set__handCursor);
ASSetPropFlags(v1, null, 1);
v1.pressed = false;
v1._state = 'closed';
}
#endinitclip
}
movieClip 5291 __Packages.Btn_simple {
#initclip
if (!Btn_simple) {
_global.Btn_simple = function (_srcMC, _img) {
this.srcMC = _srcMC;
this.img = _img;
};
var v1 = _global.Btn_simple.prototype;
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5292 __Packages.Btn_musicSwitch {
#initclip
if (!Btn_musicSwitch) {
_global.Btn_musicSwitch = function (_overlayMC, _imgMC, _option) {
this.overlayMC = _overlayMC;
this.imgMC = _imgMC;
this._state = false;
this.option = _option;
};
var v1 = _global.Btn_musicSwitch.prototype;
v1.__set__state = function (_bln) {
if (_bln != this._state) {
this._state = _bln;
if (!_bln) {
this.imgMC.gotoAndStop(2);
return this.__get__state();
}
this.imgMC.gotoAndStop(1);
}
return this.__get__state();
};
v1.__get__state = function () {
return this._state;
};
v1.__set__handCursor = function (_bln) {
if (!_bln) {
this.overlayMC.gotoAndStop(2);
return this.__get__handCursor();
}
this.overlayMC.gotoAndStop(1);
return this.__get__handCursor();
};
v1.addProperty('handCursor', function () {}, v1.__set__handCursor);
v1.addProperty('state', v1.__get__state, v1.__set__state);
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5293 __Packages.TextFormats {
#initclip
if (!TextFormats) {
_global.TextFormats = function () {
this.scrollText = new TextFormat();
this.scrollText.font = 'Arial';
this.scrollText.size = 11;
this.scrollText.color = 16777215;
this.infoText = new TextFormat();
this.infoText.font = 'Arial';
this.infoText.size = 10;
this.infoText.color = 16763904;
this.infoLineText = new TextFormat();
this.infoLineText.font = 'Arial';
this.infoLineText.size = 14;
this.infoLineText.color = 16763904;
this.stockBtnText1 = new TextFormat();
this.stockBtnText1.font = 'Arial';
this.stockBtnText1.size = 10;
this.stockBtnText1.color = 0;
this.stockBtnText1.align = 'center';
this.stockBtnText2 = new TextFormat();
this.stockBtnText2.font = 'Arial';
this.stockBtnText2.size = 10;
this.stockBtnText2.color = 16777215;
this.stockBtnText2.align = 'center';
this.stockBtnText3 = new TextFormat();
this.stockBtnText3.font = 'Arial';
this.stockBtnText3.size = 10;
this.stockBtnText3.color = 11184810;
this.stockBtnText3.align = 'center';
this.stockBtnText4 = new TextFormat();
this.stockBtnText4.font = 'Arial';
this.stockBtnText4.size = 10;
this.stockBtnText4.color = 16763904;
this.stockBtnText4.align = 'center';
this.stockBtnText5 = new TextFormat();
this.stockBtnText5.font = 'Arial';
this.stockBtnText5.size = 10;
this.stockBtnText5.color = 13303610;
this.stockBtnText5.align = 'center';
this.stockBtnText6 = new TextFormat();
this.stockBtnText6.font = 'Arial';
this.stockBtnText6.size = 10;
this.stockBtnText6.color = 12218369;
this.stockBtnText6.align = 'center';
this.popupText1 = new TextFormat();
this.popupText1.font = 'Arial';
this.popupText1.size = 10;
this.popupText1.color = 13303610;
this.popupText1.align = 'right';
this.popupText2 = new TextFormat();
this.popupText2.font = 'Arial';
this.popupText2.size = 10;
this.popupText2.color = 11590402;
this.popupText2.align = 'right';
this.popupText3 = new TextFormat();
this.popupText3.font = 'Arial';
this.popupText3.size = 10;
this.popupText3.color = 16720418;
this.popupText3.align = 'right';
this.popupText4 = new TextFormat();
this.popupText4.font = 'Arial';
this.popupText4.size = 10;
this.popupText4.color = 13303610;
this.popupText4.align = 'center';
this.hatchText1 = new TextFormat();
this.hatchText1.font = 'Arial';
this.hatchText1.size = 11;
this.hatchText1.color = 8947848;
this.hatchText2 = new TextFormat();
this.hatchText2.font = 'Arial';
this.hatchText2.size = 11;
this.hatchText2.color = 8947848;
this.interface_actionText_1 = new TextFormat();
this.interface_actionText_1.font = 'Arial';
this.interface_actionText_1.size = 12;
this.interface_actionText_1.color = 16777215;
this.interface_actionText_2 = new TextFormat();
this.interface_actionText_2.font = 'Arial';
this.interface_actionText_2.size = 12;
this.interface_actionText_2.color = 11184810;
this.interface_stockText_1 = new TextFormat();
this.interface_stockText_1.font = 'Arial';
this.interface_stockText_1.size = 10;
this.interface_stockScrnText_1 = new TextFormat();
this.interface_stockScrnText_1.font = 'Arial';
this.interface_stockScrnText_1.size = 14;
this.interface_tubeText_1 = new TextFormat();
this.interface_tubeText_1.font = 'Arial';
this.interface_tubeText_1.size = 12;
this.interface_tubeText_1.align = 'center';
this.interface_production_1 = new TextFormat();
this.interface_production_1.font = 'Arial';
this.interface_production_1.size = 10;
this.interface_production_1.align = 'right';
this.interface_production_2 = new TextFormat();
this.interface_production_2.font = 'Arial';
this.interface_production_2.size = 10;
this.interface_production_2.align = 'left';
};
var v1 = _global.TextFormats.prototype;
v1.__resolve = function (_param) {};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5294 __Packages.WD2_messages {
#initclip
if (!WD2_messages) {
_global.WD2_messages = function () {};
var v1 = _global.WD2_messages.prototype;
ASSetPropFlags(v1, null, 1);
v1.action_production_initial_infoText = 'Please choose a weapon from your arsenal on the left. <br> Only weapons displayed in orange can be purchased, other weapons are inactive and need to be invented first. Choose the \'technology\' action for this';
v1.action_production_initial_infoLine = 'Production: Select weapons';
v1.action_research_initial_infoLine = 'Research technology: Select from your arsenal';
v1.action_research_initial_infoText = 'Choose a technology to invent from your arsenal';
v1.action_resources_initial_infoLine = 'Resources: Increase your money';
v1.action_resources_initial_infoText = 'Increase your money by gathering resources.';
v1.action_religion_initial_infoLine = 'Religion: Defend agains propaganda attacks';
v1.action_religion_initial_infoText = 'Increase the religion level of your people and prevent propaganda attacks';
v1.action_preAttack_initial_infoLine = 'Prepaired attack: ';
v1.action_preAttack_initial_infoText = 'Prepare an attack. Select a rocket or plane from your arsenal. You can launch this weapon in the next turn';
v1.action_dirattack_initial_infoLine = 'Attack the enemy!';
v1.action_dirattack_initial_infoText = 'Select a weapon from your arsenal to attack the enemy';
v1.action_defense_initial_infoLine = 'Defend against a prepaired attack';
v1.action_defense_initial_infoText = 'Select anti-air or anti-rocket defense from your arsenal';
v1.action_propaganda_initial_infoLine = 'Propaganda attack on an enemy city:';
v1.action_propaganda_initial_infoText = 'Select an enemy city on the map to perform the propaganda attack on ';
v1.action_diplomacy_initial_infoLine = 'Diplomacy: Select an player';
v1.action_diplomacy_initial_infoText = 'Choose an opponent to perform the diplomacy action on';
}
#endinitclip
}
movieClip 5295 __Packages.Battle {
#initclip
if (!Battle) {
_global.Battle = function () {
this.model = _global.model;
this._activeUnitsArr = new Array();
this._toDeleteUnitsArr = new Array();
this._toShowTimedABArr = new Array();
this._toShowInBattleABArr = new Array();
this._toShowInitABArr = new Array();
this._toShowLastABArr = new Array();
this._toDeleteExplosionMC_arr = new Array();
};
var v1 = _global.Battle.prototype;
v1.createBattleScriptVars = function () {
this.resetBattle();
this.createToShowABArray();
_global.model.battleTimerArr = [];
var v2 = 0;
goto 3127;
for (;;) {
++v2;
label 3127:
if (v2 >= 15) break;
_global.model.battleTimerArr.push(_global.model.tools.randRange(50, 60));
}
this.tmpBattleArr = [];
this.randUnitOrderArr = [];
for (var i in _global.model.turnResultsArr) {
var v3 = _global.model.turnResultsArr[i];
if (v3._item == 'battle' || (v3._item == 'diplomacy' || (v3._item == 'resources' || (v3._item == 'propaganda' || v3._item == 'religion')))) {
this.tmpBattleArr.push(v3);
}
}
for (var i in this._toShowInBattleABArr) {
}
var v4 = 0;
var v5 = 0;
goto 3526;
for (;;) {
++v5;
label 3526:
if (v5 > _global.model.orderOfActions_arr.length) break;
var v6 = 0;
goto 3589;
for (;;) {
++v6;
label 3589:
if (v6 >= this.tmpBattleArr.length) break;
if (this.tmpBattleArr[v6]._item == _global.model.orderOfActions_arr[v4]) {
this.randUnitOrderArr.push(this.tmpBattleArr[v6]);
}
}
++v4;
}
for (var i in this.randUnitOrderArr) {
var v7 = _global.presenter.doTR_from_battle(this.randUnitOrderArr[i]);
}
};
v1.createToSpawnUnitsArr = function () {
this.createBattleScriptVars();
for (var i in this.randUnitOrderArr) {
var v2 = this.randUnitOrderArr[i];
var v3 = _global.model.playerArr[v2._player];
var v4 = v2._weapon;
var v5 = _global.model.human.weaponStock.getWeaponByID(v4);
var v6 = (_global.model.human.weaponStock.getWeaponByID(v2._payload)).explosion_mc_name;
var v7 = v3.startLocation[0];
var v8 = v3.startLocation[1];
var v9 = _global.model.getCityByID(v2._city);
var v10 = v9.xPos;
var v11 = v9.yPos;
var v12 = new Array();
var v13 = 'unit' + i;
var v14 = Number(i) + 1;
var v15 = new Object();
if (v2._item == 'battle') {
switch (v5.weaponName) {
case 'soldier1':
var v16 = _global.model.boatStartingPosition[v9.plr.playerNum][2];
var v17 = _global.model.boatStartingPosition[v2._player][2];
var v18 = v17;
while (v18 != v16) {
v12.push({'_x': _global.model.boatWayPointPositions[v18][0], '_y': _global.model.boatWayPointPositions[v18][1], '_type': 'default'});
++v18;
if (v18 > _global.model.boatWayPointPositions.length - 1) {
v18 = 0;
}
}
v12.push({'_x': _global.model.boatStartingPosition[v9.plr.playerNum][0], '_y': _global.model.boatStartingPosition[v9.plr.playerNum][1], '_type': 'unload'});
this._toSpawnUnitsArr.push({'unitID': v13, 'player': v2._player, 'weaponID': v4, 'startX': _global.model.boatStartingPosition[v2._player][0], 'startY': _global.model.boatStartingPosition[v2._player][1], 'trgtX': v10, 'trgtY': v11, 'wayPointArr': v12, 'result': v2._result, 'tail': undefined, 'tailNum': undefined, 'force_MC': 'boat', 'startNum': v14, 'tr': v2, 'explosion_name': v6});
var v19 = new Array();
var v20 = 0;
var v21 = _global.presenter.get_soldier_positions(v9);
v11 -= 20;
for (var j in _global.model.soldierSpawnArr1) {
v19 = [];
v19.push({'_x': _global.model.landUnitsArr[v9.plr.playerNum][0], '_y': _global.model.landUnitsArr[v9.plr.playerNum][1], '_type': 'spawn'});
var v22 = 0;
goto 5119;
for (;;) {
++v22;
label 5119:
if (v22 >= v21._wpArr.length) break;
v19.push({'_x': v21._wpArr[v22]._x, '_y': v21._wpArr[v22]._y, '_type': 'default'});
}
v19.push({'_x': v10 + v21._endPosArr[v20][0] + _global.model.tools.randRange(-3, 3), '_y': v11 + v21._endPosArr[v20][1] + _global.model.tools.randRange(-3, 3), '_type': 'soldier_reset_range'});
v19.push({'_x': v10, '_y': v11, '_type': 'shoot'});
this._toSpawnUnitsArr.push({'unitID': 'tail' + v13 + j, 'player': v2._player, 'weaponID': v4, 'startX': _global.model.landUnitsArr[v2.city.playerNum][0], 'startY': _global.model.landUnitsArr[v2.city.playerNum][1], 'trgtX': v10, 'trgtY': v11, 'wayPointArr': v19, 'result': v2._result, 'tail': v13, 'tailNum': v20++, 'force_MC': 'soldier', 'startNum': v14, 'tr': v2, 'explosion_name': v6});
}
break;
case 'soldier2':
v12.push({'_x': _global.model.marine_landUnitsArr[v9.plr.playerNum][0] + 35, '_y': _global.model.marine_landUnitsArr[v9.plr.playerNum][1] - 10, '_type': 'heli_unload'});
this._toSpawnUnitsArr.push({'unitID': v13, 'player': v2._player, 'weaponID': v4, 'startX': 0, 'startY': 0, 'trgtX': v10, 'trgtY': v11, 'wayPointArr': v12, 'result': v2._result, 'tail': undefined, 'tailNum': undefined, 'force_MC': 'apache', 'startNum': v14, 'tr': v2, 'explosion_name': v6});
var v23 = new Array();
var v24 = 0;
var v25 = _global.presenter.get_soldier_positions(v9);
for (var j in _global.model.soldierSpawnArr1) {
v23 = [];
v23.push({'_x': _global.model.marine_landUnitsArr[v9.plr.playerNum][0], '_y': _global.model.marine_landUnitsArr[v9.plr.playerNum][1], '_type': 'spawn'});
var v26 = 0;
goto 6127;
for (;;) {
++v26;
label 6127:
if (v26 >= v25._wpArr.length) break;
v23.push({'_x': v25._wpArr[v26]._x, '_y': v25._wpArr[v26]._y, '_type': 'default'});
}
v23.push({'_x': v10 + v25._endPosArr[v24][0] + _global.model.tools.randRange(-3, 3), '_y': v11 + v25._endPosArr[v24][1] + _global.model.tools.randRange(-3, 3), '_type': 'soldier_reset_range'});
v23.push({'_x': v10, '_y': v11, '_type': 'shoot'});
this._toSpawnUnitsArr.push({'unitID': 'tail' + v13, 'player': v2._player, 'weaponID': v4, 'startX': _global.model.landUnitsArr[v2.city.playerNum][0], 'startY': _global.model.landUnitsArr[v2.city.playerNum][1], 'trgtX': v10, 'trgtY': v11, 'wayPointArr': v23, 'result': v2._result, 'tail': v13, 'tailNum': v24++, 'force_MC': 'marine', 'startNum': v14, 'tr': v2, 'explosion_name': v6});
}
break;
case 'soldier3':
v12.push({'_x': _global.model.landUnitsArr[v9.plr.playerNum][0], '_y': _global.model.landUnitsArr[v9.plr.playerNum][1] - 40, '_type': 'drop'});
this._toSpawnUnitsArr.push({'unitID': v13, 'player': v2._player, 'weaponID': v4, 'startX': _global.model.chinookStartPositions[v2._player][0], 'startY': _global.model.chinookStartPositions[v2._player][1], 'trgtX': v10, 'trgtY': v11, 'wayPointArr': v12, 'result': v2._result, 'tail': undefined, 'tailNum': undefined, 'force_MC': 'chinook', 'startNum': v14, 'tr': v2, 'explosion_name': v6});
var v27 = new Array();
var v28 = _global.presenter.get_tank_positions(v9);
var v29 = 0;
goto 6998;
for (;;) {
++v29;
label 6998:
if (v29 >= v28._wpArr.length) break;
if (v29 != v28._wpArr.length - 1) {
v27.push({'_x': v28._wpArr[v29]._x, '_y': v28._wpArr[v29]._y, '_type': 'default'});
} else {
v27.push({'_x': v28._wpArr[v29]._x, '_y': v28._wpArr[v29]._y, '_type': 'tank_reset_range'});
}
}
var v30 = _global.model.tools.randRange(0, 2);
v27.push({'_x': v10 + v28._endPosArr[0][0], '_y': v11 + v28._endPosArr[0][1], '_type': 'tank_shoot'});
this._toSpawnUnitsArr.push({'unitID': 'tail' + v13, 'player': v2._player, 'weaponID': v4, 'startX': _global.model.chinookStartPositions[v2._player][0] - 210, 'startY': _global.model.chinookStartPositions[v2._player][1] - 210, 'trgtX': v10, 'trgtY': v11, 'wayPointArr': v27, 'result': v2._result, 'tail': v13, 'tailNum': 1, 'force_MC': 'tank_noShade', 'startNum': v14, 'tr': v2, 'explosion_name': v6});
var v31 = new Array();
v31.push({'_x': v10, '_y': v11, '_type': 'tank_shoot'});
this._toSpawnUnitsArr.push({'unitID': 'tail' + v13 + 'tail', 'player': v2._player, 'weaponID': v4, 'startX': _global.model.chinookStartPositions[v2._player][0] - 40, 'startY': _global.model.chinookStartPositions[v2._player][1] - 40, 'trgtX': v10 + v28._endPosArr[v30][0], 'trgtY': v11 + v28._endPosArr[v30][1], 'wayPointArr': v31, 'result': v2._result, 'tail': 'tail' + v13, 'tailNum': 2, 'force_MC': 'tankTop', 'startNum': v14, 'tr': v2, 'explosion_name': v6});
break;
case 'soldier4':
v12.push({'_x': 0, '_y': 0, '_type': 'suicide_dissapear'});
v12.push({'_x': 0, '_y': 0, '_type': 'suicide_dissapear'});
v12.push({'_x': _global.model.suicide_spawn_array[v2._b][0], '_y': _global.model.suicide_spawn_array[v2._b][1], '_type': 'suicide_appear'});
var v32 = _global.presenter.get_tank_positions(v9);
var v33 = 0;
goto 8091;
for (;;) {
++v33;
label 8091:
if (v33 >= v32._wpArr.length) break;
if (v32._wpArr[v33]._x) {
v12.push({'_x': v32._wpArr[v33]._x, '_y': v32._wpArr[v33]._y, '_type': 'default'});
}
}
v12.push({'_x': v10, '_y': v11, '_type': 'suicide_explode'});
this._toSpawnUnitsArr.push({'unitID': v13, 'player': v2._player, 'weaponID': v4, 'startX': 0, 'startY': 0, 'trgtX': v10, 'trgtY': v11, 'wayPointArr': v12, 'result': v2._result, 'tail': undefined, 'tailNum': 1, 'force_MC': 'suicide_bomber', 'startNum': v14, 'tr': v2, 'explosion_name': v6});
}
switch (v5.weaponType) {
case 'rocket':
var v34 = 30;
var v35 = 30;
v15 = new Object();
var v36 = _global.model.playerArr[v2._player].preStart[0] + 10;
var v37 = _global.model.playerArr[v2._player].preStart[1] - 42;
v15.ellipseWidth = Math.max(v36, v10) - Math.min(v36, v10);
v15.ellipseHeight = 340;
v15.ellipseCenterX = Math.min(v36, v10) + v15.ellipseWidth / 2;
v15.ellipseCenterY = Math.min(v11, v37) - 40;
if (v36 > v10) {
v15.directionMultiplier = 1;
v15.startAngle = 0;
} else {
v15.directionMultiplier = -1;
v15.startAngle = 180;
}
if (v11 < _global.model.playerArr[v2._player].preStart[1]) {
var v38 = v11 - v34;
} else {
var v38 = _global.model.playerArr[v2._player].preStart[1] - v34;
}
if (v2._result) {
v12.push({'_x': _global.model.playerArr[v2._player].preStart[0] + 10, '_y': v15.ellipseCenterY, '_type': 'rocket_follow_ellipse'});
v12.push({'_x': v10, '_y': v11, '_type': 'rocket_explode_city'});
if (v15.startAngle == 0) {
v15.targetAngle = -180;
} else {
v15.targetAngle = 360;
}
v15.finalAction = 'rocket_explode_city';
} else {
v12.push({'_x': _global.model.playerArr[v2._player].preStart[0] + 10, '_y': v15.ellipseCenterY, '_type': 'rocket_follow_ellipse_with_anti'});
if (v15.startAngle == 0) {
v15.targetAngle = -180;
} else {
v15.targetAngle = 360;
}
v12.push({'_x': v10, '_y': v11 - 100, '_type': 'rocket_explode_self'});
v15.finalAction = 'rocket_explode_self';
v15.anti = true;
v15.antiNum = v2._b;
}
if (v2._bioload) {
v15.bioload = true;
}
if (v2._pass_anti) {
v15.anti = true;
v15.antiNum = v2._b;
}
this._toSpawnUnitsArr.push({'unitID': 'unit' + v13, 'player': v2._player, 'weaponID': v4, 'startX': _global.model.playerArr[v2._player].preStart[0] + 10, 'startY': _global.model.playerArr[v2._player].preStart[1] - 21, 'trgtX': v10, 'trgtY': v11, 'wayPointArr': v12, 'result': v2._result, 'tail': undefined, 'tailNum': undefined, 'force_MC': 'rocket', 'startNum': v14, 'targetPlayer': v2._b, 'tr': v2, 'wildCard': v15, 'explosion_name': v6});
break;
case 'plane':
v15 = new Object();
var v40 = new Array();
if (v5.weaponName == 'plane1') {
var v39 = 'plane1';
} else {
if (v5.weaponName == 'plane2') {
var v39 = 'plane2';
}
}
switch (v2._player) {
case 0:
v15.plane_angle_step = -1;
v15.plane_angle_start = 180;
v15.plane_angle_center = [273, 298];
v15.circular_modifier_flyTo = [-100, 0];
v15.circular_modifier_center = [100, 0];
v15.circular_radius = 100;
v15.x_multiplier = 2;
v15.y_multiplier = 1;
break;
case 1:
v15.plane_angle_step = -1;
v15.plane_angle_start = 0;
v15.plane_angle_center = [175, 75];
v15.circular_modifier_flyTo = [100, 0];
v15.circular_modifier_center = [-100, 0];
v15.x_multiplier = 2;
v15.y_multiplier = 1;
v15.circular_radius = 100;
break;
case 2:
v15.plane_angle_step = 1;
v15.plane_angle_start = 180;
v15.plane_angle_center = [619, 100];
v15.circular_modifier_flyTo = [-100, 0];
v15.circular_modifier_center = [100, 0];
v15.circular_radius = 100;
break;
case 3:
v15.plane_angle_step = 1;
v15.plane_angle_start = 0;
v15.plane_angle_center = [230, 500];
v15.circular_modifier_flyTo = [100, 0];
v15.circular_modifier_center = [-100, 0];
v15.x_multiplier = 1;
v15.y_multiplier = 1;
v15.circular_radius = 100;
break;
case 4:
v15.plane_angle_step = -1;
v15.plane_angle_start = 180;
v15.plane_angle_center = [570, 500];
v15.circular_modifier_flyTo = [-100, 0];
v15.circular_modifier_center = [100, 0];
v15.circular_radius = 100;
v15.x_multiplier = 2;
v15.y_multiplier = 1;
}
v15.city = v2._city;
if (v2._bioload) {
v15.bioload = true;
}
v12.push({'_x': _global.model.liftOff_location[v2._player][0], '_y': _global.model.liftOff_location[v2._player][1], '_type': 'default'});
v12.push({'_x': v15.plane_angle_center[0] + v15.circular_modifier_flyTo[0], '_y': v15.plane_angle_center[1] + v15.circular_modifier_flyTo[1], '_type': 'plane_circular_flight'});
if (v2._result) {
v11 -= 100;
v12.push({'_x': v10, '_y': v11, '_type': 'bomb'});
} else {
v12.push({'_x': v10, '_y': v11, '_type': 'speedup_die'});
v15.anti = true;
v15.antiNum = v2._b;
}
if (v2._pass_anti) {
v15.anti = true;
v15.antiNum = v2._b;
}
this._toSpawnUnitsArr.push({'unitID': 'unit' + v13, 'player': v2._player, 'weaponID': v4, 'startX': _global.model.playerArr[v2._player].preStart[0] + 10, 'startY': _global.model.playerArr[v2._player].preStart[1] - 25, 'trgtX': v10, 'trgtY': v11 + 100, 'wayPointArr': v12, 'result': v2._result, 'tail': undefined, 'tailNum': undefined, 'force_MC': v39, 'startNum': v14, 'targetPlayer': v2._b, 'tr': v2, 'wildCard': v15, 'explosion_name': v6});
break;
case 'sub':
if (v2._action == 1) {
this._toSpawnUnitsArr.push({'_building': 'sub', '_startNum': v14, '_player': v2._player, '_locPlr': v2._player, '_locPos': 1, '_frame': 'sub', 'tr': v2});
}
if (v2._action == 2) {
this._toSpawnUnitsArr.push({'_building': 'sub', '_player': v2._player, '_startNum': v14, '_locPlr': v2._b, '_locPos': 2, '_frame': 'sub', '_trgtCity': v2._city, '_casualties': v2._casualties, 'tr': v2, '_addToSubArr': true});
var v41 = 30;
var v42 = 30;
v15 = new Object();
v15.sub_launch_num = v2._player;
v15.bioload = v2._bioload;
var v43 = _global.view.battleSrcMC['sub_' + v2._b + '_2']._x + 21;
var v44 = _global.view.battleSrcMC['sub_' + v2._b + '_2']._y + 55;
v15.ellipseWidth = Math.max(v43, v10) - Math.min(v43, v10);
v15.ellipseHeight = 340;
v15.ellipseCenterX = Math.min(v43, v10) + v15.ellipseWidth / 2;
v15.ellipseCenterY = Math.min(v11, v44) - 40;
if (v43 > v10) {
v15.directionMultiplier = 1;
v15.startAngle = 0;
} else {
v15.directionMultiplier = -1;
v15.startAngle = 180;
}
if (v11 < v44) {
var v45 = v11 - v41;
} else {
var v45 = v44 - v41;
}
v12.push({'_x': v43, '_y': v15.ellipseCenterY, '_type': 'rocket_follow_ellipse'});
if (v15.startAngle == 0) {
v15.targetAngle = -180;
} else {
v15.targetAngle = 360;
}
v12.push({'_x': v10, '_y': v11, '_type': 'rocket_explode_city_from_sub'});
v15.finalAction = 'rocket_explode_city_from_sub';
this._toSpawnUnitsArr.push({'unitID': 'unit' + v13, 'player': v2._player, 'weaponID': v4, 'startX': v43, 'startY': v44, 'trgtX': v10, 'trgtY': v11, 'wayPointArr': v12, 'result': v2._result, 'tail': undefined, 'tailNum': undefined, 'force_MC': 'sub_rocket', 'startNum': v14, 'targetPlayer': v2._b, 'tr': v2, 'wildCard': v15, 'explosion_name': v6, '_casualties': v2._casualties});
}
break;
case 'ship':
if (v2._action == 1) {
} else {
if (v2._action == 2) {
var v46 = 0;
for (var sh in v2._attack_arr) {
v12 = [];
v6 = (_global.model.human.weaponStock.getWeaponByID(v2._attack_arr[sh].wpn)).explosion_mc_name;
v15 = new Object();
v15._number = Number(sh);
v15._city = v2._attack_arr[sh].city;
v15._casualties = v2._result_arr[sh]._casualties;
if (v2._attack_arr[sh]._bioload) {
v15.bioload = true;
v15.city = v2._attack_arr[sh].city;
}
v12.push({'_x': _global.view.battleSrcMC['carrier' + v2._player]._x - 112, '_y': _global.view.battleSrcMC['carrier' + v2._player]._y + 54, '_type': 'default'});
var v47 = _global.view.battleSrcMC['carrier' + v2._player]._y + 54;
var v48 = (_global.model.getCityByID(v2._attack_arr[sh].city)).yPos;
var v49 = _global.view.battleSrcMC['carrier' + v2._player]._x - 112;
var v50 = (_global.model.getCityByID(v2._attack_arr[sh].city)).xPos;
if (Math.max(v47, v48) - Math.min(v47, v48) <= 200 && v50 > v49) {
var v51 = (_global.model.getCityByID(v2._attack_arr[sh].city)).yPos;
if (v47 < v48) {
v51 += 150;
} else {
v51 -= 150;
}
v12.push({'_x': _global.view.battleSrcMC['carrier' + v2._player]._x - 112, '_y': v51, '_type': 'default'});
}
if (v2._result_arr[Number(sh)]._result) {
v12.push({'_x': (_global.model.getCityByID(v2._attack_arr[sh].city)).xPos, '_y': (_global.model.getCityByID(v2._attack_arr[sh].city)).yPos - 100, '_type': 'ship_plane_bomb'});
} else {
v15.anti = true;
v15.antiNum = v2._b;
v12.push({'_x': (_global.model.getCityByID(v2._attack_arr[sh].city)).xPos, '_y': (_global.model.getCityByID(v2._attack_arr[sh].city)).yPos - 100, '_type': 'explode'});
}
this._toSpawnUnitsArr.push({'unitID': 'unit_ship' + Number(sh), 'player': v2._player, 'weaponID': v4, 'startX': _global.view.battleSrcMC['carrier' + v2._player]._x + _global.model.ship_plane_start_arr[v46][0], 'startY': _global.view.battleSrcMC['carrier' + v2._player]._y + _global.model.ship_plane_start_arr[v46][1], 'trgtX': (_global.model.getCityByID(v2._attack_arr[sh].city)).xPos, 'trgtY': (_global.model.getCityByID(v2._attack_arr[sh].city)).yPos, 'wayPointArr': v12, 'result': v2._result, 'tail': undefined, 'tailNum': undefined, 'force_MC': 'ship_plane', 'startNum': v14, 'targetPlayer': v2._b, 'tr': v2, 'wildCard': v15, 'explosion_name': v6});
++v46;
}
}
}
break;
case 'space':
v15 = new Object();
v15.targetX = _global.model.satellite_pos_arr[v2._player]._x;
v15.targetY = _global.model.satellite_pos_arr[v2._player]._y;
v15.satellite = true;
v15.cityX = v10;
v15.cityY = v11;
v15.satelliteFrame = _global.model.playerArr[v2._player].religion_code;
v15.laser_hex_color = _global.model.playerArr[v2._player].hexColorTint_str;
this._toSpawnUnitsArr.push({'unitID': 'satellite' + v13, 'player': v2._player, 'weaponID': v4, 'startX': -120, 'startY': _global.model.satellite_height_arr[v2._player], 'result': v2._result, 'tail': undefined, 'tailNum': undefined, 'startNum': v14, 'targetPlayer': v2._b, 'tr': v2, 'wildCard': v15, 'explosion_name': v6});
break;
case 'spy':
this._toSpawnUnitsArr.push({'_building': v2._frame, '_startNum': v14, '_player': v2._player, '_frame': v2._frame, 'tr': v2});
}
} else {
switch (v2._item) {
case 'diplomacy':
this._toSpawnUnitsArr.push({'_building': 'diplomacy', '_startNum': v14, '_player': v2._player, '_frame': 'diplomacy', 'tr': v2});
break;
case 'propaganda':
this._toSpawnUnitsArr.push({'_building': 'propaganda_2', '_startNum': v14, '_player': v2._player, '_frame': 'propaganda_2', '_targetCity_id': v2._city, 'tr': v2});
break;
case 'resources':
this._toSpawnUnitsArr.push({'_building': 'resources', '_startNum': v14, '_player': v2._player, '_frame': 'resources', 'tr': v2});
break;
case 'religion':
this._toSpawnUnitsArr.push({'_building': 'religion', '_startNum': v14, '_player': v2._player, '_frame': 'religion', 'tr': v2});
break;
case 'produce':
this._toSpawnUnitsArr.push({'_building': 'produce', '_startNum': v14, '_player': v2._player, '_frame': 'produce', 'tr': v2});
}
}
}
};
v1.createToShowABArray = function () {
var v2 = 0;
var v3 = 0;
while (v3 <= 1) {
var v4 = _global.model.turnResultsArr[v2];
var v5 = '';
var v6 = v4._weapon;
var v7 = _global.model.human.weaponStock.getWeaponByID(v6);
var v8 = '';
var v9 = false;
var v10 = false;
var v11 = false;
var v12 = false;
var v13 = [false];
var v14;
var v15;
if (v3 == 0 && v4._item) {
v11 = true;
switch (v4._item) {
case 'battle':
v8 = 'init';
switch (v7.weaponName) {
case 'soldier1':
v5 = 'base';
break;
case 'soldier2':
v5 = 'helipad';
v10 = true;
break;
case 'soldier3':
v5 = 'helipad';
v10 = true;
break;
case 'soldier4':
v5 = 'hatch';
v10 = true;
}
switch (v7.weaponType) {
case 'plane':
v9 = true;
v5 = 'airfield';
v12 = true;
break;
case 'rocket':
v9 = true;
v5 = 'silo';
v12 = true;
break;
case 'ship':
if (!v4._dontBeAnAss) {
v5 = 'ship';
v9 = true;
v12 = true;
} else {
v8 = undefined;
}
break;
case 'sub':
v5 = 'sub';
v12 = false;
break;
case 'space':
v5 = 'space';
v12 = true;
}
break;
case 'setPreAttack':
if (v4._value == 'ready') {
v9 = true;
v8 = 'last';
v5 = v4._frame;
} else {
v5 = undefined;
v8 = undefined;
}
break;
default:
v11 = false;
}
} else {
if (v3 == 1 && v4._item) {
v11 = true;
switch (v4._item) {
case 'production_building':
v8 = 'last';
v5 = 'factory';
break;
case 'research_building':
v8 = 'last';
v5 = 'tech';
break;
case 'defense':
v8 = 'last';
if (v4._result) {
if ((_global.model.human.weaponStock.getWeaponByID(v4._value)).weaponName == 'antiAir') {
v13 = [true, 'air'];
v5 = 'antiAir_fire';
} else {
v13 = [true, 'rocket'];
v5 = 'antiRocket_fire';
}
} else {
v8 = 'last';
v5 = v4._frame + '_still';
}
break;
case 'diplomacy':
v8 = 'inBattle';
v5 = 'diplomacy';
break;
case 'propaganda':
v8 = 'inBattle';
v5 = 'propaganda';
v14 = v4._city;
v15 = v4._player;
break;
case 'regard':
v8 = undefined;
break;
case 'bioload':
v8 = undefined;
break;
default:
v11 = false;
}
}
}
if (v11 && !v4._spyArr) {
switch (v8) {
case 'timed':
this._toShowTimedABArr.push({'_player': v4._player, '_frame': v5, '_setPreStart': v9, '_setHeliStart': v10, '_anti_arr': v13, '_value1': v14, '_value2': v15, '_building': true});
break;
case 'init':
var v16 = true;
for (var k in this._toShowInitABArr) {
if (v5 == this._toShowInitABArr[k]._frame && v4._player == this._toShowInitABArr[k]._player) {
v16 = false;
}
}
if (v16) {
this._toShowInitABArr.push({'_player': v4._player, '_frame': v5, '_setPreStart': v9, '_fixedLoc': v12, '_setHeliStart': v10, '_anti_arr': v13, '_value1': v14, '_value2': v15, '_building': true});
}
break;
case 'inBattle':
this._toShowInBattleABArr.push({'_player': v4._player, '_frame': v5, '_setPreStart': v9, '_setHeliStart': v10, '_anti_arr': v13, '_value1': v14, '_value2': v15, '_building': true});
break;
case 'last':
var v17 = true;
for (var k in this._toShowLastABArr) {
if (v5 == this._toShowLastABArr[k]._frame && v4._player == this._toShowLastABArr[k]._player) {
v17 = false;
}
}
if (v17) {
this._toShowLastABArr.push({'_player': v4._player, '_frame': v5, '_setPreStart': v9, '_setHeliStart': v10, '_anti_arr': v13, '_value1': v14, '_value2': v15, '_building': true});
}
}
}
if (v2 < _global.model.turnResultsArr.length - 1) {
++v2;
} else {
v2 = 0;
++v3;
}
}
};
v1.__get__all_turn_buildings_arr = function () {
var v2 = new Array();
for (var k in this._toShowInitABArr) {
v2.push(this._toShowInitABArr[k]);
}
for (var i in this._toShowLastABArr) {
v2.push(this._toShowLastABArr[i]);
}
for (var j in this._toShowTimedABArr) {
v2.push(this._toShowTimedABArr[j]);
}
for (var l in this._toShowInBattleABArr) {
v2.push(this._toShowInBattleABArr[l]);
}
for (var m in this._toSpawnUnitsArr) {
if (this._toSpawnUnitsArr[m]._building) {
v2.push(this._toSpawnUnitsArr[m]);
}
}
for (var n in v2) {
}
return v2;
};
v1.__get__curLastAB = function () {
if (this._toShowLastABArr.length != 0) {
return this._toShowLastABArr.shift();
} else {
return {'_empty': true};
}
};
v1.__get__toShowTimedABArr = function () {
if (this._toShowTimedABArr.length != 0) {
return this._toShowTimedABArr.shift();
} else {
return {'_empty': true};
}
};
v1.__get__toShowInitABArr = function () {
if (this._toShowInitABArr.length != 0) {
return this._toShowInitABArr.shift();
} else {
return {'_empty': true};
}
};
v1.__get__toShowInBattleABArr = function () {
if (this._toShowInBattleABArr.length != 0) {
return this._toShowInBattleABArr.shift();
} else {
return {'_empty': true};
}
};
v1.__get__toShowLastABArr = function () {
if (this._toShowLastABArr.length != 0) {
return this._toShowLastABArr.shift();
} else {
return {'_empty': true};
}
};
v1.__set__curAB = function (_param) {
return this.__get__curAB();
};
v1.getLiftOffPos = function (startPos, weaponType, playerNum) {
this._toShowLastABArr = [];
var v5 = new Array();
switch (playerNum) {
return v5;
case 0:
if (weaponType == 'plane') {
v5 = [580, 195];
}
if (weaponType == 'soldier') {
v5 = [580, 195];
}
return v5;
case 1:
if (weaponType == 'plane') {
v5 = [260, 160];
}
if (weaponType == 'soldier') {
v5 = [260, 160];
}
return v5;
case 2:
if (weaponType == 'plane') {
v5 = [580, 195];
}
if (weaponType == 'soldier') {
v5 = [580, 195];
}
return v5;
case 3:
if (weaponType == 'plane') {
v5 = [280, 415];
}
if (weaponType == 'soldier') {
v5 = [280, 415];
}
return v5;
case 4:
if (weaponType == 'plane') {
v5 = [580, 415];
}
if (weaponType == 'soldier') {
v5 = [580, 415];
}
return v5;
}
return v5;
};
v1.resetBattle = function () {
this.unitCount = 0;
this._toShowTimedABArr = [];
this._toShowInitABArr = [];
this._toShowInBattleABArr = [];
this._toShowLastABArr = [];
this._toSpawnUnitsArr = [];
};
v1.addProperty('toShowLastABArr', v1.__get__toShowLastABArr, function () {});
v1.addProperty('curLastAB', v1.__get__curLastAB, function () {});
v1.addProperty('all_turn_buildings_arr', v1.__get__all_turn_buildings_arr, function () {});
v1.addProperty('toShowInitABArr', v1.__get__toShowInitABArr, function () {});
v1.addProperty('curAB', function () {}, v1.__set__curAB);
v1.addProperty('toShowTimedABArr', v1.__get__toShowTimedABArr, function () {});
v1.addProperty('toShowInBattleABArr', v1.__get__toShowInBattleABArr, function () {});
ASSetPropFlags(v1, null, 1);
v1._toSpawnUnitsArr = new Array();
v1.unitCount = 0;
}
#endinitclip
}
movieClip 5296 __Packages.WD_colors {
#initclip
if (!WD_colors) {
_global.WD_colors = function () {};
var v1 = _global.WD_colors.prototype;
v1.WDII_colors = function () {};
ASSetPropFlags(v1, null, 1);
v1.color_red = {'ra': 50, 'rb': 255, 'ga': 0, 'gb': 0, 'ba': 0, 'bb': 0, 'aa': 75, 'ab': 0};
v1.color_blu = {'ra': 15, 'rb': 0, 'ga': 74, 'gb': 0, 'ba': 100, 'bb': 255, 'aa': 100, 'ab': 0};
v1.color_gre = {'ra': 0, 'rb': 0, 'ga': 50, 'gb': 255, 'ba': 0, 'bb': 0, 'aa': 75, 'ab': 0};
v1.color_yel = {'ra': 50, 'rb': 255, 'ga': 50, 'gb': 255, 'ba': 0, 'bb': 0, 'aa': 75, 'ab': 0};
v1.color_ora = {'ra': 100, 'rb': 91, 'ga': 62, 'gb': 40, 'ba': 0, 'bb': 0, 'aa': 100, 'ab': 0};
v1.color_pur = {'ra': 70, 'rb': 0, 'ga': 40, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0};
v1.city_red = {'ra': 100, 'rb': 200, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 75, 'ab': 0};
v1.city_green = {'ra': 50, 'rb': 0, 'ga': 100, 'gb': 100, 'ba': 50, 'bb': 0, 'aa': 75, 'ab': 0};
v1._default = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0};
}
#endinitclip
}
movieClip 5297 __Packages.Option {
#initclip
if (!Option) {
_global.Option = function () {};
var v1 = _global.Option.prototype;
v1.setSound = function () {
if (!this.sound) {
this.sound = true;
} else {
this.sound = false;
}
};
v1.__get__playSound = function () {
return this.sound;
};
v1.setMusic = function () {
if (!this.music) {
this.music = true;
} else {
this.music = false;
}
};
v1.__get__playMusic = function () {
return this.music;
};
v1.addProperty('playMusic', v1.__get__playMusic, function () {});
v1.addProperty('playSound', v1.__get__playSound, function () {});
ASSetPropFlags(v1, null, 1);
v1.sound = true;
v1.music = true;
}
#endinitclip
}
movieClip 5298 __Packages.Model {
#initclip
if (!Model) {
_global.Model = function () {
super();
this.playing_ambient_sound_arr = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.battle = new Battle();
this.tools = new Tools();
this.text_messages = new WD2_messages();
this.turnResultsArr = new Array();
this.wd_colors = new WD_colors();
this.option = new Option();
this.playedSounds_arr = new Array();
this.soundCount = 0;
this.difficulty_level_specific_vars = new Object();
var v3 = this.difficulty_level_specific_vars;
v3.stock_cap_plr = new Array(4, 4, 4);
v3.stock_cap_enm = new Array(4, 4, 4);
v3.enemy_start_money = new Array(50, 65, 60);
v3.player_start_money = new Array(80, 65, 55);
v3.spy_alert_money = new Array(180, 150, 100);
v3.enemy_start_religion = new Array(30, 40, 60);
v3.player_start_relgion = new Array(80, 60, 20);
v3.spy_steal_money_max = new Array(90, 120, 150);
v3.start_regard_arr = new Array([80, 80, 80, 80, 80], [65, 65, 65, 65, 65], [50, 50, 50, 50, 50]);
if (!this.zs66hj8s) {
v3.player_start_population = new Array(500, 450, 400);
} else {
v3.player_start_population = new Array(250, 250, 200);
}
if (!this.zs66hj8s) {
v3.enemy_start_population = new Array(450, 450, 450);
} else {
v3.enemy_start_population = new Array(200, 250, 205);
}
v3.player_resources_divider = new Array(9, 11, 13);
v3.enemy_resources_divider = new Array(9, 10, 12);
v3.enemy_religion_addition = new Array(45, 35, 25);
v3.player_religion_addition = new Array(30, 30, 25);
this.active_ambient_sounds = new Array();
this.spy_stat_obj = new Object();
this.spy_stat_obj.spy1 = new Object();
this.spy_stat_obj.spy1.weaponStealMax = 5;
this.spy_stat_obj.spy1.moneyStealPrcMax = 20;
this.spy_stat_obj.spy2 = new Object();
this.spy_stat_obj.spy2.weaponStealMax = 7;
this.spy_stat_obj.spy2.moneyStealPrcMax = 40;
this.spy_stat_obj.spy3 = new Object();
this.spy_stat_obj.spy3.weaponStealMax = 9;
this.spy_stat_obj.spy3.moneyStealPrcMax = 60;
this.spy_stat_obj.spy4 = new Object();
this.spy_stat_obj.spy4.weaponStealMax = 12;
this.spy_stat_obj.spy4.moneyStealPrcMax = 80;
this.regard_bonus_table_obj = new Object();
var v4 = this.regard_bonus_table_obj;
v4.preAttack = new Object();
v4.preAttack.attack = new Object();
v4.preAttack.defend = new Object();
v4.preAttack.attack.baseBonus = 8;
v4.preAttack.defend.baseBonus = 8;
v4.preAttack.bystander = new Object();
v4.preAttack.bystander.baseBonus = 6;
v4.preAttack.wpnLevelDef = 4;
v4.attack = new Object();
v4.attack.attack = new Object();
v4.attack.attack.baseBonus = 5;
v4.attack.defend = new Object();
v4.attack.defend.baseBonus = 6;
v4.attack.bystander = new Object();
v4.attack.bystander.baseBonus = 4;
v4.attack.wpnLevelMultiplier = 4;
v4.propaganda = new Object();
v4.propaganda.attack = new Object();
v4.propaganda.defend = new Object();
v4.propaganda.bystander = new Object();
v4.propaganda.attack.baseBonuss = 6;
v4.propaganda.defend.baseBonus = 6;
v4.propaganda.bystander.baseBonus = 4;
v4.no_retal_bonus = 3;
v4.sameReligion_bonus = 4;
v4.standard_regard_bonus = 4;
v4.diplomacyBonus = 3;
System.security.allowDomain('www.totallygame.com');
_root.hs_list = false;
_root.hs_score = 0;
_root.is_time = false;
_root.hs_gameid = 39;
_root.hs_requesturl = 'www.totallygame.com';
};
_global.Model extends Sub_model;
var v1 = _global.Model.prototype;
v1.get_cur_preAttack_arr = function (param_player) {
var v3 = [];
for (var i in this.activePlayerArr) {
if (this.activePlayerArr[i].preAttackStatus == 'ready' && (this.activePlayerArr[i].playerNum != param_player.playerNum && !param_player.ceaseFireArr[this.activePlayerArr[i].playerNum]._status)) {
for (var j in this.activePlayerArr[i].turnActionArr) {
var v4 = this.activePlayerArr[i].strength;
v3.push({'player': this.activePlayerArr[i], 'turnAction': this.activePlayerArr[i].turnActionArr[j], 'weapon': this.activePlayerArr[i].turnActionArr[j].attackWeapon, '_strength': v4});
}
}
}
return v3;
};
v1.set_city_position_to_array = function () {
var v2 = 0;
goto 5774;
for (;;) {
++v2;
label 5774:
if (v2 >= this.playerArr.length) break;
var v3 = 0;
goto 5826;
for (;;) {
++v3;
label 5826:
if (v3 >= this.cityPositions.length) break;
this.cityPositions[v2][v3] = [_global.view.battleSrcMC['citypos' + v2 + '_' + v3]._x, _global.view.battleSrcMC['citypos' + v2 + '_' + v3]._y];
}
}
};
v1.get_random_set_enemy = function (a_plr, a_num) {
var v4 = new Array();
var v5 = 0;
for (var i in this.playerArr) {
if (this.playerArr[i] != a_plr && (this.playerArr[i].playerNum != a_num && this.playerArr[i].alive)) {
v4.push(this.playerArr[i]);
}
}
v5 = this.tools.randRange(0, v4.length - 1);
if (!v5) {
v5 = 0;
}
return v5;
};
v1.getPlayerData = function (param_action, param_player) {
switch (param_action) {
case 'smallestCitySize':
var v4 = param_player.cityArr[0].population;
for (var i in param_player.cityArr) {
if (param_player.cityArr[i].population > 0) {
v4 = Math.min(v4, param_player.cityArr[i].population);
}
}
return v4;
break;
case 'largestCitySize':
var v5 = param_player.cityArr[0].population;
for (var i in param_player.cityArr) {
v5 = Math.max(v5, param_player.cityArr[i].population);
}
return v5;
break;
case 'largestCity':
var v6 = param_player.cityArr[0];
for (var i in param_player.cityArr) {
if (v6.population < param_player.cityArr[i].population) {
v6 = param_player.cityArr[i];
}
}
return v6;
break;
case 'largestCityOnTheMapSize':
var v7 = 0;
for (var i in this.activePlayerArr) {
for (var j in this.activePlayerArr[i].cityArr) {
v7 = Math.max(this.activePlayerArr[i].cityArr[j].population, v7);
}
}
return v7;
break;
case 'playerStrength':
return param_player.techLevel;
break;
case 'weaponStock':
return param_player.weaponStockLevel;
break;
case 'largestNuclKill':
var v8 = ['warhead1', 'warhead2', 'warhead3', 'warhead4'];
var v9 = (param_player.weaponStock.getWeaponByName(v8[0])).maxKills;
for (var i in v8) {
if ((param_player.techTree.getTechByName(v8[i])).invented) {
v9 = Math.max((param_player.weaponStock.getWeaponByName(v8[i])).maxKills, v9);
}
}
return v9;
break;
case 'largestBioKill':
var v10 = ['bioload1', 'bioload2', 'bioload3', 'bioload4'];
var v11 = (param_player.weaponStock.getWeaponByName(v10[0])).maxKills;
for (var i in v10) {
if ((param_player.techTree.getTechByName(v10[i])).invented) {
v11 = Math.max((param_player.weaponStock.getWeaponByName(v10[i])).maxKills, v11);
}
}
return v11;
break;
case 'techCount':
var v12 = 0;
for (var i in param_player.techTree.techArr) {
if (param_player.techTree.techArr[i].invented) {
++v12;
}
}
return v12;
}
};
v1.calcPoints = function (param_player) {
var v3 = 0;
var v4 = 0;
var v5 = 0;
var v6 = 0;
var v7 = 0;
var v8 = 0;
v4 = this.decisionPoints.attack.base - param_player.lowestRegardNum / 2;
if (v4 < 0) {
v4 = 0;
}
if (param_player.preAttackStatus == 'ready') {
v4 += 200;
}
if (param_player.preAttackStatus != 'ready' && (param_player.weaponStock.availableWeaponsArr.length <= 0 && !param_player.weaponStock.spyAvailable)) {
v3 += v4;
v4 = -999;
} else {
if (param_player.preAttackStatus == 'ready' && !param_player.weaponStock.payloadAvailable(param_player.preAttackWeapon)) {
v3 += v4;
v4 = -999;
}
}
if (param_player.special_person) {
if ((param_player.weaponStock.getWeaponByName('ship')).inStock < 0) {
v3 += v4;
v4 = -999;
} else {
if ((param_player.weaponStock.getWeaponByName('warhead3')).inStock < 3) {
v3 += v4;
v4 = -999;
}
}
}
if (param_player.suicide_person) {
if ((param_player.weaponStock.getWeaponByName('soldier4')).inStock < 2) {
v3 += v4;
v4 = -999;
}
}
var v9 = this.get_cur_preAttack_arr(param_player);
param_player.preCounterEnemy = [];
for (var i in v9) {
var v10 = 0;
var v11 = v9[i].player;
v10 = this.decisionPoints.preCounter.base - param_player.regardArr[v11.playerNum];
if (this.decisionPoints.preCounter.minPopForBonus > param_player.population) {
v10 += this.decisionPoints.preCounter.lowPopBonus;
}
if (v10 > v5) {
v5 = v10;
param_player.preCounterEnemy = [v9[i]];
} else {
if (v10 == v5) {
param_player.preCounterEnemy.push(v9[i]);
}
}
}
v6 = this.decisionPoints.religion.base - param_player.religion;
var v12 = 0;
for (var i in this.activePlayerArr) {
if (this.activePlayerArr[i].population > v12) {
v12 = this.activePlayerArr[i].population;
}
}
v6 += Math.round((param_player.population / v12) * 100) - param_player.religion - 20;
var v13 = this.decisionPoints.propaganda.base;
if (param_player.religion < 30) {
v6 += v13;
}
if (param_player.religion > 90) {
v13 += this.decisionPoints.propaganda.highReligionBonus * 2;
} else {
if (param_player.religion > 60) {
v13 += this.decisionPoints.propaganda.highReligionBonus;
}
}
v7 = this.tools.randRange(0, 90);
if (this.tools.randRange(1, 3) == 2) {
v7 = 0;
}
if (param_player.money < 150) {
v8 = this.decisionPoints.resources.base - Math.round(param_player.weaponStockLevel);
v8 += this.decisionPoints.resources.reserveBase - param_player.money / this.decisionPoints.resources.maxFunds / 100;
}
if (param_player.special_person) {
if ((param_player.weaponStock.getWeaponByName('ship')).inStock < 1) {
v8 += 250;
}
if ((param_player.weaponStock.getWeaponByName('warhead3')).inStock < 3) {
v8 += 250;
}
}
var v14 = param_player.weaponStockLevel;
v3 += this.decisionPoints.production.base - Math.round(v14);
var v15 = 0;
var v16 = 0;
for (var i in this.activePlayerArr) {
if (this.activePlayerArr[i].weaponStockLevel > v14) {
v3 += this.decisionPoints.production.enemy_stock_bonus;
}
}
v3 += v15 / this.activePlayerArr.length;
v3 += param_player.money;
if (param_player.money <= 20) {
v8 += v3;
v3 = 0;
}
var v17 = 0;
var v18 = 0;
if (param_player.special_person && v3 > 0) {
if (!(param_player.techTree.getTechByName('ship')).invented) {
v17 += v3;
v3 = -10;
} else {
if (!(param_player.techTree.getTechByName('warhead3')).invented) {
v17 += v3;
v3 = -10;
}
}
}
if (param_player.suicide_person && v3 > 0) {
if (!(param_player.techTree.getTechByName('soldier4')).invented) {
v18 += v3;
}
}
var v19 = Math.min(this.decisionPoints.research.turnCap, this.turn);
var v20 = this.getPlayerData('largestNuclKill', param_player) + this.getPlayerData('largestBioKill', param_player);
var v21 = Math.min(this.decisionPoints.research.base, this.getPlayerData('largestCityOnTheMapSize', param_player) - v20);
v21 += v17;
v21 += v18;
v21 += (this.turn / this.getPlayerData('techCount', param_player)) * this.decisionPoints.research.techTurnRatioMultiplier;
v21 += param_player.money;
if (param_player.money <= Math.round(param_player.population / this.difficulty_level_specific_vars.enemy_resources_divider[this.difficulty_level]) * 2) {
v8 += v21;
v21 = 10;
}
if (param_player.special_person && ((param_player.techTree.getTechByName('ship')).invented && ((param_player.techTree.getTechByName('warhead3')).invented && v21 > 0))) {
v3 += v21;
v21 = -100;
}
param_player.actionArr = [{'id': '_attack', 'amount': v4}, {'id': 'preCounter', 'amount': v5, 'target': param_player.preCounterEnemy}, {'id': 'propaganda', 'amount': v13}, {'id': 'diplomacy', 'amount': v7}, {'id': 'religion', 'amount': v6}, {'id': 'resources', 'amount': v8}, {'id': 'produce', 'amount': v3}, {'id': 'research', 'amount': v21}];
for (var i in param_player.actionArr) {
if (param_player.isBioloaded(param_player.actionArr[i].id)) {
param_player.actionArr[i].splice(Number(i), 1);
}
}
if (param_player.special_person && ((param_player.weaponStock.getWeaponByName('ship')).inStock > 0 && (param_player.weaponStock.getWeaponByName('warhead3')).inStock > 1)) {
v4 += 50;
}
param_player.actionArr.sortOn('amount', Array.NUMERIC | Array.DESCENDING);
param_player.turnAction_1.action = param_player.actionArr[0].id;
param_player.turnAction_2.action = param_player.actionArr[1].id;
if (param_player.actionArr[0].amount - 50 > param_player.actionArr[1].amount && param_player.actionArr[0].id == '_attack') {
param_player.turnAction_2.action = '_attack';
}
};
v1.selectCounterWeapon = function (param_player, param_plr_TA, param_enemy, param_nmy_TA) {
if (param_nmy_TA.attackWeapon.weaponType == 'rocketload' && param_player.weaponStock.antiRocket.inStock > 0) {
param_plr_TA.attackWeapon = param_player.weaponStock.antiRocket;
} else {
if (param_nmy_TA.attackWeapon.weaponType == 'plane' && param_player.weaponStock.antiAir.inStock > 0) {
param_plr_TA.attackWeapon = param_player.weaponStock.antiAir;
} else {
return 'none';
}
}
};
v1.getTarget = function (param_player, param_TA) {
switch (param_TA.action) {
case 'reset':
return false;
break;
case 'set_attack':
param_TA.action = 'attack';
return true;
break;
case '_attack':
var v4 = true;
var v5 = true;
var v6 = true;
var v7 = false;
var v9 = param_player.preAttackWeapon;
if (param_TA.num == 1) {
var v8 = param_player.turnAction_2;
if (param_player.turnAction_2.action == 'attack') {
v4 = true;
v5 = false;
} else {
if (param_player.turnAction_2.action == 'preAttack') {
v4 = false;
v5 = true;
} else {
if (param_player.turnAction_2.action == '_attack') {
v4 = true;
v5 = true;
v7 = true;
}
}
}
} else {
if (param_TA.num == 2) {
var v8 = param_player.turnAction_1;
if (param_player.turnAction_1.action == 'attack') {
v4 = true;
v5 = false;
} else {
if (param_player.turnAction_1.action == 'preAttack') {
v4 = false;
v5 = true;
} else {
if (param_player.turnAction_1.action == '_attack') {
v4 = true;
v5 = true;
v7 = true;
}
}
}
}
}
var v10 = 0;
var v11 = 0;
for (var i in this.activePlayerArr) {
if (this.activePlayerArr[i].playerNum != param_player.playerNum && !param_player.ceaseFireArr[this.activePlayerArr[i].playerNum]._status) {
var v12 = 100 - param_player.regardArr[this.activePlayerArr[i].playerNum];
if (v12 < 0) {
}
if (this.activePlayerArr[i].religion_code != param_player.religion_code) {
}
if (this.activePlayerArr[i].playerNum == param_player.primary_enemy) {
v12 += 1;
}
if (this.activePlayerArr[i].playerNum == param_player.secundary_enemy) {
}
if (v12 > v10) {
v10 = v12;
param_TA.targetPlayer = this.activePlayerArr[i];
}
}
}
var v13 = new Array();
for (var i in this.activePlayerArr) {
if (this.activePlayerArr[i] != param_player && !param_player.ceaseFireArr[this.activePlayerArr[i].playerNum]._status) {
v13.push(this.activePlayerArr[i]);
}
}
if (!param_TA.targetPlayer) {
var v14 = 100;
for (var i in v13) {
if (this.activePlayerArr[i] != param_player && (this.activePlayerArr[i].population > 0 && (param_player.regardArr[this.activePlayerArr[i].playerNum] <= v14 && !param_player.ceaseFireArr[this.activePlayerArr[i].playerNum]._status))) {
v14 = param_player.regardArr[this.activePlayerArr[i].playerNum];
param_TA.targetPlayer = this.activePlayerArr[i];
}
}
}
if (!param_TA.targetPlayer) {
param_TA.targetPlayer = v13[this.tools.randRange(0, v13.length - 1)];
}
if (!param_TA.targetPlayer) {
return false;
}
if (v7 && this.tools.randRange(0, 2)) {
v7 = false;
v8.action = 'reset';
}
var v15 = param_player.weaponStock.availableWeaponsArr;
param_TA.targetCity = undefined;
param_TA.attackWeapon = undefined;
v15.sortOn('maxKills', Array.NUMERIC | Array.DESCENDING);
var v16 = 0;
var v18 = false;
var v19 = 0;
var v21 = false;
var v22 = 0;
var v23 = false;
if (v7 && param_player.preAttackStatus == 'ready') {
for (var i in param_player.weaponStock.weaponArr) {
var v24 = param_player.weaponStock.weaponArr[i];
if ((v24.weaponCategory == 'payload' || v24.weaponCategory == 'specialLoad') && (v24.inStock > 0 && (v24.weaponLevel <= v9.weaponLevel && v24.active))) {
v18 = true;
}
if (v24.weaponCategory == 'conventional' && (v24.inStock > 0 && v24.active)) {
v21 = true;
}
}
if (!v18 || !v21) {
v7 = false;
v8.action = 'reset';
}
}
if (v7 || param_player.preAttackWeapon.weaponName == 'ship') {
if (param_player.preAttackStatus == 'ready') {
if (param_player.preAttackWeapon.weaponName == 'ship' && !v8.ship_attack_arr) {
var v25 = param_player.weaponStock.instock_active_payloads_perStock;
var v26 = 0;
var v27 = false;
var v28 = new Array();
var v29 = new Array();
var v30 = new Array();
var v31 = 0;
goto 13479;
for (;;) {
++v31;
label 13479:
if (v31 >= v25.length) break;
if (v25[v31].weaponLevel > 3) {
v25.splice(v31, 1);
}
}
param_TA.action = 'preAttack';
param_TA.preAttackCarrier = param_player.preAttackWeapon;
if (v25.length < 3) {
v26 = 3 - v25.length;
v27 = true;
}
var v32 = 0;
goto 13655;
for (;;) {
++v32;
label 13655:
if (v32 >= 3) break;
var v33 = 0;
var v36 = 0;
goto 13714;
for (;;) {
++v36;
label 13714:
if (v36 >= v25.length) break;
var v37 = v25[v36];
if (v37.maxKills > v33 && v37.weaponLevel < 4) {
v33 = v37.maxKills;
var v34 = v37;
var v35 = v36;
}
}
v28.push(v34);
v25.splice(v35, 1);
}
for (var i in param_TA.targetPlayer.cityArr) {
var v38 = param_TA.targetPlayer.cityArr[i];
if (v38.population > 0) {
v29.push(v38);
}
}
param_TA.ship_attack_arr = new Array();
var v39 = 0;
goto 14021;
for (;;) {
++v39;
label 14021:
if (v39 >= 3) break;
var v40 = this.tools.randRange(0, v29.length - 1);
param_TA.ship_attack_arr.push({'city': v29[v40].cityID, 'wpn': v28[v39].weaponID});
}
for (var i in v15) {
var v41 = v15[i];
if (v41.weaponCategory == 'conventional' && v41.maxKills > v19) {
v19 = v41.maxKills;
var v20 = v41;
}
}
for (var i in param_TA.targetPlayer.cityArr) {
var v42 = param_TA.targetPlayer.cityArr[i];
if (v42.population > 0) {
v8.action = 'attack';
v8.targetCity = v42;
v8.attackWeapon = v20;
v8.targetPlayer = param_TA.targetPlayer;
break;
}
}
} else {
var v43 = param_player.weaponStock.instock_active_payloads;
for (var i in v15) {
var v44 = v15[i];
if (v44.weaponCategory == 'conventional' && v44.maxKills > v19) {
v19 = v44.maxKills;
var v20 = v44;
}
}
var v17 = param_player.weaponStock.get_MaxKillPayload(v9);
v16 = v17.maxKills;
v22 = v16 + v19;
var v45 = 0;
for (var i in param_TA.targetPlayer.cityArr) {
var v46 = param_TA.targetPlayer.cityArr[i];
if (v46.population < v22 && (v46.population > v45 && v46.population > 0)) {
v45 = v46.population;
v23 = true;
param_TA.action = 'preAttack';
param_TA.targetCity = v46;
param_TA.attackWeapon = v17;
param_TA.preAttackPayload = v17;
param_TA.preAttackCarrier = param_player.preAttackWeapon;
v8.action = 'set_attack';
v8.targetCity = v46;
v8.attackWeapon = v20;
v8.targetPlayer = param_TA.targetPlayer;
}
}
if (!v23) {
param_TA.action = 'preAttack';
param_TA.targetCity = this.select_random_city(param_TA.targetPlayer);
param_TA.attackWeapon = v17;
param_TA.preAttackPayload = v17;
param_TA.preAttackCarrier = param_player.preAttackWeapon;
v8.action = 'attack';
v8.attackWeapon = v20;
v8.targetCity = this.select_random_city(param_TA.targetPlayer);
v8.targetPlayer = param_TA.targetPlayer;
}
}
} else {
var v47 = this.tools.randRange(1, 2);
if (v47 == 1) {
param_TA.action = 'preAttack';
v8.action = 'reset';
param_TA.preAttackCarrier = param_player.weaponStock.randomAvailableCarrier;
}
if (v47 == 2) {
param_TA.action = 'attack';
param_TA.targetCity = this.select_random_city(param_TA.targetPlayer);
v8.targetPlayer = param_TA.targetPlayer;
v8.action = 'reset';
var v48 = [];
for (var i in v15) {
var v49 = v15[i];
if (v49.weaponType == 'soldier') {
v48.push(v49);
}
}
param_TA.attackWeapon = v48[this.tools.randRange(0, 3)];
}
}
} else {
if (!v7) {
var v50 = param_player.weaponStock.instock_active_payloads;
v16 = 0;
if (param_player.preAttackStatus == 'ready') {
for (var i in v50) {
var v51 = v50[i];
if (v51.weaponCategory == 'payload' && (v51.maxKills > v16 && v51.weaponLevel <= param_player.preAttackWeapon.weaponLevel)) {
v16 = v51.maxKills;
var v17 = v51;
} else {
if (v51.weaponCategory == 'specialLoad' && param_player.preAttackWeapon.weaponName == 'space') {
v16 = v51.maxKills;
var v17 = v51;
}
}
}
param_TA.attackWeapon = v17;
param_TA.preAttackPayload = param_TA.attackWeapon;
param_TA.preAttackCarrier = param_player.preAttackWeapon;
param_TA.action = 'preAttack';
for (var i in param_TA.targetPlayer.cityArr) {
var v52 = param_TA.targetPlayer.cityArr[i];
if (v52.population <= v16 && v52.population > 0) {
param_TA.targetCity = v52;
v23 = true;
v23 = true;
}
}
if (!v23) {
param_TA.targetCity = this.select_random_city(param_TA.targetPlayer);
}
} else {
var v54 = param_player.weaponStock.allowPre;
var v55 = param_player.weaponStock.allowDir;
if (v55 && v54) {
var v53 = this.tools.randRange(1, 2);
} else {
if (!v55 && v54) {
var v53 = 1;
} else {
if (v55 && !v54) {
var v53 = 2;
}
}
}
if (v53 == 1) {
param_TA.action = 'preAttack';
v8.action = 'reset';
param_TA.preAttackCarrier = param_player.weaponStock.randomAvailableCarrier;
}
if (v53 == 2) {
param_TA.action = 'attack';
param_TA.targetCity = this.select_random_city(param_TA.targetPlayer);
v8.action = 'reset';
var v56 = [];
for (var i in v15) {
var v57 = v15[i];
if (v57.weaponType == 'soldier') {
v56.push(v57);
}
}
param_TA.attackWeapon = v56[this.tools.randRange(0, 3)];
}
}
}
}
var v58 = param_player.weaponStock.availableSpies_obj;
var v59 = new Object();
v59._level = 0;
v59._amount = 0;
v59._plr = undefined;
var v61 = 0;
var v62 = false;
if (param_player.weaponStock.spyAvailable) {
for (var i in this.activePlayerArr) {
v61 = 0;
var v63 = this.activePlayerArr[i];
var v60 = v63.weaponStock.inStock_perLevel_obj;
var v64 = 1;
goto 16495;
for (;;) {
++v64;
label 16495:
if (v64 >= 5) break;
if (v60['_level' + v64] > v59._amount && (v64 > v59._level && (v63 != param_player && (v60['_level' + v64] >= this.AI_spy_required_stock_obj['_level' + v64] && (v58['_level' + v64] > 0 && param_player.spy_readiness / 25 >= v64))))) {
v59._amount = v60['_level' + v64];
v59._level = v64;
v59._plr = v63;
}
}
}
if (this.human.money > this.tools.randRange(this.difficulty_level_specific_vars.spy_alert_money[this.difficulty_level], 240)) {
v59._level = param_player.weaponStock.get_highest_spy_level();
v59._plr = this.human;
v62 = true;
}
}
if (!param_TA.attackWeapon && (!param_TA.preAttackCarrier && v59._plr)) {
v62 = true;
} else {
if (param_TA.attackWeapon && (!param_TA.preAttackCarrier && v59._plr)) {
var v65 = this.tools.randRange(0, 6);
if (v65 == 3) {
v62 = true;
}
}
}
if (v62) {
if (param_player.turnAction_1.action == 'attack' || param_player.turnAction_1.action == 'set_attack') {
var v66 = param_player.turnAction_1;
} else {
if (param_player.turnAction_2.action == 'attack' || param_player.turnAction_2.action == 'set_attack') {
var v66 = param_player.turnAction_2;
} else {
var v66 = param_TA;
}
}
v66.action = 'attack';
v66.attackWeapon = param_player.weaponStock.select_spy_by_level(v59._level);
v66.targetCity = this.select_random_city(v59._plr);
v66.spyBuilding = this.spyBuildingArr[this.tools.randRange(1, this.spyBuildingArr.length - 1)];
v66.targetPlayer = v59._plr;
param_TA = v66;
}
if (!param_TA.attackWeapon && !param_TA.preAttackCarrier) {
return false;
}
if (param_TA.preAttackCarrier && (param_player.preAttackStatus == 'ready' && (!param_TA.preAttackPayload && !param_TA.ship_attack_arr))) {
return false;
}
return true;
break;
case 'preCounter':
param_player.preCounterEnemy.sortOn('_strength', Array.DESCENDING | Array.NUMERIC);
var v67 = 0;
goto 17520;
for (;;) {
++v67;
label 17520:
if (v67 >= param_player.preCounterEnemy.length) break;
if (param_player.preCounterEnemy[v67].player.preAttackWeapon) {
var v68 = param_player.preCounterEnemy[v67].player;
var v69 = param_player.preCounterEnemy[v67].turnAction;
var v70 = param_player.weaponStock.getWeaponByName(param_player.preCounterEnemy[v67].player.preAttackWeapon.counteredBy);
if (v70.inStock > 0) {
param_TA.attackWeapon = v70;
return true;
}
}
}
return false;
break;
case 'propaganda':
var v71 = 0;
var v72 = 0;
var v73 = 0;
var v74 = 0;
for (var i in this.activePlayerArr) {
var v75 = this.activePlayerArr[i];
if (!param_player.ceaseFireArr[v75.playerNum]._status && v75 != param_player) {
v73 = 100 - v75.religion;
v73 += (v75.largest_city()).population;
v73 -= param_player.regardArr[v75.playerNum];
if (v73 > v71) {
v71 = v73;
param_TA.targetPlayer = v75;
param_TA.targetCity = v75.largest_city();
}
}
}
if (!param_TA.targetPlayer || !param_TA.targetCity) {
return false;
} else {
return true;
}
break;
case 'diplomacy':
var v80 = false;
var v82 = false;
var v83 = '';
for (var i in this.activePlayerArr) {
var v77 = this.activePlayerArr[i];
if (v77 != param_player && !param_player.ceaseFireArr[v77.playerNum]._status) {
if (!storedv78) {
var v78 = v77.population;
var v76 = v77;
} else {
if (storedv78 > v77.population) {
var v76 = v77;
var v78 = v77.population;
}
}
}
}
if (v76.money > param_player.money) {
var v81 = v76;
v82 = true;
}
v78 = undefined;
var v84 = 0;
for (var i in this.activePlayerArr) {
v77 = this.activePlayerArr[i];
if (v77 != param_player && (!param_player.ceaseFireArr[v77.playerNum]._status && !param_player.diplomacy_offeredLastTurn[v77.playerNum])) {
v84 = this.tools.randRange(1, 5);
if (!v78 || v84 > v78) {
v78 = v84;
var v85 = v77;
}
}
}
if (v85.population > param_player.population) {
var v79 = v85;
v80 = true;
}
if (!param_player.ceaseFireArr[0]._status && !param_player.diplomacy_offeredLastTurn[0]) {
if (this.human.money > 50 && param_player.regardArr[0] < 50) {
v81 = this.human;
v82 = true;
}
if (param_player.money > 50 && param_player.regardArr[0] > 50) {
v79 = this.human;
v80 = true;
}
}
if (v80 && v82) {
if (this.tools.randRange(0, 1) == 1) {
v83 = 'offer';
} else {
v83 = 'demand';
}
} else {
if (v80) {
v83 = 'offer';
} else {
if (v82) {
v83 = 'demand';
}
}
}
if (v83 == 'offer') {
var v86 = 0;
goto 19008;
for (;;) {
++v86;
label 19008:
if (v86 >= this.diplomacy_options_arr.length) break;
if (this.diplomacy_options_arr[v86][0] == 'offer' && this.diplomacy_options_arr[v86][2] < param_player.turnMoney) {
param_TA.diplomacyLeader = v79.playerNum;
param_TA.diplomacyOption = Number(v86);
}
}
} else {
var v87 = 0;
goto 19169;
for (;;) {
++v87;
label 19169:
if (v87 >= this.diplomacy_options_arr.length) break;
if (this.diplomacy_options_arr[v87][0] == 'demand' && this.diplomacy_options_arr[v87][2] < v81.money) {
param_TA.diplomacyLeader = v81.playerNum;
param_TA.diplomacyOption = Number(v87);
}
}
}
if (param_TA.diplomacyLeader || param_TA.diplomacyLeader == 0) {
return true;
} else {
return false;
}
break;
case 'religion':
return true;
break;
case 'resources':
if (param_player.money < 150) {
return true;
} else {
return false;
}
break;
case 'produce':
var v88 = new Array();
var v89 = 0;
var v90 = 0;
var v91 = 0;
goto 19483;
for (;;) {
++v91;
label 19483:
if (v91 >= 8) break;
v89 = 0;
for (var j in param_player.weaponStock.weaponArr) {
var v92 = param_player.weaponStock.weaponArr[j];
if (v92.desire > v92.inStock && (v91 == v92.desireGroup && param_player.weaponStock.is_activeCategory(v92.desireGroup))) {
v89 += v92.desire - v92.inStock;
}
}
v88.push({'_cat': v91, '_dif': v89, '_perc': 0});
}
v88.sortOn('_dif', Array.DESCENDING | Array.NUMERIC);
var v93 = this.tools.randRange(1, 4);
if (param_player.special_person) {
v93 = 2;
}
if (param_player.suicide_person) {
v93 = 1;
}
var v94 = 0;
if (param_player.weaponStock.antiAir.inStock < 1 || param_player.weaponStock.antiRocket.inStock < 1) {
v94 = this.tools.randRange(20, 35);
v90 = v94;
}
var v95 = Math.round(this.tools.randRange(80, 100) / 10) * 10;
var v96 = 0;
var v97 = 0;
goto 20094;
for (;;) {
++v97;
label 20094:
if (v97 >= v93) break;
if (param_player.weaponStock.is_activeCategory(v88[v97]._cat)) {
if (param_player.weaponStock.active_dCat_count() < 4) {
v96 = Math.round(this.tools.randRange(40, 60) / 10) * 10;
} else {
v96 = Math.round(this.tools.randRange(0, 60) / 10) * 10;
}
if (param_player.special_person) {
v96 = 50;
}
if (v90 + v96 > v95) {
v96 = v95 - v90;
v90 = v95;
} else {
v90 += v96;
}
v88[v97]._perc = v96;
}
}
v88.sortOn('_cat');
var v98 = 0;
var v99 = 0;
goto 20491;
for (;;) {
++v99;
label 20491:
if (v99 >= 9) break;
if (param_TA.productionInvestmentArr[v99][0] == 'defense') {
param_TA.productionInvestmentArr[v99][1] = v94;
param_TA.productionInvestmentArr[v99][3] = Math.floor((param_player.turnMoney / 100) * v94);
} else {
var v100 = 0;
goto 20662;
for (;;) {
++v100;
label 20662:
if (v100 >= 9) break;
if (param_TA.productionInvestmentArr[v100][2] == v88[v99]._cat) {
param_TA.productionInvestmentArr[v100][1] = v88[v99]._perc;
param_TA.productionInvestmentArr[v100][3] = Math.floor((param_player.turnMoney / 100) * v88[v99]._perc);
}
}
}
v98 += param_TA.productionInvestmentArr[v99][3];
}
param_player.turnMoney -= v98;
param_TA.action = 'production';
return true;
break;
case 'research':
var v101 = [];
var v102 = new Array();
var v103 = 0;
if (param_TA.num == 2) {
v103 = param_player.turnMoney;
} else {
v103 = Math.round((param_player.turnMoney / 100) * this.tools.randRange(20, 80));
}
if (param_player.special_person) {
v103 = param_player.turnMoney;
}
for (var i in param_player.techTree.techArr) {
var v104 = param_player.techTree.techArr[i];
if (!v104.invented && (param_player.money > v104.cost && (v104.requiredTech.invented || v104.techLevel == 1))) {
if (v104.desireGroup != 7) {
v101.push(v104);
} else {
if (param_player.techTree.allow_special) {
v101.push(v104);
}
}
}
}
v101.sortOn('desire', Array.DESCENDING | Array.NUMERIC);
var v105 = 0;
goto 21392;
for (;;) {
++v105;
label 21392:
if (v105 >= v101.length) break;
var v106 = v101[v105];
if (v103 > v106.cost && (v101[v105].desire > 0 || param_player.special_person)) {
v102.push({'techID': v106.techID});
v103 -= v106.cost;
param_player.turnMoney -= v106.cost;
}
}
param_TA.researchArr = v102;
if (!param_TA.researchArr[0]) {
return false;
} else {
return true;
}
}
};
v1.populationPercentage = function (_plr) {
var v3 = 0;
for (var i in this.activePlayerArr) {
v3 += this.activePlayerArr[i].population;
}
return Math.round((_plr.population / v3) * 100);
};
v1.killPlayer = function (param_plr) {
for (var i in param_plr.cityArr) {
param_plr.cityArr[i].population = 0;
param_plr.cityArr[i].removeBioload();
param_plr.cityArr[i].image.gotoAndStop('empty');
}
var v3 = 0;
goto 21948;
for (;;) {
++v3;
label 21948:
if (v3 >= this.activePlayerArr.length) break;
if (this.activePlayerArr[v3].playerNum == param_plr.playerNum) {
this.activePlayerArr.splice(v3, 1);
}
}
for (var k in this.playerArr) {
if (!this.playerArr[k].alive && this.playerArr[k].lastAttackedBy_num == param_plr.playerNum) {
this.playerArr[k].lastattackedby_num = param_plr.lastAttackedBy_num;
}
}
param_plr.kill();
};
v1.calcBattle = function (plr, plr_TA) {
var v4 = plr_TA.targetPlayer;
if (v4.counterWeapon.weaponName == plr_TA.preAttackCarrier.counteredBy) {
v4.weaponStock.reduceWeaponByname(v4.counterWeapon.weaponName);
} else {
plr_TA.targetCity.population -= plr_TA.attackWeapon.maxKills;
if (plr.playedBy == 'AI' && plr.regardArr[v4.playerNum] > 0) {
plr.regardArr[v4.playerNum] -= 8;
}
if (v4.playedBy == 'AI' && v4.regardArr[plr.playerNum] > 0) {
v4.regardArr[plr.playerNum] -= 8;
}
}
plr.weaponStock.reduceWeaponByName(plr_TA.attackWeapon.weaponName, 1);
};
v1.AI_consider_diplomacyArr = function (_plr, _arr) {
var v4 = this.diplomacy_options_arr[_arr._option];
var v5 = v4[1];
var v6 = v4[2];
var v7 = this.playerArr[_arr._leader];
var v8 = 2;
var v9 = 0;
if (v4[0] == 'offer') {
if (_plr.regardArr[_arr._leader] > 50) {
++v8;
} else {
++v9;
}
v8 += _arr._option * 4;
if (_plr.strength < v7.strength) {
++v8;
} else {
++v9;
}
if (v7.population > _plr.population) {
++v8;
}
if (_plr.money < 30) {
++v8;
}
} else {
if (v4[0] == 'demand') {
if (_plr.regardArr[_arr._leader] > 50) {
++v8;
} else {
++v9;
}
v9 += Math.round(_arr._option / 2);
if (_plr.strength < v7.strength) {
++v8;
} else {
++v9;
}
if (_plr.strength < v7.strength / 2) {
v8 += 2;
} else {
++v9;
}
if (v7.population > _plr.population) {
++v8;
} else {
++v9;
}
}
}
if (v8 > v9) {
if (v4[0] == 'demand') {
if (_plr.turnMoney >= v4[2]) {
_plr.diplomacyAcceptedArr.push(_arr);
_plr.turnMoney -= v4[2];
} else {
_plr.diplomacyRejectedArr.push(_arr);
}
} else {
if (v4[0] == 'offer') {
_plr.diplomacyAcceptedArr.push(_arr);
}
}
} else {
_plr.diplomacyRejectedArr.push(_arr);
}
};
v1.doTurn = function () {
for (var i in this.activePlayerArr) {
if (this.activePlayerArr[i] != this.human) {
var v2 = this.activePlayerArr[i];
v2.turnMoney = v2.money;
if (v2.diplomacyPendingArr[0]) {
for (var j in v2.diplomacyPendingArr) {
this.AI_consider_diplomacyArr(v2, v2.diplomacyPendingArr[j]);
v2.diplomacyPendingArr[j] = undefined;
}
v2.diplomacyPendingArr = [];
v2.diplomacyPendingArr = new Array();
}
this.calcPoints(v2);
}
}
var v3 = 0;
goto 23777;
for (;;) {
++v3;
label 23777:
if (v3 >= this.activePlayerArr.length) break;
var v4 = this.activePlayerArr[v3];
if (v4 != this.human) {
var v5 = 0;
for (var j in v4.actionArr) {
if (this.getTarget(v4, v4.turnAction_1)) {
++v5;
break;
} else {
v4.turnAction_1.action = v4.actionArr[v5].id;
v4.turnAction_2.action = v4.actionArr[v5 + 1].id;
++v5;
}
}
for (var j in v4.actionArr) {
if (this.getTarget(v4, v4.turnAction_2)) {
++v5;
break;
} else {
v4.turnAction_2.action = v4.actionArr[v5].id;
++v5;
}
}
}
}
for (var i in this.playerArr) {
var v6 = this.playerArr[i];
}
++this.turn;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5299 __Packages.WD_trace {
#initclip
if (!WD_trace) {
_global.WD_trace = function () {
this.lc = new LocalConnection();
};
var v1 = _global.WD_trace.prototype;
v1.trace = function (_str) {
this.lc.send('WD2', 'trace', _str);
};
v1.specific_trace = function (_str, _str2) {
var v4 = '';
var v5 = '';
switch (_str) {
case 'aiGameVars':
for (var i in _global.model.playerArr) {
var v6 = _global.model.playerArr[i];
v4 += 'player ' + v6.playerNum + ': Money: ' + v6.money + ' <br/> ';
v4 += 'player ' + v6.playerNum + ': religion: ' + v6.religion + ' <br/> ';
}
this.lc.send('WD2', 'specific_trace', 'aiGameVars', v4);
break;
case 'lastAction':
for (var i in _global.model.playerArr) {
var v6 = _global.model.playerArr[i];
v4 += 'player ' + v6.playerNum + ': Action 1 - ' + v6.turnAction_1.action + ' turn: ' + _global.model.turn + ' <br/> ';
v4 += 'player ' + v6.playerNum + ': Action 2 - ' + v6.turnAction_2.action + ' turn: ' + _global.model.turn + ' <br/> ';
v5 += ' <u> --Player: ' + v6.playerNum + ' turn: ' + _global.model.turn + ', action 1: </u><br/>' + v6.turnAction_1.actionNames;
v5 += ' <u> --Player: ' + v6.playerNum + ' turn: ' + _global.model.turn + ', action 2: </u><br/>' + v6.turnAction_2.actionNames;
}
this.lc.send('WD2', 'specific_trace', 'lastActionDetails', v5);
break;
case 'stock':
for (var i in _global.model.playerArr) {
var v6 = _global.model.playerArr[i];
v4 += ' --- player: ' + v6.playerNum + ' <br/> ';
for (var j in v6.weaponStock.weaponArr) {
var v7 = v6.weaponStock.weaponArr[j];
if (v7.active) {
v4 += v7.weaponName + ' : ' + v7.inStock + ' <br/> ';
}
}
v4 += 'Anti Air: ' + v6.weaponStock.antiAir.inStock + ' <br /> ';
v4 += 'Anti Roc: ' + v6.weaponStock.antiRocket.inStock + ' <br />';
}
this.lc.send('WD2', 'specific_trace', 'stock', v4);
break;
case 'proTech':
for (var i in _global.model.playerArr) {
var v6 = _global.model.playerArr[i];
v4 += ' --- player: ' + v6.playerNum + ' <br/> ';
var v8 = 0;
goto 2010;
for (;;) {
++v8;
label 2010:
if (v8 >= v6.shortMSG_arr.length) break;
var v9 = v6.shortMSG_arr[v8];
if (v9._msg != '' && v9._msg) {
v4 += v9._msg + '<br />';
}
}
}
this.lc.send('WD2', 'specific_trace', 'proTech', v4);
break;
case 'bio':
for (var i in _global.model.playerArr) {
var v6 = _global.model.playerArr[i];
v4 += ' --- player: ' + v6.playerNum + ' <br/> ';
for (var j in v6.bioloadedActionsArr) {
v4 += v6.bioloadedActionsArr[j] + ' <br />';
}
}
this.lc.send('WD2', 'specific_trace', 'bio', v4);
break;
case 'ceaseFire':
for (var i in _global.model.playerArr) {
var v6 = _global.model.playerArr[i];
v4 += ' --- player: ' + v6.playerNum + ' <br/> ';
var v10 = 0;
goto 2478;
for (;;) {
++v10;
label 2478:
if (v10 >= v6.ceaseFireArr.length) break;
if (v6.ceaseFireArr[v10]._status) {
v4 += 'cease fire with: ' + v10 + ' for: ' + v6.ceaseFireArr[v10]._turnsLeft + ' turns';
}
}
}
break;
case 'regard':
for (var i in _global.model.playerArr) {
var v6 = _global.model.playerArr[i];
v4 += ' Player: ' + v6.playerNum + ' <br/>';
var v11 = 0;
goto 2716;
for (;;) {
++v11;
label 2716:
if (v11 >= v6.regardArr.length) break;
v4 += ' -- towards: ' + v11 + ' : ' + v6.regardArr[v11] + '<br/>';
}
}
break;
case 'crashTest':
this.lc.send('WD2', 'specific_trace', 'ceaseFire', _str2);
}
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5300 __Packages.Presenter_gameMenu {
#initclip
if (!Presenter_gameMenu) {
_global.Presenter_gameMenu = function () {};
var v1 = _global.Presenter_gameMenu.prototype;
v1.init_main_interface = function () {
var v2 = new Array(0, 1, 2, 3, 4);
_global.model.playerArr = new Array();
_global.model.activePlayerArr = new Array();
_global.model.human = new Player('human', 0, [0, 0]);
var v3 = _global.model.human;
v3.religion_code = this.model.building_num_to_religion_code(this.model.selected_building);
v3.playerColor = this.model.color_name_by_id(this.model.player_color - 1);
v3.playerColorTint1 = _global.model.wd_colors['color_' + this.model.color_code_by_id(this.model.player_color - 1)];
v3.hexColorTint = this.model.color_hex_by_id(this.model.player_color - 1);
v3.hexColorTint_str = this.model.color_hexStr_by_id(this.model.player_color - 1);
v3.buildingSet_id = this.model.get_religion_buildingSet_by_code(v3.religion_code);
v3.alive = true;
v3.playerNum = 0;
v3.shortMSG_arr.push({'_type': 'welcome', '_msg': 'Welcome commander. Please select 2 action from the left menu.'});
_global.model.difficulty_level = this.model.difficulty;
_global.model.playerArr.push(v3);
_global.model.activePlayerArr.push(v3);
this.remove_value_from_array(v2, this.model.player_color - 1);
var v4 = false;
var v5 = false;
var v6 = 0;
goto 3304;
for (;;) {
++v6;
label 3304:
if (v6 >= this.model.selected_leader_arr.length) break;
_global.model['comp' + (v6 + 1)] = new Player('AI', v6 + 1, [0, 0]);
var v7 = _global.model['comp' + (v6 + 1)];
var v8 = this.model.get_leader_by_ID(this.model.selected_leader_arr[v6]);
v7.religion_code = v8._religion;
v7.buildingSet_id = this.model.get_religion_buildingSet_by_code(v8._religion);
var v9 = v2[_global.model.tools.randRange(0, v2.length - 1)];
v7.playerColor = this.model.color_name_by_id(v9);
this.remove_value_from_array(v2, v9);
v7.playerColorTint1 = _global.model.wd_colors['color_' + this.model.color_code_by_id(v9)];
v7.hexColorTint = this.model.color_hex_by_id(v9);
v7.hexColorTint_str = this.model.color_hexStr_by_id(v9);
v7.faceFrame = v8._frame;
v7.alive = true;
v7.playerNum = v6 + 1;
_global.model.playerArr.push(v7);
_global.model.activePlayerArr.push(v7);
if (_global.model.tools.randRange(1, 3) == 2 && !v4) {
v7.special_person = true;
v4 = true;
} else {
if (_global.model.tools.randRange(1, 3) == 2 && !v5) {
v7.suicide_person = true;
v5 = true;
}
}
}
_global.presenter.set_player_vars();
_global.presenter.spawn_cities();
_global.presenter.updateMiniMap();
_global.presenter.updateView();
_global.model.decisionPoints.set_points_to_difficulty(_global.model.difficulty_level);
_global.view.updateView();
_global.view.setMapFrames();
_global.view.resetActionBuildings();
_global.view.updateCities();
_global.presenter_interface.update_top_plrColor();
_global.presenter_interface.update_color_dots();
_global.presenter_interface.reset_leader_stat_bars();
_global.view_interface.actionTube1.associatedTA = _global.model.human.turnAction_1;
_global.view_interface.actionTube2.associatedTA = _global.model.human.turnAction_2;
this.view.hide_gameMenu();
_global.view_interface.interfaceMC._visible = true;
_global.presenter_interface.updateView();
_global.presenter_interface.debug_automate_func();
_global.view.updateCities();
_global.view.changeOver('toInterface');
};
v1.remove_value_from_array = function (arr, a_value) {
var v4 = 0;
goto 4606;
for (;;) {
++v4;
label 4606:
if (v4 >= arr.length) break;
if (arr[v4] == a_value) {
arr.splice(v4, 1);
}
}
};
v1.set_btn_func = function () {
this.view.src_MC.btn1.onPress = function () {
_global.presenter_gameMenu.btn_pressed_difficulty(1);
};
this.view.src_MC.btn2.onPress = function () {
_global.presenter_gameMenu.btn_pressed_difficulty(2);
};
this.view.src_MC.btn3.onPress = function () {
_global.presenter_gameMenu.btn_pressed_difficulty(3);
};
var v2 = 1;
goto 4915;
for (;;) {
++v2;
label 4915:
if (v2 >= 6) break;
var v3 = this.view.src_MC['colorBtn' + v2];
v3.num = v2;
v3.onPress = function () {
_global.presenter_gameMenu.btn_pressed_color(this.num);
};
}
var v4 = 1;
goto 5055;
for (;;) {
++v4;
label 5055:
if (v4 >= 6) break;
var v5 = this.view.src_MC['buildingBtn' + v4];
v5.num = v4;
v5.onPress = function () {
_global.presenter_gameMenu.btn_pressed_building(this.num);
};
}
var v6 = 1;
goto 5195;
for (;;) {
++v6;
label 5195:
if (v6 >= 7) break;
var v7 = this.view.src_MC['BTN_allLeaders_screen' + v6];
v7.num = v6;
v7.onPress = function () {
_global.presenter_gameMenu.btn_pressed_leader_from_list(this.num);
};
v7.onRollOver = function () {
_global.presenter_gameMenu.btn_rollOver_leader(this.num);
};
v7.onRollOut = function () {
_global.view_gameMenu.src_MC.leaderText.text = '';
};
}
var v8 = 1;
goto 5437;
for (;;) {
++v8;
label 5437:
if (v8 >= 5) break;
var v9 = this.view.src_MC['BTN_selectedLeader_screen' + v8];
v9.num = v8;
v9.onPress = function () {
_global.presenter_gameMenu.btn_pressed_selected_leader(this.num);
};
}
this.view.src_MC.btn_player_list_left.onPress = function () {
_global.presenter_gameMenu.btn_pressed_leader_arrow_left();
};
this.view.src_MC.btn_player_list_right.onPress = function () {
_global.presenter_gameMenu.btn_pressed_leader_arrow_right();
};
this.view.src_MC.btn_start.onPress = function () {
_global.presenter_gameMenu.btn_pressed_start();
};
if (!_global.model.zs66hj8s) {
this.view.src_MC.demo_MC.btn_full.onPress = function () {
_global.presenter_interface.btn_pressed_full();
};
}
if (_global.model.zs66hj8s) {
this.view.src_MC.demo_MC.txtMC_full.txt.text = 'FULL VERSION';
this.view.src_MC.demo_MC.btn_full.onPress = function () {
_global.presenter_interface.btn_pressed_full();
};
this.view.src_MC.arcade_town_logo.onPress = function () {
getURL('http://www.arcadetown.com', '_blank');
};
if (_global.model.get_demo_version_name() == 'Totallygame' || (_global.model.get_demo_version_name() == 'Affiliates' || _global.model.get_demo_version_name() == 'NewGrounds')) {
this.view.src_MC.youda_logo.onPress = function () {
getURL('http://www.youdagames.com', '_blank');
};
this.view.src_MC.demo_MC.txtMC_more.txt.text = 'MORE GAMES';
this.view.src_MC.demo_MC.btn_more.onPress = function () {
getURL('http://www.youdagames.com/shop/', '_blank');
};
} else {
this.view.src_MC.demo_MC.scrn_more._visible = false;
this.view.src_MC.demo_MC.btn_more._visible = false;
}
} else {
this.view.src_MC.demo_MC._visible = false;
}
this.view.src_MC.soundBtn.onPress = function () {
_global.presenter_interface.btnPressed_option('music', true);
_level0.gameMenu.switch39.play();
};
return undefined;
};
v1.initialize_gameMenu = function () {
this.btn_pressed_difficulty(2);
this.btn_pressed_color(_global.model.tools.randRange(1, 5));
if (!_global.model.zs66hj8s) {
this.btn_pressed_building(_global.model.tools.randRange(1, 5));
} else {
this.btn_pressed_building(2);
}
this.set_btn_func();
this.set_visble_leaders_list_arr();
this.update_selected_leaders(true);
this.update_leader_list(true);
this.update_leader_list();
_global.view.setMapFrames();
};
v1.btn_pressed_building = function (a_nr) {
if (!_global.model.zs66hj8s || (a_nr == 1 || a_nr == 2)) {
_global.play_sound_by_action('interface_acceptAction_btn');
this.model.selected_building = a_nr;
this.view.active_building_btn = a_nr;
this.active_start_btn();
return undefined;
}
_global.play_sound_by_action('interface_select_stock');
return undefined;
};
v1.btn_pressed_difficulty = function (a_nr) {
_global.play_sound_by_action('interface_actionBtn_on');
this.model.difficulty = a_nr - 1;
this.view.active_difficulty_btn = a_nr;
this.active_start_btn();
return undefined;
};
v1.btn_pressed_color = function (a_nr) {
_global.play_sound_by_action('interface_acceptAction_btn');
this.model.player_color = a_nr;
this.view.active_color_btn = a_nr;
this.active_start_btn();
return undefined;
};
v1.btn_pressed_leader_from_list = function (a_nr) {
_global.play_sound_by_action('interface_acceptAction_btn');
this.add_leader_to_selection(this.btn_num_to_leader_num(a_nr));
this.active_start_btn();
return undefined;
};
v1.btn_pressed_selected_leader = function (a_nr) {
_global.play_sound_by_action('interface_select_stock');
this.remove_selected_leader(a_nr - 1);
this.active_start_btn();
return undefined;
};
v1.btn_pressed_start = function () {
_global.play_sound_by_action('interface_open_tube');
if (this.allow_game_start && !_global.model.game_initiated) {
_global.model.game_initiated = true;
this.init_main_interface();
}
return undefined;
};
v1.__get__allow_game_start = function () {
if (!_global.model.zs66hj8s && (this.model.selected_leader_arr.length > 0 && (this.model.selected_building && (this.model.difficulty != undefined && this.model.player_color)))) {
return true;
}
if (_global.model.zs66hj8s && (this.model.selected_leader_arr.length > 2 && (this.model.selected_building && (this.model.difficulty != undefined && this.model.player_color)))) {
return true;
}
return false;
};
v1.active_start_btn = function () {
if (this.allow_game_start) {
this.view.src_MC.scrn_start.gotoAndStop(2);
} else {
this.view.src_MC.scrn_start.gotoAndStop(1);
}
};
v1.remove_selected_leader = function (a_arr_index) {
this.model.selected_leader_arr.splice(a_arr_index, 1);
this.update_leader_panel();
};
v1.add_leader_to_selection = function (a_nr) {
if (!this.allowed_demo_religion(a_nr) && _global.model.zs66hj8s) {
return undefined;
}
if (!this.is_selected_leader(a_nr) && this.model.selected_leader_arr.length < 4) {
this.model.selected_leader_arr.push(a_nr);
}
this.update_leader_panel();
};
v1.is_selected_leader = function (a_nr) {
var v3 = 0;
goto 8157;
for (;;) {
++v3;
label 8157:
if (v3 >= this.model.selected_leader_arr.length) break;
if (this.model.selected_leader_arr[v3] == a_nr) {
return true;
}
}
return false;
};
v1.btn_num_to_leader_num = function (a_nr) {
return this.model.visible_leader_list_arr[a_nr - 1];
};
v1.update_leader_panel = function () {
this.set_visble_leaders_list_arr();
this.update_selected_leaders();
this.update_leader_list();
};
v1.set_visble_leaders_list_arr = function () {
this.model.visible_leader_list_arr = [];
var v2 = 0;
goto 8416;
for (;;) {
++v2;
label 8416:
if (v2 >= 7) break;
if (this.model.leader_list_start_num + v2 > 18) {
this.model.visible_leader_list_arr.push(v2 - (18 - this.model.leader_list_start_num) - 1);
} else {
this.model.visible_leader_list_arr.push(this.model.leader_list_start_num + v2);
}
}
};
v1.update_selected_leaders = function (a_init) {
if (a_init) {
var v3 = 1;
goto 8649;
for (;;) {
++v3;
label 8649:
if (v3 >= 5) break;
this.view.src_MC['leaderScrn' + v3].gotoAndStop('leaderLife');
this.view.src_MC['leaderScrn' + v3].aliveMC.gotoAndStop(20);
this.view.src_MC['leaderScrn' + v3].deadMC._visible = false;
}
return undefined;
}
var v4 = 1;
goto 8825;
for (;;) {
++v4;
label 8825:
if (v4 >= 5) break;
this.view.src_MC['leaderScrn' + v4].aliveMC.gotoAndStop(20);
this.view.src_MC['leaderScrn' + v4].aliveMC.gotoAndStop((this.model.get_leader_by_ID(this.model.selected_leader_arr[v4 - 1]))._frame);
if (this.model.get_leader_by_ID(this.model.selected_leader_arr[v4 - 1])) {
this.view.src_MC['btnCancel' + v4].gotoAndStop(2);
} else {
this.view.src_MC['btnCancel' + v4].gotoAndStop(1);
}
}
return undefined;
};
v1.update_leader_list = function (a_init) {
if (a_init) {
var v3 = 1;
goto 9193;
for (;;) {
++v3;
label 9193:
if (v3 >= 7) break;
this.view.src_MC['allLeaderScreen' + v3].gotoAndStop('leaderLife');
this.view.src_MC['allLeaderScreen' + v3].aliveMC.gotoAndStop(this.model.visible_leader_list_arr[v3 - 1] + 1);
this.view.src_MC['allLeaderScreen' + v3].deadMC._visible = false;
}
return undefined;
}
var v4 = 1;
goto 9399;
for (;;) {
++v4;
label 9399:
if (v4 >= 7) break;
this.view.src_MC['allLeaderScreen' + v4].aliveMC.gotoAndStop(this.model.visible_leader_list_arr[v4 - 1] + 1);
if (this.is_selected_leader(this.model.visible_leader_list_arr[v4 - 1])) {
this.view.src_MC['allLeaderScreen' + v4].aliveMC._alpha = 20;
} else {
this.view.src_MC['allLeaderScreen' + v4].aliveMC._alpha = 100;
}
if (_global.model.zs66hj8s) {
if (!this.allowed_demo_religion(this.model.visible_leader_list_arr[v4 - 1])) {
this.view.src_MC['allLeaderScreen' + v4].aliveMC._alpha = 50;
this.view.src_MC['full_version_leader_mc_' + v4].gotoAndStop(2);
} else {
this.view.src_MC['full_version_leader_mc_' + v4].gotoAndStop(1);
}
}
}
return undefined;
};
v1.allowed_demo_religion = function (a_num) {
var v3 = this.model.get_leader_by_ID(a_num);
if (v3._religion == 'chr' || v3._religion == 'bhu') {
return true;
}
return false;
};
v1.btn_pressed_leader_arrow_right = function () {
var v2 = this.model.leader_list_start_num;
if (v2 > 18) {
this.model.leader_list_start_num = 0;
} else {
++this.model.leader_list_start_num;
}
this.update_leader_panel();
};
v1.btn_pressed_leader_arrow_left = function () {
var v2 = this.model.leader_list_start_num;
if (v2 < 1) {
this.model.leader_list_start_num = 18;
} else {
--this.model.leader_list_start_num;
}
this.update_leader_panel();
};
v1.btn_rollOver_leader = function (a_nr) {
this.view.src_MC.leaderText.text = (this.model.get_leader_by_ID(this.btn_num_to_leader_num(a_nr)))._name;
};
v1.addProperty('allow_game_start', v1.__get__allow_game_start, function () {});
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5301 __Packages.View_gameMenu {
#initclip
if (!View_gameMenu) {
_global.View_gameMenu = function (a_src_MC) {
this.src_MC = a_src_MC;
this.src_MC.txtMC1.txt.text = 'EASY';
this.src_MC.txtMC1.txt.setTextFormat(_global.view.textFormats.interface_actionText_1);
this.src_MC.txtMC1.txt.embedFonts = true;
this.src_MC.txtMC2.txt.text = 'MEDIUM';
this.src_MC.txtMC2.txt.setTextFormat(_global.view.textFormats.interface_actionText_1);
this.src_MC.txtMC2.txt.embedFonts = true;
this.src_MC.txtMC3.txt.text = 'HARD';
this.src_MC.txtMC3.txt.setTextFormat(_global.view.textFormats.interface_actionText_1);
this.src_MC.txtMC3.txt.embedFonts = true;
this.src_MC.txtMC_start.txt.text = 'START GAME';
this.src_MC.txtMC_start.txt.setTextFormat(_global.view.textFormats.interface_actionText_1);
this.src_MC.txtMC_start.txt.embedFonts = true;
};
var v1 = _global.View_gameMenu.prototype;
v1.__set__active_difficulty_btn = function (a_nr) {
this.src_MC.scrn1.gotoAndStop(1);
this.src_MC.scrn2.gotoAndStop(1);
this.src_MC.scrn3.gotoAndStop(1);
this.src_MC['scrn' + a_nr].gotoAndStop(2);
return undefined;
return this.__get__active_difficulty_btn();
};
v1.__set__active_player_color_btn = function (a_nr) {
var v3 = 1;
goto 1472;
for (;;) {
++v3;
label 1472:
if (v3 >= 6) break;
this.src_MC['colorIndicator' + v3].gotoAndStop(1);
}
this.src_MC['colorIndicator' + a_nr].gotoAndStop(a_nr);
return undefined;
return this.__get__active_player_color_btn();
};
v1.__set__active_color_btn = function (a_nr) {
var v3 = 1;
goto 1632;
for (;;) {
++v3;
label 1632:
if (v3 >= 6) break;
this.src_MC['colorIndicator' + v3].gotoAndStop(1);
}
this.src_MC['colorIndicator' + a_nr].gotoAndStop(2);
return undefined;
return this.__get__active_color_btn();
};
v1.__set__active_building_btn = function (a_nr) {
var v3 = 1;
goto 1795;
for (;;) {
++v3;
label 1795:
if (v3 >= 6) break;
this.src_MC['buildingIndicator' + v3].gotoAndStop(1);
}
this.src_MC['buildingIndicator' + a_nr].gotoAndStop(2);
if (_global.model.zs66hj8s) {
this.src_MC.buildingIndicator3._alpha = 40;
this.src_MC.buildingIndicator4._alpha = 40;
this.src_MC.buildingIndicator5._alpha = 40;
this.src_MC.full_version_building_mc.gotoAndStop(2);
}
return undefined;
return this.__get__active_building_btn();
};
v1.update_leader_screen = function (a_MC, a_nr) {
a_MC.gotoAndStop(a_nr);
};
v1.hide_gameMenu = function () {
this.src_MC._visible = false;
};
v1.addProperty('active_building_btn', function () {}, v1.__set__active_building_btn);
v1.addProperty('active_color_btn', function () {}, v1.__set__active_color_btn);
v1.addProperty('active_player_color_btn', function () {}, v1.__set__active_player_color_btn);
v1.addProperty('active_difficulty_btn', function () {}, v1.__set__active_difficulty_btn);
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 5302 __Packages.Model_gameMenu {
#initclip
if (!Model_gameMenu) {
_global.Model_gameMenu = function () {
this.visible_leader_list_arr = new Array();
this.selected_leader_arr = new Array();
};
var v1 = _global.Model_gameMenu.prototype;
v1.color_code_by_id = function (a_num) {
for (var i in this.color_num_to_code_arr) {
if (this.color_num_to_code_arr[i][0] == a_num) {
return this.color_num_to_code_arr[i][2];
}
}
};
v1.color_hex_by_id = function (a_num) {
for (var i in this.color_num_to_code_arr) {
if (this.color_num_to_code_arr[i][0] == a_num) {
return this.color_num_to_code_arr[i][3];
}
}
};
v1.color_hexStr_by_id = function (a_num) {
for (var i in this.color_num_to_code_arr) {
if (this.color_num_to_code_arr[i][0] == a_num) {
return this.color_num_to_code_arr[i][4];
}
}
};
v1.color_name_by_id = function (a_num) {
for (var i in this.color_num_to_code_arr) {
if (this.color_num_to_code_arr[i][0] == a_num) {
return this.color_num_to_code_arr[i][1];
}
}
};
v1.get_leader_by_ID = function (a_ID) {
for (var i in this.leader_arr) {
if (this.leader_arr[i].ID == a_ID) {
return this.leader_arr[i];
}
}
};
v1.building_num_to_religion_code = function (a_nr) {
var v3 = 'chr';
switch (a_nr) {
return v3;
case 1:
return 'bhu';
return v3;
case 2:
return 'chr';
return v3;
case 3:
return 'com';
return v3;
case 4:
return 'jew';
return v3;
case 5:
return 'mus';
return v3;
}
return v3;
};
v1.get_religion_buildingSet_by_code = function (a_nr) {
var v3 = 'christian_buildings';
switch (a_nr) {
return v3;
case 'bhu':
return 'budhist_buildings';
return v3;
case 'chr':
return 'christian_buildings';
return v3;
case 'com':
return 'communist_buildings';
return v3;
case 'jew':
return 'jewish_buildings';
return v3;
case 'mus':
return 'muslim_buildings';
return v3;
}
return v3;
};
ASSetPropFlags(v1, null, 1);
v1.leader_list_start_num = 0;
v1.color_num_to_code_arr = new Array([0, 'blue', 'blu', 255, '0x0000FF'], [1, 'red', 'red', 16711680, '0xFF0000'], [2, 'orange', 'ora', 16750848, '0xFF9900'], [3, 'yellow', 'yel', 1044480, '0xFF000'], [4, 'green', 'gre', 65280, '0x00FF00']);
v1.leader_arr = new Array({'ID': 0, '_name': 'The Bombki', '_religion': 'chr', '_frame': 1, '_selected': false}, {'ID': 1, '_name': 'M. Headinajar', '_religion': 'mus', '_frame': 2, '_selected': false}, {'ID': 2, '_name': 'Col. Gedoffi', '_religion': 'mus', '_frame': 3, '_selected': false}, {'ID': 3, '_name': 'Reh Moose Hunt', '_religion': 'bhu', '_frame': 4, '_selected': false}, {'ID': 4, '_name': 'Asama Bin Loader', '_religion': 'mus', '_frame': 5, '_selected': false}, {'ID': 5, '_name': 'Any Kissonme', '_religion': 'bhu', '_frame': 6, '_selected': false}, {'ID': 6, '_name': 'Psyman Para\'s', '_religion': 'jew', '_frame': 7, '_selected': false}, {'ID': 7, '_name': 'Ehum Oldbert', '_religion': 'jew', '_frame': 8, '_selected': false}, {'ID': 8, '_name': 'Ehum Bareass', '_religion': 'jew', '_frame': 9, '_selected': false}, {'ID': 9, '_name': 'Gladinme Putit', '_religion': 'com', '_frame': 10, '_selected': false}, {'ID': 10, '_name': 'Keen to Chill', '_religion': 'com', '_frame': 11, '_selected': false}, {'ID': 11, '_name': 'Angola Market', '_religion': 'chr', '_frame': 12, '_selected': false}, {'ID': 12, '_name': 'Ballony Stare', '_religion': 'chr', '_frame': 13, '_selected': false}, {'ID': 13, '_name': 'Who in There', '_religion': 'bhu', '_frame': 14, '_selected': false}, {'ID': 14, '_name': 'JP Barksender', '_religion': 'chr', '_frame': 15, '_selected': false}, {'ID': 15, '_name': 'Jack Searock', '_religion': 'chr', '_frame': 16, '_selected': false}, {'ID': 16, '_name': 'GW Blush', '_religion': 'chr', '_frame': 17, '_selected': false}, {'ID': 17, '_name': 'Taxi Isinawater', '_religion': 'bhu', '_frame': 18, '_selected': false}, {'ID': 18, '_name': 'Bossi Isasad', '_religion': 'mus', '_frame': 19, '_selected': false});
}
#endinitclip
}
frame 3 {
stop();
var loaded = 0;
_root.onEnterFrame = function () {
if (loaded == 100) {
loaded = undefined;
this.onEnterFrame = undefined;
play();
} else {
loaded = Math.round((this.getBytesLoaded() / this.getBytesTotal()) * 100);
this.youdapreloader.percentloaded_bar_mc._xscale = loaded;
this.youdapreloader.loaded_txt.text = loaded + '%';
stop();
}
};
}
movieClip 882 citySet_dummy {
frame 1 {
stop();
}
}
movieClip 885 map_icon_special {
}
movieClip 888 map_icon_soldier {
}
movieClip 891 map_icon_rocket {
}
movieClip 894 map_icon_propaganda {
}
movieClip 897 map_icon_plane {
}
movieClip 900 map_icon_crosshair {
}
movieClip 901 whiteSquare {
}
movieClip 903 trailSmoke {
}
movieClip 904 trail {
}
movieClip 905 targetDot {
}
movieClip 1036 submarine_tint {
}
movieClip 1037 {
frame 1 {
stop();
}
}
movieClip 1168 {
frame 1 {
stop();
}
}
movieClip 1169 submarine {
frame 1 {
stop();
}
}
movieClip 1170 stockPanel {
}
movieClip 1171 {
}
movieClip 1174 statsMC {
}
movieClip 1176 spaceRocket_trail_element {
#initclip
Object.registerClass('spaceRocket_trail_element', SpaceRocket_trail_element);
#endinitclip
}
movieClip 1177 spaceRocket_smoke {
#initclip
Object.registerClass('spaceRocket_smoke', SpaceRocket_smoke);
#endinitclip
}
movieClip 1179 sliderBtn {
}
movieClip 1180 {
}
movieClip 1181 {
frame 1 {
stop();
}
}
movieClip 1183 {
frame 1 {
stop();
}
}
movieClip 1246 {
frame 1 {
stop();
}
}
movieClip 1309 {
frame 1 {
stop();
}
}
movieClip 1310 satellite_bhu {
frame 1 {
stop();
}
}
movieClip 1311 satellite {
frame 1 {
stop();
}
}
movieClip 1313 {
}
movieClip 1314 propaganda_beams {
frame 1 {
stop();
}
frame 2 {
var loopCount = 0;
}
frame 3 {
++loopCount;
if (loopCount > 8) {
gotoAndStop(1);
}
}
frame 20 {
gotoAndPlay(3);
}
}
movieClip 1316 {
}
movieClip 1318 {
}
movieClip 1320 popUp {
frame 1 {
}
frame 5 {
stop();
}
frame 10 {
stop();
}
}
movieClip 1322 playerBtn_overlay {
frame 1 {
stop();
}
}
movieClip 1335 player_colors {
frame 1 {
stop();
}
}
movieClip 1338 {
}
movieClip 1341 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 1344 messageWindow {
}
movieClip 1369 mensen_stroom {
}
movieClip 1376 lang04 {
}
movieClip 1383 land03 {
}
movieClip 1390 land02 {
}
movieClip 1397 land01 {
}
movieClip 1404 land00 {
}
movieClip 1410 land_water {
}
movieClip 1412 {
}
movieClip 1413 land_outline_4 {
frame 1 {
stop();
}
}
movieClip 1415 land_outline_2_stroke {
}
movieClip 1417 {
}
movieClip 1418 land_outline_1 {
frame 1 {
stop();
}
}
movieClip 1420 {
}
movieClip 1421 land_outline_0 {
frame 1 {
stop();
}
}
movieClip 1423 {
}
movieClip 1424 land_oultine_3 {
frame 1 {
stop();
}
}
movieClip 1426 interfaceStats {
}
movieClip 1428 {
}
movieClip 1430 {
frame 1 {
stop();
}
}
movieClip 1431 {
}
movieClip 1433 {
}
movieClip 1435 {
}
movieClip 1437 {
}
movieClip 1439 {
}
movieClip 1441 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 1442 {
frame 1 {
stop();
}
}
movieClip 1456 {
frame 1 {
stop();
}
}
movieClip 1459 {
}
movieClip 1468 audio_switch {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 1480 {
frame 1 {
stop();
}
}
movieClip 1483 {
frame 1 {
stop();
}
}
movieClip 1506 button_cocoon_sequence {
frame 1 {
stop();
}
}
movieClip 1531 {
frame 1 {
stop();
}
}
movieClip 1533 {
}
movieClip 1534 {
frame 1 {
stop();
}
frame 2 {
play();
}
frame 45 {
gotoAndPlay(2);
}
}
movieClip 1541 {
}
movieClip 1542 {
frame 1 {
stop();
}
}
movieClip 1549 actionBtn_switch_mc {
frame 1 {
stop();
}
}
movieClip 1553 {
frame 1 {
stop();
}
}
movieClip 1565 {
}
movieClip 1568 {
}
movieClip 1571 {
}
movieClip 1572 {
}
movieClip 1582 {
}
movieClip 1583 {
}
movieClip 1593 {
}
movieClip 1594 {
}
movieClip 1604 {
}
movieClip 1605 {
}
movieClip 1615 {
}
movieClip 1616 {
}
movieClip 1626 {
}
movieClip 1627 {
}
movieClip 1637 {
}
movieClip 1638 {
}
movieClip 1644 {
}
movieClip 1645 {
}
movieClip 1649 biohazard {
}
movieClip 1650 {
frame 1 {
stop();
}
}
movieClip 1695 {
frame 1 {
stop();
}
}
movieClip 1734 {
}
movieClip 1743 leadersTopMC {
frame 22 {
gotoAndPlay(1);
}
frame 24 {
play();
}
frame 59 {
if (this.playDead) {
gotoAndStop('leaderDead');
}
}
frame 60 {
stop();
}
frame 73 {
stop();
}
}
movieClip 1745 {
}
movieClip 1746 {
frame 1 {
stop();
}
}
movieClip 1749 {
frame 1 {
stop();
}
}
movieClip 1756 {
}
movieClip 1760 {
}
movieClip 1765 {
}
movieClip 1768 {
}
movieClip 1771 {
}
movieClip 1774 {
}
movieClip 1777 {
}
movieClip 1789 {
}
movieClip 1791 {
}
movieClip 1798 {
frame 1 {
stop();
}
}
movieClip 1802 {
}
movieClip 1804 {
}
movieClip 1819 {
}
movieClip 1820 {
}
movieClip 1822 {
}
movieClip 1830 {
}
movieClip 1831 interface_center_slider_1 {
}
movieClip 1833 {
}
movieClip 1834 {
}
movieClip 1836 {
}
movieClip 1837 interface_production_stat {
}
movieClip 1842 {
}
movieClip 1845 {
frame 1 {
stop();
}
}
movieClip 1850 {
frame 1 {
stop();
}
}
movieClip 1901 {
}
movieClip 1912 buildings_research {
}
movieClip 1964 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 6 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
}
movieClip 2009 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 6 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
}
movieClip 2054 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 6 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
}
movieClip 2107 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
frame 9 {
stop();
}
}
movieClip 2151 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 6 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
}
movieClip 2174 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 6 {
stop();
}
frame 7 {
stop();
}
}
movieClip 2231 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 6 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
frame 9 {
stop();
}
frame 10 {
stop();
}
}
movieClip 2239 {
}
movieClip 2240 {
}
movieClip 2247 {
}
movieClip 2260 {
}
movieClip 2267 {
}
movieClip 2269 {
}
movieClip 2276 {
frame 1 {
stop();
}
}
movieClip 2277 {
frame 1 {
stop();
}
}
movieClip 2307 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 6 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
frame 9 {
stop();
}
}
movieClip 2320 {
frame 1 {
stop();
}
}
movieClip 2332 {
}
movieClip 2337 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 2339 {
}
movieClip 2341 {
}
movieClip 2342 {
frame 1 {
stop();
}
}
movieClip 2357 {
frame 1 {
stop();
}
}
movieClip 2373 {
}
movieClip 2384 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 2398 {
frame 1 {
stop();
}
}
movieClip 2401 {
}
movieClip 2402 {
}
movieClip 2413 {
frame 1 {
stop();
}
}
movieClip 2416 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 2419 {
frame 1 {
stop();
}
}
movieClip 2422 {
frame 1 {
stop();
}
}
movieClip 2433 {
frame 1 {
stop();
}
}
movieClip 2434 {
frame 1 {
stop();
}
}
movieClip 2435 {
frame 1 {
stop();
}
}
movieClip 2452 {
}
movieClip 2454 {
frame 1 {
gotoAndPlay(_global.model.tools.randRange(2, 110));
}
}
movieClip 2455 {
frame 1 {
gotoAndPlay(_global.model.tools.randRange(2, 110));
}
}
movieClip 2456 {
frame 1 {
gotoAndPlay(_global.model.tools.randRange(2, 110));
}
}
movieClip 2459 {
frame 1 {
gotoAndPlay(_global.model.tools.randRange(2, 110));
}
}
movieClip 2464 {
frame 1 {
gotoAndPlay(_global.model.tools.randRange(2, 110));
}
}
movieClip 2475 {
}
movieClip 2520 {
}
movieClip 2521 buildings_church {
}
movieClip 2548 factory_smoke {
frame 1 {
stop();
}
frame 41 {
stop();
}
}
movieClip 2559 buildings_factorie {
}
movieClip 2570 {
}
movieClip 2573 {
}
movieClip 2599 {
}
movieClip 2607 {
frame 1 {
stop();
}
frame 10 {
play();
}
}
movieClip 2609 {
}
movieClip 2610 {
}
movieClip 2611 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
}
movieClip 2616 {
frame 1 {
stop();
}
}
movieClip 2618 {
frame 1 {
stop();
}
}
movieClip 2675 {
frame 1 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
frame 9 {
stop();
}
frame 10 {
stop();
}
frame 11 {
stop();
}
}
movieClip 2690 missile_silo_jew {
frame 1 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
frame 9 {
stop();
}
frame 10 {
stop();
}
}
movieClip 2705 missile_silo_com {
frame 1 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
frame 9 {
stop();
}
frame 10 {
stop();
}
frame 11 {
stop();
}
frame 12 {
stop();
}
frame 13 {
stop();
}
frame 14 {
stop();
}
}
movieClip 2720 missile_silo_chr {
frame 1 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
frame 9 {
stop();
}
frame 10 {
stop();
}
frame 11 {
stop();
}
frame 12 {
stop();
}
}
movieClip 2735 missile_silo_bhu {
frame 1 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
frame 9 {
stop();
}
frame 10 {
stop();
}
frame 11 {
stop();
}
frame 12 {
stop();
}
}
movieClip 2736 buildings_silo {
}
movieClip 2745 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 2750 airstrip_jew {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 2755 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 2760 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 2766 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 2767 buildings_airfield {
}
movieClip 2816 tankBase {
}
movieClip 2825 boat001_still {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 6 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
frame 9 {
stop();
}
frame 10 {
stop();
}
frame 11 {
stop();
}
frame 12 {
stop();
}
frame 30 {
stop();
}
}
movieClip 2924 {
frame 1 {
stop();
}
}
movieClip 2935 buildings_propaganda {
}
movieClip 2940 {
frame 1 {
stop();
}
}
movieClip 2945 {
frame 1 {
stop();
}
frame 134 {
gotoAndStop(1);
}
}
movieClip 2946 {
}
movieClip 2947 interface_2 {
}
movieClip 2984 {
}
movieClip 3035 {
}
movieClip 3047 flag_pole {
frame 1 {
stop();
}
}
movieClip 3088 faces {
}
movieClip 3091 citySelected {
}
movieClip 3093 city_position {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 3095 {
}
movieClip 3096 cloud {
#initclip
Object.registerClass('cloud', Cloud);
#endinitclip
}
movieClip 3097 bioCloud {
#initclip
Object.registerClass('bioCloud', BioCloud);
#endinitclip
}
movieClip 3098 action_hatch_execute {
frame 1 {
stop();
}
frame 13 {
stop();
}
}
movieClip 3121 {
frame 1 {
stop();
}
}
movieClip 3122 suicide_bomber_hatch {
}
movieClip 3127 buildings_helipad {
}
movieClip 3129 {
}
movieClip 3138 buildings_diplomacy {
}
movieClip 3143 buildings_base {
}
movieClip 3144 {
frame 1 {
stop();
}
}
movieClip 3145 {
frame 1 {
stop();
}
}
movieClip 3218 {
frame 1 {
stop();
}
}
movieClip 3289 {
frame 1 {
stop();
}
}
movieClip 3290 {
}
movieClip 3291 {
}
movieClip 3293 {
}
movieClip 3294 {
frame 1 {
stop();
}
}
movieClip 3295 {
frame 1 {
stop();
loopCount = 0;
}
frame 18 {
++loopCount;
if (!loopCount) {
loopCount = 1;
}
if (loopCount > 10) {
gotoAndStop(1);
} else {
gotoAndPlay(2);
}
}
}
movieClip 3322 {
frame 1 {
stop();
}
}
movieClip 3325 {
}
movieClip 3329 muslim_buildings {
}
movieClip 3334 jewish_buildings {
}
movieClip 3338 communist_buildings {
}
movieClip 3364 christian_buildings {
}
movieClip 3389 budhist_buildings {
}
movieClip 3432 explosion003 {
frame 22 {
stop();
}
}
movieClip 3483 explosion002 {
frame 51 {
stop();
}
}
movieClip 3524 explosion001 {
frame 21 {
stop();
}
}
movieClip 3607 {
frame 83 {
stop();
}
}
movieClip 3608 explosion_warhead_4 {
frame 91 {
stop();
}
}
movieClip 3609 explosion_warhead_3 {
frame 55 {
stop();
}
}
movieClip 3654 explosion_warhead_2 {
frame 47 {
stop();
}
}
movieClip 3703 explosion_warhead_1 {
frame 52 {
stop();
}
}
movieClip 3752 explosion_dust {
frame 50 {
stop();
}
}
movieClip 3835 explosion_bioload_4 {
frame 87 {
stop();
}
}
movieClip 3880 {
frame 23 {
stop();
}
}
movieClip 3887 explosion_bioload_3 {
frame 55 {
stop();
}
}
movieClip 3888 explosion_bioload_2 {
frame 53 {
stop();
}
}
movieClip 3889 explosion_bioload_1 {
frame 56 {
stop();
}
}
movieClip 3894 {
}
movieClip 3929 tankTop_yellow {
frame 1 {
stop();
}
frame 17 {
stop();
}
}
movieClip 3966 tankTop_red {
frame 1 {
stop();
}
frame 17 {
stop();
}
}
movieClip 4003 tankTop_orange {
frame 1 {
stop();
}
frame 17 {
stop();
}
}
movieClip 4040 tankTop_green {
frame 1 {
stop();
}
frame 15 {
stop();
}
}
movieClip 4076 tankTop_blue {
frame 1 {
stop();
}
frame 15 {
stop();
}
}
movieClip 4293 soldier001_tint {
}
movieClip 4366 soldier001_shoot_tint {
}
movieClip 4438 soldier001_shoot {
}
movieClip 4439 soldier001 {
frame 218 {
stop();
}
}
movieClip 4488 plane001_tint {
}
movieClip 4561 {
}
movieClip 4562 chinook_shadow {
}
movieClip 4564 chinook {
}
movieClip 4601 boat001_tint {
}
movieClip 4610 boat001_still_tint {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
}
movieClip 4647 boat001 {
}
movieClip 4692 {
frame 1 {
stop();
}
}
movieClip 4753 {
frame 1 {
stop();
}
}
movieClip 4760 {
}
movieClip 4775 curActionTextField {
frame 1 {
stop();
}
}
movieClip 4776 {
frame 1 {
stop();
}
}
movieClip 4783 {
frame 1 {
stop();
}
}
movieClip 4840 {
}
movieClip 4842 {
}
movieClip 4843 {
frame 1 {
stop();
}
frame 2 {
play();
_global.presenter_interface.launch_space_rocket_sound();
}
frame 95 {
stop();
}
}
movieClip 4844 {
}
movieClip 4845 {
frame 1 {
stop();
}
frame 2 {
play();
_global.presenter_interface.launch_space_rocket_sound();
}
frame 95 {
stop();
}
}
movieClip 4846 {
}
movieClip 4847 {
frame 1 {
stop();
}
frame 2 {
play();
_global.presenter_interface.launch_space_rocket_sound();
}
frame 95 {
stop();
}
}
movieClip 4848 {
}
movieClip 4849 {
frame 1 {
stop();
}
frame 2 {
play();
_global.presenter_interface.launch_space_rocket_sound();
}
frame 95 {
stop();
}
}
movieClip 4850 {
frame 1 {
stop();
}
}
movieClip 4851 {
frame 1 {
stop();
}
frame 2 {
play();
_global.presenter_interface.launch_space_rocket_sound();
}
frame 95 {
stop();
}
}
movieClip 4852 {
}
movieClip 4853 {
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 6 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
frame 9 {
stop();
}
frame 10 {
stop();
}
frame 11 {
stop();
}
frame 12 {
stop();
}
frame 13 {
stop();
}
frame 14 {
stop();
}
frame 15 {
stop();
}
frame 16 {
stop();
}
frame 17 {
stop();
}
frame 18 {
stop();
}
frame 19 {
stop();
}
frame 20 {
stop();
}
frame 21 {
stop();
}
}
movieClip 4854 {
}
movieClip 4857 {
frame 1 {
stop();
}
}
movieClip 4860 {
frame 1 {
stop();
}
}
movieClip 4863 {
frame 1 {
stop();
}
}
movieClip 4865 battleMC {
}
movieClip 4902 apache_tint {
}
movieClip 4975 apache {
}
movieClip 4976 apache_shadow {
}
movieClip 5064 {
frame 1 {
stop();
}
}
frame 5 {
stop();
}
movieClip 5067 {
}
movieClip 5070 {
}
movieClip 5072 {
}
movieClip 5074 {
}
movieClip 5079 {
}
movieClip 5083 {
}
movieClip 5086 {
}
movieClip 5090 {
frame 99 {
_root.play();
}
}
frame 13 {
stop();
}
frame 13 {
stop();
_global.main = new Main();
}
movieClip 5097 {
}
movieClip 5105 {
frame 52 {
stop();
}
}
movieClip 5126 {
}
movieClip 5127 {
}
movieClip 5129 {
}
movieClip 5130 {
}
movieClip 5139 {
frame 1 {
stop();
}
frame 2 {
bg.onPress = function () {};
bg.useHandCursor = false;
}
frame 7 {
_global.presenter_interface.full_version_mc_sound_start();
}
frame 290 {
stop();
_global.presenter_interface.load_full_version_btns(this);
}
}
movieClip 5143 {
}
movieClip 5146 {
frame 195 {
stop();
_root.introMovie._visible = false;
_root.splashScreenMC._visible = true;
_global.presenter_interface.init_theme_snd();
}
}
movieClip 5147 {
frame 1 {
stop();
}
}
movieClip 5150 {
}
movieClip 5156 {
frame 1 {
this._visible = false;
}
}
movieClip 5157 {
}
movieClip 5161 {
}
button 5164 {
on (release) {
gameURL = 'http://www.miniclip.com/games/' + gamename + '/en/';
trace('Going to game: ' + gameURL);
getURL(gameURL, '_blank');
}
}
movieClip 5168 {
frame 1 {
System.security.allowDomain('www.miniclip.com');
}
instance mcHighscores of movieClip 5156 {
onClipEvent (load) {
_visible = false;
}
}
frame 2 {
if (_url.indexOf('miniclip.com') == -1 && _url.indexOf('miniclip.net') == -1 && _url.indexOf('miniclip.co.uk') == -1 && _url.indexOf('miniclips.com')) {
gotoAndStop(_currentframe + 1);
} else {
var noCache = getTimer() + random(100000);
mcTarget.loadMovie('http://www.miniclip.com/swfcontent/highscore.swf?noCache=' + noCache);
stop();
}
}
frame 3 {
stop();
}
}
movieClip 5169 {
frame 1 {
stop();
}
frame 2 {
stop();
}
instance comHighscores of movieClip 5168 {
onClipEvent (construct) {
scoreLocation = '_global.model.human.score';
gamename = 'World Domination 2';
saveScore = true;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
}
}
movieClip 5173 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 5174 {
}
movieClip 5185 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
}
movieClip 5187 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 5189 {
}
movieClip 5194 {
frame 1 {
stop();
}
}
movieClip 5199 {
frame 1 {
stop();
}
}
movieClip 5204 {
frame 1 {
stop();
}
}
movieClip 5209 {
frame 1 {
stop();
}
}
movieClip 5214 {
frame 1 {
stop();
}
}
movieClip 5222 {
frame 1 {
stop();
}
}
movieClip 5226 {
frame 1 {
stop();
}
}
movieClip 5230 {
frame 1 {
stop();
}
}
movieClip 5234 {
frame 1 {
stop();
}
}
movieClip 5238 {
frame 1 {
stop();
}
}
movieClip 5240 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 5242 {
frame 1 {
stop();
}
}
movieClip 5246 {
}
movieClip 5249 {
}
movieClip 5250 {
}
movieClip 5253 {
frame 1 {
stop();
}
}
movieClip 5255 {
}