STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/52048352?noj=FRM52048352-22DC" width="1" height="1"></div>

Tower's Tactics 1 - Throne.swf

This is the info page for
Flash #49790

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
movieClip 3 locationPicture9 { } frame 1 { function contextMenuCredits() {} function linkNightTowers() { getURL('http://www.NightTowers.com', '_blank'); } function linkSponsor() { getURL('http://www.ArmorGames.com', '_blank'); } function anonymous(A1) { gtr = new Array(); ku = ''; while (A1.length > 0) { f = A1.length; gtr.splice(A1[f - 1], 0, A1.slice(f - 2, f - 1)); A1.splice(f - 2, 2); } i = 0; while (i < gtr.length) { ku += gtr[i]; ++i; } return ku; } var theftWarning = ['I see that you have used a decompiler - or another form of flash theft - in order to ', 'illegally obtain this file. Well, let me tell you; I spent over 1000 hours of my life', 'creating this game. I do NOT want it stolen, modified, and placed on your crap site,', 'giving YOU a profit for MY hard work. If you have no conscience, and no respect for', 'other people\'s property, go ahead and steal this game - but I will find you, and I will', 'make SURE that you BURN in HELL.']; var contextMenu = new ContextMenu(); contextMenu.hideBuiltInItems(); var customMenuItem1 = new ContextMenuItem('Tower Tactical by F. R. Fernando ~ Septenary', contextMenuCredits); var customMenuItem2 = new ContextMenuItem('Visit the Night Tower!', linkNightTowers); var customMenuItem3 = new ContextMenuItem('Visit ArmorGames.com!', linkSponsor); contextMenu.customItems.push(customMenuItem1, customMenuItem2, customMenuItem3); menu = contextMenu; var thisUrl = _root._url; var permittedUrls = ['nighttowers.com', 'ungrounded.net', 'newgrounds.com', 'armorgames.com', 'addictinggames.com', 'ugoplayer.com', 'deviantart.com']; var thisUrlPermitted = false; var i = 0; while (i < permittedUrls.length) { if (thisUrl.indexOf(permittedUrls[i]) != -1) { thisUrlPermitted = true; } ++i; } if (thisUrlPermitted == false || _root._url.substr(0, 7) == 'file://') { stolenTextFormat = new TextFormat(); with (stolenTextFormat) { color = 16777164; font = 'Tahoma'; size = 15; bold = 1; align = 'center'; } _root.createEmptyMovieClip('block', 900000); with (block) { beginFill(0, 100); moveTo(0, 0); lineTo(Stage.width, 0); lineTo(Stage.width, Stage.height); lineTo(0, Stage.height); endFill(); createTextField('getYourOwn', 1, 0, 170, Stage.width, Stage.height); getYourOwn.selectable = 0; getYourOwn.text = 'This is likely a STOLEN copy of Tower Tactical.\r\rPlease play it at a valid location instead.'; getYourOwn.setTextFormat(stolenTextFormat); } var stolenGame = true; } removeAG = false; time = new Date(); removeAGUrls = ['http://www.NightTowers.com/removeAG.txt']; var i = 0; for (;;) { if (!(++i < removeAGUrls.length && removeAG == false)) break; this.loadVariables(removeAGUrls[i] + '?time=' + time.getTime()); if (removeAG) { } else {} } autoQuality = true; lastAutoQuality = 0; stop(); } movieClip 7 { } movieClip 10 { frame 119 { this.gotoAndPlay(60); } } movieClip 12 { } movieClip 16 { frame 1 { block.onRelease = function () { getURL('http://www.ArmorGames.com/', '_blank'); }; } } movieClip 22 { } movieClip 26 { } movieClip 35 { } movieClip 38 { instance bar of movieClip 22 { onClipEvent (enterFrame) { _xscale = _root.percentDone; } } } movieClip 39 { frame 2 { preloader.bar._xscale = 0; if (_root.removeAG) { agObject._alpha = 0; } } frame 20 { totalBytes = Math.round(_root.getBytesTotal() / 1024); loadedBytes = Math.round(_root.getBytesLoaded() / 1024); percentDone = Math.round((loadedBytes / totalBytes) * 100); preloader.bar._xscale = percentDone; preloader.loadedPercent.text = percentDone + '%'; if (_root._framesloaded >= _root._totalframes && _root.stolenGame != true) { _root.spinOpenStart = _root.spinOpen._currentframe; _root.nextFrame(); } } frame 21 { gotoAndPlay('Preloading'); } } movieClip 40 { frame 1 { currentDate = new Date(); lastSecond = currentDate.getTime(); } frame 24 { currentDate = new Date(); thisSecond = currentDate.getTime(); secondsDifference = (thisSecond - lastSecond) / 1000; _root.currentFPS = Math.round(24 / secondsDifference); if (_root.autoQuality == true) { if (_root.currentFPS <= 20) { _root._quality = 'Medium'; _root.lastAutoQuality = thisSecond; } else { if (thisSecond > _root.lastAutoQuality + 10000) { _root._quality = 'High'; _root.lastAutoQuality = thisSecond; } } } } } movieClip 2309 __Packages.ab20 { #initclip if (!_global.ab20) { var v1 = function () {}; _global.ab20 = v1; var v2 = v1.prototype; v1.fr = function (str, find, replace, limit) { var v2 = str; var v3; var v4; var v9; if (typeof find !== 'string') { if (replace === undefined) { replace = ['']; } else { if (typeof replace === 'string') { replace = [replace]; } } } else { find = [find]; replace = [replace]; } v9 = find.length; var v1 = 0; var v5 = 0; while (v1 < v9) { v4 = v2.indexOf(find[v1]); while (v4 !== -1) { if (limit !== undefined && v5 >= limit) { break; } v3 = new Array(v2.substring(0, v4), v2.substr(v4, find[v1].length), v2.substr(v4 + find[v1].length)); v3[1] = (replace[v1] === undefined) ? '' : replace[v1]; v2 = v3[0] + v3[1] + v3[2]; ++v5; } v1++; v5 = 0; } return v2; }; v1.encodeNum = function (num) { var v11 = getTimer(); var v6 = ['aZ', 'Zy', 'Zx']; var v7 = ['zH', 'jY', 'uH']; var v4 = ['Ah', 'Xh', 'hO']; var v5 = ['Ub', 'Bu', 'Cb']; var v8 = ['Qc', 'Pc', 'Pe']; var v9 = ['Ei', 'Ie', 'Ef']; var v3 = ['Fk', 'kG', 'Kg']; var v13 = ['Jl', 'Lm', 'Mn']; var v12 = ['No', 'Np', 'Qp']; var v2 = ['Rs', 'St', 'Sw']; var v14 = random(3); num = String(num); num = ab20.fr(num, '9', v6[random(3)], 1); num = ab20.fr(num, '9', v6[random(3)], 1); num = ab20.fr(num, '9', v6[random(3)], 1); num = ab20.fr(num, '9', v6[random(3)], 1); num = ab20.fr(num, '9', v6[random(3)], 1); num = ab20.fr(num, '9', v6[random(3)], 1); num = ab20.fr(num, '8', v7[random(3)], 1); num = ab20.fr(num, '8', v7[random(3)], 1); num = ab20.fr(num, '8', v7[random(3)], 1); num = ab20.fr(num, '8', v7[random(3)], 1); num = ab20.fr(num, '8', v7[random(3)], 1); num = ab20.fr(num, '7', v4[random(3)], 1); num = ab20.fr(num, '7', v4[random(3)], 1); num = ab20.fr(num, '7', v4[random(3)], 1); num = ab20.fr(num, '7', v4[random(3)], 1); num = ab20.fr(num, '7', v4[random(3)], 1); num = ab20.fr(num, '7', v4[random(3)], 1); num = ab20.fr(num, '7', v4[random(3)], 1); num = ab20.fr(num, '7', v4[random(3)], 1); num = ab20.fr(num, '6', v5[random(3)], 1); num = ab20.fr(num, '6', v5[random(3)], 1); num = ab20.fr(num, '6', v5[random(3)], 1); num = ab20.fr(num, '6', v5[random(3)], 1); num = ab20.fr(num, '6', v5[random(3)], 1); num = ab20.fr(num, '6', v5[random(3)], 1); if (v14 == 1) { num = ab20.fr(num, '5', v8[0]); num = ab20.fr(num, '4', v9[random(3)]); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '2', v13[random(3)]); num = ab20.fr(num, '1', v12[random(3)]); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); var v10 = getTimer() - v11; num = num + 'Dd' + v10; return num; } num = ab20.fr(num, '5', v8[random(3)]); num = ab20.fr(num, '4', v9[random(3)]); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '3', v3[random(3)], 1); num = ab20.fr(num, '2', v13[random(3)]); num = ab20.fr(num, '1', v12[random(3)]); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); num = ab20.fr(num, '0', v2[random(3)], 1); var v10 = getTimer() - v11; num = num + 'Dd' + v10; return num; }; v1.encodeStr8bytes = function (str) { var v1 = 0; var v4 = str.length; var v3 = '%'; var v2 = ['%', '$', '#', '@']; while (v1 < v4) { v3 += str.charCodeAt(v1) + v2[random(v2.length)]; ++v1; } return v3; }; v1.decodeStr8bytes = function (str) { str = 'PIE' + str + 'PIE'; str = ab20.fr(str, '%', 'D'); str = ab20.fr(str, '$', 'D'); str = ab20.fr(str, '#', 'D'); str = ab20.fr(str, '@', 'D'); str = ab20.fr(str, 'PIED', ''); str = ab20.fr(str, 'DPIE', ''); var v3 = str.split('D'); var v4 = ''; var v1 = 0; var v5 = v3.length; while (v1 < v5) { v4 += String(String.fromCharCode(v3[v1])); ++v1; } return v4; }; v1.decodeNum = function (str) { var v2 = ['aZ', 'Zy', 'Zx', 'zH', 'jY', 'uH', 'Ah', 'Xh', 'hO', 'Ub', 'Bu', 'Cb', 'Qc', 'Pc', 'Pe', 'Ei', 'Ie', 'Ef', 'Fk', 'kG', 'Kg', 'Jl', 'Lm', 'Mn', 'No', 'Np', 'Qp', 'Rs', 'St', 'Sw']; str = String(str); str = str.split('Dd'); str = str[0]; str = ab20.fr(str, v2[0], '9'); str = ab20.fr(str, v2[1], '9'); str = ab20.fr(str, v2[2], '9'); str = ab20.fr(str, v2[3], '8'); str = ab20.fr(str, v2[4], '8'); str = ab20.fr(str, v2[5], '8'); str = ab20.fr(str, v2[6], '7'); str = ab20.fr(str, v2[7], '7'); str = ab20.fr(str, v2[8], '7'); str = ab20.fr(str, v2[9], '6'); str = ab20.fr(str, v2[10], '6'); str = ab20.fr(str, v2[11], '6'); str = ab20.fr(str, v2[12], '5'); str = ab20.fr(str, v2[13], '5'); str = ab20.fr(str, v2[14], '5'); str = ab20.fr(str, v2[15], '4'); str = ab20.fr(str, v2[16], '4'); str = ab20.fr(str, v2[17], '4'); str = ab20.fr(str, v2[18], '3'); str = ab20.fr(str, v2[19], '3'); str = ab20.fr(str, v2[20], '3'); str = ab20.fr(str, v2[21], '2'); str = ab20.fr(str, v2[22], '2'); str = ab20.fr(str, v2[23], '2'); str = ab20.fr(str, v2[24], '1'); str = ab20.fr(str, v2[25], '1'); str = ab20.fr(str, v2[26], '1'); str = ab20.fr(str, v2[27], '0'); str = ab20.fr(str, v2[28], '0'); str = ab20.fr(str, v2[29], '0'); var v3 = Number(str); return v3; }; ASSetPropFlags(_global.ab20.prototype, null, 1); } #endinitclip } frame 2 { function logIntoSingleplayer() { if (selectedSaveSlot >= 1 && selectedSaveSlot <= 3 && selectedSaveSlot != undefined) { currentDate = new Date(); currentTime = currentDate.getTime(); lastSaveTime = currentTime; userSettings = []; if (tacticalSlot[selectedSaveSlot].data.userSettings.teamName != undefined) { userSettings.teamName = tacticalSlot[selectedSaveSlot].data.userSettings.teamName; userSettings.colourR = tacticalSlot[selectedSaveSlot].data.userSettings.colourR; userSettings.colourG = tacticalSlot[selectedSaveSlot].data.userSettings.colourG; userSettings.colourB = tacticalSlot[selectedSaveSlot].data.userSettings.colourB; userSettings.deitiesUnlocked = tacticalSlot[selectedSaveSlot].data.userSettings.deitiesUnlocked; userSettings.maxTeamSize = tacticalSlot[selectedSaveSlot].data.userSettings.maxTeamSize; userSettings.unitTypesUnlocked = tacticalSlot[selectedSaveSlot].data.userSettings.unitTypesUnlocked; userSettings.teamLevel = tacticalSlot[selectedSaveSlot].data.userSettings.teamLevel; userSettings.teamCoins = tacticalSlot[selectedSaveSlot].data.userSettings.teamCoins; userSettings.teamVictories = tacticalSlot[selectedSaveSlot].data.userSettings.teamVictories; userSettings.teamDefeats = tacticalSlot[selectedSaveSlot].data.userSettings.teamDefeats; userSettings.campaignProgress = tacticalSlot[selectedSaveSlot].data.userSettings.campaignProgress; userSettings.campaignRank = tacticalSlot[selectedSaveSlot].data.userSettings.campaignRank; userSettings.teamFormationDate = tacticalSlot[selectedSaveSlot].data.userSettings.teamFormationDate; userSettings.gameplayTime = tacticalSlot[selectedSaveSlot].data.userSettings.gameplayTime; userSettings.gameplayTimeString = tacticalSlot[selectedSaveSlot].data.userSettings.gameplayTimeString; userSettings.lastCampaignMap = tacticalSlot[selectedSaveSlot].data.userSettings.lastCampaignMap; userSettings.graphicsQuality = tacticalSlot[selectedSaveSlot].data.userSettings.graphicsQuality; userSettings.maxMusicVolume = tacticalSlot[selectedSaveSlot].data.userSettings.maxMusicVolume; userSettings.tutorialObjective = tacticalSlot[selectedSaveSlot].data.userSettings.tutorialObjective; userSettings.cinematicsWatched = tacticalSlot[selectedSaveSlot].data.userSettings.cinematicsWatched; userSettings.fieldBattle = tacticalSlot[selectedSaveSlot].data.userSettings.fieldBattle; userSettings.survivalHS = tacticalSlot[selectedSaveSlot].data.userSettings.survivalHS; userSettings.timeAttackHS = tacticalSlot[selectedSaveSlot].data.userSettings.timeAttackHS; userUnitLineup = []; for (var v2 in tacticalSlot[selectedSaveSlot].data.userUnitLineup) { userUnitLineup[v2] = new Array(); userUnitLineup[v2].unitName = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitName; userUnitLineup[v2].unitType = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitType; userUnitLineup[v2].unitLevel = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitLevel; userUnitLineup[v2].unitDeity = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitDeity; userUnitLineup[v2].unitMaxHPPriority = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitMaxHPPriority; userUnitLineup[v2].unitMaxChargePriority = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitMaxChargePriority; userUnitLineup[v2].unitAttackPowerPriority = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitAttackPowerPriority; userUnitLineup[v2].unitMagicPowerPriority = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitMagicPowerPriority; userUnitLineup[v2].unitSpeedPriority = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitSpeedPriority; userUnitLineup[v2].unitForcePriority = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitForcePriority; userUnitLineup[v2].unitMaxHP = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitMaxHP; userUnitLineup[v2].unitAttackPower = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitAttackPower; userUnitLineup[v2].unitMagicPower = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitMagicPower; userUnitLineup[v2].unitSpeed = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitSpeed; userUnitLineup[v2].unitMaxCharge = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitMaxCharge; userUnitLineup[v2].unitFavour = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitFavour; userUnitLineup[v2].unitEXP = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitEXP; userUnitLineup[v2].unitTrainingPoints = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitTrainingPoints; userUnitLineup[v2].spcChat = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].spcChat; userUnitLineup[v2].beginStatusEffects = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].beginStatusEffects.slice(); userUnitLineup[v2].unitSkills = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitSkills.slice(); userUnitLineup[v2].unitSkillsKnown = tacticalSlot[selectedSaveSlot].data.userUnitLineup[v2].unitSkillsKnown.slice(); } } else { userSettings = []; userUnitLineup = []; userSettings.colourR = 255; userSettings.colourG = 255; userSettings.colourB = 255; userSettings.deitiesUnlocked = 3; userSettings.maxTeamSize = 3; userSettings.unitTypesUnlocked = 3; userSettings.teamCoins = 0; userSettings.teamVictories = 0; userSettings.teamDefeats = 0; userSettings.campaignProgress = '1:0:0'; userSettings.campaignRank = 0; userSettings.teamFormationDate = currentTime; userSettings.gameplayTime = 0; userSettings.lastCampaignMap = 1; userSettings.graphicsQuality = 'Auto'; userSettings.maxMusicVolume = 100; userSettings.isMuted = false; userSettings.tutorialObjective = 0; userSettings.cinematicsWatched = 0; userSettings.fieldBattle = false; userSettings.survivalHS = 0; userSettings.timeAttackHS = 0; newUnitFromTemplate('hero', 0, 4); nextGameCinematic = 'introduction'; } if (userSettings.graphicsQuality == 'Auto') { autoQuality = true; } else { autoQuality = false; _root._quality = userSettings.graphicsQuality.toUpperCase(); } _root.soundManager.maxBGMusicVolume = _root.userSettings.maxMusicVolume * 0.7; if (tacticalSlot[selectedSaveSlot].data.userSettings.isMute) { soundManager.toggleMute(); } return true; } else { return false; } } function deleteCurrentSlot() { tacticalSlot[selectedSaveSlot].clear(); loggedIn = false; userSettings = new Array(); userSettings.maxMusicVolume = 100; _root.soundManager.maxBGMusicVolume = 100; userUnitLineup = new Array(); tutorialObjective = -1; } function saveUserSettings() { currentDate = new Date(); currentTime = currentDate.getTime(); userSettings.gameplayTime = getGameplayTime(); userSettings.teamLevel = getTeamLevel(); lastSaveTime = currentTime; tacticalSlot[selectedSaveSlot].data.userSettings = new Array(); tacticalSlot[selectedSaveSlot].data.userSettings.teamName = userSettings.teamName; tacticalSlot[selectedSaveSlot].data.userSettings.teamLevel = userSettings.teamLevel; tacticalSlot[selectedSaveSlot].data.userSettings.colourR = userSettings.colourR; tacticalSlot[selectedSaveSlot].data.userSettings.colourG = userSettings.colourG; tacticalSlot[selectedSaveSlot].data.userSettings.colourB = userSettings.colourB; tacticalSlot[selectedSaveSlot].data.userSettings.deitiesUnlocked = userSettings.deitiesUnlocked; tacticalSlot[selectedSaveSlot].data.userSettings.maxTeamSize = userSettings.maxTeamSize; tacticalSlot[selectedSaveSlot].data.userSettings.unitTypesUnlocked = userSettings.unitTypesUnlocked; tacticalSlot[selectedSaveSlot].data.userSettings.teamCoins = userSettings.teamCoins; tacticalSlot[selectedSaveSlot].data.userSettings.teamVictories = userSettings.teamVictories; tacticalSlot[selectedSaveSlot].data.userSettings.teamDefeats = userSettings.teamDefeats; tacticalSlot[selectedSaveSlot].data.userSettings.campaignRank = userSettings.campaignRank; tacticalSlot[selectedSaveSlot].data.userSettings.teamFormationDate = userSettings.teamFormationDate; tacticalSlot[selectedSaveSlot].data.userSettings.gameplayTime = userSettings.gameplayTime; tacticalSlot[selectedSaveSlot].data.userSettings.gameplayTimeString = userSettings.gameplayTimeString; tacticalSlot[selectedSaveSlot].data.userSettings.campaignProgress = userSettings.campaignProgress; tacticalSlot[selectedSaveSlot].data.userSettings.lastCampaignMap = userSettings.lastCampaignMap; tacticalSlot[selectedSaveSlot].data.userSettings.graphicsQuality = userSettings.graphicsQuality; tacticalSlot[selectedSaveSlot].data.userSettings.maxMusicVolume = userSettings.maxMusicVolume; tacticalSlot[selectedSaveSlot].data.userSettings.isMute = soundManager.isMute; tacticalSlot[selectedSaveSlot].data.userSettings.tutorialObjective = userSettings.tutorialObjective; tacticalSlot[selectedSaveSlot].data.userSettings.cinematicsWatched = userSettings.cinematicsWatched; tacticalSlot[selectedSaveSlot].data.userSettings.fieldBattle = userSettings.fieldBattle; tacticalSlot[selectedSaveSlot].data.userSettings.survivalHS = userSettings.survivalHS; tacticalSlot[selectedSaveSlot].data.userSettings.timeAttackHS = userSettings.timeAttackHS; tacticalSlot[selectedSaveSlot].data.userUnitLineup = new Array(); for (var v1 in userUnitLineup) { tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1] = new Array(); tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitName = userUnitLineup[v1].unitName; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitType = userUnitLineup[v1].unitType; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitLevel = userUnitLineup[v1].unitLevel; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitDeity = userUnitLineup[v1].unitDeity; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitMaxHPPriority = userUnitLineup[v1].unitMaxHPPriority; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitMaxChargePriority = userUnitLineup[v1].unitMaxChargePriority; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitAttackPowerPriority = userUnitLineup[v1].unitAttackPowerPriority; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitMagicPowerPriority = userUnitLineup[v1].unitMagicPowerPriority; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitSpeedPriority = userUnitLineup[v1].unitSpeedPriority; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitForcePriority = userUnitLineup[v1].unitForcePriority; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitMaxHP = userUnitLineup[v1].unitMaxHP; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitAttackPower = userUnitLineup[v1].unitAttackPower; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitMagicPower = userUnitLineup[v1].unitMagicPower; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitSpeed = userUnitLineup[v1].unitSpeed; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitMaxCharge = userUnitLineup[v1].unitMaxCharge; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitFavour = userUnitLineup[v1].unitFavour; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitEXP = userUnitLineup[v1].unitEXP; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitTrainingPoints = userUnitLineup[v1].unitTrainingPoints; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].spcChat = userUnitLineup[v1].spcChat; tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].beginStatusEffects = userUnitLineup[v1].beginStatusEffects.slice(); tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitSkills = new Array(); tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitSkills = userUnitLineup[v1].unitSkills.slice(); tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitSkillsKnown = new Array(); tacticalSlot[selectedSaveSlot].data.userUnitLineup[v1].unitSkillsKnown = userUnitLineup[v1].unitSkillsKnown.slice(); } slotText[selectedSaveSlot] = tacticalSlot[selectedSaveSlot].data.userSettings.teamName + ' (' + tacticalSlot[selectedSaveSlot].data.userSettings.gameplayTimeString + ')'; savingGame.play(); } function RGBToHex(r, g, b) { return '0x' + (r << 16 | g << 8 | b).toString(16); } function RGBToHexLight(r, g, b) { r += 160; g += 160; b += 160; if (r > 255) { r = 255; } if (g > 255) { g = 255; } if (b > 255) { b = 255; } return (String(r.toString(16) + g.toString(16) + b.toString(16))).toUpperCase(); } function RGBToHexLight2(r, g, b) { r += 160; g += 160; b += 160; if (r > 255) { r = 255; } if (g > 255) { g = 255; } if (b > 255) { b = 255; } return (String('0x' + r.toString(16) + g.toString(16) + b.toString(16))).toUpperCase(); } function attemptUnitLevel(partyNumber) { if (userUnitLineup[partyNumber].unitEXP >= levelEXPReqs[_root.userUnitLineup[partyNumber].unitLevel + 1]) { ++userUnitLineup[partyNumber].unitLevel; userUnitLineup[partyNumber].unitMaxHP += userUnitLineup[partyNumber].unitMaxHPPriority * 0.8; userUnitLineup[partyNumber].unitMaxCharge += userUnitLineup[partyNumber].unitMaxChargePriority * 0.3; userUnitLineup[partyNumber].unitAttackPower += userUnitLineup[partyNumber].unitAttackPowerPriority * 0.008; userUnitLineup[partyNumber].unitMagicPower += userUnitLineup[partyNumber].unitMagicPowerPriority * 0.008; userUnitLineup[partyNumber].unitSpeed += userUnitLineup[partyNumber].unitSpeedPriority * 0.005; return true; } else { return false; } } function beginNewMission(missionNumber) { currentMission = missionNumber; fadeTransition.targetFrame = 'gameScreen'; fadeTransition.targetObject = '_root'; fadeTransition.gotoAndPlay('beginFadeSlow'); } function getTeamLevel() { var v3 = 0; var v2 = 0; var v1 = 0; do { if (userUnitLineup[v1].unitLevel != undefined) { v3 += userUnitLineup[v1].unitLevel; ++v2; } } while (++v1 < userUnitLineup.length); teamLevel = v3 / v2; if (teamLevel <= 0) { teamLevel = 1; } userSettings.teamLevel = teamLevel; return teamLevel; } function getCampaignRank() { return campaignRankText; } function getTeamAge() { currentDate = new Date(); currentTime = currentDate.getTime(); if (currentTime < userSettings.teamFormationDate + 3600000) { teamAge = (currentTime - userSettings.teamFormationDate) / 60000; teamAgeText = Math.round(teamAge) + ' Minute(s)'; return teamAgeText; } if (currentTime < userSettings.teamFormationDate + 86400000) { teamAge = (currentTime - userSettings.teamFormationDate) / 3600000; teamAgeText = Math.round(teamAge) + ' Hour(s)'; return teamAgeText; } teamAge = (currentTime - userSettings.teamFormationDate) / 86400000; teamAgeText = Math.round(teamAge) + ' Day(s)'; return teamAgeText; } function getGameplayTime() { currentDate = new Date(); currentTime = currentDate.getTime(); gameplayTime = userSettings.gameplayTime + (currentTime - lastSaveTime); gameplayHours = Math.floor(gameplayTime / 3600000); gameplayMinutes = Math.floor((gameplayTime % 3600000) / 60000); gameplaySeconds = Math.floor((gameplayTime % 60000) / 1000); if (gameplayHours < 10) { gameplayHours = '0' + gameplayHours; } if (gameplayMinutes < 10) { gameplayMinutes = '0' + gameplayMinutes; } if (gameplaySeconds < 10) { gameplaySeconds = '0' + gameplaySeconds; } userSettings.gameplayTimeString = gameplayHours + ':' + gameplayMinutes + ':' + gameplaySeconds; return gameplayTime; } function newUnitFromTemplate(unitName, unitType, unitDeity) { unitNameProcessed = (unitName.charAt(0)).toUpperCase() + unitName.slice(1); var v3 = 0; do { if (userUnitLineup[v3].unitName == unitNameProcessed) { var v5 = 'Someone already has this name!'; } } while (++v3 < userUnitLineup.length); if (unitName == undefined || unitName == '' || unitType == undefined || unitDeity == undefined) { v5 = 'Please fill out all fields, sir!'; } if (v5 == undefined) { var v1 = userUnitLineup.length; var v4 = Math.floor(getTeamLevel()); var v7 = 0; if (unitType !== 0) { } else { v7 = 1; } userUnitLineup[v1] = new Array(); userUnitLineup[v1].unitName = unitNameProcessed; userUnitLineup[v1].unitType = unitType; userUnitLineup[v1].unitLevel = v4; userUnitLineup[v1].unitDeity = unitDeity; userUnitLineup[v1].unitFavour = deityStats[unitDeity].startFavour; userUnitLineup[v1].unitMaxHPPriority = jobStats[unitType].creationMaxHPPriority; userUnitLineup[v1].unitMaxChargePriority = jobStats[unitType].creationMaxChargePriority; userUnitLineup[v1].unitAttackPowerPriority = jobStats[unitType].creationAttackPowerPriority; userUnitLineup[v1].unitMagicPowerPriority = jobStats[unitType].creationMagicPowerPriority; userUnitLineup[v1].unitSpeedPriority = jobStats[unitType].creationSpeedPriority; userUnitLineup[v1].unitForcePriority = jobStats[unitType].creationForcePriority; userUnitLineup[v1].unitMaxHP = 80 + jobStats[unitType].creationMaxHPPriority * 0.8 * v4; userUnitLineup[v1].unitMaxCharge = 30 + jobStats[unitType].creationMaxChargePriority * 0.3 * v4; userUnitLineup[v1].unitAttackPower = 0.2 + jobStats[unitType].creationAttackPowerPriority * 0.008 * v4; userUnitLineup[v1].unitMagicPower = 0.2 + jobStats[unitType].creationMagicPowerPriority * 0.008 * v4; userUnitLineup[v1].unitSpeed = 1.2 + jobStats[unitType].creationSpeedPriority * 0.005 * v4; userUnitLineup[v1].unitEXP = levelEXPReqs[v4]; userUnitLineup[v1].unitTrainingPoints = Math.round(v4 / 3); userUnitLineup[v1].spcChat = v7; userUnitLineup[v1].beginStatusEffects = new Array(); userUnitLineup[v1].unitSkills = new Array(); userUnitLineup[v1].unitSkillsKnown = jobStats[unitType].creationSkills.slice(); if (unitDeity !== 0) { } else { userUnitLineup[v1].unitSkillsKnown.push(18); } if (unitType !== 0) { } else { userUnitLineup[v1].unitMaxHP += 25; userUnitLineup[v1].unitMaxCharge += 15; userUnitLineup[v1].unitAttackPower += 0.2; userUnitLineup[v1].unitMagicPower += 0.2; } teamSlotSelected = v1; return v5; } else { return v5; } } versionText = 'Version 1.0.1'; multiplayerEnabled = false; var tacticalSlot = new Array(); tacticalSlot[1] = SharedObject.getLocal('tacticalSlot1'); tacticalSlot[2] = SharedObject.getLocal('tacticalSlot2'); tacticalSlot[3] = SharedObject.getLocal('tacticalSlot3'); loggedIn = false; maxPlayerTeamSize = 7; bgMusicSet = 'noMusic'; userSettings = new Array(); userSettings.maxMusicVolume = 100; userUnitLineup = new Array(); tutorialObjective = -1; Color.prototype.setTint = function (r, g, b, amount) { var v2 = new Object(); v2.ba = 100 - amount; v2.ga = v2.ba; v2.ra = v2.ba; var v3 = amount / 100; v2.rb = r * v3; v2.gb = g * v3; v2.bb = b * v3; this.setTransform(v2); }; Array.prototype.distinct = function () { var v4 = this.length; var v2 = v4; while (v2--) { var v3 = v2; while (v3--) { if (this[v2] == this[v3]) { this.splice(v2, 1); } } } }; Array.prototype.Contains = function (value) { var v3 = -1; var v2 = 0; v2 = 0; while (v2 < this.length) { if (this[v2] == value) { v3 = v2; } ++v2; } return v3; }; Array.prototype.shuffle = function () { var v5 = this.length; var v3 = v5; while (v3--) { var v2 = random(v5); var v4 = this[v3]; this[v3] = this[v2]; this[v2] = v4; } }; String.prototype.capAfterSpace = function () { i = length(this); j = new String(); while (i--) { if (this.charAt(i - 1) == ' ' || i == 0) { u = (this.charAt(i)).toUpperCase(); } else { u = this.charAt(i); } j = u + j; } return j; }; skillStats = new Array(); skillStats[1] = new Array(); skillStats[1].name = 'Charcoal'; skillStats[1].description = 'Projectile. Throws hot embers at an enemy. May cause burns.'; skillStats[1].compatibility = [0, 2, 3, 6, 7]; skillStats[1].alliance = 1; skillStats[1].charge = 15; skillStats[1].basePower = 20; skillStats[1].preparationTime = 1; skillStats[1].rechargeTime = 240; skillStats[1].maxRange = 185; skillStats[1].invokeMethod = 1; skillStats[1].effectType = 'projectile'; skillStats[1].projectileType = 1; skillStats[1].projectileDebrisType = 1; skillStats[1].force = 0.6; skillStats[1].experience = 5; skillStats[1].statusEffect = 2; skillStats[1].statusEffectDuration = 110; skillStats[1].statusEffectChance = 0.4; skillStats[1].statusEffectSPC = 0.5; skillStats[1].learnRequirement = 60; skillStats[1].trainPenalty = [0, 1, 8, 10]; skillStats[2] = new Array(); skillStats[2].name = 'Smoke Bomb'; skillStats[2].description = 'Area projectile. Smoke causes area damage and disorientation.'; skillStats[2].compatibility = [0, 2, 3, 4, 6, 7]; skillStats[2].alliance = 1; skillStats[2].charge = 20; skillStats[2].basePower = 14; skillStats[2].preparationTime = 2; skillStats[2].rechargeTime = 240; skillStats[2].maxRange = 150; skillStats[2].invokeMethod = 1; skillStats[2].effectType = 'projectile'; skillStats[2].projectileType = 2; skillStats[2].projectileDebrisType = 2; skillStats[2].force = 0.45; skillStats[2].experience = 6; skillStats[2].learnRequirement = 230; skillStats[2].preReq = 1; skillStats[2].preReqWeight = 25; skillStats[2].trainPenalty = [0, 1, 5, 11]; skillStats[3] = new Array(); skillStats[3].name = 'Plague Ball'; skillStats[3].description = 'Projectile. Fires a ball of biohazardous spores that may poison an enemy.'; skillStats[3].compatibility = [0, 3, 4, 6, 7]; skillStats[3].alliance = 1; skillStats[3].charge = 18; skillStats[3].basePower = 20; skillStats[3].preparationTime = 1; skillStats[3].rechargeTime = 240; skillStats[3].maxRange = 160; skillStats[3].invokeMethod = 1; skillStats[3].effectType = 'projectile'; skillStats[3].projectileType = 3; skillStats[3].projectileDebrisType = 3; skillStats[3].force = 0.25; skillStats[3].experience = 6; skillStats[3].statusEffect = 1; skillStats[3].statusEffectDuration = 190; skillStats[3].statusEffectChance = 0.65; skillStats[3].statusEffectSPC = 1; skillStats[3].learnRequirement = 220; skillStats[3].trainPenalty = [0, 1, 5, 9]; skillStats[4] = new Array(); skillStats[4].name = 'Frost Burst'; skillStats[4].description = 'Close range. Blasts and may freeze with a chilling breeze.'; skillStats[4].compatibility = [0, 1, 2, 4, 5, 6]; skillStats[4].alliance = 1; skillStats[4].charge = 17; skillStats[4].basePower = 18; skillStats[4].preparationTime = 0; skillStats[4].rechargeTime = 360; skillStats[4].maxRange = 20; skillStats[4].invokeMethod = 1; skillStats[4].effectType = 'attack'; skillStats[4].force = 0.75; skillStats[4].attackDebrisType = 4; skillStats[4].experience = 5; skillStats[4].statusEffect = 3; skillStats[4].statusEffectDuration = 160; skillStats[4].statusEffectChance = 0.6; skillStats[4].statusEffectSPC = 0.55; skillStats[4].learnRequirement = 170; skillStats[4].trainPenalty = [0, 1, 4, 12]; skillStats[5] = new Array(); skillStats[5].name = 'Aid'; skillStats[5].description = 'Projectile. Relieves an ally (not self) with a healing light.'; skillStats[5].compatibility = [0, 1, 2, 3, 6, 7]; skillStats[5].alliance = 2; skillStats[5].charge = 20; skillStats[5].basePower = -50; skillStats[5].preparationTime = 1; skillStats[5].rechargeTime = 320; skillStats[5].maxRange = 120; skillStats[5].invokeMethod = 1; skillStats[5].effectType = 'projectile'; skillStats[5].projectileType = 4; skillStats[5].projectileDebrisType = 5; skillStats[5].force = 0; skillStats[5].experience = 10; skillStats[5].learnRequirement = 220; skillStats[5].trainPenalty = [0, 2, 5]; skillStats[6] = new Array(); skillStats[6].name = 'Advanced Aid'; skillStats[6].description = 'Projectile. Greatly heals an ally (not self) using medicinal knowledge.'; skillStats[6].compatibility = [0, 1, 2, 3, 6, 7]; skillStats[6].alliance = 2; skillStats[6].charge = 26; skillStats[6].basePower = -95; skillStats[6].preparationTime = 2; skillStats[6].rechargeTime = 440; skillStats[6].maxRange = 140; skillStats[6].invokeMethod = 1; skillStats[6].effectType = 'projectile'; skillStats[6].projectileType = 4; skillStats[6].projectileDebrisType = 6; skillStats[6].force = 0; skillStats[6].experience = 15; skillStats[6].learnRequirement = 450; skillStats[6].preReq = 5; skillStats[6].preReqWeight = 50; skillStats[6].trainPenalty = [2, 7, 11]; skillStats[7] = new Array(); skillStats[7].name = 'Final Aid'; skillStats[7].description = 'Projectile. Greatly heals an ally (not self) and may cause auto-heal.'; skillStats[7].compatibility = [0, 2, 3, 6, 7]; skillStats[7].alliance = 2; skillStats[7].charge = 35; skillStats[7].basePower = -100; skillStats[7].preparationTime = 2; skillStats[7].rechargeTime = 680; skillStats[7].maxRange = 150; skillStats[7].invokeMethod = 1; skillStats[7].effectType = 'projectile'; skillStats[7].projectileType = 4; skillStats[7].projectileDebrisType = 7; skillStats[7].force = 0; skillStats[7].experience = 22; skillStats[7].statusEffect = 4; skillStats[7].statusEffectDuration = 240; skillStats[7].statusEffectChance = 1.5; skillStats[7].statusEffectSPC = -1.5; skillStats[7].learnRequirement = 780; skillStats[7].preReq = 6; skillStats[7].preReqWeight = 75; skillStats[7].trainPenalty = [3, 7, 9]; skillStats[8] = new Array(); skillStats[8].name = 'Rest'; skillStats[8].description = 'Self skill. Heals by resting. Immobilizes self for a few seconds.'; skillStats[8].compatibility = [0, 1, 2, 6, 7]; skillStats[8].alliance = 2; skillStats[8].charge = 12; skillStats[8].basePower = -40; skillStats[8].preparationTime = 0; skillStats[8].rechargeTime = 720; skillStats[8].maxRange = 0; skillStats[8].invokeMethod = 2; skillStats[8].effectType = 'self'; skillStats[8].force = 0; skillStats[8].attackDebrisType = 8; skillStats[8].experience = 7; skillStats[8].statusEffect = 6; skillStats[8].statusEffectDuration = 72; skillStats[8].statusEffectChance = 100; skillStats[8].statusEffectSPC = 0; skillStats[8].learnRequirement = 80; skillStats[8].trainPenalty = [0, 1, 8, 11]; skillStats[9] = new Array(); skillStats[9].name = 'Detonate'; skillStats[9].description = 'Area self skill. Blow up to damage both self and surrounding enemies.'; skillStats[9].compatibility = [0, 1, 2, 4, 5]; skillStats[9].alliance = 1; skillStats[9].charge = 22; skillStats[9].basePower = 15; skillStats[9].preparationTime = 1; skillStats[9].rechargeTime = 600; skillStats[9].maxRange = 40; skillStats[9].invokeMethod = 2; skillStats[9].effectType = 'self'; skillStats[9].force = 0; skillStats[9].attackDebrisType = 9; skillStats[9].shakeMagnitude = 6; skillStats[9].shakeTime = 50; skillStats[9].experience = 16; skillStats[9].learnRequirement = 600; skillStats[9].trainPenalty = [3, 6, 10]; skillStats[10] = new Array(); skillStats[10].name = 'Solo Bolt'; skillStats[10].description = 'Close range. Strike with the power of lightning.'; skillStats[10].compatibility = [0, 1, 2, 4, 5, 7]; skillStats[10].alliance = 1; skillStats[10].charge = 18; skillStats[10].basePower = 22; skillStats[10].preparationTime = 1; skillStats[10].rechargeTime = 480; skillStats[10].maxRange = 20; skillStats[10].invokeMethod = 1; skillStats[10].effectType = 'attack'; skillStats[10].force = 0.4; skillStats[10].attackDebrisType = 10; skillStats[10].experience = 7; skillStats[10].learnRequirement = 110; skillStats[10].trainPenalty = [0, 1, 4]; skillStats[11] = new Array(); skillStats[11].name = 'Double Bolt'; skillStats[11].description = 'Close range. Successive lightning strikes deal high damage.'; skillStats[11].compatibility = [0, 1, 3, 4, 5, 7]; skillStats[11].alliance = 1; skillStats[11].charge = 25; skillStats[11].basePower = 33; skillStats[11].preparationTime = 1; skillStats[11].rechargeTime = 672; skillStats[11].maxRange = 20; skillStats[11].invokeMethod = 1; skillStats[11].effectType = 'attack'; skillStats[11].force = 0.5; skillStats[11].attackDebrisType = 11; skillStats[11].experience = 15; skillStats[11].learnRequirement = 400; skillStats[11].preReq = 10; skillStats[11].preReqWeight = 50; skillStats[11].trainPenalty = [0, 2, 4, 11]; skillStats[12] = new Array(); skillStats[12].name = 'Illusion Sword'; skillStats[12].description = 'Close range. Damages and disorients the enemy using illusionary weaponry.'; skillStats[12].compatibility = [0, 1, 5]; skillStats[12].alliance = 1; skillStats[12].charge = 22; skillStats[12].basePower = 32; skillStats[12].preparationTime = 2; skillStats[12].rechargeTime = 600; skillStats[12].maxRange = 20; skillStats[12].invokeMethod = 1; skillStats[12].effectType = 'attack'; skillStats[12].force = 0.9; skillStats[12].attackDebrisType = 12; skillStats[12].statusEffect = 5; skillStats[12].statusEffectDuration = 150; skillStats[12].statusEffectChance = 0.8; skillStats[12].statusEffectSPC = 200; skillStats[12].experience = 19; skillStats[12].learnRequirement = 500; skillStats[12].trainPenalty = [3, 6, 11]; skillStats[13] = new Array(); skillStats[13].name = 'Adrenaline'; skillStats[13].description = 'Self skill. Boosts standard attack power with a rush of adrenaline.'; skillStats[13].compatibility = [0, 1, 2, 3, 4, 5]; skillStats[13].alliance = 2; skillStats[13].charge = 12; skillStats[13].basePower = 0; skillStats[13].preparationTime = 1; skillStats[13].rechargeTime = 800; skillStats[13].maxRange = 0; skillStats[13].invokeMethod = 2; skillStats[13].effectType = 'self'; skillStats[13].force = 0; skillStats[13].attackDebrisType = 13; skillStats[13].experience = 9; skillStats[13].statusEffect = 7; skillStats[13].statusEffectDuration = 400; skillStats[13].statusEffectChance = 100; skillStats[13].statusEffectSPC = 1.4; skillStats[13].learnRequirement = 220; skillStats[13].trainPenalty = [0, 2, 4]; skillStats[14] = new Array(); skillStats[14].name = 'Adrenaline Blast'; skillStats[14].description = 'Area self skill. Boosts attack power of self and surrounding allies.'; skillStats[14].compatibility = [0, 1, 3, 4, 5]; skillStats[14].alliance = 2; skillStats[14].charge = 25; skillStats[14].basePower = 0; skillStats[14].preparationTime = 0; skillStats[14].rechargeTime = 720; skillStats[14].maxRange = 0; skillStats[14].invokeMethod = 2; skillStats[14].effectType = 'self'; skillStats[14].force = 0; skillStats[14].attackDebrisType = 14; skillStats[14].experience = 18; skillStats[14].learnRequirement = 760; skillStats[14].preReq = 13; skillStats[14].preReqWeight = 50; skillStats[14].trainPenalty = [3, 6, 10]; skillStats[15] = new Array(); skillStats[15].name = 'Burn Cut'; skillStats[15].description = 'Close range. Flaming gas cuts through and may burn an enemy.'; skillStats[15].compatibility = [0, 1, 2, 4, 5]; skillStats[15].alliance = 1; skillStats[15].charge = 15; skillStats[15].basePower = 22; skillStats[15].preparationTime = 0; skillStats[15].rechargeTime = 528; skillStats[15].maxRange = 20; skillStats[15].invokeMethod = 1; skillStats[15].effectType = 'attack'; skillStats[15].force = 0.75; skillStats[15].attackDebrisType = 15; skillStats[15].experience = 10; skillStats[15].statusEffect = 2; skillStats[15].statusEffectDuration = 140; skillStats[15].statusEffectChance = 0.6; skillStats[15].statusEffectSPC = 1; skillStats[15].learnRequirement = 265; skillStats[15].trainPenalty = [0, 1, 4, 10]; skillStats[16] = new Array(); skillStats[16].name = 'Flame Cast'; skillStats[16].description = 'Area projectile. Throws an orb that ignites on contact, causing burns.'; skillStats[16].compatibility = [0, 2, 3, 4, 5, 6, 7]; skillStats[16].alliance = 1; skillStats[16].charge = 24; skillStats[16].basePower = 28; skillStats[16].preparationTime = 2; skillStats[16].rechargeTime = 672; skillStats[16].maxRange = 250; skillStats[16].invokeMethod = 1; skillStats[16].effectType = 'projectile'; skillStats[16].projectileType = 5; skillStats[16].projectileDebrisType = 16; skillStats[16].force = 0.6; skillStats[16].experience = 22; skillStats[16].learnRequirement = 640; skillStats[16].trainPenalty = [3, 7, 10]; skillStats[17] = new Array(); skillStats[17].name = 'Shard Cast'; skillStats[17].description = 'Area projectile. Throws an orb that blasts freezing cold shards.'; skillStats[17].compatibility = [0, 3, 4, 5, 6, 7]; skillStats[17].alliance = 1; skillStats[17].charge = 24; skillStats[17].basePower = 28; skillStats[17].preparationTime = 2; skillStats[17].rechargeTime = 672; skillStats[17].maxRange = 250; skillStats[17].invokeMethod = 1; skillStats[17].effectType = 'projectile'; skillStats[17].projectileType = 6; skillStats[17].projectileDebrisType = 17; skillStats[17].force = 0.6; skillStats[17].experience = 22; skillStats[17].learnRequirement = 640; skillStats[17].trainPenalty = [3, 7, 12]; skillStats[18] = new Array(); skillStats[18].name = 'Sacrifice Blood'; skillStats[18].description = 'Self skill. Sacrifice health to the gods in exchange for favour.'; skillStats[18].compatibility = [0, 1, 2, 3, 4, 5, 6, 7]; skillStats[18].deityRestrict = [4]; skillStats[18].alliance = 2; skillStats[18].charge = 5; skillStats[18].basePower = 0; skillStats[18].staticPower = 0.2; skillStats[18].baseFavour = 5; skillStats[18].preparationTime = 1; skillStats[18].rechargeTime = 2400; skillStats[18].maxRange = 0; skillStats[18].invokeMethod = 2; skillStats[18].effectType = 'self'; skillStats[18].force = 0; skillStats[18].attackDebrisType = 18; skillStats[18].experience = 9; skillStats[18].learnRequirement = 50; skillStats[18].trainPenalty = [0, 1, 5, 11]; skillStats[19] = new Array(); skillStats[19].name = 'Sacrifice Soul'; skillStats[19].description = 'Self skill. Kill this unit in exchange for a large amount of favour.'; skillStats[19].compatibility = [0, 1, 3, 4, 5, 6, 7]; skillStats[19].deityRestrict = [4]; skillStats[19].alliance = 2; skillStats[19].charge = 20; skillStats[19].basePower = 0; skillStats[19].staticPower = 1; skillStats[19].baseFavour = 15; skillStats[19].preparationTime = 3; skillStats[19].rechargeTime = 0; skillStats[19].maxRange = 0; skillStats[19].invokeMethod = 2; skillStats[19].effectType = 'self'; skillStats[19].force = 0; skillStats[19].attackDebrisType = 19; skillStats[19].experience = 25; skillStats[19].learnRequirement = 720; skillStats[19].preReq = 20; skillStats[19].preReqWeight = 50; skillStats[19].trainPenalty = [3, 5, 9]; skillStats[20] = new Array(); skillStats[20].name = 'Sacrifice Body'; skillStats[20].description = 'Self skill. Sacrifice max. health (during this battle) in exchange for favour.'; skillStats[20].compatibility = [0, 1, 2, 3, 4, 5, 6, 7]; skillStats[20].deityRestrict = [4]; skillStats[20].alliance = 2; skillStats[20].charge = 5; skillStats[20].basePower = 0; skillStats[20].staticPower = 0.25; skillStats[20].maxPower = true; skillStats[20].baseFavour = 7; skillStats[20].preparationTime = 2; skillStats[20].rechargeTime = 2880; skillStats[20].maxRange = 0; skillStats[20].invokeMethod = 2; skillStats[20].effectType = 'self'; skillStats[20].force = 0; skillStats[20].attackDebrisType = 20; skillStats[20].experience = 15; skillStats[20].learnRequirement = 400; skillStats[20].preReq = 18; skillStats[20].preReqWeight = 50; skillStats[20].trainPenalty = [0, 2, 8, 9]; skillStats[21] = new Array(); skillStats[21].name = 'Aether Flow'; skillStats[21].description = 'Self skill. Applies a steady auto heal to unit, using alchemic substances.'; skillStats[21].compatibility = [0, 1, 2, 5, 6, 7]; skillStats[21].alliance = 2; skillStats[21].charge = 26; skillStats[21].basePower = 0; skillStats[21].preparationTime = 1; skillStats[21].rechargeTime = 720; skillStats[21].maxRange = 0; skillStats[21].invokeMethod = 2; skillStats[21].effectType = 'self'; skillStats[21].force = 0; skillStats[21].attackDebrisType = 21; skillStats[21].experience = 17; skillStats[21].statusEffect = 4; skillStats[21].statusEffectDuration = 284; skillStats[21].statusEffectChance = 100; skillStats[21].statusEffectSPC = -2.8; skillStats[21].learnRequirement = 450; skillStats[21].preReq = 6; skillStats[21].preReqWeight = 50; skillStats[21].trainPenalty = [2, 5, 12]; skillStats[22] = new Array(); skillStats[22].name = 'Shock Cast'; skillStats[22].description = 'Area projectile. Throws an orb that electrifies and immobilizes enemies.'; skillStats[22].compatibility = [0, 3, 4, 5, 6, 7]; skillStats[22].alliance = 1; skillStats[22].charge = 26; skillStats[22].basePower = 30; skillStats[22].preparationTime = 2; skillStats[22].rechargeTime = 672; skillStats[22].maxRange = 250; skillStats[22].invokeMethod = 1; skillStats[22].effectType = 'projectile'; skillStats[22].projectileType = 6; skillStats[22].projectileDebrisType = 22; skillStats[22].force = 0.6; skillStats[22].experience = 22; skillStats[22].learnRequirement = 720; skillStats[22].trainPenalty = [3, 7]; skillStats[23] = new Array(); skillStats[23].name = 'Toxin Cloud'; skillStats[23].description = 'Area projectile. Expels a gas that poisons enemies in a large area.'; skillStats[23].compatibility = [0, 2, 6, 7]; skillStats[23].alliance = 1; skillStats[23].charge = 18; skillStats[23].basePower = 4; skillStats[23].preparationTime = 2; skillStats[23].rechargeTime = 600; skillStats[23].maxRange = 230; skillStats[23].invokeMethod = 1; skillStats[23].effectType = 'projectile'; skillStats[23].projectileType = 3; skillStats[23].projectileDebrisType = 23; skillStats[23].force = 0; skillStats[23].experience = 14; skillStats[23].preReq = 3; skillStats[23].preReqWeight = 50; skillStats[23].learnRequirement = 330; skillStats[23].trainPenalty = [0, 2, 5, 9]; skillStats[24] = new Array(); skillStats[24].name = 'Charge Cannon'; skillStats[24].description = 'Close range. Expels immense energy at one enemy, massively damaging it.'; skillStats[24].compatibility = [0, 1, 2, 3, 4, 5, 6, 7]; skillStats[24].deityRestrict = [0, 2, 3]; skillStats[24].alliance = 1; skillStats[24].charge = 40; skillStats[24].basePower = 55; skillStats[24].preparationTime = 3; skillStats[24].rechargeTime = 960; skillStats[24].maxRange = 30; skillStats[24].invokeMethod = 1; skillStats[24].effectType = 'attack'; skillStats[24].force = 1.2; skillStats[24].attackDebrisType = 24; skillStats[24].shakeMagnitude = 10; skillStats[24].shakeTime = 50; skillStats[24].experience = 25; skillStats[24].learnRequirement = 950; skillStats[24].trainPenalty = [3, 6, 7, 10]; skillStats[25] = new Array(); skillStats[25].name = 'Bloodshed Portal'; skillStats[25].description = 'Area projectile. Opens an underworld gate that damages enemies.'; skillStats[25].compatibility = [0, 3, 4, 7]; skillStats[25].deityRestrict = [0, 1, 2]; skillStats[25].alliance = 1; skillStats[25].charge = 40; skillStats[25].basePower = 0; skillStats[25].preparationTime = 4; skillStats[25].rechargeTime = 960; skillStats[25].maxRange = 270; skillStats[25].invokeMethod = 1; skillStats[25].effectType = 'projectile'; skillStats[25].projectileType = 5; skillStats[25].projectileDebrisType = 25; skillStats[25].projectileHitGround = true; skillStats[25].force = 1.2; skillStats[25].experience = 25; skillStats[25].learnRequirement = 850; skillStats[25].trainPenalty = [3, 5, 7, 11]; skillStats[26] = new Array(); skillStats[26].name = 'Lifeforce Wind'; skillStats[26].description = 'Area self skill. Massively heals and applies auto heal to surrounding allies.'; skillStats[26].compatibility = [0, 1, 2, 5, 6, 7]; skillStats[26].alliance = 2; skillStats[26].charge = 42; skillStats[26].basePower = 0; skillStats[26].preparationTime = 4; skillStats[26].rechargeTime = 1008; skillStats[26].maxRange = 0; skillStats[26].invokeMethod = 2; skillStats[26].effectType = 'self'; skillStats[26].force = 0; skillStats[26].attackDebrisType = 26; skillStats[26].experience = 25; skillStats[26].learnRequirement = 900; skillStats[26].preReq = 21; skillStats[26].preReqWeight = 50; skillStats[26].trainPenalty = [3, 4, 9, 12]; skillStats[27] = new Array(); skillStats[27].name = 'Confusion Lights'; skillStats[27].description = 'Close range. Damages and disorients enemy, making attacks miss.'; skillStats[27].compatibility = [0, 1, 2, 4, 5, 6]; skillStats[27].alliance = 1; skillStats[27].charge = 15; skillStats[27].basePower = 16; skillStats[27].preparationTime = 0; skillStats[27].rechargeTime = 480; skillStats[27].maxRange = 20; skillStats[27].invokeMethod = 1; skillStats[27].effectType = 'attack'; skillStats[27].force = 0.4; skillStats[27].attackDebrisType = 27; skillStats[27].experience = 5; skillStats[27].statusEffect = 5; skillStats[27].statusEffectDuration = 250; skillStats[27].statusEffectChance = 1.5; skillStats[27].statusEffectSPC = 200; skillStats[27].learnRequirement = 80; skillStats[27].trainPenalty = [0, 1, 7, 11]; jobStats = new Array(); jobStats[0] = new Array(); jobStats[0].name = 'Hero'; jobStats[0].description = 'Your hero, leader of the team. You may only have one.'; jobStats[0].attackType = 'attack'; jobStats[0].attackMaxRange = 25; jobStats[0].baseAttackPower = 10; jobStats[0].baseForce = 0.3; jobStats[0].creationMaxHPPriority = 30; jobStats[0].creationMaxChargePriority = 20; jobStats[0].creationAttackPowerPriority = 20; jobStats[0].creationMagicPowerPriority = 20; jobStats[0].creationSpeedPriority = 10; jobStats[0].creationSkills = [8, 10]; jobStats[1] = new Array(); jobStats[1].name = 'Guardsman'; jobStats[1].varNames = ['Dark Guard', 'Outlaw Sword', 'Pirate']; jobStats[1].description = 'A standard but well-rounded, equipped and armed infantry unit.'; jobStats[1].attackType = 'attack'; jobStats[1].attackMaxRange = 25; jobStats[1].baseAttackPower = 10; jobStats[1].baseForce = 0.25; jobStats[1].creationMaxHPPriority = 25; jobStats[1].creationMaxChargePriority = 20; jobStats[1].creationAttackPowerPriority = 20; jobStats[1].creationMagicPowerPriority = 20; jobStats[1].creationSpeedPriority = 15; jobStats[1].creationSkills = [4]; jobStats[2] = new Array(); jobStats[2].name = 'Spearman'; jobStats[2].varNames = ['Trainer', 'Bandit Impaler', 'Undead Spear']; jobStats[2].description = 'A basic infantry unit that specializes in physical attacks.'; jobStats[2].attackType = 'attack'; jobStats[2].attackMaxRange = 25; jobStats[2].baseAttackPower = 10; jobStats[2].baseForce = 0.2; jobStats[2].creationMaxHPPriority = 25; jobStats[2].creationMaxChargePriority = 15; jobStats[2].creationAttackPowerPriority = 30; jobStats[2].creationMagicPowerPriority = 15; jobStats[2].creationSpeedPriority = 15; jobStats[2].creationSkills = [13]; jobStats[3] = new Array(); jobStats[3].name = 'Bowman'; jobStats[3].varNames = ['Dark Archer', 'Nightshade Bow']; jobStats[3].description = 'A bow-equipped unit that can attack from a great distance.'; jobStats[3].attackType = 'projectile'; jobStats[3].projectileType = -1; jobStats[3].attackMaxRange = 360; jobStats[3].baseAttackPower = 11; jobStats[3].baseForce = 0.25; jobStats[3].closeAttackRange = 25; jobStats[3].closeAttackThres = 80; jobStats[3].creationMaxHPPriority = 15; jobStats[3].creationMaxChargePriority = 20; jobStats[3].creationAttackPowerPriority = 30; jobStats[3].creationMagicPowerPriority = 20; jobStats[3].creationSpeedPriority = 15; jobStats[3].creationSkills = [1]; jobStats[4] = new Array(); jobStats[4].name = 'Crossbowman'; jobStats[4].varNames = ['Bandit Crossbow', 'Undead Crossbow']; jobStats[4].description = 'A strong but slow-firing unit with a ranged attack.'; jobStats[4].attackType = 'projectile'; jobStats[4].projectileType = -2; jobStats[4].attackMaxRange = 300; jobStats[4].closeAttackRange = 25; jobStats[4].closeAttackThres = 80; jobStats[4].baseAttackPower = 15; jobStats[4].baseForce = 0.35; jobStats[4].creationMaxHPPriority = 17; jobStats[4].creationMaxChargePriority = 15; jobStats[4].creationAttackPowerPriority = 30; jobStats[4].creationMagicPowerPriority = 25; jobStats[4].creationSpeedPriority = 13; jobStats[4].creationSkills = [2]; jobStats[5] = new Array(); jobStats[5].name = 'Knight'; jobStats[5].varNames = ['Undead Rider', 'Haruspex', 'Headless Mount', 'Awakener']; jobStats[5].description = 'A large, fast, mounted unit. Moderately acceptable in all fields.'; jobStats[5].mounted = true; jobStats[5].attackType = 'attack'; jobStats[5].attackMaxRange = 25; jobStats[5].baseAttackPower = 10; jobStats[5].baseForce = 0.3; jobStats[5].creationMaxHPPriority = 20; jobStats[5].creationMaxChargePriority = 10; jobStats[5].creationAttackPowerPriority = 20; jobStats[5].creationMagicPowerPriority = 20; jobStats[5].creationSpeedPriority = 30; jobStats[5].creationSkills = [12]; jobStats[6] = new Array(); jobStats[6].name = 'Monk'; jobStats[6].varNames = ['Druid', 'Nightshade Priest']; jobStats[6].description = 'A charge-efficient skill-based unit. The ideal profession for healing others.'; jobStats[6].attackType = 'attack'; jobStats[6].attackMaxRange = 25; jobStats[6].baseAttackPower = 10; jobStats[6].baseForce = 0.1; jobStats[6].creationMaxHPPriority = 20; jobStats[6].creationMaxChargePriority = 30; jobStats[6].creationAttackPowerPriority = 10; jobStats[6].creationMagicPowerPriority = 30; jobStats[6].creationSpeedPriority = 10; jobStats[6].creationSkills = [5]; jobStats[7] = new Array(); jobStats[7].name = 'Incanter'; jobStats[7].varNames = ['Outlaw Magi', 'Nightshade Mage']; jobStats[7].description = 'A ranged unit highly proficient with skills, but lacking in physical attack power.'; jobStats[7].attackType = 'projectile'; jobStats[7].projectileType = -3; jobStats[7].attackMaxRange = 150; jobStats[7].closeAttackRange = 25; jobStats[7].closeAttackThres = 80; jobStats[7].baseAttackPower = 10; jobStats[7].baseForce = 0.1; jobStats[7].creationMaxHPPriority = 15; jobStats[7].creationMaxChargePriority = 25; jobStats[7].creationAttackPowerPriority = 10; jobStats[7].creationMagicPowerPriority = 35; jobStats[7].creationSpeedPriority = 15; jobStats[7].creationSkills = [3]; jobStats[8] = new Array(); jobStats[8].name = 'Haruspex'; jobStats[8].description = 'An elite divine servant of Kasayel that uses very potent magic.'; jobStats[8].attackType = 'projectile'; jobStats[8].projectileType = -3; jobStats[8].attackMaxRange = 150; jobStats[8].closeAttackRange = 40; jobStats[8].closeAttackThres = 80; jobStats[8].baseAttackPower = 10; jobStats[8].baseForce = 0.15; jobStats[8].creationMaxHPPriority = 20; jobStats[8].creationMaxChargePriority = 20; jobStats[8].creationAttackPowerPriority = 5; jobStats[8].creationMagicPowerPriority = 40; jobStats[8].creationSpeedPriority = 15; jobStats[8].creationSkills = [6, 4]; jobStats[9] = new Array(); jobStats[9].name = 'Angel'; jobStats[9].description = 'An extremely powerful unit that recieves ultimate favour from the gods.'; jobStats[9].attackType = 'attack'; jobStats[9].attackMaxRange = 25; jobStats[9].baseAttackPower = 12; jobStats[9].baseForce = 0.2; jobStats[9].creationMaxHPPriority = 30; jobStats[9].creationMaxChargePriority = 5; jobStats[9].creationAttackPowerPriority = 30; jobStats[9].creationMagicPowerPriority = 30; jobStats[9].creationSpeedPriority = 5; jobStats[9].creationSkills = [6, 4]; projectileStats = new Array(); projectileStats[-3] = new Array(); projectileStats[-3].baseSpeed = 20; projectileStats[-3].baseHeight = 30; projectileStats[-3].projectileTrailDiversity = 1; projectileStats[-3].projectileDebrisType = -3; projectileStats[-2] = new Array(); projectileStats[-2].baseSpeed = 20; projectileStats[-2].baseHeight = 0; projectileStats[-2].projectileTrailDiversity = 0; projectileStats[-2].projectileDebrisType = -2; projectileStats[-1] = new Array(); projectileStats[-1].baseSpeed = 20; projectileStats[-1].baseHeight = 16; projectileStats[-1].projectileTrailDiversity = 0; projectileStats[-1].projectileDebrisType = -1; projectileStats[1] = new Array(); projectileStats[1].baseSpeed = 10; projectileStats[1].baseHeight = 15; projectileStats[1].projectileTrailDiversity = 1; projectileStats[2] = new Array(); projectileStats[2].baseSpeed = 8; projectileStats[2].baseHeight = 15; projectileStats[2].projectileTrailDiversity = 1; projectileStats[3] = new Array(); projectileStats[3].baseSpeed = 10; projectileStats[3].baseHeight = 40; projectileStats[3].projectileTrailDiversity = 1; projectileStats[4] = new Array(); projectileStats[4].baseSpeed = 10; projectileStats[4].baseHeight = 20; projectileStats[4].projectileTrailDiversity = 0; projectileStats[5] = new Array(); projectileStats[5].baseSpeed = 13; projectileStats[5].baseHeight = 34; projectileStats[5].projectileTrailDiversity = 0; projectileStats[6] = new Array(); projectileStats[6].baseSpeed = 13; projectileStats[6].baseHeight = 34; projectileStats[6].projectileTrailDiversity = 0; damageDebrisStats = new Array(); damageDebrisStats[2] = new Array(); damageDebrisStats[2].targetPlayer = 2; damageDebrisStats[2].damageAmount = 5; damageDebrisStats[2].statusEffect = 5; damageDebrisStats[2].statusEffectDuration = 200; damageDebrisStats[2].statusEffectChance = 0.5; damageDebrisStats[2].statusEffectSPC = 200; damageDebrisStats[2].hitTestType = 1; damageDebrisStats[9] = new Array(); damageDebrisStats[9].targetPlayer = 2; damageDebrisStats[9].damageAmount = 12; damageDebrisStats[9].statusEffect = 2; damageDebrisStats[9].statusEffectDuration = 140; damageDebrisStats[9].statusEffectChance = 0.3; damageDebrisStats[9].statusEffectSPC = 0.8; damageDebrisStats[9].hitTestType = 1; damageDebrisStats[14] = new Array(); damageDebrisStats[14].targetPlayer = 1; damageDebrisStats[14].damageAmount = 0; damageDebrisStats[14].statusEffect = 7; damageDebrisStats[14].statusEffectDuration = 400; damageDebrisStats[14].statusEffectChance = 100; damageDebrisStats[14].statusEffectSPC = 1.35; damageDebrisStats[14].hitTestType = 1; damageDebrisStats[16] = new Array(); damageDebrisStats[16].targetPlayer = 2; damageDebrisStats[16].damageAmount = 9; damageDebrisStats[16].statusEffect = 2; damageDebrisStats[16].statusEffectDuration = 140; damageDebrisStats[16].statusEffectChance = 0.6; damageDebrisStats[16].statusEffectSPC = 1.5; damageDebrisStats[16].hitTestType = 1; damageDebrisStats[17] = new Array(); damageDebrisStats[17].targetPlayer = 2; damageDebrisStats[17].damageAmount = 9; damageDebrisStats[17].statusEffect = 3; damageDebrisStats[17].statusEffectDuration = 140; damageDebrisStats[17].statusEffectChance = 0.6; damageDebrisStats[17].statusEffectSPC = 0.55; damageDebrisStats[17].hitTestType = 1; damageDebrisStats[22] = new Array(); damageDebrisStats[22].targetPlayer = 2; damageDebrisStats[22].damageAmount = 11; damageDebrisStats[22].statusEffect = 6; damageDebrisStats[22].statusEffectDuration = 120; damageDebrisStats[22].statusEffectChance = 0.6; damageDebrisStats[22].statusEffectSPC = 0.55; damageDebrisStats[22].hitTestType = 1; damageDebrisStats[23] = new Array(); damageDebrisStats[23].targetPlayer = 2; damageDebrisStats[23].damageAmount = 1; damageDebrisStats[23].statusEffect = 1; damageDebrisStats[23].statusEffectDuration = 300; damageDebrisStats[23].statusEffectChance = 1.5; damageDebrisStats[23].statusEffectSPC = 2; damageDebrisStats[23].hitTestType = 1; damageDebrisStats[25] = new Array(); damageDebrisStats[25].targetPlayer = 2; damageDebrisStats[25].damageAmount = 37; damageDebrisStats[25].hitTestType = 1; damageDebrisStats[25].shakeMagnitude = 10; damageDebrisStats[25].shakeTime = 50; damageDebrisStats[26] = new Array(); damageDebrisStats[26].targetPlayer = 1; damageDebrisStats[26].damageAmount = -80; damageDebrisStats[26].statusEffect = 4; damageDebrisStats[26].statusEffectDuration = 240; damageDebrisStats[26].statusEffectChance = 0.75; damageDebrisStats[26].statusEffectSPC = -1.5; damageDebrisStats[26].hitTestType = 1; environmentStats = new Array(); environmentStats[0] = new Array(); environmentStats[0].ground = 4; environmentStats[0].background2 = 4; environmentStats[0].background3 = 4; environmentStats[0].background4 = 2; environmentStats[0].sun = 1; environmentStats[0].sunX = 200; environmentStats[0].sunY = 80; environmentStats[1] = new Array(); environmentStats[1].ground = 2; environmentStats[1].background2 = 2; environmentStats[1].background3 = 2; environmentStats[1].background4 = 2; environmentStats[1].sun = 1; environmentStats[1].sunX = 200; environmentStats[1].sunY = 80; environmentStats[2] = new Array(); environmentStats[2].ground = 3; environmentStats[2].background2 = 3; environmentStats[2].background3 = 3; environmentStats[2].background4 = 3; environmentStats[2].sun = 1; environmentStats[2].sunX = 200; environmentStats[2].sunY = 80; environmentStats[3] = new Array(); environmentStats[3].ground = 5; environmentStats[3].background2 = 5; environmentStats[3].background3 = 5; environmentStats[3].background4 = 3; environmentStats[3].sun = 2; environmentStats[3].sunX = 87; environmentStats[3].sunY = 0; environmentStats[4] = new Array(); environmentStats[4].ground = 6; environmentStats[4].background2 = 6; environmentStats[4].background3 = 6; environmentStats[4].background4 = 4; environmentStats[5] = new Array(); environmentStats[5].ground = 7; environmentStats[5].background2 = 7; environmentStats[5].background3 = 7; environmentStats[5].background4 = 5; environmentStats[5].sun = 1; environmentStats[5].sunX = 400; environmentStats[5].sunY = -20; environmentStats[6] = new Array(); environmentStats[6].ground = 8; environmentStats[6].background2 = 8; environmentStats[6].background3 = 8; environmentStats[6].background4 = 4; environmentStats[6].fieldOverlay = 1; environmentStats[6].fieldOverlayScroll = 0.5; environmentStats[7] = new Array(); environmentStats[7].ground = 9; environmentStats[7].background2 = 9; environmentStats[7].background3 = 9; environmentStats[7].background4 = 2; environmentStats[7].sun = 1; environmentStats[7].sunX = 400; environmentStats[7].sunY = 38; environmentStats[8] = new Array(); environmentStats[8].ground = 10; environmentStats[8].background2 = 10; environmentStats[8].background3 = 10; environmentStats[8].background4 = 6; environmentStats[8].sun = 2; environmentStats[8].sunX = 513; environmentStats[8].sunY = 0; environmentStats[8].sunFlip = true; environmentStats[8].fieldOverlay = 2; environmentStats[8].fieldOverlayScroll = 0.7; environmentStats[9] = new Array(); environmentStats[9].ground = 11; environmentStats[9].background2 = 11; environmentStats[9].background3 = 11; environmentStats[9].background4 = 3; environmentStats[9].sun = 1; environmentStats[9].sunX = 580; environmentStats[9].sunY = 25; environmentStats[9].fieldOverlay = 3; environmentStats[9].fieldOverlayScroll = 0.5; environmentStats[10] = new Array(); environmentStats[10].ground = 12; environmentStats[10].background2 = 12; environmentStats[10].background3 = 12; environmentStats[10].background4 = 7; environmentStats[10].fieldOverlay = 4; environmentStats[10].fieldOverlayScroll = 0; environmentStats[11] = new Array(); environmentStats[11].ground = 13; environmentStats[11].background2 = 13; environmentStats[11].background3 = 13; environmentStats[11].background4 = 8; environmentStats[11].fieldOverlay = 5; environmentStats[11].fieldOverlayScroll = 0; environmentStats[12] = new Array(); environmentStats[12].ground = 14; environmentStats[12].background2 = 14; environmentStats[12].background3 = 14; environmentStats[12].background4 = 7; environmentStats[12].fieldOverlay = 6; environmentStats[12].fieldOverlayScroll = 0; environmentStats[12].sun = 2; environmentStats[12].sunX = 87; environmentStats[12].sunY = 0; deityStats = new Array(); deityStats[0] = new Array(); deityStats[0].deityName = 'Xew'; deityStats[0].deityDescription = 'The god of sacrifice. Units serving Xew gain more favour from sacrifices.'; deityStats[0].startFavour = 50; deityStats[1] = new Array(); deityStats[1].deityName = 'Tulinaa'; deityStats[1].deityDescription = 'The god of knowledge. Units serving Tulinaa gain favour by using skills.'; deityStats[1].startFavour = 50; deityStats[2] = new Array(); deityStats[2].deityName = 'Resquar'; deityStats[2].deityDescription = 'The god of humanity. Units serving Resquar gain small amounts of favour for being alive in battle.'; deityStats[2].startFavour = 50; deityStats[3] = new Array(); deityStats[3].deityName = 'Kasayel'; deityStats[3].deityDescription = 'The god of bloodshed. Units serving Kasayel gain favour for each enemy-killing attack they make.'; deityStats[3].startFavour = 50; deityStats[4] = new Array(); deityStats[4].deityName = 'Godless'; deityStats[4].deityDescription = 'This unit is godless and is always at 75 favour. However, it may not fare well in judgement...'; deityStats[4].startFavour = 75; campaignStats = new Array(); campaignStats.locationData = new Array(); campaignStats.locationData[1] = new Array(); campaignStats.locationData[1].locationInfo = 'Commuloran Peaks::A small mountain range that divides the town of Photomorus from the nearby ocean. It serves as an excellent lookout location for both land and sea.'; campaignStats.locationData[1].campaignMissions = [1, 5]; campaignStats.locationData[2] = new Array(); campaignStats.locationData[2].locationInfo = 'Photomorus::Home to a few thousand citizens, Photomorus is a merchant town with a small army. Its significant history stretches over several hundred years.'; campaignStats.locationData[2].campaignMissions = [2, 18]; campaignStats.locationData[3] = new Array(); campaignStats.locationData[3].locationInfo = 'Phosmortem Temple::Considered to be the center of Photomorus, this greatly respected temple is older than the city itself. It is usually entered by only the most worthy individuals.'; campaignStats.locationData[3].campaignMissions = [3]; campaignStats.locationData[4] = new Array(); campaignStats.locationData[4].locationInfo = 'Highway 6::Highway 6 is the only large road that runs from Photomorus, as well as its only trade route. The road becomes more dangerous at night, due to bandits and thieves.'; campaignStats.locationData[4].campaignMissions = [4, 17]; campaignStats.locationData[5] = new Array(); campaignStats.locationData[5].locationInfo = 'Plebian Plains::The land quickly evens out at the end of Highway 6, exposing a grassy terrain with strewn with rocks. These plains are rarely visited by those of high class.'; campaignStats.locationData[5].campaignMissions = [6, 7]; campaignStats.locationData[6] = new Array(); campaignStats.locationData[6].locationInfo = 'River Sel::Between the town and the plains lies a shallow river - one of many that flow north from the mountains to the ocean. It provides a view for those travelling on the highway.'; campaignStats.locationData[6].campaignMissions = [8, 16]; campaignStats.locationData[7] = new Array(); campaignStats.locationData[7].locationInfo = 'Thief Hideout::A long, narrow, underground passage from an abandoned house in Photomorus leads to a remote bandit base. The lowest of thieves inconspicuously occupy this area.'; campaignStats.locationData[7].campaignMissions = [9]; campaignStats.locationData[8] = new Array(); campaignStats.locationData[8].locationInfo = 'Soul\'s Grotto::Although the fastest connection between the plains and port, this cave is largely unknown. Strange occurrences frequently push explorers away from the mysterious area.'; campaignStats.locationData[8].campaignMissions = [10]; campaignStats.locationData[9] = new Array(); campaignStats.locationData[9].locationInfo = 'Yenrow Port::A sparsely inhabited port sits on the edge of the northern ocean. Although formerly prosperous, something has lately driven people away... Strange ships often come ashore.'; campaignStats.locationData[9].campaignMissions = [11]; campaignStats.locationData[10] = new Array(); campaignStats.locationData[10].locationInfo = 'Langeli Foothills::The foot of the Langeli Mountains is rumored to be cursed. Very few people know of the area\'s existance - and those who do never dare to approach it.'; campaignStats.locationData[10].campaignMissions = [12]; campaignStats.locationData[11] = new Array(); campaignStats.locationData[11].locationInfo = 'Langeli Plateau::This elevated point of the mountains would be an excellent lookout location if it weren\'t eternally covered by clouds. The sudden cold makes this a dangerous environment.'; campaignStats.locationData[11].campaignMissions = [13]; campaignStats.locationData[12] = new Array(); campaignStats.locationData[12].locationInfo = 'The Night Tower::Built at the coming of the gods, the tower is said to allow communication between the world and the heavens. Divine power keeps it in everlasting nightfall.'; campaignStats.locationData[12].campaignMissions = [14, 15]; campaignStats.missionData = new Array(); campaignStats.missionData[0] = new Array(); campaignStats.missionData[0].missionInfo = 'Training'; campaignStats.missionData[0].playerNumber = 1; campaignStats.missionData[0].environmentNumber = 0; campaignStats.missionData[0].victoryCond = [true, false]; campaignStats.missionData[0].enemyTeamName = 'Combat Trainer'; campaignStats.missionData[0].enemyTeamColours = [216, 191, 52]; campaignStats.missionData[0].enemyTeamUnits = [0]; campaignStats.missionData[0].enemyTeamAI = 1; campaignStats.missionData[0].deployInterval = 144; campaignStats.missionData[0].maxDeployed = 4; campaignStats.missionData[1] = new Array(); campaignStats.missionData[1].missionInfo = 'Capital Punishment'; campaignStats.missionData[1].missionAvailable = '0:1:1:0'; campaignStats.missionData[1].playerNumber = 1; campaignStats.missionData[1].environmentNumber = 1; campaignStats.missionData[1].victoryCond = [false, true]; campaignStats.missionData[1].enemyTeamName = 'Town Deserters'; campaignStats.missionData[1].enemyTeamColours = [150, 20, 20]; campaignStats.missionData[1].enemyTeamUnits = [1, 1, 2, 2]; campaignStats.missionData[1].enemyTeamAI = 1; campaignStats.missionData[1].deployInterval = 144; campaignStats.missionData[1].maxDeployed = 4; campaignStats.missionData[2] = new Array(); campaignStats.missionData[2].missionInfo = 'Sensed Intentions'; campaignStats.missionData[2].missionAvailable = '0:2:2:0'; campaignStats.missionData[2].playerNumber = 1; campaignStats.missionData[2].environmentNumber = 2; campaignStats.missionData[2].victoryCond = [false, true]; campaignStats.missionData[2].enemyTeamName = 'Chaotic Mob'; campaignStats.missionData[2].enemyTeamColours = [80, 0, 0]; campaignStats.missionData[2].enemyTeamUnits = [5, 4, 6, 7]; campaignStats.missionData[2].enemyTeamAI = 1; campaignStats.missionData[2].deployInterval = 144; campaignStats.missionData[2].maxDeployed = 4; campaignStats.missionData[3] = new Array(); campaignStats.missionData[3].missionInfo = 'The Temple Defiled'; campaignStats.missionData[3].missionAvailable = '0:3:3:0,1,2'; campaignStats.missionData[3].playerNumber = 1; campaignStats.missionData[3].environmentNumber = 3; campaignStats.missionData[3].victoryCond = [true, false]; campaignStats.missionData[3].enemyTeamName = 'Haruspex Elite'; campaignStats.missionData[3].enemyTeamColours = [0, 0, 0]; campaignStats.missionData[3].enemyTeamUnits = [3, 5, 4]; campaignStats.missionData[3].enemyTeamAI = 1; campaignStats.missionData[3].deployInterval = 144; campaignStats.missionData[3].maxDeployed = 4; campaignStats.missionData[3].rankUp = 'Congratulations on clearing the sacred temple!::2'; campaignStats.missionData[3].bossMusic = true; campaignStats.missionData[4] = new Array(); campaignStats.missionData[4].missionInfo = 'In Pursuit'; campaignStats.missionData[4].missionAvailable = '2:1:1:2'; campaignStats.missionData[4].playerNumber = 1; campaignStats.missionData[4].environmentNumber = 4; campaignStats.missionData[4].victoryCond = [false, true]; campaignStats.missionData[4].enemyTeamName = 'Druidic Rearguard'; campaignStats.missionData[4].enemyTeamColours = [0, 0, 0]; campaignStats.missionData[4].enemyTeamUnits = [4, 5, 8, 8, 8]; campaignStats.missionData[4].enemyTeamAI = 1; campaignStats.missionData[4].deployInterval = 144; campaignStats.missionData[4].maxDeployed = 4; campaignStats.missionData[5] = new Array(); campaignStats.missionData[5].missionInfo = 'Countryside Cleansing'; campaignStats.missionData[5].missionAvailable = '1:1:1:0,1'; campaignStats.missionData[5].playerNumber = 2; campaignStats.missionData[5].environmentNumber = 1; campaignStats.missionData[5].victoryCond = [false, true]; campaignStats.missionData[5].enemyTeamName = 'Bandit Outcasts'; campaignStats.missionData[5].enemyTeamColours = [150, 20, 20]; campaignStats.missionData[5].enemyTeamUnits = [9, 9, 12, 12, 13]; campaignStats.missionData[5].enemyTeamAI = 1; campaignStats.missionData[5].deployInterval = 144; campaignStats.missionData[5].maxDeployed = 4; campaignStats.missionData[6] = new Array(); campaignStats.missionData[6].missionInfo = 'Approaching Vengeance'; campaignStats.missionData[6].missionAvailable = '0:7:7:0,'; campaignStats.missionData[6].playerNumber = 1; campaignStats.missionData[6].environmentNumber = 5; campaignStats.missionData[6].victoryCond = [false, true]; campaignStats.missionData[6].enemyTeamName = 'Guardia Minoris'; campaignStats.missionData[6].enemyTeamColours = [0, 0, 0]; campaignStats.missionData[6].enemyTeamUnits = [10, 10, 8, 8, 26, 27, 4]; campaignStats.missionData[6].enemyTeamAI = 1; campaignStats.missionData[6].deployInterval = 144; campaignStats.missionData[6].maxDeployed = 4; campaignStats.missionData[7] = new Array(); campaignStats.missionData[7].missionInfo = 'Forseen Ambush'; campaignStats.missionData[7].missionAvailable = '0:8:8:0,'; campaignStats.missionData[7].playerNumber = 2; campaignStats.missionData[7].environmentNumber = 5; campaignStats.missionData[7].victoryCond = [false, true]; campaignStats.missionData[7].enemyTeamName = 'Guardia Majoris'; campaignStats.missionData[7].enemyTeamColours = [0, 0, 0]; campaignStats.missionData[7].enemyTeamUnits = [11, 10, 10, 8, 27, 26, 4]; campaignStats.missionData[7].enemyTeamAI = 1; campaignStats.missionData[7].deployInterval = 144; campaignStats.missionData[7].maxDeployed = 4; campaignStats.missionData[7].enemySkewDeploy = true; campaignStats.missionData[7].rankUp = 'Well fought! Your reputation grows.::3'; campaignStats.missionData[8] = new Array(); campaignStats.missionData[8].missionInfo = 'Through the Night'; campaignStats.missionData[8].missionAvailable = '2:2:2:0,2'; campaignStats.missionData[8].playerNumber = 1; campaignStats.missionData[8].environmentNumber = 6; campaignStats.missionData[8].victoryCond = [false, true]; campaignStats.missionData[8].enemyTeamName = 'Eclipse Arci'; campaignStats.missionData[8].enemyTeamColours = [0, 0, 0]; campaignStats.missionData[8].enemyTeamUnits = [10, 10, 5, 5, 12, 12]; campaignStats.missionData[8].enemyTeamAI = 1; campaignStats.missionData[8].deployInterval = 144; campaignStats.missionData[8].maxDeployed = 4; campaignStats.missionData[9] = new Array(); campaignStats.missionData[9].missionInfo = 'Justice Claimed'; campaignStats.missionData[9].missionAvailable = '1:2:2:0,1'; campaignStats.missionData[9].playerNumber = 1; campaignStats.missionData[9].environmentNumber = 7; campaignStats.missionData[9].victoryCond = [false, true]; campaignStats.missionData[9].enemyTeamName = 'Bandit Ringleaders'; campaignStats.missionData[9].enemyTeamColours = [150, 20, 20]; campaignStats.missionData[9].enemyTeamUnits = [14, 13, 13, 12, 9, 9]; campaignStats.missionData[9].enemyTeamAI = 1; campaignStats.missionData[9].deployInterval = 144; campaignStats.missionData[9].maxDeployed = 4; campaignStats.missionData[9].enemySkewDeploy = true; campaignStats.missionData[9].rankUp = 'Excellent; the bandit hideout has been exposed!::2'; campaignStats.missionData[10] = new Array(); campaignStats.missionData[10].missionInfo = 'Alarum Ended'; campaignStats.missionData[10].missionAvailable = '0:9:9:0,1'; campaignStats.missionData[10].playerNumber = 1; campaignStats.missionData[10].environmentNumber = 8; campaignStats.missionData[10].victoryCond = [true, false]; campaignStats.missionData[10].enemyTeamName = 'Haruspex Elite'; campaignStats.missionData[10].enemyTeamColours = [0, 0, 0]; campaignStats.missionData[10].enemyTeamUnits = [15, 10, 33]; campaignStats.missionData[10].enemyTeamAI = 1; campaignStats.missionData[10].deployInterval = 144; campaignStats.missionData[10].maxDeployed = 4; campaignStats.missionData[10].bossMusic = true; campaignStats.missionData[10].rankUp = 'Alterand is finally dead! Few now oppose you.::2'; campaignStats.missionData[11] = new Array(); campaignStats.missionData[11].missionInfo = 'Hijack that Boat!'; campaignStats.missionData[11].missionAvailable = '0:10:10:0'; campaignStats.missionData[11].playerNumber = 1; campaignStats.missionData[11].environmentNumber = 9; campaignStats.missionData[11].victoryCond = [false, true]; campaignStats.missionData[11].enemyTeamName = 'Deathbed Crew'; campaignStats.missionData[11].enemyTeamColours = [0, 0, 0]; campaignStats.missionData[11].enemyTeamUnits = [16, 16, 17, 17, 9, 9, 33]; campaignStats.missionData[11].enemyTeamAI = 1; campaignStats.missionData[11].deployInterval = 144; campaignStats.missionData[11].maxDeployed = 4; campaignStats.missionData[12] = new Array(); campaignStats.missionData[12].missionInfo = 'Island Investigation'; campaignStats.missionData[12].missionAvailable = '0:11:11:0'; campaignStats.missionData[12].playerNumber = 1; campaignStats.missionData[12].environmentNumber = 10; campaignStats.missionData[12].victoryCond = [false, true]; campaignStats.missionData[12].enemyTeamName = 'Accursed Atma'; campaignStats.missionData[12].enemyTeamColours = [0, 0, 0]; campaignStats.missionData[12].enemyTeamUnits = [20, 17, 17, 18, 18, 19, 33, 27]; campaignStats.missionData[12].enemyTeamAI = 1; campaignStats.missionData[12].deployInterval = 144; campaignStats.missionData[12].maxDeployed = 4; campaignStats.missionData[13] = new Array(); campaignStats.missionData[13].missionInfo = 'Shrouded in Mist'; campaignStats.missionData[13].missionAvailable = '0:12:12:0'; campaignStats.missionData[13].playerNumber = 1; campaignStats.missionData[13].environmentNumber = 11; campaignStats.missionData[13].victoryCond = [false, true]; campaignStats.missionData[13].enemyTeamName = 'Lone Sentries'; campaignStats.missionData[13].enemyTeamColours = [0, 0, 0]; campaignStats.missionData[13].enemyTeamUnits = [25, 24, 20, 17, 17, 19, 26, 33]; campaignStats.missionData[13].enemyTeamAI = 1; campaignStats.missionData[13].deployInterval = 144; campaignStats.missionData[13].maxDeployed = 4; campaignStats.missionData[13].victoryCondSPC = '(All enemies must be dead at the same time!)'; campaignStats.missionData[14] = new Array(); campaignStats.missionData[14].missionInfo = 'Confrontation'; campaignStats.missionData[14].missionAvailable = '0:13:13:0'; campaignStats.missionData[14].playerNumber = 1; campaignStats.missionData[14].environmentNumber = 12; campaignStats.missionData[14].victoryCond = [false, true]; campaignStats.missionData[14].enemyTeamName = 'Tower\'s Guard'; campaignStats.missionData[14].enemyTeamColours = [0, 0, 0]; campaignStats.missionData[14].enemyTeamUnits = [22, 25, 24, 20, 17, 18, 19]; campaignStats.missionData[14].enemyTeamAI = 1; campaignStats.missionData[14].deployInterval = 144; campaignStats.missionData[14].maxDeployed = 4; campaignStats.missionData[14].victoryCondSPC = '(All enemies must be dead at the same time!)'; campaignStats.missionData[15] = new Array(); campaignStats.missionData[15].missionInfo = 'Final Judgement'; campaignStats.missionData[15].missionAvailable = '0:14:14:0'; campaignStats.missionData[15].playerNumber = 1; campaignStats.missionData[15].environmentNumber = 12; campaignStats.missionData[15].victoryCond = [true, false]; campaignStats.missionData[15].enemyTeamName = 'Tower\'s Judgement'; campaignStats.missionData[15].enemyTeamColours = [0, 0, 0]; campaignStats.missionData[15].enemyTeamUnits = [21, 22, 29]; campaignStats.missionData[15].enemyTeamAI = 1; campaignStats.missionData[15].deployInterval = 144; campaignStats.missionData[15].maxDeployed = 4; campaignStats.missionData[15].bossMusic = true; campaignStats.missionData[15].victoryCondSPC = 'Good luck!'; campaignStats.missionData[16] = new Array(); campaignStats.missionData[16].missionInfo = 'All At Once'; campaignStats.missionData[16].missionAvailable = '1:4:4:1'; campaignStats.missionData[16].playerNumber = 2; campaignStats.missionData[16].environmentNumber = 6; campaignStats.missionData[16].victoryCond = [false, true]; campaignStats.missionData[16].victoryCondSPC = '(All enemies must be dead at the same time!)'; campaignStats.missionData[16].enemyTeamName = 'Revival'; campaignStats.missionData[16].enemyTeamColours = [0, 0, 0]; campaignStats.missionData[16].enemyTeamUnits = [24, 24, 25, 19, 18, 18]; campaignStats.missionData[16].enemyTeamAI = 1; campaignStats.missionData[16].deployInterval = 144; campaignStats.missionData[16].maxDeployed = 4; campaignStats.missionData[17] = new Array(); campaignStats.missionData[17].missionInfo = 'Learning Strategies'; campaignStats.missionData[17].missionAvailable = '1:5:5:1'; campaignStats.missionData[17].playerNumber = 2; campaignStats.missionData[17].environmentNumber = 4; campaignStats.missionData[17].victoryCond = [false, true]; campaignStats.missionData[17].victoryCondSPC = '(All enemies must be dead at the same time!)'; campaignStats.missionData[17].enemyTeamName = 'Reanimation'; campaignStats.missionData[17].enemyTeamColours = [0, 0, 0]; campaignStats.missionData[17].enemyTeamUnits = [22, 24, 25, 19, 18, 33, 26]; campaignStats.missionData[17].enemyTeamAI = 1; campaignStats.missionData[17].deployInterval = 144; campaignStats.missionData[17].maxDeployed = 4; campaignStats.missionData[18] = new Array(); campaignStats.missionData[18].missionInfo = 'Duet'; campaignStats.missionData[18].missionAvailable = '1:6:6:1'; campaignStats.missionData[18].playerNumber = 2; campaignStats.missionData[18].environmentNumber = 2; campaignStats.missionData[18].victoryCond = [false, true]; campaignStats.missionData[18].victoryCondSPC = '(Hint: Get both enemies to low health before making the kill!)'; campaignStats.missionData[18].enemyTeamName = 'Resurrection'; campaignStats.missionData[18].enemyTeamColours = [0, 0, 0]; campaignStats.missionData[18].enemyTeamUnits = [23, 23]; campaignStats.missionData[18].enemyTeamAI = 1; campaignStats.missionData[18].deployInterval = 144; campaignStats.missionData[18].maxDeployed = 4; campaignStats.missionData[18].rankUp = 'The awakeners are dead! Good work.::2'; campaignStats.missionData[1].missionDialog = ['!hero::Scouting... Waste of time. There\'s nothing to kill here! Let\'s go.::noPicture::1', '!rnd::What? Abandon post, sir? Photomorus must be protected... you said so yourself!::noPicture::1', '!hero::I\'ll make exceptions when peace has lasted for over a decade. Back to town!::noPicture::1', '!newRnd::Wait, General! There seems to be a band of Photomorian deserters headed this way! What are your orders?::noPicture::1', '!hero::Deserters? Our own men, running away? Filthy traitors! Cut them off and teach them a lesson!::noPicture::1', '!rnd::Capital punishment? Alright, sir. I\'ll ready the men.::noPicture::1']; campaignStats.missionData[2].missionDialog = ['!newRnd::Sir, Photomorus seems to have come under attack while we were gone! No wonder our men were fleeing!::noPicture::2', '!hero::Impossible! Who has reason to attack us?::noPicture::2', '!rnd::It looks like a collection of thieves and... other more powerful assailants. Agh! We have lost the favour of the gods!::noPicture::2', '!hero::The gods? So it would seem. Perhaps they have heard me...::noPicture::2', '!rnd::Heard you, sir? Heard what?::noPicture::2', '!hero::Nothing, nothing. Stop asking questions and start defending the town!::noPicture::2']; campaignStats.missionData[3].missionDialog = ['!hero::What\'s this? Phosmortem Temple has been broken into!::noPicture::3', '!newRnd::Someone is inside the main chamber, General!::noPicture::3', '!hero::Well? Kill him! Halt... Who goes there?::noPicture::3', 'Alterand::Hello. You must be the general. You can call me Alterand.::alterandPortrait::3', '!hero::Alterand? What are you doing here, and what kind of name is that?::noPicture::3', 'Alterand::I\'m just examining this interesting town. Kasayel will be pleased with its destruction.::alterandPortrait::3', '!hero::Kasayel? So, of all the false gods, the lowest is against me. What does he want?::noPicture::3', 'Alterand::The lowest in tolerance, yes. But don\'t worry. He only wants you dead.::alterandPortrait::3', '!hero::Well, tell your "god" that he can\'t always have what he wants. Get out of this sacred temple!::noPicture::3']; campaignStats.missionData[4].missionDialog = ['!hero::The the minion of a "god" should be more courageous. Alterand fled fast enough to be invisible.::noPicture::4', '!newRnd::That Alterand guy may have vanished, sir, but we can still track his followers.::noPicture::4', '!hero::Only a god like Kasayel would be so stupid. I now have the perfect excuse to throw him from his throne...::noPicture::4', '!rnd::Sir? Did you say something?::noPicture::4', '!hero::No, it\'s nothing. ...What is that dust cloud ahead?::noPicture::4', '!newRnd::Enemy sighted, sir! Permission to attack?::noPicture::4', '!hero::Ah. Granted.::noPicture::4']; campaignStats.missionData[5].missionDialog = ['!newRnd::The thieves that helped Alterand attack Photomorus should be around here somewhere...::noPicture::1', '!hero::Find them fast, would you? We have more important things to do than deal with bandits.::noPicture::1', '!rnd::Right away, sir. In fact, there seems to be a small group of them right up ahead.::noPicture::1', '!hero::Capture and interrogate them. They\'ll tell us where the rest of their band are, with a little bit of persuasion.::noPicture::1']; campaignStats.missionData[6].missionDialog = ['!hero::Idiot! We have been chasing Kasayel\'s minions straight into the middle of nowhere!::noPicture::5', '!newRnd::My humble apologies, General. The enemy is swift.::noPicture::5', '!hero::I can see that for myself, soldier. ...Ah! Over there! That cave is guarded by several of Kasayel\'s followers.::noPicture::5', '!rnd::Good eyes, sir. Should I scout ahead and get their exact numbers?::noPicture::5', '!hero::No need. They seem few, and must be guarding that cave to cover Alterand\'s retreat. Attack now, before we lose more time!::noPicture::5', '!rnd::Sir, I would not recommend...::noPicture::5', '!hero::Go, go!::noPicture::5']; campaignStats.missionData[7].missionDialog = ['!newRnd::Agh! The enemies here number more than we are equipped for, General!::noPicture::5', '!hero::Ha! We\'re just getting started, soldier!::noPicture::6', '!rnd::What\'s this? Foes approach from behind, as well!::noPicture::6', '!hero::Gah! Surrounded, are we? Keep fighting! We have work to do!::noPicture::6']; campaignStats.missionData[8].missionDialog = ['!hero::I am getting very tired with this chase. My patience is running out.::noPicture::7', '!newRnd::I\'m not very awake myself, General.::noPicture::7', '!hero::I don\'t care.::noPicture::7', '!rnd::Yes, sir. I don\'t care either, sir.::noPicture::7', '!hero::Long marches put me into bad humour. Perhaps we should stop.::noPicture::7', '!newRnd::Gods! There are enemy archers across the river! We are almost in bow range!::noPicture::7', '!hero::Mention the gods again, and I will personally order a soldier to hire an assassin to personally slit your throat.::noPicture::7', '!rnd::...::noPicture::7', '!hero::Ah, my temper... But what are you doing, just standing there?! Take care of those archers, now!::noPicture::7']; campaignStats.missionData[9].missionDialog = ['!newRnd::The prisoners say that the rest of their kind live around here. Can we trust them?::noPicture::8', '!hero::Yes, I think we can. People don\'t lie in the face of death. Keep your eyes open, just in case.::noPicture::8', '!newRnd::General, we approach the den of the thieves!::noPicture::8', '!hero::Ha, and in a nicely secluded location! Photomorus will have to expand here once we have cleared it of this rabble.::noPicture::8', '!rnd::Good idea, sir. Might I mention that I\'ve been wanting to move closer to... Wait, stop! We\'re surrounded!::noPicture::8', '!hero::Their guard is still active! Kill them all!::noPicture::8']; campaignStats.missionData[10].missionDialog = ['!hero::Alterand! I know you\'re in here! Stop running and fight!::noPicture::9', 'Alterand::Running? I was barely even walking. It\'s not hard to outpace you.::alterandPortrait::9', '!newRnd::Sir, let\'s attack before he flees again!::noPicture::9', 'Alterand::My lord was angry that I ran from a common human. I am commanded to kill you at once.::alterandPortrait::9', '!hero::Ha! Good luck with that, coward!::noPicture::9', 'Alterand::It\'s better to retreat than die. The Tower itself teaches us that.::alterandPortrait::9', '!hero::Soldier, what is this "Tower" he is ranting about?::noPicture::9', '!newRnd::The "Tower"? That\'s where I met his mom last night.::noPicture::9', '!hero::Ha ha ha... Really though, I must know... what "Tower"?::noPicture::9', 'Alterand::Still talking? Chancellus tells of Kasayel\'s impatience! Die, now!::alterandPortrait::9']; campaignStats.missionData[11].missionDialog = ['!newRnd::I don\'t understand. Alterand is dead. Why don\'t we return to town?::noPicture::10', '!hero::Alterand may be dead, soldier, but Kasayel is alive. He ordered the attack on Photomorus, and he will pay for it.::noPicture::10', '!rnd::What? Kasayel is a god! We can\'t just kill him like we did Alterand!::noPicture::10', '!hero::Gods, gods, gods! There are no gods, fool! Of course Kasayel can be killed, if you fight hard enough! Fight!::noPicture::10', '!rnd::Well then tell me sir, where is Kasayel, and how are we going to get to him?::noPicture::10', '!hero::Where do you think Alterand was running to? His master, of course. You! Did you question the locals?::noPicture::10', '!newRnd::Yes, general. It seems that before his death, Alterand ordered a boat to be ready to sail to a certain island.::noPicture::10', '!hero::There. All we have to do is sieze the boat, capture the crew, and sail to that island. Get ready for a fight!::noPicture::10']; campaignStats.missionData[12].missionDialog = ['!hero::So, this is where Alterand was going, is it?::noPicture::11', '!newRnd::As far as we\'ve found out, yeah.::noPicture::11', '!hero::Excellent. We\'re close, I can sense it! Search the island for anything suspicious or supernatural.::noPicture::11', '!rnd::It looks like we\'re being searched for as well. Enemies approach! To arms!::noPicture::11', '!hero::I command this expedition, soldier, not you. To arms! Free the world from the grasp of these pretentious gods!::noPicture::11']; campaignStats.missionData[13].missionDialog = ['!hero::It seems to be mildly cold up here. The perfect location for such a frigid overlord to hide in. Double the search efforts!::noPicture::12', '!newRnd::S-si-sir! We should t-tu-turn back! We ar-aren\'t going t-to find Kasayel - i-it\'s impossible!::noPicture::12', '!hero::You doubt my efforts? I try to help the world, and this is my thanks? Ha! Ha ha ha!::noPicture::12', '!rnd::...::noPicture::12', '!hero::Stop! What\'s that ahead? A man? Open fire! Attack! Kill!::noPicture::12', 'Hidden Figure::Explorers... remove them...::chancellusPortrait2::12', '!newRnd::Sir, enemy h-has vanished! What are your or-orde-orders?::noPicture::12', '!hero::Vanished? What, right into the air? It must be Kasayel himself! I knew it!::noPicture::12', '!newRnd::If it really was Kasayel, he wasn\'t alone. New targets in sight!::noPicture::12', '!hero::We\'re almost there, men! Prepare for battle!::noPicture::12']; campaignStats.missionData[14].missionDialog = ['!newRnd::Holy... I\'ve never seen anything like this.::noPicture::13', '!hero::Kasayel! I have come to overthrow you! Show yourself!::noPicture::13', 'Hidden Figure::Lord Kasayel is not here.::chancellusPortrait2::13', '!hero::You! You are Kasayel! Come out and fight!::noPicture::13', 'Chancellus::You mistake me. I am Chancellus, one of Lord Kasayel\'s servants.::chancellusPortrait::13', '!hero::Lies! We followed Alterand\'s path straight to this tower! Alterand served Kasayel - you must be him!::noPicture::13', 'Chancellus::Master Alterand? True, he served our Lord. Kasayel, however, is a god, and lives in the heavens. You won\'t find him here.::chancellusPortrait::13', '!hero::Heavens? Ha, there are no heavens! More lies! Kasayel is in this tower, and I will find him!::noPicture::13', 'Chancellus::You trespass and blaspheme. Guards, remove this heretic from our holy grounds.::chancellusPortrait::13']; campaignStats.missionData[15].missionDialog = ['Chancellus::May Lord Kasayel forgive his modest followers and their disability to dispatch a small band of humans.::chancellusPortrait::14', '!hero::You see now? You can\'t stop me. I will find Kasayel!::noPicture::14', '!newRnd::Sir, I don\'t like this. We should retreat.::noPicture::14', 'Chancellus::Your soldier speaks wisdom. I repeat, Lord Kasayel is not here. Leave at once.::chancellusPortrait::14', '!hero::I don\'t care what you like and don\'t like! I will find Kasayel, even if I have to destroy this entire tower! Attack! Fight!::noPicture::14', 'Chancellus::Wretched human. Are the words of your followers nothing? You, at least, do not deserve to be spared.::chancellusPortrait::14', '!hero::I am just trying to save this world from your pseudo-gods! Can nobody see that I am in the right?::noPicture::14', 'Chancellus::Lord Kasayel will judge.::chancellusPortrait::14']; campaignStats.missionData[16].missionDialog = ['!newRnd::Sir, we have a situation. An enemy force is marching towards Photomorus.::noPicture::7', '!hero::Well, deal with it. Stop them before they reach the city.::noPicture::7', '!rnd::We have tried, but there is a problem. Some strange power seems to keep these attackers alive after death.::noPicture::7', '!hero::Ha! Just standard curative sorcery. The power of the living team members revives the dead.::noPicture::7', '!rnd::Well then, how are we supposed to defeat an invincible enemy team?::noPicture::7', '!hero::Simple. It takes a while to revive the dead. Have all the enemies dead at once, and we will win.::noPicture::7', '!rnd::Understood. All enemies must be dead at the same time. We must defend the town!::noPicture::7']; campaignStats.missionData[17].missionDialog = ['!newRnd::Enemies still threaten the town. We need to destroy them immediately!::noPicture::4', '!hero::Do you think I need your advice, soldier?::noPicture::4', '!rnd::...No, sir.::noPicture::4', '!hero::Who could be commanding this army now that Alterand is dead? More of Kasayel\'s servants...::noPicture::4', '!newRnd::Kasayel must have endless commanders at his disposal. It could be anyone.::noPicture::4', '!hero::Nothing is endless. Whoever it is, this certain commander seems to enjoy reviving his troops. We must learn his strategies.::noPicture::4', '!rnd::Here\'s our chance, General - enemies ahead!::noPicture::4']; campaignStats.missionData[18].missionDialog = ['!hero::You fools! I thought you said you stopped the enemy march on Photomorus!::noPicture::2', '!newRnd::We thought we did, sir. But it seems that two foes were able to escape on horseback.::noPicture::2', '!hero::Yes, and now they terrorize the town! Idiot! Be glad that only two escaped your blind eyes!::noPicture::2', '!rnd::My apologies...::noPicture::2', '!hero::Only two, and yet they continue their attack instead of retreating. Be on your guard.::noPicture::2']; predefinedEnemies = new Array(); predefinedEnemies[0] = new Array(); predefinedEnemies[0].unitName = '!rnd'; predefinedEnemies[0].unitType = 2; predefinedEnemies[0].unitLevel = 2; predefinedEnemies[0].unitDeity = 1; predefinedEnemies[0].unitFavour = 50; predefinedEnemies[0].unitMaxHP = 145; predefinedEnemies[0].unitAttackPower = 0.001; predefinedEnemies[0].unitMagicPower = 0.001; predefinedEnemies[0].unitSpeed = 1.5; predefinedEnemies[0].unitMaxCharge = 50; predefinedEnemies[0].spcChat = 0; predefinedEnemies[0].grVar = 2; predefinedEnemies[0].unitSkills = [8, 10]; predefinedEnemies[1] = new Array(); predefinedEnemies[1].unitName = '!rnd'; predefinedEnemies[1].unitType = 2; predefinedEnemies[1].unitLevel = 1; predefinedEnemies[1].unitDeity = 2; predefinedEnemies[1].unitFavour = 35; predefinedEnemies[1].unitMaxHP = 75; predefinedEnemies[1].unitAttackPower = 0.15; predefinedEnemies[1].unitMagicPower = 0.15; predefinedEnemies[1].unitSpeed = 1.5; predefinedEnemies[1].unitMaxCharge = 50; predefinedEnemies[1].spcChat = 0; predefinedEnemies[1].unitSkills = [4, 8, 10]; predefinedEnemies[2] = new Array(); predefinedEnemies[2].unitName = '!rnd'; predefinedEnemies[2].unitType = 3; predefinedEnemies[2].unitLevel = 1; predefinedEnemies[2].unitDeity = 1; predefinedEnemies[2].unitFavour = 35; predefinedEnemies[2].unitMaxHP = 45; predefinedEnemies[2].unitAttackPower = 0.25; predefinedEnemies[2].unitMagicPower = 0.2; predefinedEnemies[2].unitSpeed = 1.6; predefinedEnemies[2].unitMaxCharge = 40; predefinedEnemies[2].spcChat = 0; predefinedEnemies[2].unitSkills[0] = [1, 5]; predefinedEnemies[3] = new Array(); predefinedEnemies[3].unitName = 'Alterand'; predefinedEnemies[3].unitType = 8; predefinedEnemies[3].unitLevel = 5; predefinedEnemies[3].unitDeity = 3; predefinedEnemies[3].unitFavour = 100; predefinedEnemies[3].unitMaxHP = 340; predefinedEnemies[3].unitAttackPower = 0.4; predefinedEnemies[3].unitMagicPower = 0.6; predefinedEnemies[3].unitSpeed = 1.4; predefinedEnemies[3].unitMaxCharge = 100; predefinedEnemies[3].spcChat = 1; predefinedEnemies[3].unitSkills = [9, 11, 16]; predefinedEnemies[4] = new Array(); predefinedEnemies[4].unitName = '!rnd'; predefinedEnemies[4].unitType = 1; predefinedEnemies[4].unitLevel = 2; predefinedEnemies[4].unitDeity = 3; predefinedEnemies[4].unitFavour = 65; predefinedEnemies[4].unitMaxHP = 80; predefinedEnemies[4].unitAttackPower = 0.2; predefinedEnemies[4].unitMagicPower = 0.22; predefinedEnemies[4].unitSpeed = 1.7; predefinedEnemies[4].unitMaxCharge = 55; predefinedEnemies[4].spcChat = 0; predefinedEnemies[4].grVar = 2; predefinedEnemies[4].unitSkills = [4, 8, 10, 13]; predefinedEnemies[5] = new Array(); predefinedEnemies[5].unitName = '!rnd'; predefinedEnemies[5].unitType = 3; predefinedEnemies[5].unitLevel = 2; predefinedEnemies[5].unitDeity = 3; predefinedEnemies[5].unitFavour = 65; predefinedEnemies[5].unitMaxHP = 80; predefinedEnemies[5].unitAttackPower = 0.3; predefinedEnemies[5].unitMagicPower = 0.25; predefinedEnemies[5].unitSpeed = 1.85; predefinedEnemies[5].unitMaxCharge = 45; predefinedEnemies[5].spcChat = 0; predefinedEnemies[5].grVar = 2; predefinedEnemies[5].unitSkills = [1, 2, 3, 5]; predefinedEnemies[6] = new Array(); predefinedEnemies[6].unitName = '!rnd'; predefinedEnemies[6].unitType = 4; predefinedEnemies[6].unitLevel = 1; predefinedEnemies[6].unitDeity = 2; predefinedEnemies[6].unitFavour = 40; predefinedEnemies[6].unitMaxHP = 45; predefinedEnemies[6].unitAttackPower = 0.58; predefinedEnemies[6].unitMagicPower = 0.18; predefinedEnemies[6].unitSpeed = 1.78; predefinedEnemies[6].unitMaxCharge = 40; predefinedEnemies[6].spcChat = 0; predefinedEnemies[6].grVar = 2; predefinedEnemies[6].unitSkills = [2, 5, 10, 13]; predefinedEnemies[7] = new Array(); predefinedEnemies[7].unitName = '!rnd'; predefinedEnemies[7].unitType = 2; predefinedEnemies[7].unitLevel = 1; predefinedEnemies[7].unitDeity = 2; predefinedEnemies[7].unitFavour = 40; predefinedEnemies[7].unitMaxHP = 65; predefinedEnemies[7].unitAttackPower = 0.35; predefinedEnemies[7].unitMagicPower = 0.3; predefinedEnemies[7].unitSpeed = 1.55; predefinedEnemies[7].unitMaxCharge = 30; predefinedEnemies[7].spcChat = 0; predefinedEnemies[7].grVar = 3; predefinedEnemies[7].unitSkills = [4, 15]; predefinedEnemies[8] = new Array(); predefinedEnemies[8].unitName = '!rnd'; predefinedEnemies[8].unitType = 6; predefinedEnemies[8].unitLevel = 3; predefinedEnemies[8].unitDeity = 3; predefinedEnemies[8].unitFavour = 60; predefinedEnemies[8].unitMaxHP = 70; predefinedEnemies[8].unitAttackPower = 0.28; predefinedEnemies[8].unitMagicPower = 0.6; predefinedEnemies[8].unitSpeed = 1.45; predefinedEnemies[8].unitMaxCharge = 70; predefinedEnemies[8].spcChat = 0; predefinedEnemies[8].grVar = 2; predefinedEnemies[8].unitSkills = [3, 5, 8, 23]; predefinedEnemies[9] = new Array(); predefinedEnemies[9].unitName = '!rnd'; predefinedEnemies[9].unitType = 1; predefinedEnemies[9].unitLevel = 3; predefinedEnemies[9].unitDeity = 1; predefinedEnemies[9].unitFavour = 55; predefinedEnemies[9].unitMaxHP = 95; predefinedEnemies[9].unitAttackPower = 0.45; predefinedEnemies[9].unitMagicPower = 0.4; predefinedEnemies[9].unitSpeed = 1.9; predefinedEnemies[9].unitMaxCharge = 60; predefinedEnemies[9].spcChat = 0; predefinedEnemies[9].grVar = 3; predefinedEnemies[9].unitSkills = [2, 4, 5, 15]; predefinedEnemies[10] = new Array(); predefinedEnemies[10].unitName = '!rnd'; predefinedEnemies[10].unitType = 4; predefinedEnemies[10].unitLevel = 3; predefinedEnemies[10].unitDeity = 3; predefinedEnemies[10].unitFavour = 55; predefinedEnemies[10].unitMaxHP = 95; predefinedEnemies[10].unitAttackPower = 0.65; predefinedEnemies[10].unitMagicPower = 0.25; predefinedEnemies[10].unitSpeed = 1.84; predefinedEnemies[10].unitMaxCharge = 50; predefinedEnemies[10].spcChat = 0; predefinedEnemies[10].grVar = 3; predefinedEnemies[10].unitSkills = [2, 10, 11, 13]; predefinedEnemies[11] = new Array(); predefinedEnemies[11].unitName = 'Ripenti'; predefinedEnemies[11].unitType = 5; predefinedEnemies[11].unitLevel = 9; predefinedEnemies[11].unitDeity = 3; predefinedEnemies[11].unitFavour = 95; predefinedEnemies[11].unitMaxHP = 650; predefinedEnemies[11].unitAttackPower = 1.25; predefinedEnemies[11].unitMagicPower = 0.7; predefinedEnemies[11].unitSpeed = 1.5; predefinedEnemies[11].unitMaxCharge = 60; predefinedEnemies[11].spcChat = 0; predefinedEnemies[11].grVar = 2; predefinedEnemies[11].unitSkills = [6, 12, 14, 21]; predefinedEnemies[11].mounted = true; predefinedEnemies[12] = new Array(); predefinedEnemies[12].unitName = '!rnd'; predefinedEnemies[12].unitType = 4; predefinedEnemies[12].unitLevel = 3; predefinedEnemies[12].unitDeity = 2; predefinedEnemies[12].unitFavour = 40; predefinedEnemies[12].unitMaxHP = 80; predefinedEnemies[12].unitAttackPower = 0.6; predefinedEnemies[12].unitMagicPower = 0.35; predefinedEnemies[12].unitSpeed = 1.98; predefinedEnemies[12].unitMaxCharge = 50; predefinedEnemies[12].spcChat = 0; predefinedEnemies[12].grVar = 2; predefinedEnemies[12].unitSkills = [5, 11, 13, 16]; predefinedEnemies[13] = new Array(); predefinedEnemies[13].unitName = '!rnd'; predefinedEnemies[13].unitType = 2; predefinedEnemies[13].unitLevel = 3; predefinedEnemies[13].unitDeity = 2; predefinedEnemies[13].unitFavour = 60; predefinedEnemies[13].unitMaxHP = 100; predefinedEnemies[13].unitAttackPower = 0.75; predefinedEnemies[13].unitMagicPower = 0.45; predefinedEnemies[13].unitSpeed = 1.7; predefinedEnemies[13].unitMaxCharge = 40; predefinedEnemies[13].spcChat = 0; predefinedEnemies[13].grVar = 3; predefinedEnemies[13].unitSkills = [4, 8, 10, 13, 15]; predefinedEnemies[14] = new Array(); predefinedEnemies[14].unitName = '!rnd'; predefinedEnemies[14].unitType = 7; predefinedEnemies[14].unitLevel = 4; predefinedEnemies[14].unitDeity = 0; predefinedEnemies[14].unitFavour = 75; predefinedEnemies[14].unitMaxHP = 135; predefinedEnemies[14].unitAttackPower = 0.4; predefinedEnemies[14].unitMagicPower = 0.95; predefinedEnemies[14].unitSpeed = 1.8; predefinedEnemies[14].unitMaxCharge = 85; predefinedEnemies[14].spcChat = 0; predefinedEnemies[14].grVar = 2; predefinedEnemies[14].unitSkills = [1, 3, 16, 17, 21]; predefinedEnemies[15] = new Array(); predefinedEnemies[15].unitName = 'Alterand'; predefinedEnemies[15].unitType = 5; predefinedEnemies[15].unitLevel = 10; predefinedEnemies[15].unitDeity = 3; predefinedEnemies[15].unitFavour = 98; predefinedEnemies[15].unitMaxHP = 1050; predefinedEnemies[15].unitAttackPower = 1.1; predefinedEnemies[15].unitMagicPower = 1.1; predefinedEnemies[15].unitSpeed = 2.4; predefinedEnemies[15].unitMaxCharge = 100; predefinedEnemies[15].spcChat = 1; predefinedEnemies[15].grVar = 3; predefinedEnemies[15].unitSkills = [21, 22, 25]; predefinedEnemies[15].mounted = true; predefinedEnemies[16] = new Array(); predefinedEnemies[16].unitName = '!rnd'; predefinedEnemies[16].unitType = 1; predefinedEnemies[16].unitLevel = 5; predefinedEnemies[16].unitDeity = 2; predefinedEnemies[16].unitFavour = 45; predefinedEnemies[16].unitMaxHP = 195; predefinedEnemies[16].unitAttackPower = 0.74; predefinedEnemies[16].unitMagicPower = 0.5; predefinedEnemies[16].unitSpeed = 2; predefinedEnemies[16].unitMaxCharge = 70; predefinedEnemies[16].spcChat = 0; predefinedEnemies[16].grVar = 4; predefinedEnemies[16].unitSkills = [2, 6, 9, 12]; predefinedEnemies[17] = new Array(); predefinedEnemies[17].unitName = '!rnd'; predefinedEnemies[17].unitType = 2; predefinedEnemies[17].unitLevel = 5; predefinedEnemies[17].unitDeity = 3; predefinedEnemies[17].unitFavour = 60; predefinedEnemies[17].unitMaxHP = 180; predefinedEnemies[17].unitAttackPower = 0.76; predefinedEnemies[17].unitMagicPower = 0.55; predefinedEnemies[17].unitSpeed = 1.55; predefinedEnemies[17].unitMaxCharge = 40; predefinedEnemies[17].spcChat = 0; predefinedEnemies[17].grVar = 4; predefinedEnemies[17].unitSkills = [11, 12, 14, 15]; predefinedEnemies[18] = new Array(); predefinedEnemies[18].unitName = '!rnd'; predefinedEnemies[18].unitType = 4; predefinedEnemies[18].unitLevel = 5; predefinedEnemies[18].unitDeity = 3; predefinedEnemies[18].unitFavour = 55; predefinedEnemies[18].unitMaxHP = 110; predefinedEnemies[18].unitAttackPower = 0.82; predefinedEnemies[18].unitMagicPower = 0.35; predefinedEnemies[18].unitSpeed = 1.7; predefinedEnemies[18].unitMaxCharge = 60; predefinedEnemies[18].spcChat = 0; predefinedEnemies[18].grVar = 3; predefinedEnemies[18].unitSkills = [14, 15, 11, 21]; predefinedEnemies[19] = new Array(); predefinedEnemies[19].unitName = '!rnd'; predefinedEnemies[19].unitType = 5; predefinedEnemies[19].unitLevel = 5; predefinedEnemies[19].unitDeity = 3; predefinedEnemies[19].unitFavour = 65; predefinedEnemies[19].unitMaxHP = 180; predefinedEnemies[19].unitAttackPower = 0.72; predefinedEnemies[19].unitMagicPower = 0.62; predefinedEnemies[19].unitSpeed = 2; predefinedEnemies[19].unitMaxCharge = 60; predefinedEnemies[19].spcChat = 0; predefinedEnemies[19].grVar = 2; predefinedEnemies[19].unitSkills = [7, 12, 15, 23]; predefinedEnemies[19].mounted = true; predefinedEnemies[20] = new Array(); predefinedEnemies[20].unitName = '!rnd'; predefinedEnemies[20].unitType = 5; predefinedEnemies[20].unitLevel = 6; predefinedEnemies[20].unitDeity = 3; predefinedEnemies[20].unitFavour = 70; predefinedEnemies[20].unitMaxHP = 300; predefinedEnemies[20].unitAttackPower = 0.62; predefinedEnemies[20].unitMagicPower = 0.5; predefinedEnemies[20].unitSpeed = 2; predefinedEnemies[20].unitMaxCharge = 100; predefinedEnemies[20].spcChat = 0; predefinedEnemies[20].grVar = 4; predefinedEnemies[20].unitSkills = [16, 17, 22]; predefinedEnemies[20].mounted = true; predefinedEnemies[21] = new Array(); predefinedEnemies[21].unitName = 'Chancellus'; predefinedEnemies[21].unitType = 9; predefinedEnemies[21].unitLevel = 15; predefinedEnemies[21].unitDeity = 3; predefinedEnemies[21].unitFavour = 100; predefinedEnemies[21].unitMaxHP = 1600; predefinedEnemies[21].unitAttackPower = 1.25; predefinedEnemies[21].unitMagicPower = 1.2; predefinedEnemies[21].unitSpeed = 2.45; predefinedEnemies[21].unitMaxCharge = 160; predefinedEnemies[21].spcChat = 1; predefinedEnemies[21].unitSkills = [24, 25, 26]; predefinedEnemies[22] = new Array(); predefinedEnemies[22].unitName = '!rnd'; predefinedEnemies[22].unitType = 3; predefinedEnemies[22].unitLevel = 7; predefinedEnemies[22].unitDeity = 3; predefinedEnemies[22].unitFavour = 80; predefinedEnemies[22].unitMaxHP = 160; predefinedEnemies[22].unitAttackPower = 0.6; predefinedEnemies[22].unitMagicPower = 0.6; predefinedEnemies[22].unitSpeed = 1.7; predefinedEnemies[22].unitMaxCharge = 90; predefinedEnemies[22].spcChat = 0; predefinedEnemies[22].grVar = 3; predefinedEnemies[22].unitSkills = [14, 7, 22, 17]; predefinedEnemies[22].alpha = 60; predefinedEnemies[22].beginStatusEffects = ['8:999999999:480']; predefinedEnemies[22].zombie = true; predefinedEnemies[22].alpha = 60; predefinedEnemies[23] = new Array(); predefinedEnemies[23].unitName = '!rnd'; predefinedEnemies[23].unitType = 5; predefinedEnemies[23].unitLevel = 9; predefinedEnemies[23].unitDeity = 3; predefinedEnemies[23].unitFavour = 80; predefinedEnemies[23].unitMaxHP = 450; predefinedEnemies[23].unitAttackPower = 0.7; predefinedEnemies[23].unitMagicPower = 0.95; predefinedEnemies[23].unitSpeed = 2; predefinedEnemies[23].unitMaxCharge = 100; predefinedEnemies[23].spcChat = 0; predefinedEnemies[23].grVar = 5; predefinedEnemies[23].unitSkills = [7, 21, 27, 22]; predefinedEnemies[23].mounted = true; predefinedEnemies[23].beginStatusEffects = ['8:999999999:240']; predefinedEnemies[23].zombie = true; predefinedEnemies[24] = new Array(); predefinedEnemies[24].unitName = '!rnd'; predefinedEnemies[24].unitType = 6; predefinedEnemies[24].unitLevel = 5; predefinedEnemies[24].unitDeity = 3; predefinedEnemies[24].unitFavour = 55; predefinedEnemies[24].unitMaxHP = 120; predefinedEnemies[24].unitAttackPower = 0.4; predefinedEnemies[24].unitMagicPower = 0.6; predefinedEnemies[24].unitSpeed = 1.9; predefinedEnemies[24].unitMaxCharge = 80; predefinedEnemies[24].spcChat = 0; predefinedEnemies[24].grVar = 3; predefinedEnemies[24].unitSkills = [23, 17, 11, 9]; predefinedEnemies[24].beginStatusEffects = ['8:999999999:480']; predefinedEnemies[24].zombie = true; predefinedEnemies[24].alpha = 60; predefinedEnemies[25] = new Array(); predefinedEnemies[25].unitName = '!rnd'; predefinedEnemies[25].unitType = 7; predefinedEnemies[25].unitLevel = 7; predefinedEnemies[25].unitDeity = 3; predefinedEnemies[25].unitFavour = 65; predefinedEnemies[25].unitMaxHP = 140; predefinedEnemies[25].unitAttackPower = 0.4; predefinedEnemies[25].unitMagicPower = 0.7; predefinedEnemies[25].unitSpeed = 2; predefinedEnemies[25].unitMaxCharge = 85; predefinedEnemies[25].spcChat = 0; predefinedEnemies[25].grVar = 3; predefinedEnemies[25].unitSkills = [16, 17, 21, 22]; predefinedEnemies[25].beginStatusEffects = ['8:999999999:480']; predefinedEnemies[25].zombie = true; predefinedEnemies[25].alpha = 60; predefinedEnemies[26] = new Array(); predefinedEnemies[26].unitName = '!rnd'; predefinedEnemies[26].unitType = 1; predefinedEnemies[26].unitLevel = 4; predefinedEnemies[26].unitDeity = 3; predefinedEnemies[26].unitFavour = 65; predefinedEnemies[26].unitMaxHP = 135; predefinedEnemies[26].unitAttackPower = 0.35; predefinedEnemies[26].unitMagicPower = 0.4; predefinedEnemies[26].unitSpeed = 1.7; predefinedEnemies[26].unitMaxCharge = 75; predefinedEnemies[26].spcChat = 0; predefinedEnemies[26].grVar = 2; predefinedEnemies[26].unitSkills = [4, 8, 10, 13]; predefinedEnemies[27] = new Array(); predefinedEnemies[27].unitName = '!rnd'; predefinedEnemies[27].unitType = 3; predefinedEnemies[27].unitLevel = 4; predefinedEnemies[27].unitDeity = 3; predefinedEnemies[27].unitFavour = 65; predefinedEnemies[27].unitMaxHP = 120; predefinedEnemies[27].unitAttackPower = 0.45; predefinedEnemies[27].unitMagicPower = 0.3; predefinedEnemies[27].unitSpeed = 1.85; predefinedEnemies[27].unitMaxCharge = 55; predefinedEnemies[27].spcChat = 0; predefinedEnemies[27].grVar = 2; predefinedEnemies[27].unitSkills = [1, 2, 3, 5]; predefinedEnemies[28] = new Array(); predefinedEnemies[28].unitName = '!rnd'; predefinedEnemies[28].unitType = 6; predefinedEnemies[28].unitLevel = 4; predefinedEnemies[28].unitDeity = 3; predefinedEnemies[28].unitFavour = 55; predefinedEnemies[28].unitMaxHP = 120; predefinedEnemies[28].unitAttackPower = 0.4; predefinedEnemies[28].unitMagicPower = 0.5; predefinedEnemies[28].unitSpeed = 1.8; predefinedEnemies[28].unitMaxCharge = 80; predefinedEnemies[28].spcChat = 0; predefinedEnemies[28].grVar = 3; predefinedEnemies[28].unitSkills = [23, 17, 11, 9]; predefinedEnemies[28].alpha = 60; predefinedEnemies[29] = new Array(); predefinedEnemies[29].unitName = '!rnd'; predefinedEnemies[29].unitType = 3; predefinedEnemies[29].unitLevel = 5; predefinedEnemies[29].unitDeity = 3; predefinedEnemies[29].unitFavour = 70; predefinedEnemies[29].unitMaxHP = 130; predefinedEnemies[29].unitAttackPower = 0.55; predefinedEnemies[29].unitMagicPower = 0.5; predefinedEnemies[29].unitSpeed = 1.7; predefinedEnemies[29].unitMaxCharge = 75; predefinedEnemies[29].spcChat = 0; predefinedEnemies[29].grVar = 3; predefinedEnemies[29].unitSkills = [14, 7, 22, 17]; predefinedEnemies[29].alpha = 60; predefinedEnemies[30] = new Array(); predefinedEnemies[30].unitName = '!rnd'; predefinedEnemies[30].unitType = 5; predefinedEnemies[30].unitLevel = 9; predefinedEnemies[30].unitDeity = 3; predefinedEnemies[30].unitFavour = 80; predefinedEnemies[30].unitMaxHP = 550; predefinedEnemies[30].unitAttackPower = 0.7; predefinedEnemies[30].unitMagicPower = 0.95; predefinedEnemies[30].unitSpeed = 2.5; predefinedEnemies[30].unitMaxCharge = 100; predefinedEnemies[30].spcChat = 0; predefinedEnemies[30].grVar = 5; predefinedEnemies[30].unitSkills = [7, 21, 27, 22]; predefinedEnemies[30].mounted = true; predefinedEnemies[31] = new Array(); predefinedEnemies[31].unitName = '!rnd'; predefinedEnemies[31].unitType = 2; predefinedEnemies[31].unitLevel = 8; predefinedEnemies[31].unitDeity = 1; predefinedEnemies[31].unitFavour = 60; predefinedEnemies[31].unitMaxHP = 165; predefinedEnemies[31].unitAttackPower = 0.65; predefinedEnemies[31].unitMagicPower = 0.3; predefinedEnemies[31].unitSpeed = 1.5; predefinedEnemies[31].unitMaxCharge = 60; predefinedEnemies[31].spcChat = 0; predefinedEnemies[31].grVar = 2; predefinedEnemies[31].unitSkills = [8, 11, 14, 15]; predefinedEnemies[32] = new Array(); predefinedEnemies[32].unitName = '!rnd'; predefinedEnemies[32].unitType = 7; predefinedEnemies[32].unitLevel = 7; predefinedEnemies[32].unitDeity = 3; predefinedEnemies[32].unitFavour = 65; predefinedEnemies[32].unitMaxHP = 140; predefinedEnemies[32].unitAttackPower = 0.25; predefinedEnemies[32].unitMagicPower = 0.65; predefinedEnemies[32].unitSpeed = 2; predefinedEnemies[32].unitMaxCharge = 85; predefinedEnemies[32].spcChat = 0; predefinedEnemies[32].grVar = 3; predefinedEnemies[32].unitSkills = [16, 17, 21, 22]; predefinedEnemies[32].alpha = 60; predefinedEnemies[33] = new Array(); predefinedEnemies[33].unitName = '!rnd'; predefinedEnemies[33].unitType = 6; predefinedEnemies[33].unitLevel = 5; predefinedEnemies[33].unitDeity = 3; predefinedEnemies[33].unitFavour = 65; predefinedEnemies[33].unitMaxHP = 100; predefinedEnemies[33].unitAttackPower = 0.38; predefinedEnemies[33].unitMagicPower = 0.75; predefinedEnemies[33].unitSpeed = 1.45; predefinedEnemies[33].unitMaxCharge = 110; predefinedEnemies[33].spcChat = 0; predefinedEnemies[33].grVar = 2; predefinedEnemies[33].unitSkills = [6, 23]; predefinedEnemies[34] = new Array(); predefinedEnemies[34].unitName = '!rnd'; predefinedEnemies[34].unitType = 4; predefinedEnemies[34].unitLevel = 7; predefinedEnemies[34].unitDeity = 3; predefinedEnemies[34].unitFavour = 75; predefinedEnemies[34].unitMaxHP = 145; predefinedEnemies[34].unitAttackPower = 0.1; predefinedEnemies[34].unitMagicPower = 0.45; predefinedEnemies[34].unitSpeed = 1.6; predefinedEnemies[34].unitMaxCharge = 70; predefinedEnemies[34].spcChat = 0; predefinedEnemies[34].grVar = 3; predefinedEnemies[34].unitSkills = [14, 15, 11, 21]; predefinedEnemies[35] = new Array(); predefinedEnemies[35].unitName = '!rnd'; predefinedEnemies[35].unitType = 5; predefinedEnemies[35].unitLevel = 7; predefinedEnemies[35].unitDeity = 3; predefinedEnemies[35].unitFavour = 80; predefinedEnemies[35].unitMaxHP = 200; predefinedEnemies[35].unitAttackPower = 0.85; predefinedEnemies[35].unitMagicPower = 0.72; predefinedEnemies[35].unitSpeed = 2; predefinedEnemies[35].unitMaxCharge = 80; predefinedEnemies[35].spcChat = 0; predefinedEnemies[35].grVar = 2; predefinedEnemies[35].unitSkills = [7, 12, 15, 23]; predefinedEnemies[35].mounted = true; predefinedEnemies[36] = new Array(); predefinedEnemies[36].unitName = '!rnd'; predefinedEnemies[36].unitType = 2; predefinedEnemies[36].unitLevel = 7; predefinedEnemies[36].unitDeity = 3; predefinedEnemies[36].unitFavour = 70; predefinedEnemies[36].unitMaxHP = 190; predefinedEnemies[36].unitAttackPower = 0.9; predefinedEnemies[36].unitMagicPower = 0.65; predefinedEnemies[36].unitSpeed = 1.65; predefinedEnemies[36].unitMaxCharge = 55; predefinedEnemies[36].spcChat = 0; predefinedEnemies[36].grVar = 4; predefinedEnemies[36].unitSkills = [11, 12, 14, 15]; campaignRanks = ['Amateur', 'Rising', 'Acknowledged', 'Revered', 'Lordly', 'Divine', 'Almighty']; randomEnemyNames = ['Friscal', 'Altero', 'Nesera', 'Instar', 'Feldspar', 'Ledna', 'Opher', 'Yestir', 'Fruna', 'Antar', 'Cartag', 'Ureni', 'Ipsol', 'Perta', 'Banten', 'Veldan', 'Xerta', 'Herston', 'Kewnar', 'Perniac', 'Zerr', 'Nat', 'Cadnar', 'Ulra', 'Deste', 'Dontar', 'Hastu', 'Jeran', 'Justan', 'Seral', 'Kaster', 'Ontari', 'Ipine', 'Constant', 'Etur', 'Gramas', 'Feltes', 'Graan', 'Nicko', 'Einhar', 'Valkyr', 'Usirin', 'Wellnam', 'Michen', 'Rastur', 'Cid', 'Ghrant', 'Uleris', 'Elith']; unlockUnitOrder = [2, 3, 1, 6, 4, 7, 5]; survivalEnemies = new Array(); survivalEnemies[0] = [16, 14, 13, 12, 28]; survivalEnemies[1] = [17, 18, 19, 20, 27, 29]; survivalEnemies[2] = [30, 31, 32, 34, 35, 36, 20, 29]; levelEXPReqs = [0, 100, 200, 340, 500, 680, 880, 1110, 1340, 1600, 1880, 2180, 2500, 2840, 3200, 3580]; stop(); this.opener.spinOpen.gotoAndPlay(spinOpenStart); } movieClip 41 { } movieClip 43 { } movieClip 47 deployButton { frame 1 { deployButton.onRollOver = function () { if (this.deployed != true && _root.gamePath.conditionAccomplished == undefined) { buttonRollOver._alpha = 50; _root.helpDialog.newHelpMessage('professionPicture', _root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitType, unitHelpMessage); _root.gamePath.helpDialogSelectingTarget = false; } }; deployButton.onRollOut = function () { if (this.deployed != true) { buttonRollOver._alpha = 0; } _root.helpDialog.clearHelpMessage(); }; deployButton.onRelease = function () { if (this.deployed != true && _root.gamePath.gamePaused != true) { if ((eval('_root.gamePath.unitManager' + _root.gamePath.playerNumber)).deployNewUnit(deployNumber) == true) { this.deployed = true; buttonRollOver._alpha = 100; _root.helpDialog.clearHelpMessage(); _root.gameInterfacePath.unitDisplay.selectUnit.getUnitListing(); } } }; } } movieClip 50 spcFlyingDot { } movieClip 57 dropDownSelect { } movieClip 58 emptyMC { } movieClip 60 dropDownSelectLarge { } movieClip 62 { frame 1 { stop(); } } movieClip 68 { frame 1 { stop(); } } movieClip 70 standardListElement { } movieClip 72 { frame 1 { messageText.text = _parent.messageText; } } movieClip 73 unitSlotMessage { frame 131 { this.removeMovieClip(); } } movieClip 79 levelUpEmbellish { frame 51 { this.removeMovieClip(); } } movieClip 86 instructionButton { frame 1 { button.onRelease = function () { _parent._parent.mainInstructionsBody.switchInstruction(idText); }; stop(); } frame 2 { button.onRelease = function () { _parent._parent.mainInstructionsBody.switchInstruction(idText); }; stop(); } } movieClip 88 livesNum { } movieClip 91 deityPicture0 { } movieClip 94 deityPicture1 { } movieClip 97 deityPicture2 { } movieClip 100 deityPicture3 { } movieClip 103 skillPicture1 { } movieClip 106 skillPicture2 { } movieClip 109 skillPicture3 { } movieClip 113 skillPictureUndefined { } movieClip 116 locationPicture1 { } movieClip 119 locationPicture2 { } movieClip 122 locationPicture3 { } movieClip 125 professionPicture0 { } movieClip 128 soldierPortrait { } movieClip 131 skillPicture4 { } movieClip 134 skillPicture5 { } movieClip 137 skillPicture6 { } movieClip 140 professionPicture5 { } movieClip 143 professionPicture1 { } movieClip 146 professionPicture2 { } movieClip 149 professionPicture3 { } movieClip 152 professionPicture4 { } movieClip 155 professionPicture6 { } movieClip 158 professionPicture7 { } movieClip 161 skillPicture7 { } movieClip 164 skillPicture8 { } movieClip 167 skillPicture9 { } movieClip 196 { frame 1 { gotoAndStop('dialogPicture' + _parent.dialogPicture); } } movieClip 197 dialogPictures { frame 40 { stop(); } frame 80 { this.removeMovieClip(); } } movieClip 200 skillPicture10 { } movieClip 203 skillPicture11 { } movieClip 206 skillPicture12 { } movieClip 209 skillPicture13 { } movieClip 212 skillPicture14 { } movieClip 215 skillPicture15 { } movieClip 218 skillPicture16 { } movieClip 221 skillPicture17 { } movieClip 224 alterandPortrait { } movieClip 227 locationPicture4 { } movieClip 230 skillPicture18 { } movieClip 233 skillPicture19 { } movieClip 236 skillPicture20 { } movieClip 239 deityPicture4 { } movieClip 242 skillPicture21 { } movieClip 245 skillPicture22 { } movieClip 248 skillPicture23 { } movieClip 251 skillPicture24 { } movieClip 254 skillPicture25 { } movieClip 257 skillPicture26 { } movieClip 260 skillPicture27 { } movieClip 263 locationPicture5 { } movieClip 266 locationPicture6 { } movieClip 269 locationPicture7 { } movieClip 272 locationPicture8 { } movieClip 275 locationPicture10 { } movieClip 278 chancellusPortrait { } movieClip 281 chancellusPortrait2 { } movieClip 284 locationPicture11 { } movieClip 287 locationPicture12 { } movieClip 319 debris0 { frame 1 { randomBloodAnim = Math.round(Math.random() * 1) + 1; this.gotoAndPlay('bloodAnim' + randomBloodAnim); } frame 17 { removeMovieClip(this); } frame 34 { removeMovieClip(this); } } movieClip 324 projectile1 { } movieClip 325 debris1 { frame 1 { function moveParticles() { var i = -1; while (++i < this.numParticles) { if (particleStats[i].particleDead != true) { this['particle' + i]._x += particleStats[i].particleSpeed; this['particle' + i]._y = particleStats[i].particleA * Math.pow(this['particle' + i]._x, 2) + particleStats[i].particleB * this['particle' + i]._x + particleStats[i].particleC; this['particle' + i]._alpha -= particleStats[i].particleFadeRate; this['particle' + i]._rotation += particleStats[i].particleRotateRate; if (this['particle' + i]._alpha <= 0) { particleStats[i].particleDead = true; removeMovieClip(eval('this.particle' + i)); ++this.numParticlesDead; } } } if (numParticlesDead >= numParticles) { this.removeMovieClip(); } } particleStats = new Array(); numParticles = Math.round(Math.random() * 2) + 1; numParticlesDead = 0; var i = -1; while (++i < numParticles) { baseSpeed = Math.round(Math.random() * 4) + 4; baseHeight = Math.round(Math.random() * 50) + 50; startX = 0; startY = 0; endX = Math.round(Math.random() * 60) - 30; endY = Math.round(Math.random() * -30) - 30; particleFadeRate = Math.round(Math.random() * 3) + 1; particleRotateRate = Math.round(Math.random() * 12) - 6; while (startY - baseHeight > endY) { ++baseHeight; } var particleK = startY - baseHeight; var particleH = (startX + endX) / 2; var particleA = ((particleK - startY) * (startX - endX) + (endY - startY) * (particleH - startX)) / ((startX - endX) * (Math.pow(particleH, 2) - Math.pow(startX, 2)) + (particleH - startX) * (Math.pow(endX, 2) - Math.pow(startX, 2))); var particleB = (particleK - startY - particleA * (Math.pow(particleH, 2) - Math.pow(startX, 2))) / (particleH - startX); var particleC = startY - particleA * Math.pow(startX, 2) - particleB * startX; var particleAngleToVertex = Math.atan2(startY - particleK, particleH - startX) / 0.0174532925199433; var particleSpeed = baseSpeed * Math.cos((particleAngleToVertex / 180) * Math.PI); attachMovie('debris1Embed', 'particle' + i, this.getNextHighestDepth()); this['particle' + i]._x = startX; this['particle' + i]._y = particleA * Math.pow(this['particle' + i]._x, 2) + particleB * this['particle' + i]._x + particleC; particleStats[i] = new Array(); particleStats[i].particleA = particleA; particleStats[i].particleB = particleB; particleStats[i].particleC = particleC; particleStats[i].vertexX = particleH; particleStats[i].vertexY = particleK; particleStats[i].particleSpeed = particleSpeed; particleStats[i].particleFadeRate = particleFadeRate; particleStats[i].particleRotateRate = particleRotateRate; particleStats[i].particleDead = false; } clearInterval(particleInterval); particleInterval = setInterval(this, 'moveParticles', 40); } frame 16 { stop(); } } movieClip 333 { } movieClip 345 { } movieClip 347 debris1Embed { frame 1 { randomParticle = Math.round(Math.random() * 2) + 1; this.gotoAndStop('particle' + randomParticle); } } movieClip 351 { } movieClip 352 debris2 { frame 5 { _parent._parent.debrisDamageTest(unitNumber, debrisNumber, debrisType); } frame 30 { this.removeMovieClip(); } } movieClip 354 projectile-1 { } movieClip 356 projectile-2 { } movieClip 359 debris-1 { frame 30 { this.removeMovieClip(); } } movieClip 360 debris-2 { frame 30 { this.removeMovieClip(); } } movieClip 369 projectile2 { } movieClip 373 projectileTrail1_1 { frame 25 { doneTrailing = true; this.stop(); } } movieClip 380 projectile-3 { frame 1 { gotoAndStop('orb' + Math.round(Math.random() * 2)); } } movieClip 384 debris-3 { frame 20 { this.removeMovieClip(); } } movieClip 389 statusEffectSymbol5 { } movieClip 390 AIManager { frame 1 { function newAI(playerNumber) { switch (_root.campaignStats.missionData[_root.currentMission].enemyTeamAI) { case 1: deployLeaderLast = true; deployInterval = 6; averageCovering = 1; unitToEnemyRatio = 1.8; targetSwitchInterval = 120; abilityUseInterval = 200; maxDeployed = 8; break; case 2: deployLeaderLast = false; deployInterval = 4; averageCovering = 1; unitToEnemyRatio = 1; targetSwitchInterval = 120; abilityUseInterval = 200; maxDeployed = 6; break; default: deployLeaderLast = true; deployInterval = 6; averageCovering = 1; unitToEnemyRatio = 1.8; targetSwitchInterval = 120; abilityUseInterval = 200; } unitsDeployed = new Array(); lastDeployTime = 0; AIEnabled = playerNumber; inversePlayer = _parent['unitManager' + AIEnabled].inversePlayerNumber; AISecond = 0; skewedDeploys = 0; clearInterval(manageAIInterval); manageAIInterval = setInterval(this, 'manageAI', 1000); } function manageAI() { if (AIEnabled) { ++AISecond; if (_parent['unitManager' + AIEnabled].deployedUnits < _parent.unitLineups[AIEnabled].length && _parent['unitManager' + AIEnabled].deployedUnits - _parent['unitManager' + AIEnabled].unitsDead.length < maxDeployed && AISecond > lastDeployTime + deployInterval && _parent['unitManager' + AIEnabled].deployedUnits - _parent['unitManager' + AIEnabled].unitsDead.length < (_parent['unitManager' + inversePlayer].deployedUnits - _parent['unitManager' + inversePlayer].unitsDead.length) * unitToEnemyRatio && (_root.userSettings.tutorialObjective < 0 || _root.userSettings.tutorialObjective > 8)) { if (_parent['unitManager' + AIEnabled].deployedUnits >= _parent.unitLineups[AIEnabled].length - 1 && deployLeaderLast == true) { (eval('_parent.unitManager' + AIEnabled)).deployNewUnit(0); } else { while (!deployUnitPicked) { var deployUnitNumber = Math.round(Math.random() * (_parent.unitLineups[AIEnabled].length - 1)); var deployUnitPicked = true; if (deployUnitNumber == 0 && deployLeaderLast == true) { deployUnitPicked = false; } else { if (unitsDeployed.Contains(deployUnitNumber) >= 0) { deployUnitPicked = false; } } } if ((eval('_parent.unitManager' + AIEnabled)).deployNewUnit(deployUnitNumber)) { } unitsDeployed.push(deployUnitNumber); } lastDeployTime = AISecond; } } } } } movieClip 395 { frame 1 { if (_parent.damageNumber > 0) { if (_parent.playerNum == _root.gamePath.playerNumber) { gotoAndStop('playerDamage'); } else { gotoAndStop('enemyDamage'); } } else { if (_parent.damageNumber < 0) { if (_parent.playerNum == _root.gamePath.playerNumber) { gotoAndStop('playerHeal'); } else { gotoAndStop('enemyHeal'); } } else { _parent.removeMovieClip(); } } } frame 2 { lastDamageText.text = Math.ceil(_parent.damageNumber); } frame 3 { lastDamageText.text = Math.ceil(_parent.damageNumber); } frame 4 { lastDamageText.text = '+' + Math.abs(Math.ceil(_parent.damageNumber)); } frame 5 { lastDamageText.text = '+' + Math.abs(Math.ceil(_parent.damageNumber)); } } movieClip 396 damageNumber { frame 24 { this.removeMovieClip(); } } movieClip 398 { } movieClip 400 { } movieClip 402 destinationFlagTemplate { frame 1 { flagColourObject1 = new Color(this.flagColour1); flagColourObject2 = new Color(this.flagColour2); redLight = _root.gamePath.playerSettings[_root.gamePath.playerNumber].colourR; greenLight = _root.gamePath.playerSettings[_root.gamePath.playerNumber].colourG; blueLight = _root.gamePath.playerSettings[_root.gamePath.playerNumber].colourB; redLightShade = redLight + 65; greenLightShade = greenLight + 65; blueLightShade = blueLight + 65; if (redLightShade > 255) { redLightShade = 255; } if (greenLightShade > 255) { greenLightShade = 255; } if (blueLightShade > 255) { blueLightShade = 255; } this.flagColourObject1.setTint(redLight, greenLight, blueLight, 100); this.flagColourObject2.setTint(redLightShade, greenLightShade, blueLightShade, 100); } } movieClip 403 unitTemplate { frame 1 { function updateUnit() { ++framesAlive; if (!deRe && unitMode == 2) { if (desX > 1150) { desX == _root.fieldWidth - 50; } else { if (desX < 50) { destinationX = 50; } } if (desX > _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0]) { _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0] += currentSpeed; if (_root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0] <= 0) { _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][1] = _root.gamePath.groundHeights[0] + 5; } else { if (_root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0] > _root.gamePath.groundHeights.length - 5) { _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][1] = _root.gamePath.groundHeights[_root.gamePath.groundHeights.length - 1] + 5; } else { _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][1] = _root.gamePath.groundHeights[mRound(_root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0])] + 5; } } nextUnitMode = 2; } else { if (desX < _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0]) { _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0] -= currentSpeed; if (_root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0] <= 0) { _root.gamePath.plUnCo[playerNumber][unitNumber][1] = _root.gamePath.groundHeights[0] + 5; } else { if (_root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0] > _root.gamePath.groundHeights.length - 5) { _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][1] = _root.gamePath.groundHeights[_root.gamePath.groundHeights.length - 1] + 5; } else { _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][1] = _root.gamePath.groundHeights[mRound(_root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0])] + 5; } } nextUnitMode = 2; } } if (desX - currentSpeed < _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0] && desX + currentSpeed > _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0]) { deRe = true; if (aiFreezeWalk) { aiFreezeWalk = false; } nextUnitMode = 1; if (_parent.playerNumber == _root.gamePath.playerNumber) { _parent.changeDestinationFlags(); } } } if (aiFreezeWalk && _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0] > 50 && _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0] < 1150) { aiFreezeWalk = false; } unitBody._x = _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0]; unitBody._y = _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][1] + overlapAdjust; if (unitMode == 0) { if (knockedBackSpeed) { if (_root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0] + knockedBackSpeed < 1150 && _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0] + knockedBackSpeed > 50) { _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0] += knockedBackSpeed; } _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][1] = _root.gamePath.groundHeights[mRound(_root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0])] + 5; var v6 = knockedBackSpeed; if (knockedBackSpeed > 0) { knockedBackSpeed -= 3; } else { if (knockedBackSpeed < 0) { knockedBackSpeed += 3; } } if (v6 > 0 && knockedBackSpeed < 0 || v6 < 0 && knockedBackSpeed > 0) { knockedBackSpeed = 0; } } if (knockedBackSpeed <= 0 && doneKnockBack == true) { unitMode = 2; } } if (numUnitsOverlapping > 0) { overlapAdjustmentY = mRound(overlapAdjustmentLevel * (15 / (numUnitsOverlapping + baseUnitsOverlapping))); } else { overlapAdjustmentY = 0; } if (overlapAdjust < overlapAdjustmentY) { ++overlapAdjust; } else { if (overlapAdjust > overlapAdjustmentY) { --overlapAdjust; } } if (partyNumber == 0) { leaderSymbol._x = unitBody._x; leaderSymbol._y = unitBody._y + 4; } healthBar._x = unitBody._x; healthBar._y = unitBody._y; var v5 = 1; var v4 = 0; while (v4 < statusEffects.length) { if (statusEffects[v4] != 0 && statusEffects[v4] != undefined) { this['statusEffect' + v4]._y = unitBody._y - unitBody.bodyWidthBlock._height - 20 * v5; this['statusEffect' + v4]._x = unitBody._x; ++v5; } ++v4; } if ((unitMode < 3 && unitMode != 0 || animUnitMode == true) && nextUnitModeDelay <= 0 && unitMode != nextUnitMode && !aiFreezeWalk) { unitMode = nextUnitMode; animUnitMode = false; if (nextSelectSkill != undefined) { if (currentCharge >= _root.skillStats[skill[nextSelectSkill.nSB]].charge && skillStatus[nextSelectSkill.nSB] == 1) { _parent.unitSelectSkill(unitNumber, nextSelectSkill.nSB, nextSelectSkill.nTM, nextSelectSkill.nTE); } delete nextSelectSkill; } nextUnitModeDelay = 0; } else { if (nextUnitModeDelay > 0) { --nextUnitModeDelay; } } } function updateUnitMedPriority() { if (unitMode <= 2 && targetEnemy < 0) { if (desX >= _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0]) { unitBody._xscale = 100; } else { if (desX < _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0]) { unitBody._xscale = -100; } } } else { if (targetEnemy >= 0) { if (_root.gamePath.plUnCo[targetPlayerNumber][targetEnemy][0] >= _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0] + 5) { unitBody._xscale = 100; } else { if (_root.gamePath.plUnCo[targetPlayerNumber][targetEnemy][0] < _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0] - 5) { unitBody._xscale = -100; } } } } if (targetEnemy >= 0 && _root['gameUnitsPath' + targetPlayerNumber]['playerUnit' + targetEnemy].unitDead != true && selectedAbility >= 0 && !aiFreezeWalk) { unitCoordinateX = _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0]; enemyCoordinateX = _root.gamePath.plUnCo[targetPlayerNumber][targetEnemy][0]; if (enemyCoordinateX <= unitCoordinateX && enemyCoordinateX >= unitCoordinateX - actionMaxX || enemyCoordinateX >= unitCoordinateX && enemyCoordinateX <= unitCoordinateX + actionMaxX) { taInRa = true; deRe = true; if (_root.jobStats[unitType].attackType == 'projectile' && selectedAbility == 0) { enemyDistanceX = Math.abs(unitCoordinateX - enemyCoordinateX); if (enemyDistanceX <= _root.jobStats[unitType].closeAttackThres && enemyDistanceX > _root.jobStats[unitType].closeAttackRange) { closeRangeAttack = true; actionMaxX = _root.jobStats[unitType].closeAttackRange; nextUnitMode = 2; deRe = false; taInRa = false; desX = enemyCoordinateX; } else { if (enemyDistanceX <= _root.jobStats[unitType].closeAttackRange) { closeRangeAttack = true; } else { if (enemyDistanceX > _root.jobStats[unitType].closeAttackThres) { closeRangeAttack = false; actionMaxX = _root.jobStats[unitType].attackMaxRange; } } } } } else { if (!aiFreezeWalk) { desX = enemyCoordinateX; taInRa = false; deRe = false; } } } else { if (_root['gameUnitsPath' + targetPlayerNumber]['playerUnit' + targetEnemy].unitDead == true) { if (_parent.attackClosest(unitNumber) && selectedAbility > 0 && _root.skillStats[skills[selectedAbilityBlock]].alliance == 1) { _parent.unitSelectSkill(unitNumber, selectedAbilityBlock, targetPlayerNumber, targetEnemy); } } } if (attackTime == true && unitMode == 3 && targetEnemy >= 0) { if (_root.jobStats[unitType].attackType == 'projectile' && !closeAtkAnim) { projectileStartX = unitBody._x + unitBody.projectileStart._x; projectileStartY = unitBody._y + unitBody.projectileStart._y; if (unitBody._xscale < 0) { projectileStartX = unitBody._x - unitBody.projectileStart._x; } else { projectileStartX = unitBody._x + unitBody.projectileStart._x; } projectileEndX = _root.gamePath.plUnCo[targetPlayerNumber][targetEnemy][0]; projectileEndY = _root.gamePath.plUnCo[targetPlayerNumber][targetEnemy][1] - _root['gameUnitsPath' + targetPlayerNumber]['playerUnit' + targetEnemy].unitBody.bodyWidthBlock._height / 2; _parent.newProjectile(projectileStartX, projectileStartY, projectileEndX, projectileEndY, 0, unitNumber); _root.soundManager.gameFieldSFX('attackHit', unitType, unitBody._x); } else { if (_root.jobStats[unitType].attackType == 'attack' || closeAtkAnim) { if (unitBody._xscale < 0) { attackTestX1 = unitBody._x - unitBody.attackPoint0._x; attackTestX2 = unitBody._x - unitBody.attackPoint1._x; attackTestModify = attackTestX1; } else { attackTestX1 = unitBody._x + unitBody.attackPoint0._x; attackTestX2 = unitBody._x + unitBody.attackPoint1._x; attackTestModify = attackTestX1; } doneTestingAttackHit = false; modifyFactor = 0; if (projectileOffset) { var v8 = mRound(mRand() * 100); if (v8 < projectileOffset / 100) { doneTestingAttackHit = true; } } while (!doneTestingAttackHit) { attackTestY = unitBody._y + unitBody.attackPoint0._y; var v4 = {'x': attackTestModify, 'y': attackTestY}; localToGlobal(v4); if (_root['gameUnitsPath' + targetPlayerNumber].hitTest(v4.x, v4.y, true)) { var v3 = -1; while (++v3 <= _root['gameUnitsPath' + targetPlayerNumber].deployedUnits) { if (_root['gameUnitsPath' + targetPlayerNumber]['playerUnit' + v3].unitBody.hitTest(v4.x, v4.y, true)) { if (nextAttackSkill > 0) { _parent.newDebris(unitNumber, _root.skillStats[nextAttackSkill].attackDebrisType, attackTestModify, attackTestY); _root['gameUnitsPath' + targetPlayerNumber].damageUnit(v3, unitNumber, _parent.playerNumber, nextAttackSkill, 'none'); skillStatus[nextAttackSkillBlock] = 3; finalizeSkillUse(nextAttackSkill); nextAttackSkill = 0; nextAttackSkillBlock = -1; } else { _root['gameUnitsPath' + targetPlayerNumber].damageUnit(v3, unitNumber, _parent.playerNumber, 0, 'none'); } _root['gameUnitsPath' + targetPlayerNumber].newDebris(v3, 0, attackTestModify, attackTestY); if (_root.jobStats[unitType].attackType == 'attack') { _root.soundManager.gameFieldSFX('attackHit', unitType, unitBody._x); } else { if (_root.jobStats[unitType].attackType == 'projectile') { _root.soundManager.gameFieldSFX('attackHitC', unitType, unitBody._x); } } doneTestingAttackHit = true; ++unitEXP; break; } } } if (doneTestingAttackHit) { break; } else { if (attackTestX1 > attackTestX2 && attackTestModify >= attackTestX2) { --attackTestModify; --modifyFactor; } else { if (attackTestX1 < attackTestX2 && attackTestModify <= attackTestX2) { ++attackTestModify; ++modifyFactor; } else { if (_root['gameUnitsPath' + targetPlayerNumber]['playerUnit' + targetEnemy].unitDead != true) { unitCoordinateX = _root.gamePath.plUnCo[_parent.playerNumber][unitNumber][0]; enemyCoordinateX = _root.gamePath.plUnCo[targetPlayerNumber][targetEnemy][0]; if (enemyCoordinateX <= unitCoordinateX && enemyCoordinateX >= unitCoordinateX - actionMaxX || enemyCoordinateX >= unitCoordinateX && enemyCoordinateX <= unitCoordinateX + actionMaxX) { actionMaxX -= 2; nextUnitMode = 2; } nextUnitMode = 2; } else { _parent.attackClosest(unitNumber); if (selectedAbility > 0 && targetPlayerNumber == _parent.inversePlayerNumber) { _parent.unitSelectSkill(unitNumber, selectedAbilityBlock, targetPlayerNumber, targetEnemy); } } doneTestingAttackHit = true; break; } } } } } } unitEXP += 0.5; attackTime = false; } if (taInRa == true && selectedAbility >= 0 && unitMode <= 2 && !aiFreezeWalk) { if (selectedAbility == 0) { nextUnitMode = 3; } else { if (selectedAbility > 0) { if (currentCharge >= _root.skillStats[skills[selectedAbilityBlock]].charge) { nextUnitMode = 4; preparingSkill = true; } else { taInRa = false; nextUnitMode = 2; selectedAbility = -1; _parent.unitSetAttackTarget(targetEnemy, unitNumber); if (_parent.playerNumber == _root.gamePath.playerNumber) { _root.gameInterfacePath.skillInfo.gotoAndStop('skillError'); _root.gameInterfacePath.skillInfo.errorMessage.text = unitName + '\'s charge is too weak!'; _root.soundManager.sfx.spcClick.start(); _root.gamePath.lastSkillError = _root.gamePath.currentTime; } } } } } if (prepareTime >= _root.skillStats[skills[selectedAbilityBlock]].preparationTime && selectedAbility > 0 && _root['gameUnitsPath' + targetPlayerNumber]['playerUnit' + targetEnemy].unitDead != true) { preparingSkill = false; if (taInRa == true) { prepareTime = 0; if (_root.skillStats[selectedAbility].effectType == 'projectile') { projectileStartX = unitBody._x + unitBody.projectileStart._x; projectileStartY = unitBody._y + unitBody.projectileStart._y; if (unitBody._xscale < 0) { projectileStartX = unitBody._x - unitBody.projectileStart._x; } else { projectileStartX = unitBody._x + unitBody.projectileStart._x; } projectileEndX = _root.gamePath.plUnCo[targetPlayerNumber][targetEnemy][0]; projectileEndY = _root.gamePath.plUnCo[targetPlayerNumber][targetEnemy][1] - _root['gameUnitsPath' + targetPlayerNumber]['playerUnit' + targetEnemy].unitBody.bodyWidthBlock._height / 3; _parent.newProjectile(projectileStartX, projectileStartY, projectileEndX, projectileEndY, selectedAbility, unitNumber); skillStatus[selectedAbilityBlock] = 3; finalizeSkillUse(selectedAbility); } else { if (_root.skillStats[selectedAbility].effectType == 'attack') { nextAttackSkill = selectedAbility; nextAttackSkillBlock = selectedAbilityBlock; } else { if (_root.skillStats[selectedAbility].effectType == 'self') { _parent.newDebris(unitNumber, _root.skillStats[selectedAbility].attackDebrisType, unitBody._x, unitBody._y - unitBody.bodyWidthBlock._height / 2); _root['gameUnitsPath' + targetPlayerNumber].damageUnit(unitNumber, unitNumber, _parent.playerNumber, selectedAbility, 'none'); skillStatus[selectedAbilityBlock] = 3; finalizeSkillUse(selectedAbility); targetPlayerNumber = -1; targetEnemy = -1; } } } if (targetPlayerNumber == _parent.inversePlayerNumber) { _parent.unitSetAttackTarget(targetEnemy, unitNumber); } else { nextUnitMode = 1; targetEnemy = -1; targetPlayerNumber = -1; } selectedAbility = 0; taInRa = false; } else { nextUnitMode = 2; deRe = false; } } else { if (preparingSkill == true && selectedAbility > 0 && _root['gameUnitsPath' + targetPlayerNumber]['playerUnit' + targetEnemy].unitDead == true || selectedAbility <= 0 && (preparingSkill == true || unitMode == 4)) { preparingSkill = false; prepareTime = 0; _parent.attackClosest(unitNumber); } } if (newlySelectedGlowing) { newlySelectedGlowAlpha = (-Math.pow(0.8 * newlySelectedGlowing - 10, 2) + 100) / 4; newlySelectedGlowBlur = (-Math.pow(0.8 * newlySelectedGlowing - 10, 2) + 100) / 20; var v7 = new flash.filters.GlowFilter(16720418, newlySelectedGlowAlpha, newlySelectedGlowBlur, newlySelectedGlowBlur, 3, 1, false, false); unitBody.filters = []; unitBodyFilters = unitBody.filters; unitBodyFilters.push(v7); unitBody.filters = unitBodyFilters; newlySelectedGlowing += 4; if (newlySelectedGlowing > 25) { newlySelectedGlowing = 0; } } if (!unitDead) { switch (unitMode) { case 0: unitBody.gotoAndStop('knockedBack'); break; case 1: unitBody.gotoAndStop('idle'); break; case 2: unitBody.gotoAndStop('moving'); break; case 3: unitBody.gotoAndStop('attack'); break; case 4: unitBody.gotoAndStop('powerUp'); } } if (unitBody._alpha < bodyAlpha) { unitBody._alpha += 3; } else { if (unitBody._alpha > bodyAlpha) { unitBody._alpha = bodyAlpha; } } lastMedPriority = framesAlive; } function updateUnitLowPriority() { if (_parent.AISettings == 2 && !aiFreezeWalk) { AIActions(); } if (currentCharge < currentMaxCharge) { currentCharge += currentChargeSpeed; } unitEXP += 0.1; if (framesAlive > lastResquarFavour + 144 && unitDeity == 2) { ++currentFavour; if (currentFavour > 100) { currentFavour = 100; } lastResquarFavour = framesAlive; } if (framesAlive > lastStatusEffectCheck + 24) { var v5 = 0; for (var v4 in statusEffects) { if (statusEffects[v4] != 0 && statusEffects[v4] != undefined) { switch (statusEffects[v4]) { case 1: _parent.damageUnit(unitNumber, 0, 0, -2, (currentMaxHP / 100) * statusEffectSPC[v4]); break; case 2: _parent.damageUnit(unitNumber, 0, 0, -2, (currentMaxHP / 100) * statusEffectSPC[v4]); break; case 4: _parent.damageUnit(unitNumber, 0, 0, -2, (currentMaxHP / 100) * statusEffectSPC[v4]); } if (framesAlive > statusEffectStart[v4] + statusEffectDuration[v4]) { _parent.removeStatusEffect(unitNumber, v4); } } else { ++v5; } } if (v5 == statusEffects.length) { statusEffects = []; } lastStatusEffectCheck = framesAlive; } v4 = -1; while (++v4 < 5) { if (skillStatus[v4] == 3) { skillRecharge[v4] += 24; if (skillRecharge[v4] >= _root.skillStats[skills[v4]].rechargeTime) { skillStatus[v4] = 1; skillRecharge[v4] = 0; } } } if (unitType == 9) { var v10 = mRound(mRand()); var v6 = mRound(mRand()); if (!v6) { v6 = -1; } var v7 = mRound(mRand() * 40) + 60; var v9 = mRound(mRand() * 60) - 30; var v8 = mRound(mRand() * 70) - 60; if (v10) { attachMovie('powerhouseShock', 'powerhouse' + lastLowPriority, this.getNextHighestDepth(), {'_x': unitBody._x + v9, '_y': unitBody._y + v8, '_xscale': v7 * v6, '_yscale': v7}); } else { attachMovie('powerhouseCloud', 'powerhouse' + lastLowPriority, this.getNextHighestDepth(), {'_x': unitBody._x + v9, '_y': unitBody._y + v8, '_xscale': v7 * v6, '_yscale': v7}); } if (currentHP < currentMaxHP * 0.8 && !spcChatRecord) { _root.gameInterfacePath.nextChatMessage = _parent.playerNumber + ':' + unitName + ':Apologies to your followers... they do not deserve death.'; spcChatRecord = 1; } else { if (currentHP < currentMaxHP * 0.55 && spcChatRecord == 1) { _root.gameInterfacePath.nextChatMessage = _parent.playerNumber + ':' + unitName + ':You can do nothing without the support of the gods.'; ++spcChatRecord; } else { if (currentHP < currentMaxHP * 0.25 && spcChatRecord == 2) { _root.gameInterfacePath.nextChatMessage = _parent.playerNumber + ':' + unitName + ':Enough of this. Grant me strength!'; _root.gamePath.finalSendTime = _root.gamePath.mainIntervalsPassed; ++spcChatRecord; if (!_root['gameUnitsPath' + _root.gamePath.playerNumber].leaderDeployed) { _root['gameUnitsPath' + _root.gamePath.playerNumber].deployNewUnit(0); } unitBody.gotoAndStop('spcFinal'); aiFreezeWalk = true; unitDead = true; _root.gamePath.startChancellusEnd = true; clearInterval(_root.gamePath.spcTimerInt); _root.gamePath.spcTimerInt = setInterval(_root.gamePath, 'spcTimer', 100); } } } } else { if (unitType == 8) { if (currentHP < currentMaxHP * 0.8 && !spcChatRecord) { _root.gameInterfacePath.nextChatMessage = _parent.playerNumber + ':' + unitName + ':This temple belongs to Kasayel now!'; spcChatRecord = 1; } else { if (currentHP < currentMaxHP * 0.5 && spcChatRecord == 1) { _root.gameInterfacePath.nextChatMessage = _parent.playerNumber + ':' + unitName + ':Fool! You cannot defy a god!'; ++spcChatRecord; } else { if (currentHP < currentMaxHP * 0.1 && spcChatRecord == 2) { _root.gameInterfacePath.nextChatMessage = _parent.playerNumber + ':' + unitName + ':Ah... perhaps it is time to leave...'; ++spcChatRecord; } } } } else { if (unitType == 5 && grVar == 3) { if (currentHP < currentMaxHP * 0.8 && !spcChatRecord) { _root.gameInterfacePath.nextChatMessage = _parent.playerNumber + ':' + unitName + ':Lord Kasayel forgives me for my cowardice!'; spcChatRecord = 1; } else { if (currentHP < currentMaxHP * 0.5 && spcChatRecord == 1) { _root.gameInterfacePath.nextChatMessage = _parent.playerNumber + ':' + unitName + ':The Tower gives its orders... you must die!'; ++spcChatRecord; } else { if (currentHP < currentMaxHP * 0.1 && spcChatRecord == 2) { _root.gameInterfacePath.nextChatMessage = _parent.playerNumber + ':' + unitName + ':Agh! Master Chancellus will avenge me!'; ++spcChatRecord; } } } } } } lastLowPriority = framesAlive; } function getTargetDistances(targetMan) { var v6 = []; var v3 = -1; var v5 = 0; while (++v3 < _root['gameUnitsPath' + targetMan].deployedUnits) { if (_root['gameUnitsPath' + targetMan]['playerUnit' + v3].unitDead != true) { v6[v5] = Math.abs(unitBody._x - _root.gamePath.plUnCo[targetMan][v3][0]) + ':' + v3; ++v5; } } v6.sort(_parent.splitAndOrder); return v6; } function finalizeSkillUse(skillNumber) { _root.soundManager.gameFieldSFX('skillStart', skillNumber, unitBody._x); lastAbilityUse = framesAlive; lastSkillUsed = skillNumber; currentCharge -= _root.skillStats[skillNumber].charge; if (_root.skillStats[skillNumber].shakeTime > 0) { _root.gamePath.shakeTime = _root.skillStats[skillNumber].shakeTime; _root.gamePath.shakeMagnitude = _root.skillStats[skillNumber].shakeMagnitude; } _root.gameInterfacePath.newDisplayMessage(unitName + ': ' + _root.skillStats[skillNumber].name, _parent.playerNumber); unitEXP += _root.skillStats[skillNumber].experience; if (_parent.playerNumber == _root.gamePath.playerNumber) { ++_root.gamePath.statSkillsUsed; } if (_root.skillStats[skillNumber].baseFavour && unitDeity != 4) { if (unitDeity == 0) { currentFavour += _root.skillStats[skillNumber].baseFavour * 1.8; } else { currentFavour += _root.skillStats[skillNumber].baseFavour; } } if (unitDeity == 1 && !_root.skillStats[skillNumber].baseFavour) { currentFavour += 2.2; } if (currentFavour > 100) { currentFavour = 100; } } mRound = Math.round; mRand = Math.random; if (_parent.AISettings == 2) { AIActions = function () { recordedUnitDistances = []; var v5 = 0; var v7 = 0; if (selectedAbility <= 0 && nextAttackSkill <= 0) { if (aiFreezeSkill < 0) { skills.push(skills.shift()); skillStatus.push(skillStatus.shift()); skillRecharge.push(skillRecharge.shift()); } var v3 = Math.max(aiFreezeSkill, 0); while (v3 < skillsDefined) { if (skillStatus[v3] == 1) { if (_root.skillStats[skills[v3]].effectType == 'projectile' || _root.skillStats[skills[v3]].effectType == 'attack') { if (_root.skillStats[skills[v3]].alliance == 1) { recordedUnitDistances = getTargetDistances(_parent.inversePlayerNumber); var v4 = 0; while (v4 < recordedUnitDistances.length) { if ((recordedUnitDistances[v4].split(':'))[0] <= _root.skillStats[skills[v3]].maxRange || _root.skillStats[skills[v3]].effectType == 'attack' && (_root.jobStats[unitType].attackType == 'attack' || closeRangeAttack)) { if (currentCharge >= _root.skillStats[skills[v3]].charge) { _parent.unitSelectSkill(unitNumber, v3, _parent.inversePlayerNumber, (recordedUnitDistances[v4].split(':'))[1]); } else { aiFreezeSkill = v3; } break; } else { if (aiFreezeSkill >= 0) { aiFreezeSkill = -1; } } ++v4; } } else { if (_root.skillStats[skills[v3]].alliance == 2) { recordedUnitDistances = getTargetDistances(_parent.playerNumber); var v4 = 0; while (v4 < recordedUnitDistances.length) { if ((recordedUnitDistances[v4].split(':'))[0] <= _root.skillStats[skills[v3]].maxRange && _parent['playerUnit' + (recordedUnitDistances[v4].split(':'))[1]].currentHP < _parent['playerUnit' + (recordedUnitDistances[v4].split(':'))[1]].currentMaxHP * 0.75 && (recordedUnitDistances[v4].split(':'))[1] != unitNumber) { if (currentCharge >= _root.skillStats[skills[v3]].charge) { _parent.unitSelectSkill(unitNumber, v3, _parent.playerNumber, (recordedUnitDistances[v4].split(':'))[1]); } else { aiFreezeSkill = v3; } break; } else { if (aiFreezeSkill >= 0) { aiFreezeSkill = -1; } } ++v4; } } } } else { if (_root.skillStats[skills[v3]].effectType == 'self') { if (_root.skillStats[skills[v3]].alliance == 1) { recordedUnitDistances = getTargetDistances(_parent.inversePlayerNumber); var v4 = 0; while (v4 < recordedUnitDistances.length) { if ((recordedUnitDistances[v4].split(':'))[0] <= _root.skillStats[skills[v3]].maxRange) { if (currentCharge >= _root.skillStats[skills[v3]].charge) { _parent.unitSelectSkill(unitNumber, v3, _parent.playerNumber, unitNumber); } else { aiFreezeSkill = v3; } break; } else { if (aiFreezeSkill >= 0) { aiFreezeSkill = -1; } } ++v4; } } else { if (_root.skillStats[skills[v3]].alliance == 2) { if (currentHP < currentMaxHP * 0.75) { if (currentCharge >= _root.skillStats[skills[v3]].charge) { _parent.unitSelectSkill(unitNumber, v3, _parent.playerNumber, unitNumber); } else { aiFreezeSkill = v3; } } else { if (aiFreezeSkill >= 0) { aiFreezeSkill = -1; } } } } } } } if (aiFreezeSkill >= 0 || selectedAbility > 0 || nextAttackSkill > 0) { break; } ++v3; } } recordedUnitDistances = getTargetDistances(_parent.inversePlayerNumber); if (taInRa != true && selectedAbility <= 0 && nextAttackSkill <= 0 || targetEnemy < 0 || targetPlayerNumber < 0) { if (framesAlive > lastTargetSwitch + _root.gamePath['AIManager' + _parent.playerNumber].targetSwitchInterval || targetEnemy < 0 || targetPlayerNumber < 0) { var v6 = 0; lastTargetSwitch = framesAlive; targetPlayerNumber = _parent.inversePlayerNumber; while (v6 < _root['gameUnitsPath' + targetPlayerNumber].deployedUnits) { v7 = 0; if (recordedUnitDistances[v6] != undefined) { v5 = (recordedUnitDistances[v6].split(':'))[1]; var v4 = -1; while (++v4 < _parent.deployedUnits) { if (v5 == _parent['playerUnit' + v4].targetEnemy && _parent['playerUnit' + v4].taInRa && v4 != unitNumber) { ++v7; } } if (v7 < _root.gamePath['AIManager' + _parent.playerNumber].averageCovering) { if (v5 != undefined) { _parent.unitSetAttackTarget(v5, unitNumber); } break; } } if (v6 >= _root['gameUnitsPath' + targetPlayerNumber].deployedUnits) { v5 = (recordedUnitDistances[0].split(':'))[1]; if (v5 != undefined) { _parent.unitSetAttackTarget(v5, unitNumber); } break; } ++v6; } } } }; } projectileMovement = function () { var v15 = 0; var v6 = -1; while (++v6 <= projectileNumber) { if (this['arrow' + v6] != undefined) { var v7 = false; this['arrow' + v6]._x += this['arrow' + v6].projectileSpeed; this['arrow' + v6]._y = this['arrow' + v6].projectileA * Math.pow(this['arrow' + v6]._x, 2) + this['arrow' + v6].projectileB * this['arrow' + v6]._x + this['arrow' + v6].projectileC; if (this['arrow' + v6]._x > this['arrow' + v6].vertexX && this['arrow' + v6].startX < this['arrow' + v6].vertexX || this['arrow' + v6]._x < this['arrow' + v6].vertexX && this['arrow' + v6].startX > this['arrow' + v6].vertexX) { this['arrow' + v6].vertexReached = true; } if (this['arrow' + v6]._x < this['arrow' + v6].vertexX) { this['arrow' + v6]._rotation = -Math.atan2(this['arrow' + v6]._y - this['arrow' + v6].vertexY, this['arrow' + v6].vertexX - this['arrow' + v6]._x) / 0.0174532925199433; } else { if (this['arrow' + v6]._x > this['arrow' + v6].vertexX) { this['arrow' + v6]._rotation = Math.atan2(this['arrow' + v6]._x - this['arrow' + v6].vertexX, this['arrow' + v6].vertexY - this['arrow' + v6]._y) / 0.0174532925199433 - 80; } } if (this['arrow' + v6].startX > this['arrow' + v6].vertexX) { this['arrow' + v6]._xscale = -100; } var v5 = {'x': this['arrow' + v6]._x, 'y': this['arrow' + v6]._y}; localToGlobal(v5); if (_root['gameUnitsPath' + this['arrow' + v6].targetPlayerNumber].hitTest(v5.x, v5.y, true) && this['arrow' + v6].hitGround != true) { var v4 = -1; while (++v4 <= _root['gameUnitsPath' + this['arrow' + v6].targetPlayerNumber].deployedUnits) { if (_root['gameUnitsPath' + this['arrow' + v6].targetPlayerNumber]['playerUnit' + v4].unitBody.hitTest(v5.x, v5.y, true) && !(this['arrow' + v6].targetPlayerNumber == _parent.playerNumber && v4 == unitNumber)) { _root['gameUnitsPath' + this['arrow' + v6].targetPlayerNumber].damageUnit(v4, unitNumber, _parent.playerNumber, this['arrow' + v6].abilityNumber, 'none'); _root['gameUnitsPath' + this['arrow' + v6].targetPlayerNumber].newDebris(v4, 0, this['arrow' + v6]._x, this['arrow' + v6]._y); if (this['arrow' + v6].debrisType > 0) { _parent.newDebris(unitNumber, this['arrow' + v6].debrisType, this['arrow' + v6]._x, this['arrow' + v6]._y); } _root.soundManager.gameFieldSFX('projectileHit', this['arrow' + v6].projectileType, this['arrow' + v6]._x); removeMovieClip(this['arrow' + v6]); v7 = true; break; } } } else { if (this['arrow' + v6]._y >= _root.gamePath.groundHeights[mRound(this['arrow' + v6]._x)] && this['arrow' + v6].vertexReached == true || this['arrow' + v6]._x > 1300 || this['arrow' + v6]._x < -100 || this['arrow' + v6]._y > _root._height + 100 || this['arrow' + v6]._y < -100) { if (this['arrow' + v6].debrisType > 0) { _parent.newDebris(unitNumber, this['arrow' + v6].debrisType, this['arrow' + v6]._x, this['arrow' + v6]._y); } else { if (this['arrow' + v6].debrisType < 0) { _parent.newDebris(unitNumber, this['arrow' + v6].debrisType, this['arrow' + v6]._x, this['arrow' + v6]._y, this['arrow' + v6]._xscale, this['arrow' + v6]._rotation); } } _root.soundManager.gameFieldSFX('projectileHit', this['arrow' + v6].projectileType, this['arrow' + v6]._x); removeMovieClip(this['arrow' + v6]); v7 = true; } } if (v7 == true) { break; } if (this['arrow' + v6].projectileTrailDiversity > 0) { trailType = mRound(mRand() * (this['arrow' + v6].projectileTrailDiversity - 1) + 1); attachMovie('projectileTrail' + this['arrow' + v6].projectileType + '_' + trailType, 'projectileTrail' + v6 + '_' + this['arrow' + v6].projectileTrails, getNextHighestDepth(), {'_x': this['arrow' + v6]._x, '_y': this['arrow' + v6]._y, '_rotation': this['arrow' + v6]._rotation}); prjWTrls.push(v6 + ':' + this['arrow' + v6].projectileTrails); ++this['arrow' + v6].projectileTrails; } ++v15; } } if (v15 == 0) { projectileNumber = 0; } projTrlsDel = 0; v6 = 0; while (prjWTrls[v6] != undefined) { var v8 = (prjWTrls[v6].split(':'))[0]; var v9 = (prjWTrls[v6].split(':'))[1]; if (this['projectileTrail' + v8 + '_' + v9].doneTrailing) { this['projectileTrail' + v8 + '_' + v9].removeMovieClip(); prjWTrls.splice(v6, 1); ++projTrlsDel; } ++v6; } if (projTrlsDel == prjWTrls.length) { prjWTrls = []; } }; } } movieClip 405 { } movieClip 414 { } movieClip 415 { } movieClip 416 { frame 1 { function testNextAttack(firstTime) { if (_parent._parent.nextUnitMode == 3 || firstTime == true) { randomAttackAnim = Math.round(Math.random() * 3) + 1; gotoAndPlay('attackAnim' + randomAttackAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextAttack(true); } frame 15 { _parent._parent.attackTime = true; } frame 28 { testNextAttack(false); } frame 46 { _parent._parent.attackTime = true; } frame 58 { testNextAttack(false); } frame 75 { _parent._parent.attackTime = true; } frame 89 { testNextAttack(false); } frame 110 { _parent._parent.attackTime = true; } frame 119 { testNextAttack(false); } } movieClip 417 { frame 1 { function testNextSpell(firstTime) { if (_parent._parent.nextUnitMode == 4 || firstTime == true) { randomSpellAnim = Math.round(Math.random() * 0) + 1; this.gotoAndPlay('spellAnim' + randomSpellAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextSpell(true); } frame 22 { if (_parent._parent.nullAnimScript) { stop(); } else { ++_parent._parent.prepareTime; } } frame 47 { testNextSpell(false); } } movieClip 418 { frame 1 { _parent._parent.doneKnockBack = false; var randomKnockAnim = Math.round(Math.random() * 1) + 1; gotoAndPlay('knockBack' + randomKnockAnim); } frame 25 { _parent._parent.doneKnockBack = true; stop(); } frame 50 { _parent._parent.doneKnockBack = true; stop(); } } movieClip 419 unitBody0 { } movieClip 421 { } movieClip 423 { } movieClip 428 { } movieClip 430 { } movieClip 432 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); colourObject1 = new Color(colour1); colourObject2 = new Color(colour2); playerNumber = _parent._parent.datPath.playerNumber; if (playerNumber != undefined) { redLight = _root.gamePath.playerSettings[playerNumber].colourR; greenLight = _root.gamePath.playerSettings[playerNumber].colourG; blueLight = _root.gamePath.playerSettings[playerNumber].colourB; } else { redLight = _root.userSettings.colourR; greenLight = _root.userSettings.colourG; blueLight = _root.userSettings.colourB; } redLightShade = redLight + 40; greenLightShade = greenLight + 40; blueLightShade = blueLight + 40; if (redLightShade > 255) { redLightShade = 255; } if (greenLightShade > 255) { greenLightShade = 255; } if (blueLightShade > 255) { blueLightShade = 255; } colourObject1.setTint(redLight, greenLight, blueLight, 100); colourObject2.setTint(redLightShade, greenLightShade, blueLightShade, 100); } } movieClip 437 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 442 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 447 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 452 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 457 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 462 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 467 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 468 { } movieClip 469 { } movieClip 470 { } movieClip 471 { } movieClip 472 { frame 1 { function testNextAttack(firstTime) { if (_parent._parent.nextUnitMode == 3 || firstTime == true) { randomAttackAnim = Math.round(Math.random() * 2) + 1; gotoAndPlay('attackAnim' + randomAttackAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextAttack(true); } frame 15 { _parent._parent.attackTime = true; } frame 28 { testNextAttack(false); } frame 49 { _parent._parent.attackTime = true; } frame 58 { testNextAttack(false); } frame 75 { _parent._parent.attackTime = true; } frame 89 { testNextAttack(false); } } movieClip 473 { frame 1 { function testNextSpell(firstTime) { if (_parent._parent.nextUnitMode == 4 || firstTime == true) { randomSpellAnim = Math.round(Math.random() * 0) + 1; this.gotoAndPlay('spellAnim' + randomSpellAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextSpell(true); } frame 22 { if (_parent._parent.nullAnimScript) { stop(); } else { ++_parent._parent.prepareTime; } } frame 47 { testNextSpell(false); } } movieClip 474 { frame 1 { _parent._parent.doneKnockBack = false; var randomKnockAnim = Math.round(Math.random() * 1) + 1; gotoAndPlay('knockBack' + randomKnockAnim); } frame 25 { _parent._parent.doneKnockBack = true; stop(); } frame 50 { _parent._parent.doneKnockBack = true; stop(); } } movieClip 475 unitBody1 { } movieClip 478 { } movieClip 480 { } movieClip 484 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); colourObject1 = new Color(colour1); colourObject2 = new Color(colour2); playerNumber = _parent._parent.datPath.playerNumber; if (playerNumber != undefined) { redLight = _root.gamePath.playerSettings[playerNumber].colourR; greenLight = _root.gamePath.playerSettings[playerNumber].colourG; blueLight = _root.gamePath.playerSettings[playerNumber].colourB; } else { redLight = _root.userSettings.colourR; greenLight = _root.userSettings.colourG; blueLight = _root.userSettings.colourB; } redLightShade = redLight + 40; greenLightShade = greenLight + 40; blueLightShade = blueLight + 40; if (redLightShade > 255) { redLightShade = 255; } if (greenLightShade > 255) { greenLightShade = 255; } if (blueLightShade > 255) { blueLightShade = 255; } colourObject1.setTint(redLight, greenLight, blueLight, 100); colourObject2.setTint(redLightShade, greenLightShade, blueLightShade, 100); } } movieClip 489 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 494 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 499 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 504 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 509 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 514 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 519 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 520 { } movieClip 521 { } movieClip 522 { frame 1 { function testNextAttack(firstTime) { if (_parent._parent.nextUnitMode == 3 || firstTime == true) { randomAttackAnim = Math.round(Math.random() * 2) + 1; gotoAndPlay('attackAnim' + randomAttackAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextAttack(true); } frame 17 { _parent._parent.attackTime = true; } frame 31 { testNextAttack(false); } frame 47 { _parent._parent.attackTime = true; } frame 60 { testNextAttack(false); } frame 76 { _parent._parent.attackTime = true; } frame 95 { testNextAttack(false); } } movieClip 523 { frame 1 { function testNextSpell(firstTime) { if (_parent._parent.nextUnitMode == 4 || firstTime == true) { randomSpellAnim = Math.round(Math.random() * 0) + 1; this.gotoAndPlay('spellAnim' + randomSpellAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextSpell(true); } frame 20 { if (_parent._parent.nullAnimScript) { stop(); } else { ++_parent._parent.prepareTime; } } frame 49 { testNextSpell(false); } } movieClip 524 { frame 1 { _parent._parent.doneKnockBack = false; var randomKnockAnim = Math.round(Math.random() * 1) + 1; gotoAndPlay('knockBack' + randomKnockAnim); } frame 25 { _parent._parent.doneKnockBack = true; stop(); } frame 50 { _parent._parent.doneKnockBack = true; stop(); } } movieClip 525 unitBody2 { } movieClip 530 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 534 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 538 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 542 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 546 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 549 { } movieClip 551 { } movieClip 557 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); colourObject1 = new Color(colour1); colourObject2 = new Color(colour2); playerNumber = _parent._parent._parent._parent.playerNumber; if (playerNumber == undefined) { playerNumber = _parent._parent.playerNumber; } if (playerNumber != undefined) { redLight = _root.gamePath.playerSettings[playerNumber].colourR; greenLight = _root.gamePath.playerSettings[playerNumber].colourG; blueLight = _root.gamePath.playerSettings[playerNumber].colourB; } else { redLight = _root.userSettings.colourR; greenLight = _root.userSettings.colourG; blueLight = _root.userSettings.colourB; } redLightShade = redLight + 40; greenLightShade = greenLight + 40; blueLightShade = blueLight + 40; if (redLightShade > 255) { redLightShade = 255; } if (greenLightShade > 255) { greenLightShade = 255; } if (blueLightShade > 255) { blueLightShade = 255; } colourObject1.setTint(redLight, greenLight, blueLight, 100); colourObject2.setTint(redLightShade, greenLightShade, blueLightShade, 100); } } movieClip 559 { } movieClip 563 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 565 { } movieClip 566 { } movieClip 568 { } movieClip 569 { } movieClip 587 { } movieClip 589 { } movieClip 592 { frame 1 { function testNextAttack(firstTime) { if (_parent._parent.nextUnitMode == 3 || firstTime == true) { if (_parent._parent.closeRangeAttack == true) { randomAttackAnim = Math.round(Math.random() * 1) + 1; _parent._parent.closeAtkAnim = true; gotoAndPlay('attackAnimC' + randomAttackAnim); } else { randomAttackAnim = Math.round(Math.random() * 0) + 1; _parent._parent.closeAtkAnim = false; gotoAndPlay('attackAnim' + randomAttackAnim); } } else { _parent._parent.animUnitMode = true; stop(); } } testNextAttack(true); } frame 47 { _parent._parent.attackTime = true; } frame 63 { testNextAttack(false); } frame 80 { _parent._parent.attackTime = true; } frame 93 { testNextAttack(false); } frame 114 { _parent._parent.attackTime = true; } frame 130 { testNextAttack(false); } } movieClip 593 { frame 1 { function testNextSpell(firstTime) { if (_parent._parent.nextUnitMode == 4 || firstTime == true) { randomSpellAnim = Math.round(Math.random() * 0) + 1; this.gotoAndPlay('spellAnim' + randomSpellAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextSpell(true); } frame 21 { if (_parent._parent.nullAnimScript) { stop(); } else { ++_parent._parent.prepareTime; } } frame 41 { testNextSpell(false); } } movieClip 594 { frame 1 { _parent._parent.doneKnockBack = false; var randomKnockAnim = Math.round(Math.random() * 0) + 1; gotoAndPlay('knockBack' + randomKnockAnim); } frame 26 { _parent._parent.doneKnockBack = true; stop(); } } movieClip 595 unitBody3 { } movieClip 599 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 603 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 606 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 610 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 613 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 615 { } movieClip 617 { } movieClip 622 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); colourObject1 = new Color(colour1); colourObject2 = new Color(colour2); playerNumber = _parent._parent.datPath.playerNumber; if (playerNumber != undefined) { redLight = _root.gamePath.playerSettings[playerNumber].colourR; greenLight = _root.gamePath.playerSettings[playerNumber].colourG; blueLight = _root.gamePath.playerSettings[playerNumber].colourB; } else { redLight = _root.userSettings.colourR; greenLight = _root.userSettings.colourG; blueLight = _root.userSettings.colourB; } redLightShade = redLight + 40; greenLightShade = greenLight + 40; blueLightShade = blueLight + 40; if (redLightShade > 255) { redLightShade = 255; } if (greenLightShade > 255) { greenLightShade = 255; } if (blueLightShade > 255) { blueLightShade = 255; } colourObject1.setTint(redLight, greenLight, blueLight, 100); colourObject2.setTint(redLightShade, greenLightShade, blueLightShade, 100); } } movieClip 624 { } movieClip 628 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 629 { } movieClip 630 { } movieClip 632 { } movieClip 633 { frame 1 { function testNextAttack(firstTime) { if (_parent._parent.nextUnitMode == 3 || firstTime == true) { if (_parent._parent.closeRangeAttack == true) { randomAttackAnim = Math.round(Math.random() * 1) + 1; _parent._parent.closeAtkAnim = true; gotoAndPlay('attackAnimC' + randomAttackAnim); } else { randomAttackAnim = Math.round(Math.random() * 0) + 1; _parent._parent.closeAtkAnim = false; gotoAndPlay('attackAnim' + randomAttackAnim); } } else { _parent._parent.animUnitMode = true; stop(); } } testNextAttack(true); } frame 97 { _parent._parent.attackTime = true; } frame 116 { testNextAttack(false); } frame 144 { _parent._parent.attackTime = true; } frame 155 { testNextAttack(false); } frame 181 { _parent._parent.attackTime = true; } frame 207 { testNextAttack(false); } } movieClip 634 { frame 1 { function testNextSpell(firstTime) { if (_parent._parent.nextUnitMode == 4 || firstTime == true) { randomSpellAnim = Math.round(Math.random() * 0) + 1; this.gotoAndPlay('spellAnim' + randomSpellAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextSpell(true); } frame 31 { if (_parent._parent.nullAnimScript) { stop(); } else { ++_parent._parent.prepareTime; } } frame 41 { testNextSpell(false); } } movieClip 635 { frame 1 { _parent._parent.doneKnockBack = false; var randomKnockAnim = Math.round(Math.random() * 0) + 1; gotoAndPlay('knockBack' + randomKnockAnim); } frame 31 { _parent._parent.doneKnockBack = true; stop(); } } movieClip 636 unitBody4 { } movieClip 642 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 650 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 656 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 662 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 668 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 671 { } movieClip 673 { } movieClip 683 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); colourObject1 = new Color(colour1); colourObject2 = new Color(colour2); playerNumber = _parent._parent._parent._parent.playerNumber; if (playerNumber == undefined) { playerNumber = _parent._parent.playerNumber; } if (playerNumber != undefined) { redLight = _root.gamePath.playerSettings[playerNumber].colourR; greenLight = _root.gamePath.playerSettings[playerNumber].colourG; blueLight = _root.gamePath.playerSettings[playerNumber].colourB; } else { redLight = _root.userSettings.colourR; greenLight = _root.userSettings.colourG; blueLight = _root.userSettings.colourB; } redLightShade = redLight + 40; greenLightShade = greenLight + 40; blueLightShade = blueLight + 40; if (redLightShade > 255) { redLightShade = 255; } if (greenLightShade > 255) { greenLightShade = 255; } if (blueLightShade > 255) { blueLightShade = 255; } colourObject1.setTint(redLight, greenLight, blueLight, 100); colourObject2.setTint(redLightShade, greenLightShade, blueLightShade, 100); } } movieClip 688 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 691 { } movieClip 699 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); colourObject1 = new Color(colour1); playerNumber = _parent._parent.datPath.playerNumber; if (playerNumber != undefined) { redLight = _root.gamePath.playerSettings[playerNumber].colourR; greenLight = _root.gamePath.playerSettings[playerNumber].colourG; blueLight = _root.gamePath.playerSettings[playerNumber].colourB; } else { redLight = _root.userSettings.colourR; greenLight = _root.userSettings.colourG; blueLight = _root.userSettings.colourB; } redLightShade = redLight + 40; greenLightShade = greenLight + 40; blueLightShade = blueLight + 40; colourObject1.setTint(redLight, greenLight, blueLight, 100); } } movieClip 701 { } movieClip 708 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 714 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 722 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 728 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 734 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 735 { } movieClip 736 { } movieClip 737 { frame 1 { function testNextAttack(firstTime) { if (_parent._parent.nextUnitMode == 3 || firstTime == true) { randomAttackAnim = Math.round(Math.random() * 2) + 1; gotoAndPlay('attackAnim' + randomAttackAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextAttack(true); } frame 21 { _parent._parent.attackTime = true; } frame 51 { testNextAttack(false); } frame 62 { _parent._parent.attackTime = true; } frame 81 { testNextAttack(false); } frame 109 { _parent._parent.attackTime = true; } frame 127 { testNextAttack(false); } } movieClip 738 { frame 1 { function testNextSpell(firstTime) { if (_parent._parent.nextUnitMode == 4 || firstTime == true) { randomSpellAnim = Math.round(Math.random() * 0) + 1; this.gotoAndPlay('spellAnim' + randomSpellAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextSpell(true); } frame 21 { if (_parent._parent.nullAnimScript) { stop(); } else { ++_parent._parent.prepareTime; } } frame 42 { testNextSpell(false); } } movieClip 739 { frame 1 { _parent._parent.doneKnockBack = false; var randomKnockAnim = Math.round(Math.random() * 0) + 1; gotoAndPlay('knockBack' + randomKnockAnim); } frame 30 { _parent._parent.doneKnockBack = true; stop(); } } movieClip 740 unitBody5 { } movieClip 744 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 748 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 754 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 759 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 763 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 767 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 770 { } movieClip 772 { } movieClip 778 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); colourObject1 = new Color(colour1); colourObject2 = new Color(colour2); playerNumber = _parent._parent._parent._parent.playerNumber; if (playerNumber == undefined) { playerNumber = _parent._parent.playerNumber; } if (playerNumber != undefined) { redLight = _root.gamePath.playerSettings[playerNumber].colourR; greenLight = _root.gamePath.playerSettings[playerNumber].colourG; blueLight = _root.gamePath.playerSettings[playerNumber].colourB; } else { redLight = _root.userSettings.colourR; greenLight = _root.userSettings.colourG; blueLight = _root.userSettings.colourB; } redLightShade = redLight + 40; greenLightShade = greenLight + 40; blueLightShade = blueLight + 40; if (redLightShade > 255) { redLightShade = 255; } if (greenLightShade > 255) { greenLightShade = 255; } if (blueLightShade > 255) { blueLightShade = 255; } colourObject1.setTint(redLight, greenLight, blueLight, 100); colourObject2.setTint(redLightShade, greenLightShade, blueLightShade, 100); } } movieClip 782 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 783 { } movieClip 784 { } movieClip 785 { frame 1 { function testNextAttack(firstTime) { if (_parent._parent.nextUnitMode == 3 || firstTime == true) { randomAttackAnim = Math.round(Math.random() * 1) + 1; gotoAndPlay('attackAnim' + randomAttackAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextAttack(true); } frame 20 { _parent._parent.attackTime = true; } frame 42 { testNextAttack(false); } frame 65 { _parent._parent.attackTime = true; } frame 97 { testNextAttack(false); } } movieClip 786 { frame 1 { function testNextSpell(firstTime) { if (_parent._parent.nextUnitMode == 4 || firstTime == true) { randomSpellAnim = Math.round(Math.random() * 0) + 1; this.gotoAndPlay('spellAnim' + randomSpellAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextSpell(true); } frame 45 { if (_parent._parent.nullAnimScript) { stop(); } else { ++_parent._parent.prepareTime; } } frame 75 { ++_parent._parent.prepareTime; if (_parent._parent.preparingSkill == true && _parent._parent.nextUnitMode == 4) { gotoAndPlay('stillPreparing'); } } frame 112 { testNextSpell(false); } } movieClip 787 { frame 1 { _parent._parent.doneKnockBack = false; var randomKnockAnim = Math.round(Math.random() * 0) + 1; gotoAndPlay('knockBack' + randomKnockAnim); } frame 30 { _parent._parent.doneKnockBack = true; stop(); } } movieClip 788 unitBody6 { } movieClip 793 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 797 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 802 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 806 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 809 { } movieClip 811 { } movieClip 816 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); colourObject1 = new Color(colour1); colourObject2 = new Color(colour2); playerNumber = _parent._parent._parent._parent.playerNumber; if (playerNumber == undefined) { playerNumber = _parent._parent.playerNumber; } if (playerNumber != undefined) { redLight = _root.gamePath.playerSettings[playerNumber].colourR; greenLight = _root.gamePath.playerSettings[playerNumber].colourG; blueLight = _root.gamePath.playerSettings[playerNumber].colourB; } else { redLight = _root.userSettings.colourR; greenLight = _root.userSettings.colourG; blueLight = _root.userSettings.colourB; } redLightShade = redLight + 40; greenLightShade = greenLight + 40; blueLightShade = blueLight + 40; if (redLightShade > 255) { redLightShade = 255; } if (greenLightShade > 255) { greenLightShade = 255; } if (blueLightShade > 255) { blueLightShade = 255; } colourObject1.setTint(redLight, greenLight, blueLight, 100); colourObject2.setTint(redLightShade, greenLightShade, blueLightShade, 100); } } movieClip 820 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 824 { frame 1 { gotoAndStop(_parent._parent.datPath.grVar); stop(); } } movieClip 825 { } movieClip 826 { } movieClip 827 { frame 1 { function testNextAttack(firstTime) { if (_parent._parent.nextUnitMode == 3 || firstTime == true) { randomAttackAnim = Math.round(Math.random() * 1) + 1; if (_parent._parent.closeRangeAttack == true) { _parent._parent.closeAtkAnim = true; } else { _parent._parent.closeAtkAnim = false; } gotoAndPlay('attackAnim' + randomAttackAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextAttack(true); } frame 35 { _parent._parent.attackTime = true; } frame 60 { testNextAttack(false); } frame 76 { _parent._parent.attackTime = true; } frame 101 { testNextAttack(false); } } movieClip 828 { frame 1 { function testNextSpell(firstTime) { if (_parent._parent.nextUnitMode == 4 || firstTime == true) { randomSpellAnim = Math.round(Math.random() * 0) + 1; this.gotoAndPlay('spellAnim' + randomSpellAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextSpell(true); } frame 15 { if (_parent._parent.nullAnimScript) { stop(); } else { ++_parent._parent.prepareTime; } } frame 45 { testNextSpell(false); } } movieClip 829 { frame 1 { _parent._parent.doneKnockBack = false; var randomKnockAnim = Math.round(Math.random() * 0) + 1; gotoAndPlay('knockBack' + randomKnockAnim); } frame 30 { _parent._parent.doneKnockBack = true; stop(); } } movieClip 830 unitBody7 { } movieClip 831 { frame 1 { randomDeathAnim = Math.round(Math.random() * 1) + 1; gotoAndPlay('deathAnim' + randomDeathAnim); } frame 47 { _parent.deathDone = true; stop(); } frame 76 { _parent.deathDone = true; stop(); } } movieClip 843 { frame 1 { if (!_root.gamePath.stopAngels && _parent.playerNumber != _root.gamePath.enemyNumber && !_parent.lives) { randomDeathAngel = Math.round(Math.random() * 0) + 1; gotoAndPlay('deathAngel' + randomDeathAngel); } else { stop(); } } frame 126 { stop(); } } movieClip 845 reviveText { } movieClip 846 { frame 1 { randomDeathAnim = Math.round(Math.random() * 1) + 1; gotoAndPlay('deathAnim' + randomDeathAnim); } frame 47 { _parent.deathDone = true; stop(); } frame 76 { _parent.deathDone = true; stop(); } } movieClip 847 { frame 1 { randomDeathAnim = Math.round(Math.random() * 1) + 1; gotoAndPlay('deathAnim' + randomDeathAnim); } frame 46 { _parent.deathDone = true; stop(); } frame 75 { _parent.deathDone = true; stop(); } } movieClip 848 { frame 1 { randomDeathAnim = Math.round(Math.random() * 1) + 1; gotoAndPlay('deathAnim' + randomDeathAnim); } frame 27 { _parent.deathDone = true; stop(); } frame 71 { _parent.deathDone = true; stop(); } } movieClip 849 { frame 1 { randomDeathAnim = Math.round(Math.random() * 1) + 1; gotoAndPlay('deathAnim' + randomDeathAnim); } frame 36 { _parent.deathDone = true; stop(); } frame 85 { _parent.deathDone = true; stop(); } } movieClip 850 { frame 1 { _root.soundManager.sfx.spcHorseNeigh.start(); randomDeathAnim = Math.round(Math.random() * 1) + 1; gotoAndPlay('deathAnim' + randomDeathAnim); } frame 49 { _parent.deathDone = true; stop(); } frame 84 { _parent.deathDone = true; stop(); } } movieClip 851 { frame 1 { randomDeathAnim = Math.round(Math.random() * 1) + 1; gotoAndPlay('deathAnim' + randomDeathAnim); } frame 25 { _parent.deathDone = true; stop(); } frame 51 { _parent.deathDone = true; stop(); } } movieClip 874 { frame 1 { randomDeathAnim = Math.round(Math.random() * 1) + 1; gotoAndPlay('deathAnim' + randomDeathAnim); } frame 39 { _parent.deathDone = true; stop(); } frame 61 { _parent.deathDone = true; stop(); } } movieClip 876 { } movieClip 878 { } movieClip 880 { } movieClip 883 { } movieClip 885 { frame 1 { colourObject1 = new Color(colour1); colourObject2 = new Color(colour2); playerNumber = _parent._parent._parent._parent.playerNumber; if (playerNumber == undefined) { playerNumber = _parent._parent.playerNumber; } if (playerNumber != undefined) { redLight = _root.gamePath.playerSettings[playerNumber].colourR; greenLight = _root.gamePath.playerSettings[playerNumber].colourG; blueLight = _root.gamePath.playerSettings[playerNumber].colourB; } else { redLight = _root.userSettings.colourR; greenLight = _root.userSettings.colourG; blueLight = _root.userSettings.colourB; } redLightShade = redLight + 40; greenLightShade = greenLight + 40; blueLightShade = blueLight + 40; if (redLightShade > 255) { redLightShade = 255; } if (greenLightShade > 255) { greenLightShade = 255; } if (blueLightShade > 255) { blueLightShade = 255; } colourObject1.setTint(redLight, greenLight, blueLight, 100); colourObject2.setTint(redLightShade, greenLightShade, blueLightShade, 100); } } movieClip 887 { } movieClip 889 { } movieClip 890 { frame 1 { randomDeathAnim = Math.round(Math.random() * 1) + 1; gotoAndPlay('deathAnim' + randomDeathAnim); } frame 60 { _parent.deathDone = true; stop(); } } movieClip 893 { frame 1 { _root.soundManager.sfx.spcLightning.start(); _root.gamePath.shakeTime = 240; _root.gamePath.shakeMagnitude = 5; } frame 13 { stop(); } } movieClip 894 unitDeaths { frame 1 { function manageCorpse() { var v3 = {'x': corpse.headPoint._x, 'y': corpse.headPoint._y}; corpse.localToGlobal(v3); if (!_root.gameBackgroundPath.background1.ground.hitTest(v3.x, v3.y, true) && !(v3.x >= _root.gamePath.fieldWidth && v3.y >= _root.gamePath.groundHeights[_root.gamePath.groundHeights.length - 1])) { if (corpse.headPoint._x > 0) { corpse._rotation += 4; } else { if (corpse.headPoint._x < 0) { corpse._rotation -= 4; } } } else { if (corpse.headPoint != undefined) { var v5 = true; } } if (this._y > endY) { --this._y; } else { if (v5) { var v4 = {'x': corpse._x, 'y': corpse._y}; localToGlobal(v4); _root.gamePath.overlayManager.attachMovie('reviveText', 'reviveTextP' + playerNumber + 'U' + unitNumber, _root.gamePath.overlayManager.getNextHighestDepth()); textPath = _root.gamePath.overlayManager['reviveTextP' + playerNumber + 'U' + unitNumber]; textPath.baseX = v4.x - 13.5 - _root.gamePath.fieldScroll * 0.5; textPath._y = v4.y - 9.800000000000001; clearInterval(manageCorpseInterval); } else { reviveText._visible = false; } } } function fadeOutBody() { if (!fadeBodyInt) { clearInterval(fadeBodyInt); fadeBodyInt = setInterval(this, 'fadeOutBody', 40); } else { if (corpse._alpha > 0) { corpse._alpha -= 2; } if (corpse._alpha <= 0) { this.removeMovieClip(); } } } clearInterval(manageCorpseInterval); manageCorpseInterval = setInterval(this, 'manageCorpse', 40); stop(); } } movieClip 897 projectile3 { } movieClip 900 projectileTrail2_1 { frame 20 { doneTrailing = true; this.stop(); } } movieClip 906 projectileTrail3_1 { frame 11 { doneTrailing = true; this.stop(); } } movieClip 909 projectileTrail-3_1 { frame 11 { doneTrailing = true; this.stop(); } } movieClip 914 statusEffectSymbol1 { } movieClip 917 debris3 { frame 1 { function moveParticles() { var i = -1; while (++i < numParticles) { if (eval('particle' + i) == undefined) { ++numParticlesDead; } } if (numParticlesDead >= numParticles) { this.removeMovieClip(); } } numParticles = Math.round(Math.random() * 2) + 2; numParticlesDead = 0; var i = -1; while (++i < numParticles) { this.attachMovie('debris3Embed', 'particle' + i, this.getNextHighestDepth(), {'_rotation': Math.round(Math.random() * 360)}); } } frame 36 { clearInterval(this.particleInterval); this.particleInterval = setInterval(this, 'moveParticles', 40); stop(); } } movieClip 947 debris3Embed { frame 1 { randomParticle = Math.round(Math.random() * 1) + 1; this.gotoAndPlay('particle' + randomParticle); } frame 16 { this.removeMovieClip(); } frame 31 { this.removeMovieClip(); } } movieClip 978 statusEffectSymbol2 { } movieClip 984 statusEffectSymbol4 { } movieClip 990 statusEffectSymbol6 { } movieClip 995 statusEffectSymbol7 { } movieClip 998 leaderSymbol { } movieClip 1003 debris4 { frame 40 { this.removeMovieClip(); } } movieClip 1008 statusEffectSymbol3 { } movieClip 1012 debris5 { frame 32 { this.removeMovieClip(); } } movieClip 1014 projectile4 { } movieClip 1017 debris6 { frame 32 { this.removeMovieClip(); } } movieClip 1023 debris7 { frame 32 { this.removeMovieClip(); } } movieClip 1025 { } movieClip 1027 { } movieClip 1028 sun1 { frame 1 { function updateSun() { if (_root.gamePath.backgroundManager.background1.hitTest(this._x, this._y, true) || _root.gamePath.backgroundManager.background2.hitTest(this._x, this._y, true) || _root.gamePath.backgroundManager.background3.hitTest(this._x, this._y, true)) { if (this._alpha > 0) { this._alpha -= 7.5; } } else { if (this._alpha < 100) { this._alpha += 5; } } if (currentFrameRecord > lastAlphaDirectionRays + 45) { alphaDirectionRays = Math.round(Math.random() + 1); lastAlphaDirectionRays = currentFrameRecord; } else { if (currentFrameRecord > lastAlphaDirectionGlare + 50) { alphaDirectionGlare = Math.round(Math.random() + 1); lastAlphaDirectionGlare = currentFrameRecord; } } if (alphaDirectionRays == 1 && rays._alpha > 20) { rays._alpha -= 2; } else { if (alphaDirectionRays == 2 && rays._alpha < 100) { rays._alpha += 2; } } if (alphaDirectionGlare == 1 && glare._alpha > 65) { glare._alpha -= 2; } else { if (alphaDirectionGlare == 2 && glare._alpha < 100) { glare._alpha += 2; } } ++currentFrameRecord; } clearInterval(updateSunInterval); updateSunInterval = setInterval(this, 'updateSun', 80); } } movieClip 1031 sun2 { frame 1 { function updateSun() { if (currentFrameRecord > lastAlphaDirectionGlare + 24) { alphaDirectionGlare = Math.round(Math.random() + 1); alphaSpeed = Math.round(Math.random() * 6); lastAlphaDirectionGlare = currentFrameRecord; } if (alphaDirectionGlare == 1 && _alpha > 25) { _alpha = _alpha - alphaSpeed; } else { if (alphaDirectionGlare == 2 && _alpha < 100) { _alpha = _alpha + alphaSpeed; } } ++currentFrameRecord; } clearInterval(updateSunInterval); updateSunInterval = setInterval(this, 'updateSun', 80); } } movieClip 1034 debris8 { frame 31 { this.removeMovieClip(); } } movieClip 1041 debris9 { frame 4 { _parent._parent.debrisDamageTest(unitNumber, debrisNumber, debrisType); } frame 50 { this.removeMovieClip(); } } movieClip 1044 { } movieClip 1048 debris10 { frame 24 { this.removeMovieClip(); } } movieClip 1053 debris11 { frame 45 { this.removeMovieClip(); } } movieClip 1056 debris12 { frame 43 { this.removeMovieClip(); } } movieClip 1059 debris13 { frame 34 { this.removeMovieClip(); } } movieClip 1062 debris14 { frame 12 { _parent._parent.debrisDamageTest(unitNumber, debrisNumber, debrisType); } frame 38 { this.removeMovieClip(); } } movieClip 1065 debris15 { frame 41 { this.removeMovieClip(); } } movieClip 1068 debris16 { frame 19 { _parent._parent.debrisDamageTest(unitNumber, debrisNumber, debrisType); } frame 53 { this.removeMovieClip(); } } movieClip 1071 projectile5 { } movieClip 1074 projectile6 { } movieClip 1077 debris17 { frame 10 { _parent._parent.debrisDamageTest(unitNumber, debrisNumber, debrisType); } frame 60 { this.removeMovieClip(); } } movieClip 1080 debris18 { frame 35 { this.removeMovieClip(); } } movieClip 1083 debris19 { frame 44 { this.removeMovieClip(); } } movieClip 1084 debris20 { frame 36 { this.removeMovieClip(); } } movieClip 1085 { } movieClip 1086 { } movieClip 1087 { frame 1 { function testNextAttack(firstTime) { if (_parent._parent.nextUnitMode == 3 || firstTime == true) { randomAttackAnim = Math.round(Math.random() * 1) + 1; if (_parent._parent.closeRangeAttack == true) { _parent._parent.closeAtkAnim = true; } else { _parent._parent.closeAtkAnim = false; } gotoAndPlay('attackAnim' + randomAttackAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextAttack(true); } frame 35 { _parent._parent.attackTime = true; } frame 60 { testNextAttack(false); } frame 76 { _parent._parent.attackTime = true; } frame 101 { testNextAttack(false); } } movieClip 1088 { frame 1 { function testNextSpell(firstTime) { if (_parent._parent.nextUnitMode == 4 || firstTime == true) { randomSpellAnim = Math.round(Math.random() * 0) + 1; this.gotoAndPlay('spellAnim' + randomSpellAnim); } else { _parent._parent.animUnitMode = true; stop(); } } testNextSpell(true); } frame 15 { ++_parent._parent.prepareTime; } frame 45 { testNextSpell(false); } } movieClip 1089 { frame 1 { _parent._parent.doneKnockBack = false; var randomKnockAnim = Math.round(Math.random() * 0) + 1; gotoAndPlay('knockBack' + randomKnockAnim); } frame 30 { _parent._parent.doneKnockBack = true; stop(); } } movieClip 1090 unitBody8 { } movieClip 1093 debris21 { frame 37 { this.removeMovieClip(); } } movieClip 1096 debris22 { frame 21 { _parent._parent.debrisDamageTest(unitNumber, debrisNumber, debrisType); } frame 45 { this.removeMovieClip(); } } movieClip 1097 debris23 { frame 37 { _parent._parent.debrisDamageTest(unitNumber, debrisNumber, debrisType); } frame 69 { this.removeMovieClip(); } } movieClip 1100 debris24 { frame 53 { this.removeMovieClip(); } } movieClip 1135 debris25 { frame 24 { _parent._parent.debrisDamageTest(unitNumber, debrisNumber, debrisType); } frame 80 { this.removeMovieClip(); } } movieClip 1136 debris26 { frame 24 { _parent._parent.debrisDamageTest(unitNumber, debrisNumber, debrisType); } frame 66 { this.removeMovieClip(); } } movieClip 1143 waterShine1 { } movieClip 1148 waterShine2 { } movieClip 1156 fieldOverlay1 { frame 1 { function shineWater() { var v3 = 0; while (v3 <= 4) { if (this['shine' + v3] == undefined && _root.gamePath.mainIntervalsPassed > lastShineOn + 30) { attachMovie('waterShine' + Math.round(Math.random() + 1), 'shine' + v3, this.getNextHighestDepth(), {'_x': Math.random() * 150 + 50, '_y': Math.random() * 20 + 6, '_alpha': 0, 'shineIn': true}); lastShineOn = _root.gamePath.mainIntervalsPassed; } else { if (this['shine' + v3] != undefined) { if (this['shine' + v3]._alpha < 100 && this['shine' + v3].shineIn == true) { this['shine' + v3]._alpha += 2; if (this['shine' + v3]._alpha >= 100) { this['shine' + v3].shineIn = false; } } else { if (this['shine' + v3]._alpha > 0 && this['shine' + v3].shineIn != true) { this['shine' + v3]._alpha -= 1; if (this['shine' + v3]._alpha <= 0) { this['shine' + v3].removeMovieClip(); } } } } } ++v3; } } clearInterval(shineWaterInt); shineWaterInt = setInterval(this, 'shineWater', 40); lastShineOn = 0; } } movieClip 1159 fieldOverlay2 { } movieClip 1168 fieldOverlay3 { frame 1 { function shineWater() { var v3 = 0; while (v3 <= 10) { if (this['shine' + v3] == undefined && _root.gamePath.mainIntervalsPassed > lastShineOn + 30) { attachMovie('waterShine' + Math.round(Math.random() + 1), 'shine' + v3, this.getNextHighestDepth(), {'_x': Math.random() * 1200, '_y': Math.random() * 25 + 15, '_alpha': 0, 'shineIn': true}); lastShineOn = _root.gamePath.mainIntervalsPassed; } else { if (this['shine' + v3] != undefined) { if (this['shine' + v3]._alpha < 100 && this['shine' + v3].shineIn == true) { this['shine' + v3]._alpha += 4; if (this['shine' + v3]._alpha >= 100) { this['shine' + v3].shineIn = false; } } else { if (this['shine' + v3]._alpha > 0 && this['shine' + v3].shineIn != true) { this['shine' + v3]._alpha -= 1; if (this['shine' + v3]._alpha <= 0) { this['shine' + v3].removeMovieClip(); } } } } } ++v3; } } clearInterval(shineWaterInt); shineWaterInt = setInterval(this, 'shineWater', 40); lastShineOn = 0; stop(); } } movieClip 1169 { frame 1 { function newDot(isNew) { if (isNew) { var v4 = Math.round(Math.random() * 60 + 24); clearInterval(newDotInterval); newDotInterval = setInterval(this, 'newDot', v4, false); stop(); } else { clearInterval(newDotInterval); var v2 = Math.round(Math.random() * 4 + 1); var v3 = Math.round(Math.random() * 600); _x = v3; gotoAndPlay('dot' + v2); } } newDot(true); } frame 20 { newDot(true); } frame 44 { newDot(true); } frame 58 { newDot(true); } frame 75 { newDot(true); } frame 84 { newDot(true); } } movieClip 1170 fieldOverlay4 { } movieClip 1171 fieldOverlay5 { frame 1 { function manageFlyingDots() { if (numFlyingDots < maxNumFlyingDots) { var v2 = new Object(); v2._x = Math.random() * 250 - 50; v2._y = Math.random() * -100 - 50; v2._xscale = Math.random() * 75 + 25; v2._yscale = v2._xscale; v2.dotSpeed = Math.random() * 4; v2.onEnterFrame = function () { testMoveX = this.dotSpeed * Math.abs(this._x / 10); if (testMoveX < 4) { testMoveX = 4; } testMoveY = this.dotSpeed * Math.abs(this._y - 100) / 5; if (testMoveY < 5) { testMoveY = 5; } this._x += testMoveX; this._y += testMoveY; if (this._y > 300 || this._x > 600) { --numFlyingDots; this.removeMovieClip(); } }; attachMovie('spcFlyingSnow', 'flyingSnow' + numFlyingDots, this.getNextHighestDepth(), v2); ++numFlyingDots; } } maxNumFlyingDots = 5; numFlyingDots = 0; clearInterval(manageFlyingDotsInterval); manageFlyingDotsInterval = setInterval(this, 'manageFlyingDots', 40); } } movieClip 1173 spcFlyingSnow { } movieClip 1176 { frame 1 { gotoAndStop('type' + _parent.textType); if (!_parent.textType) { _root.soundManager.sfx.spcTimer.start(); } else { if (_parent.textType == 1) { _parent.dispNum = '+' + _parent.dispNum; } } } } movieClip 1177 timerNum { frame 25 { this.removeMovieClip(); } } movieClip 1180 unitRevival { frame 1 { function manageObj() { _x = baseX + _root.gamePath.fieldScroll * 0.5; } manageObj(); clearInterval(manageObjInt); manageObjInt = setInterval(this, 'manageObj', 40); } frame 30 { this.removeMovieClip(); } } movieClip 1181 fieldOverlay6 { frame 1 { function manageFlyingDots() { if (numFlyingDots < maxNumFlyingDots) { var v2 = new Object(); v2._x = Math.random() * 250 - 50; v2._y = Math.random() * -100 - 50; v2._xscale = Math.random() * 75 + 25; v2._yscale = v2._xscale; v2.dotSpeed = Math.random() * 10; v2.onEnterFrame = function () { testMoveX = this.dotSpeed * Math.abs(this._x / 10); if (testMoveX < 4) { testMoveX = 4; } testMoveY = this.dotSpeed * Math.abs(this._y - 100) / 5; if (testMoveY < 5) { testMoveY = 5; } this._x += testMoveX; this._y += testMoveY; if (this._y > 300 || this._x > 600) { --numFlyingDots; this.removeMovieClip(); } }; var v3 = Math.round(Math.random()); if (v3) { attachMovie('spcFlyingSnow', 'flyingSnow' + numFlyingDots, this.getNextHighestDepth(), v2); } else { attachMovie('spcFlyingDot', 'flyingSnow' + numFlyingDots, this.getNextHighestDepth(), v2); } ++numFlyingDots; } } maxNumFlyingDots = 4; numFlyingDots = 0; clearInterval(manageFlyingDotsInterval); manageFlyingDotsInterval = setInterval(this, 'manageFlyingDots', 40); } } movieClip 1183 { } movieClip 1185 { } movieClip 1187 { } movieClip 1190 { } movieClip 1192 { } movieClip 1193 { } movieClip 1195 { } movieClip 1197 { } movieClip 1199 { } movieClip 1201 { } movieClip 1202 { } movieClip 1203 { } movieClip 1204 { frame 1 { function testNextAttack(firstTime) { if (_parent._parent.nextUnitMode == 3 || firstTime == true) { randomAttackAnim = Math.round(Math.random() * 2) + 1; gotoAndPlay('attackAnim' + randomAttackAnim); } else { _parent._parent.unitMode = _parent._parent.nextUnitMode; stop(); } } testNextAttack(true); } frame 20 { _parent._parent.attackTime = true; } frame 30 { testNextAttack(false); } frame 46 { _parent._parent.attackTime = true; } frame 62 { testNextAttack(false); } frame 79 { _parent._parent.attackTime = true; } frame 93 { testNextAttack(false); } } movieClip 1205 { frame 1 { function testNextSpell(firstTime) { if (_parent._parent.nextUnitMode == 4 || firstTime == true) { randomSpellAnim = Math.round(Math.random() * 0) + 1; this.gotoAndPlay('spellAnim' + randomSpellAnim); } else { _parent._parent.unitMode = _parent._parent.nextUnitMode; stop(); } } testNextSpell(true); } frame 29 { ++_parent._parent.prepareTime; } frame 51 { testNextSpell(false); } } movieClip 1206 { frame 1 { _parent._parent.doneKnockBack = false; var randomKnockAnim = Math.round(Math.random() * 1) + 1; gotoAndPlay('knockBack' + randomKnockAnim); } frame 25 { _parent._parent.doneKnockBack = true; stop(); } frame 50 { _parent._parent.doneKnockBack = true; stop(); } } movieClip 1207 { frame 99 { if (!_root.chancellusEnd) { gotoAndPlay('repeat'); } } frame 165 { gotoAndPlay('repeat2'); } } movieClip 1208 unitBody9 { } movieClip 1209 powerhouseCloud { frame 20 { this.removeMovieClip(); } } movieClip 1210 powerhouseShock { frame 11 { this.removeMovieClip(); } } movieClip 1216 statusEffectSymbol8 { } movieClip 1248 chancellusFinal { frame 7 { _root.soundManager.sfx.spcThunder.start(); } frame 45 { _root.soundManager.sfx.spcThunder.start(); } frame 53 { _root.soundManager.sfx.spcLightning.start(); } frame 59 { _root.soundManager.sfx.spcLightning.start(); } frame 63 { _root.soundManager.sfx.spcThunder.start(); } frame 72 { _root.soundManager.sfx.spcLightning.start(); } frame 83 { _root.soundManager.sfx.spcThunder.start(); } frame 85 { _root.gamePath.stopAngels = true; _root.chancellusEnd = true; _root.gamePath.startChancellusEnd = false; if (_root.gamePath != undefined) { var i = 0; while (i < _root['gameUnitsPath' + _root.gamePath.playerNumber].deployedUnits) { if (!_root['gameUnitsPath' + _root.gamePath.playerNumber]['playerUnit' + i].unitDead) { _root['gameUnitsPath' + _root.gamePath.playerNumber].damageUnit(i, 0, 0, -1, _root['gameUnitsPath' + _root.gamePath.playerNumber]['playerUnit' + i].currentHP); } ++i; } _root.gamePath.overlayBlood.gotoAndPlay('bloodIn'); } } frame 93 { _root.soundManager.sfx.spcThunder.start(); } frame 99 { stop(); this.removeMovieClip(); } } movieClip 1251 skillSpiral { } movieClip 1252 debris27 { frame 1 { function manSkill() { if (lightsOn < lightsNumber) { cScale = Math.round(Math.random() * 50) + 50; cAlpha = Math.round(Math.random() * 50) + 50; cXSpeed = Math.round(Math.random() * 8) + 6; cYSpeed = Math.round(Math.random() * 7) - 3.5; cTintR = Math.round(Math.random() * 250); cTintG = Math.round(Math.random() * 250); cTineB = Math.round(Math.random() * 250); attachMovie('skillSpiral', 'light' + lightsOn, this.getNextHighestDepth(), {'_xscale': cScale, '_yscale': cScale, '_alpha': cAlpha, 'xSpeed': cXSpeed, 'ySpeed': cYSpeed}); spiralColour = new Color(this['light' + lightsOn]); spiralColour.setTint(cTintR, cTintG, cTintB, 80); ++lightsOn; } var v2 = 0; while (v2 < lightsOn) { if (this['light' + v2] != undefined) { this['light' + v2]._x += this['light' + v2].xSpeed; this['light' + v2]._y += this['light' + v2].ySpeed; this['light' + v2]._alpha -= 4; this['light' + v2]._rotation += 8; if (this['light' + v2]._alpha <= 0) { this['light' + v2].removeMovieClip(); ++lightsDead; } } ++v2; } if (lightsDead >= lightsOn && lightsOn >= lightsNumber) { this.removeMovieClip(); } } var lightsOn = 0; var lightsDead = 0; var lightsNumber = 12; clearInterval(manSkillInt); manSkillInt = setInterval(this, 'manSkill', 40); } } movieClip 1253 { frame 1 { stop(); } } movieClip 1255 { } button 1256 { on (release) { getURL('http://www.armorgames.com', 'blank'); } } movieClip 1258 { } movieClip 1260 { } movieClip 1261 { frame 100 { _parent.play(); } } movieClip 1267 { frame 200 { stop(); } } movieClip 1272 { } movieClip 1273 { frame 5 { stop(); } instance of movieClip 1272 { onClipEvent (load) { turn = Math.random() * 2; } onClipEvent (enterFrame) { --this._alpha; this._rotation += turn; } } instance of movieClip 1272 { onClipEvent (load) { turn = Math.random() * 2; } onClipEvent (enterFrame) { --this._alpha; this._rotation += turn; } } instance of movieClip 1272 { onClipEvent (load) { turn = Math.random() * 2; } onClipEvent (enterFrame) { --this._alpha; this._rotation += turn; } } instance of movieClip 1272 { onClipEvent (load) { turn = Math.random() * 2; } onClipEvent (enterFrame) { --this._alpha; this._rotation -= turn; } } instance of movieClip 1272 { onClipEvent (load) { turn = Math.random() * 2; } onClipEvent (enterFrame) { --this._alpha; this._rotation -= turn; } } instance of movieClip 1272 { onClipEvent (load) { turn = Math.random() * 2; } onClipEvent (enterFrame) { --this._alpha; this._rotation -= turn; } } } button 1277 { on (release) { getURL('http://www.nighttowers.com', '_blank'); } } movieClip 1281 { frame 1 { _root.stop(); } frame 230 { this.stop(); this._parent.play(); } } movieClip 1283 { } movieClip 1286 { frame 1 { if (_root.removeAG) { agObject._alpha = 0; } } frame 52 { if (!_root.removeAG) { stop(); } } frame 81 { stop(); } frame 236 { _root.gotoAndStop('mainMenu'); } frame 261 { stop(); } } movieClip 1307 { frame 1 { function newHelpMessage(pictureType, pictureNumber, helpText) { clearInterval(errorMessageInterval); if (pictureType == 'errorMessage') { this.gotoAndStop('noBack'); errorMessageTime = 0; errorMessageInterval = setInterval(this, 'errorMessage', 40); _root.soundManager.sfx.spcClick.start(); } else { this.gotoAndStop(pictureType); } this.helpText.htmlText = helpText; this.picture.attachMovie(pictureType + pictureNumber, 'picture', this.picture.getNextHighestDepth()); clearInterval(followMouseInterval); followMouseInterval = setInterval(this, 'followMouse', 80); } function clearHelpMessage() { this.helpText.htmlText = ''; removeMovieClip(this.picture.picture); clearInterval(followMouseInterval); this.gotoAndStop('clear'); this._y = -500; } function followMouse() { newXPosition = _root._xmouse + 10; newYPosition = _root._ymouse; while (newXPosition + this._width > 600) { --newXPosition; } while (newYPosition + this._height > 300) { --newYPosition; } this._x = newXPosition; this._y = newYPosition; } function errorMessage() { ++errorMessageTime; if (errorMessageTime >= 120) { clearHelpMessage(); clearInterval(errorMessageInterval); } } this._y = -500; this.stop(); } } movieClip 1313 { frame 1 { this.stop(); } frame 31 { Mouse.show(); (eval(targetObject)).gotoAndPlay(targetFrame); } frame 57 { gotoAndStop('clear'); } frame 119 { Mouse.show(); if (targetObject == '_root') { (eval(targetObject)).gotoAndStop(targetFrame); if (targetFrame == 'mainMenuReload') { _root.mainMenu.gotoAndPlay('open'); } } else { (eval(targetObject)).gotoAndPlay(targetFrame); } } frame 161 { gotoAndStop('clear'); } frame 181 { gotoAndStop('clear'); } } movieClip 1316 { frame 1 { this.stop(); } } movieClip 1391 { frame 1 { function defineSPCSFX() { this.createEmptyMovieClip('sfx', this.getNextHighestDepth()); sfx.spcClick = new Sound(sfx); sfx.spcClick.attachSound('sfxClick'); sfx.spcDoubleFall = new Sound(sfx); sfx.spcDoubleFall.attachSound('sfxDoubleFall'); sfx.spcClick.attachSound('sfxClick'); sfx.spcThunder = new Sound(sfx); sfx.spcThunder.attachSound('sfxThunder'); sfx.spcLightning = new Sound(sfx); sfx.spcLightning.attachSound('sfxLightning2'); sfx.spcDrawSword = new Sound(sfx); sfx.spcDrawSword.attachSound('sfxDrawSword'); sfx.spcLvlUp = new Sound(sfx); sfx.spcLvlUp.attachSound('sfxLvlUp'); sfx.spcDoorCreak = new Sound(sfx); sfx.spcDoorCreak.attachSound('sfxDoorCreak'); sfx.spcDoorSlam = new Sound(sfx); sfx.spcDoorSlam.attachSound('sfxDoorSlam'); sfx.spcHorseNeigh = new Sound(sfx); sfx.spcHorseNeigh.attachSound('sfxHorseNeigh2'); sfx.spcSacrifice = new Sound(sfx); sfx.spcSacrifice.attachSound('sfxSacrifice'); sfx.spcTimer = new Sound(sfx); sfx.spcTimer.attachSound('sfxTime'); sfx.spcBattleStart = new Sound(sfx); sfx.spcBattleStart.attachSound('sfxBattleStart'); sfx.spcBossEnd1 = new Sound(sfx); sfx.spcBossEnd1.attachSound('sfxBossEnd1'); sfx.spcBossEnd2 = new Sound(sfx); sfx.spcBossEnd2.attachSound('sfxBossEnd2'); sfx.spcBossEnd3 = new Sound(sfx); sfx.spcBossEnd3.attachSound('sfxBossEnd3'); } function toggleMute() { if (isMute) { isMute = false; defineSPCSFX(); fadePower = 0.5; maxBGMusicVolume = _root.userSettings.maxMusicVolume * musicVolMultiplier; } else { isMute = true; sfx.removeMovieClip(); fadePower = 2; maxBGMusicVolume = 0; } } function musicSet(musicSet, fadePow, volMultip) { _root.bgMusicSet = musicSet; this.fadePower = fadePow; this.musicVolMultiplier = volMultip; if (!isMute) { this.maxBGMusicVolume = _root.userSettings.maxMusicVolume * volMultip; } } function gameFieldSFX(sfxType, subType, xPosition) { if (!isMute) { attachMovie('emptyMC', 'soundEffect' + sfxNum, this.getNextHighestDepth()); (eval('soundEffect' + sfxNum)).sfx = new Sound(eval('soundEffect' + sfxNum)); (eval('soundEffect' + sfxNum)).sfx.attachSound(soundEffects[sfxType][subType][Math.round(Math.random() * (soundEffects[sfxType][subType].length - 1))]); (eval('soundEffect' + sfxNum)).sfx.sfxNum = sfxNum; (eval('soundEffect' + sfxNum)).sfx.onSoundComplete = function () { (eval('soundEffect' + this.sfxNum)).removeMovieClip(); }; var soundTestPoint = {'x': 300, 'y': 0}; _root.gameUnitsPath1.globalToLocal(soundTestPoint); if (soundTestPoint.x > xPosition) { var sfxVolume = 100 - (soundTestPoint.x - xPosition) / 3; } else { if (soundTestPoint.x < xPosition) { var sfxVolume = 100 - (xPosition - soundTestPoint.x) / 3; } } if (sfxVolume <= 0) { (eval('soundEffect' + sfxNum)).removeMovieClip(); (eval('soundEffect' + sfxNum)).sfx.setVolume(0); } else { if (sfxVolume > 0) { (eval('soundEffect' + sfxNum)).sfx.setVolume(sfxVolume); (eval('soundEffect' + sfxNum)).sfx.start(); } } ++sfxNum; } } function manageBackgroundMusic() { currentDate = new Date(); currentTime = currentDate.getTime(); if (nextBGMusic != currentBGMusic && nextBGMusic >= 0) { if ((eval('bgMusic' + currentBGMusic)).musicVolume > 0) { (eval('bgMusic' + currentBGMusic)).musicVolume -= fadePower; (eval('bgMusic' + currentBGMusic)).music.setVolume((eval('bgMusic' + currentBGMusic)).musicVolume); } if ((eval('bgMusic' + nextBGMusic)).musicVolume < maxBGMusicVolume) { (eval('bgMusic' + nextBGMusic)).musicVolume += fadePower; if ((eval('bgMusic' + nextBGMusic)).musicVolume > maxBGMusicVolume) { (eval('bgMusic' + nextBGMusic)).musicVolume = maxBGMusicVolume; } (eval('bgMusic' + nextBGMusic)).music.setVolume((eval('bgMusic' + nextBGMusic)).musicVolume); } if (((eval('bgMusic' + currentBGMusic)).musicVolume <= 0 || (eval('bgMusic' + currentBGMusic)).musicVolume == undefined) && (eval('this.bgMusic' + nextBGMusic)).musicVolume >= maxBGMusicVolume) { (eval('bgMusic' + currentBGMusic)).music.stop(); stillFadingOut = false; currentBGMusic = nextBGMusic; nextBGMusic = -1; } } else { if ((eval('bgMusic' + currentBGMusic)).musicVolume > maxBGMusicVolume) { (eval('bgMusic' + currentBGMusic)).musicVolume -= fadePower; if ((eval('bgMusic' + currentBGMusic)).musicVolume < maxBGMusicVolume) { (eval('bgMusic' + currentBGMusic)).musicVolume = maxBGMusicVolume; } (eval('bgMusic' + currentBGMusic)).music.setVolume((eval('bgMusic' + currentBGMusic)).musicVolume); } else { if ((eval('bgMusic' + currentBGMusic)).musicVolume < maxBGMusicVolume) { (eval('bgMusic' + currentBGMusic)).musicVolume += fadePower; if ((eval('bgMusic' + currentBGMusic)).musicVolume > maxBGMusicVolume) { (eval('bgMusic' + currentBGMusic)).musicVolume = maxBGMusicVolume; } (eval('bgMusic' + currentBGMusic)).music.setVolume((eval('bgMusic' + currentBGMusic)).musicVolume); } } } if (bgMusic[currentMusicSet + 'MaxRandom'] > bgMusic[currentMusicSet + 'MinRandom'] || currentMusicSet != _root.bgMusicSet) { if (currentTime > lastAutoMusicChange + autoChangeInterval || currentMusicSet != _root.bgMusicSet) { if (nextBGMusic >= 0) { (eval('bgMusic' + currentBGMusic)).music.stop(); currentBGMusic = nextBGMusic; nextBGMusic = -1; } do { nextBGMusic = Math.round(Math.random() * (bgMusic[_root.bgMusicSet + 'MaxRandom'] - bgMusic[_root.bgMusicSet + 'MinRandom'])) + bgMusic[_root.bgMusicSet + 'MinRandom']; } while (nextBGMusic == currentBGMusic && bgMusic[currentMusicSet + 'MaxRandom'] > bgMusic[currentMusicSet + 'MinRandom']); lastAutoMusicChange = currentTime; (eval('bgMusic' + nextBGMusic)).music.start(0, 999); (eval('bgMusic' + nextBGMusic)).music.setVolume(0); if (currentMusicSet != _root.bgMusicSet) { currentMusicSet = _root.bgMusicSet; } else { fadePower = 1.5; } } } } currentBGMusicVolume = 0; nextBGMusicVolume = 0; currentBGMusic = -1; nextBGMusic = -1; fadePower = 0.5; lastAutoMusicChange = 0; autoChangeInterval = 130000; sfxNum = 0; stillFadingOut = false; isMute = false; musicVolMultiplier = 1; bgMusic = new Array(); bgMusic.mainMusicMaxRandom = 0; bgMusic.mainMusicMinRandom = 0; this.createEmptyMovieClip('bgMusic0', this.getNextHighestDepth()); bgMusic0.music = new Sound(bgMusic0); bgMusic0.music.attachSound('darkSkies'); bgMusic0.musicVolume = 0; bgMusic.battleMusicMaxRandom = 3; bgMusic.battleMusicMinRandom = 1; this.createEmptyMovieClip('bgMusic1', this.getNextHighestDepth()); bgMusic1.music = new Sound(bgMusic1); bgMusic1.music.attachSound('victoriousDay'); bgMusic1.musicVolume = 0; this.createEmptyMovieClip('bgMusic2', this.getNextHighestDepth()); bgMusic2.music = new Sound(bgMusic2); bgMusic2.music.attachSound('tanksThunder'); bgMusic2.musicVolume = 0; bgMusic.creditsMusicMaxRandom = 3; bgMusic.creditsMusicMinRandom = 3; this.createEmptyMovieClip('bgMusic3', this.getNextHighestDepth()); bgMusic3.music = new Sound(bgMusic3); bgMusic3.music.attachSound('restlessNights'); bgMusic3.musicVolume = 0; bgMusic.preBattleMusicMaxRandom = 4; bgMusic.preBattleMusicMinRandom = 4; this.createEmptyMovieClip('bgMusic4', this.getNextHighestDepth()); bgMusic4.music = new Sound(bgMusic4); bgMusic4.music.attachSound(''); bgMusic4.musicVolume = 0; bgMusic.campaignMusicMaxRandom = 5; bgMusic.campaignMusicMinRandom = 5; this.createEmptyMovieClip('bgMusic5', this.getNextHighestDepth()); bgMusic5.music = new Sound(bgMusic5); bgMusic5.music.attachSound('calmBeforeStorm'); bgMusic5.musicVolume = 0; bgMusic.bossMusicMaxRandom = 6; bgMusic.bossMusicMinRandom = 6; this.createEmptyMovieClip('bgMusic6', this.getNextHighestDepth()); bgMusic6.music = new Sound(bgMusic6); bgMusic6.music.attachSound('metalVisage'); bgMusic6.musicVolume = 0; bgMusic.campaignMusic2MaxRandom = 7; bgMusic.campaignMusic2MinRandom = 7; this.createEmptyMovieClip('bgMusic7', this.getNextHighestDepth()); bgMusic7.music = new Sound(bgMusic7); bgMusic7.music.attachSound('spreadOfChaos'); bgMusic7.musicVolume = 0; bgMusic.introCinMaxRandom = 8; bgMusic.introCinMinRandom = 8; this.createEmptyMovieClip('bgMusic8', this.getNextHighestDepth()); bgMusic8.music = new Sound(bgMusic8); bgMusic8.music.attachSound('defiance'); bgMusic8.musicVolume = 0; defineSPCSFX(); soundEffects = new Array(); soundEffects.projectileHit = new Array(); soundEffects.projectileHit[-2] = ['sfxArrowHit, sfxArrowHit2']; soundEffects.projectileHit[-1] = ['sfxArrowHit, sfxArrowHit2']; soundEffects.projectileHit[1] = ['sfxFireStrike']; soundEffects.projectileHit[2] = ['sfxFireStrike']; soundEffects.projectileHit[3] = ['sfxSploosh']; soundEffects.projectileHit[4] = ['sfxHeal']; soundEffects.debrisHit = new Array(); soundEffects.debrisHit[16] = ['sfxFireStrike2']; soundEffects.debrisHit[17] = ['sfxIce']; soundEffects.skillStart = new Array(); soundEffects.skillStart[1] = ['sfxWoosh', 'sfxWoosh2']; soundEffects.skillStart[2] = ['sfxWoosh', 'sfxWoosh2']; soundEffects.skillStart[3] = ['sfxWoosh', 'sfxWoosh2']; soundEffects.skillStart[4] = ['sfxWeirdWind']; soundEffects.skillStart[8] = ['sfxHeal2']; soundEffects.skillStart[9] = ['sfxExplosion']; soundEffects.skillStart[10] = ['sfxLightning2']; soundEffects.skillStart[11] = ['sfxLightning2']; soundEffects.skillStart[12] = ['sfxIllusion']; soundEffects.skillStart[13] = ['sfxVolley']; soundEffects.skillStart[14] = ['sfxVolley']; soundEffects.skillStart[15] = ['sfxFireStrike2']; soundEffects.skillStart[18] = ['sfxSacrifice']; soundEffects.skillStart[19] = ['sfxSacrifice']; soundEffects.skillStart[20] = ['sfxSacrifice']; soundEffects.skillStart[21] = ['sfxGreatHeal']; soundEffects.skillStart[22] = ['sfxElectricity']; soundEffects.skillStart[24] = ['sfxChargeCannon']; soundEffects.skillStart[25] = ['sfxChargeCannon']; soundEffects.skillStart[26] = ['sfxGreatHeal']; soundEffects.skillStart[27] = ['sfxIllusion']; soundEffects.attackHit = new Array(); soundEffects.attackHitC = new Array(); soundEffects.attackHit[0] = ['sfxMetalHit', 'sfxMetalHit2', 'sfxMetalHit3', 'sfxMetalHit4', 'sfxMetalHit5']; soundEffects.attackHit[1] = ['sfxMetalHit', 'sfxMetalHit2', 'sfxMetalHit3', 'sfxMetalHit4', 'sfxMetalHit5']; soundEffects.attackHit[2] = ['sfxThinHit', 'sfxThinHit2', 'sfxThinHit3']; soundEffects.attackHit[3] = ['sfxBowFire', 'sfxBowFire2']; soundEffects.attackHitC[3] = ['sfxWoodHit', 'sfxWoodHit2', 'sfxWoodHit3']; soundEffects.attackHit[4] = ['sfxBowFire', 'sfxBowFire3']; soundEffects.attackHitC[4] = ['sfxWoodHit', 'sfxMetalHit2', 'sfxWoodHit3']; soundEffects.attackHit[5] = ['sfxThinHit2', 'sfxThinHit3', 'sfxMetalHit2', 'sfxHorseNeigh', 'sfxHorseSnort']; soundEffects.attackHit[6] = ['sfxWoodHit', 'sfxWoodHit2', 'sfxWoodHit3']; soundEffects.attackHit[9] = ['sfxMetalHit', 'sfxMetalHit2', 'sfxMetalHit3', 'sfxMetalHit4', 'sfxMetalHit5']; soundEffects.deaths = new Array(); soundEffects.deaths[0] = ['sfxDie1', 'sfxDie2', 'sfxDie3']; soundEffects.deaths[1] = ['sfxDie1', 'sfxDie2', 'sfxDie3']; soundEffects.deaths[2] = ['sfxDie1', 'sfxDie2', 'sfxDie3']; soundEffects.deaths[3] = ['sfxDie1', 'sfxDie2', 'sfxDie3']; soundEffects.deaths[4] = ['sfxDie1', 'sfxDie2', 'sfxDie3']; soundEffects.deaths[5] = ['sfxDie1', 'sfxHorseNeigh']; soundEffects.deaths[6] = ['sfxDie1', 'sfxDie2', 'sfxDie3']; soundEffects.deaths[7] = ['sfxDie1', 'sfxDie2', 'sfxDie3']; clearInterval(backgroundMusicInterval); backgroundMusicInterval = setInterval(this, 'manageBackgroundMusic', 80); stop(); } } frame 3 { stop(); } movieClip 1394 { } movieClip 1400 { } movieClip 1404 { frame 1 { if (_root.removeAG) { armorGames._alpha = 0; armorGames.enabled = false; } armorGames.onRelease = function () { getURL('http://www.ArmorGames.com', '_blank'); }; } } movieClip 1407 { } movieClip 1408 { frame 1 { function manageLight() { if (fadeIn && gateLight._alpha < 85) { gateLight._alpha += 0.5; } else { if (!fadeIn && gateLight._alpha > 35) { gateLight._alpha -= 0.5; } } if (curTime > lastSwitch + 80) { fadeIn = Math.round(Math.random()); lastSwitch = curTime; } ++curTime; } fadeIn = 0; lastSwitch = 0; curTime = 0; clearInterval(manageLightInt); manageLightInt = setInterval(this, 'manageLight', 40); } } movieClip 1409 { frame 113 { stop(); } } movieClip 1412 { frame 86 { this.stop(); } } movieClip 1427 { frame 1 { stop(); } } movieClip 1437 { frame 1 { var i = 0; while (++i <= 3) { if (_root.tacticalSlot[i].data.userSettings.teamName == undefined) { this['slotText' + i].text = 'Start New Team'; } else { this['slotText' + i].text = _root.tacticalSlot[i].data.userSettings.teamName + ' (' + _root.tacticalSlot[i].data.userSettings.gameplayTimeString + ')'; } } saveSlot1.onRelease = function () { if (_root.loggedIn != true) { _root.selectedSaveSlot = 1; slotSelected1.gotoAndStop(2); slotSelected2.gotoAndStop(1); slotSelected3.gotoAndStop(1); } }; saveSlot2.onRelease = function () { if (_root.loggedIn != true) { _root.selectedSaveSlot = 2; slotSelected1.gotoAndStop(1); slotSelected2.gotoAndStop(2); slotSelected3.gotoAndStop(1); } }; saveSlot3.onRelease = function () { if (_root.loggedIn != true) { _root.selectedSaveSlot = 3; slotSelected1.gotoAndStop(1); slotSelected2.gotoAndStop(1); slotSelected3.gotoAndStop(2); } }; enterButton.onRelease = function () { if (_root.loggedIn != true && _root.mainMenu.stoppedTransition == true) { if (_root.logIntoSingleplayer() == true) { if (_root.userSettings.teamName == undefined) { _parent._parent.newTeamInput.gotoAndPlay('newTeamIn'); } else { _parent.gotoAndPlay('loggedIn'); } _root.loggedIn = true; logInError = ''; this.enabled = false; } else { logInError = 'Please Select a Slot!'; } } }; deleteButton.onRelease = function () { if (_root.loggedIn != true && _root.mainMenu.stoppedTransition == true) { _parent._parent.warning.gotoAndPlay('deleteTeamWarning'); } }; stop(); } frame 2 { enterButton.onRelease = function () { if (_root.loggedIn != true && _root.mainMenu.stoppedTransition == true) { if (_root.logIntoMultiplayer(username.text, passwordText.text) == true) { this._parent.gotoAndPlay('loggedIn'); } else {} } }; } } movieClip 1444 { } movieClip 1460 { frame 1 { if (_root.soundManager.isMute) { gotoAndStop('muted'); } else { stop(); } mute.onRelease = function () { _root.soundManager.toggleMute(); gotoAndStop('muted'); }; } frame 2 { unMute.onRelease = function () { _root.soundManager.toggleMute(); gotoAndStop('notMuted'); }; } } movieClip 1468 { frame 11 { stop(); } } movieClip 1473 { } movieClip 1474 { frame 1 { instructions.buttonText = 'Help and Instructions'; manageTeam.buttonText = 'Manage Your Team'; campaign.buttonText = 'Campaign'; endurance.buttonText = 'Field Battle'; quickCredits.buttonText = 'Quick Credits'; instructions.menuButton.onRelease = function () { if (_root.mainMenu.stoppedTransition == true && !_root.disabledMainMenu) { _root.mainMenu.gotoAndPlay('close'); _root.nextGameMenu = 'instructions'; } }; manageTeam.menuButton.onRelease = function () { if (_root.mainMenu.stoppedTransition == true && !_root.disabledMainMenu) { _root.mainMenu.gotoAndPlay('close'); _root.nextGameMenu = 'subControls'; } }; endurance.menuButton.onRelease = function () { if (_root.mainMenu.stoppedTransition == true && _root.userSettings.fieldBattle && !_root.disabledMainMenu) { _root.mainMenu.gotoAndPlay('close'); _root.nextGameMenu = 'subControls'; _root.targetTeamMenu = 'endurance'; } else { if (!_root.userSettings.fieldBattle && !_root.disabledMainMenu) { _root.helpDialog.newHelpMessage('errorMessage', 'none', 'Unlock Through Campaign'); } } }; campaign.menuButton.onRelease = function () { if (_root.mainMenu.stoppedTransition == true && !_root.disabledMainMenu) { _root.mainMenu.gotoAndPlay('close'); _root.nextGameMenu = 'campaignMenu'; } }; back.onRelease = function () { if (_root.mainMenu.stoppedTransition == true) { _root.saveUserSettings(); _root.selectedSaveSlot = 0; _root.mainMenu.mainMenu.gotoAndPlay('logOut'); _root.mainMenu.mainMenu.menuButtons.gotoAndPlay('mainOutDown'); if (_root.soundManager.isMute) { _root.soundManager.toggleMute(); } } }; quickCredits.buttonHit.onRelease = function () { _parent._parent._parent.quickCredits.gotoAndStop('cred'); }; } } movieClip 1475 { frame 1 { _root.mainMenu.stoppedTransition = false; } frame 40 { _root.mainMenu.stoppedTransition = true; stop(); } frame 41 { _root.mainMenu.stoppedTransition = false; } frame 80 { stop(); this.gotoAndPlay(nextMenu); } frame 81 { _root.mainMenu.stoppedTransition = false; } frame 100 { stop(); } frame 101 { _root.mainMenu.stoppedTransition = false; } frame 140 { _root.mainMenu.stoppedTransition = true; stop(); } } movieClip 1476 { frame 1 { if (_root.loggedIn == true) { this.logInInput.gotoAndStop('clear'); this.gotoAndPlay('loggedIn'); } else { if (_root.multiplayerEnabled == true) { this.logInInput.gotoAndStop('multiplayer'); } } _root.mainMenu.stoppedTransition = false; } frame 45 { _root.mainMenu.stoppedTransition = true; if (_root.loggedIn != true) { stop(); } } frame 46 { if (_root.userSettings.tutorialObjective >= 0 && _root.userSettings.tutorialObjective < 4 && _root.userSettings.cinematicsWatched == 0) { _root.fadeTransition.targetFrame = 'campaignMenu'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFadeSlow'); } else { if (_root.userSettings.tutorialObjective >= 0) { _root.fadeTransition.targetFrame = 'instructions'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFadeSlow'); } } _root.mainMenu.stoppedTransition = false; } frame 85 { _root.mainMenu.stoppedTransition = true; this.stop(); } frame 86 { _root.mainMenu.stoppedTransition = false; } frame 106 { _root.loggedIn = false; this.gotoAndStop('logIn'); } } movieClip 1479 { frame 1 { stop(); } } movieClip 1489 { } movieClip 1491 { } movieClip 1498 { frame 1 { function updateDropDownSelect() { if (select[0] != undefined && droppedDown == true && buttonsOpen != true) { var i = 0; do { buttonHolder.attachMovie('dropDownSelect', 'dropDownSelect' + i, buttonHolder.getNextHighestDepth(), {'idNumber': i, 'varNumber': varNumbers[i], 'selectText': select[i], '_y': 16 * i, '_alpha': 0}); (eval('buttonHolder.dropDownSelect' + i + '.button')).onRelease = selectFunction[i]; (eval('buttonHolder.dropDownSelect' + i + '.button')).onRollOver = overFunction[i]; (eval('buttonHolder.dropDownSelect' + i + '.button')).onRollOut = outFunction[i]; } while (++i < select.length); selectMask._height = 275 - testTopStart.y - selectMask._y; if (buttonHolder._height > selectMask._height) { bottomBar._y = selectMask._y + selectMask._height; } buttonsOpen = true; } else { if (droppedDown == false && buttonsOpen == true) { var i = select.length - 1; do { (eval('buttonHolder.dropDownSelect' + i)).removeMovieClip(); } while (--i >= 0); selectMask._height = 0.1; buttonsOpen = false; } } var i = 0; do { if (eval('buttonHolder.dropDownSelect' + i) != undefined && (eval('buttonHolder.dropDownSelect' + i))._alpha < 100) { (eval('buttonHolder.dropDownSelect' + i))._alpha += 10; } } while (++i < select.length); if (buttonHolder._height > selectMask._height && bottomBar._alpha < 100) { bottomBar._alpha += 10; } else { if (buttonHolder._height <= selectMask._height && bottomBar._alpha > 0) { bottomBar._alpha -= 10; if (bottomBar._alpha <= 0) { clearInterval(updateDropDown); } } } if (Key.isDown(1) && !hitTest(_root._xmouse, _root._ymouse, true)) { droppedDown = false; } if (!selectMask.hitTest(_root._xmouse, _root._ymouse, true) && buttonHolder._height > selectMask._height) { var testMousePosition = {'x': _root._xmouse, 'y': _root._ymouse}; globalToLocal(testMousePosition); if (testMousePosition.y < selectMask._y && buttonHolder._y < selectMask._y) { buttonHolder._y += 2; } else { if (testMousePosition.y > selectMask._y + selectMask._height && buttonHolder._y > selectMask._y - (buttonHolder._height - selectMask._height)) { buttonHolder._y -= 2; } } } } droppedDown = false; buttonsOpen = false; var testTopStart = {'x': 0, 'y': 0}; localToGlobal(testTopStart); buttonHolder.setMask(selectMask); dropButton.onRelease = function () { if (droppedDown != true) { droppedDown = true; clearInterval(this._parent.updateDropDown); this._parent.updateDropDown = setInterval(this._parent, 'updateDropDownSelect', 40); } else { if (droppedDown == true) { droppedDown = false; } } }; } } movieClip 1500 { frame 1 { teamName.restrict = 'A-Z a-z'; heroName.restrict = 'A-Za-z'; teamName.onChanged = function () { teamName.text = teamName.text.capAfterSpace(); }; heroName.onChanged = function () { heroName.text = heroName.text.capAfterSpace(); }; firstPlay.topMessage = 'Yes'; firstPlay.select = new Array(); firstPlay.selectFunction = new Array(); firstPlay.select[0] = 'Yes'; firstPlay.select[1] = 'No'; firstPlay.selectFunction[0] = function () { firstPlay.topMessage = this._parent.selectText; firstPlay.droppedDown = false; _root.userSettings.tutorialObjective = 0; }; firstPlay.selectFunction[1] = function () { firstPlay.topMessage = this._parent.selectText; firstPlay.droppedDown = false; _root.userSettings.tutorialObjective = -1; }; enterButton.onRelease = function () { if (teamName.text == undefined || teamName.text == '' || heroName.text == '' || teamName.text == undefined) { errorMessage.text = 'Please answer me, general!'; } else { _root.userSettings.teamName = teamName.text; _root.userUnitLineup[0].unitName = heroName.text; _parent.newTeam = false; _parent.gotoAndPlay('newTeamOut'); this.enabled = false; _root.saveUserSettings(); if (_root.userSettings.tutorialObjective < 0) { _root.fadeTransition.targetFrame = 'subControls'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFadeSlow'); } } }; } } movieClip 1501 { frame 1 { stop(); } frame 20 { stop(); } frame 40 { _parent.mainMenu.gotoAndPlay('loggedIn'); } } movieClip 1527 { frame 1 { fullCredits.buttonText = 'View Full Credits'; fullCredits.buttonHit.onRelease = function () { _root.mainMenu.gotoAndPlay('close'); _root.nextGameMenu = 'campaignMenu'; _root.nextGameCinematic = 'credits'; _parent.menuOn = false; this.enabled = false; }; } } movieClip 1530 { } movieClip 1531 { frame 1 { stop(); } frame 2 { function manageCredits() { if (menuOn && _alpha < 100) { _alpha = _alpha + 4; } else { if (!menuOn && _alpha > 0) { _alpha = _alpha - 4; if (_alpha <= 0) { gotoAndStop('clear'); } } else { if (menuOn && _alpha >= 100) { var v2 = {'x': _root._xmouse, 'y': _root._ymouse}; globalToLocal(v2); if (v2.y > listMask._y + listMask._height * 0.7 && scrollText._y > scrollTextStart - (scrollText._height - listMask._height)) { scrollText._y -= 4; } else { if (v2.y < listMask._y + listMask._height * 0.3 && scrollText._y < scrollTextStart) { scrollText._y += 4; } } } } } } exit.onRelease = function () { if (menuOn) { menuOn = false; _root.disabledMainMenu = false; this.enabled = false; } }; menuOn = true; _root.disabledMainMenu = true; _alpha = 0; scrollText.setMask(listMask); scrollTextStart = scrollText._y; clearInterval(manageCreditsInt); manageCreditsInt = setInterval(this, 'manageCredits', 40); } } movieClip 1533 { frame 1 { deleteButton.buttonText = '<U>Delete Team</U>'; cancelButton.buttonText = '<U>Cancel</U>'; cancelButton.buttonHit.onRelease = function () { _parent.gotoAndPlay('deleteWarningOut'); this.enabled = false; }; deleteButton.buttonHit.onRelease = function () { _root.fadeTransition.targetFrame = 'mainMenuReload'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFadeSlow'); _root.deleteCurrentSlot(); _root.mainMenu.gotoAndPlay('close'); _parent.gotoAndPlay('deleteWarningOut'); this.enabled = false; _root.soundManager.maxBGMusicVolume = 0; _root.soundManager.sfx.spcDoubleFall.start(); }; } } movieClip 1535 { frame 1 { dismissButton.buttonText = '<U>Dismiss Unit</U>'; cancelButton.buttonText = '<U>Cancel</U>'; cancelButton.buttonHit.onRelease = function () { _parent.gotoAndPlay('dismissWarningOut'); this.enabled = false; dismissButton.buttonHit.enabled = false; }; dismissButton.buttonHit.onRelease = function () { _root.userUnitLineup.splice(_root.teamSlotSelected, 1); if (_root.userSettings.tutorialObjective > 0) { if (_parent._parent.unitsEdited.Contains(_root.teamSlotSelected)) { _parent._parent.unitsEdited.splice(_parent._parent.unitsEdited.Contains(_root.teamSlotSelected), 1); } } _root.teamSlotSelected = -1; _parent._parent.currentMenu.unitSlots.refreshUnitSlots(); _root.fadeTransition.gotoAndPlay('quickFadeNoEffect'); this.enabled = false; cancelButton.buttonHit.enabled = false; _parent.gotoAndPlay('dismissWarningOut'); }; } } movieClip 1536 { frame 1 { stop(); } frame 20 { stop(); } frame 40 { gotoAndStop('clear'); } frame 59 { stop(); } frame 79 { gotoAndStop('clear'); } } movieClip 1537 { frame 1 { _root.soundManager.musicSet('mainMusic', 1, 0.7); _root.lastMenu = 'main'; } frame 77 { stop(); } frame 78 { this.stoppedTransition = false; } frame 120 { this.stoppedTransition = true; _parent.gotoAndStop(_root.nextGameMenu); stop(); } } frame 4 { stop(); } frame 5 { stop(); } movieClip 1540 { frame 64 { stop(); } } movieClip 1544 { } movieClip 1545 { frame 40 { stop(); } } movieClip 1547 { frame 25 { this.animDone = true; stop(); } } movieClip 1549 { frame 35 { this.animDone = true; stop(); } } movieClip 1551 { frame 45 { this.animDone = true; stop(); } } movieClip 1554 { } movieClip 1562 { } movieClip 1563 { frame 1 { function manageSlider() { if (draggingSlider == true) { var v3 = {'x': this.slider._x, 'y': this.slider._y}; this.localToGlobal(v3); sliderXPosition = v3.x; if (_root._xmouse > sliderXPosition) { slider._x += _root._xmouse - sliderXPosition; if (slider._x > 150) { slider._x = 150; } } else { if (_root._xmouse < sliderXPosition) { slider._x -= sliderXPosition - _root._xmouse; if (slider._x < 0) { slider._x = 0; } } } if (!Key.isDown(1)) { draggingSlider = false; } if (this.setSetting == 'colourR' || this.setSetting == 'colourG' || this.setSetting == 'colourB' || this.setSetting == 'maxMusicVolume') { _root.userSettings[setSetting] = (this.slider._x / 150) * maxValue; } } } slider.sliderButton.onPress = function () { draggingSlider = true; }; clearInterval(manageSliderInterval); manageSliderInterval = setInterval(this, 'manageSlider', 40); } } movieClip 1569 { frame 1 { teamName.text = _root.userSettings.teamName; teamName.restrict = 'A-Z a-z'; teamName.onChanged = function () { teamName.text = (teamName.text.charAt(0)).toUpperCase() + (teamName.text.slice(1)).toLowerCase(); }; redSlider.slider._x = (_root.userSettings.colourR / 255) * 150; greenSlider.slider._x = (_root.userSettings.colourG / 255) * 150; blueSlider.slider._x = (_root.userSettings.colourB / 255) * 150; teamBarColour = new Color(teamColourBar); redSlider.setSetting = 'colourR'; greenSlider.setSetting = 'colourG'; blueSlider.setSetting = 'colourB'; redSlider.maxValue = 255; greenSlider.maxValue = 255; blueSlider.maxValue = 255; qualityDropDown.topMessage = _root.userSettings.graphicsQuality; qualityDropDown.select = new Array(); qualityDropDown.selectHelpMessages = new Array(); qualityDropDown.selectFunction = new Array(); qualityDropDown.overFunction = new Array(); qualityDropDown.outFunction = new Array(); qualityDropDown.select[0] = 'Auto'; qualityDropDown.select[1] = 'High'; qualityDropDown.select[2] = 'Medium'; qualityDropDown.select[3] = 'Low'; var i = 0; do { qualityDropDown.selectFunction[i] = function () { qualityDropDown.topMessage = this._parent.selectText; qualityDropDown.droppedDown = false; _root.userSettings.graphicsQuality = this._parent.selectText; if (this._parent.selectText == 'Auto') { _root.autoQuality = true; } else { _root.autoQuality = false; _root._quality = this._parent.selectText.toUpperCase(); } _root.helpDialog.clearHelpMessage(); }; } while (++i <= 3); qualityDropDown.overFunction[3] = function () { _root.helpDialog.newHelpMessage('noBack', 'none', 'NOT recommended!'); }; qualityDropDown.outFunction[3] = function () { _root.helpDialog.clearHelpMessage(); }; maxMusicVolume.slider._x = (_root.userSettings.maxMusicVolume / 100) * 150; maxMusicVolume.setSetting = 'maxMusicVolume'; maxMusicVolume.maxValue = 100; deleteTeam.buttonText = 'Delete Team'; deleteTeam.buttonHit.onRelease = function () { _parent._parent.warning.gotoAndPlay('deleteTeamWarning'); }; } } movieClip 1571 { frame 1 { _root.getGameplayTime(); this.teamStats.htmlText = 'Team Level: ' + Math.round(_root.getTeamLevel()) + '<br />Victories: ' + _root.userSettings.teamVictories + '<br />Defeats: ' + _root.userSettings.teamDefeats + '<br />Team Description: ' + _root.campaignRanks[_root.userSettings.campaignRank] + '<br />Gameplay Time: ' + _root.userSettings.gameplayTimeString + '<br />Team Age: ' + _root.getTeamAge(); this.teamCoins.text = _root.userSettings.teamCoins; } } movieClip 1572 { frame 1 { editUnitLineup.buttonText = '<font size=\'14\'><u>Edit Unit Lineup</u>'; editUnitLineup.buttonHit.onRelease = function () { if (_parent._parent.teamColourChanged != false && _parent._parent.warning._currentframe == 1) { _root.helpDialog.clearHelpMessage(); _parent._parent.fadeOutCurrentMenu = true; _parent._parent.targetTeamMenu = 'manageTeam'; if (_root.userSettings.tutorialObjective == 0) { _root.userSettings.tutorialObjective = 2; } } else { if (_parent._parent.teamColourChanged == false) { _root.helpDialog.newHelpMessage('errorMessage', 'noPicture', 'Try changing your colour!'); } } }; } } movieClip 1573 { } movieClip 1576 { } movieClip 1577 { } movieClip 1578 { frame 1 { function manageTeamMenu() { if (teamSetupMenu._alpha < 100 && bottomPanel1.animDone == true) { teamSetupMenu._alpha += 5; } if (teamStatsMenu._alpha < 100 && bottomPanel2.animDone == true) { teamStatsMenu._alpha += 5; } if (teamOptionsMenu._alpha < 100 && bottomPanel3.animDone == true) { teamOptionsMenu._alpha += 5; } if (exitSymbol._alpha < 100 && _parent.tutorialComplete == true) { exitSymbol._alpha += 5; } teamSetupMenu.teamName.text = teamSetupMenu.teamName.text.capAfterSpace(); _root.userSettings.teamName = teamSetupMenu.teamName.text; teamSetupMenu.teamBarColour.setTint(_root.userSettings.colourR, _root.userSettings.colourG, _root.userSettings.colourB, 100); _root.soundManager.fadePower = 2; if (!_root.soundManager.isMute && _root.userSettings.maxMusicVolume) { _root.soundManager.maxBGMusicVolume = _root.userSettings.maxMusicVolume * _root.soundManager.musicVolMultiplier; } else { if (!_root.userSettings.maxMusicVolume && !_root.soundManager.isMute) { _root.soundManager.toggleMute(); teamSetupMenu.mute.gotoAndStop('muted'); _root.userSettings.maxMusicVolume = entryMusicVol; teamSetupMenu.maxMusicVolume.draggingSlider = false; teamSetupMenu.maxMusicVolume.slider._x = (_root.userSettings.maxMusicVolume / 100) * 150; } } teamSetupMenu.bgMusicVolume.text = Math.round(_root.userSettings.maxMusicVolume); if (_root.userSettings.tutorialObjective >= 0) { if (_parent.tutorialComplete != true) { if (_root.userSettings.colourR != 255 || _root.userSettings.colourG != 255 || _root.userSettings.colourB != 255) { _parent.teamColourChanged = true; } if (_parent.teamColourChanged != true) { tutArrow1._alpha = 100; tutArrow2._alpha = 0; } else { tutArrow1._alpha = 0; tutArrow2._alpha = 100; } exitSymbol.exit.enabled = false; } else { tutArrow3._alpha = 100; exitSymbol.exit.enabled = true; } } } entryMusicVol = _root.userSettings.maxMusicVolume; exitSymbol.exit.onRelease = function () { if (_parent.tutorialComplete == true && _parent.warning._currentframe == 1) { _parent.fadeOutCurrentMenu = true; _parent.targetTeamMenu = 'exitTeamMenu'; _root.saveUserSettings(); _root.helpDialog.clearHelpMessage(); this.enabled = false; } }; clearInterval(manageTeamMenuInterval); manageTeamMenuInterval = setInterval(this, 'manageTeamMenu', 40); } } movieClip 1581 { frame 1 { continueButton.buttonText = 'Continue...'; continueButton.buttonHit.onRelease = function () { _parent.instructionsOn = false; ++_root.userSettings.tutorialObjective; _root.subMenu.gotoAndStop('setupTeam'); }; overText.htmlText = 'Reccomended Actions:<li>Change your team colour.</li><li>Click the \'Edit Unit Lineup\' button to continue.</li>'; } } movieClip 1584 { frame 1 { continueButton.buttonText = 'Continue...'; continueButton.buttonHit.onRelease = function () { _parent.instructionsOn = false; ++_root.userSettings.tutorialObjective; _root.subMenu.gotoAndStop('manageTeam'); }; overText.htmlText = 'Reccomended Actions:<li>Hire one or two units for your team.</li><li>Select the hired units and then click \'Edit Unit\'.</li>'; } } movieClip 1587 { frame 1 { continueButton.buttonText = 'Continue...'; continueButton.buttonHit.onRelease = function () { _parent.instructionsOn = false; ++_root.userSettings.tutorialObjective; _root.subMenu.gotoAndStop('manageUnit'); }; overText.htmlText = 'Reccomended Actions:<li>Familiarize yourself with this menu.</li><li>Equip any known skills if possible.</li>'; } } movieClip 1588 { frame 1 { function setInstructions() { if (instructions._alpha < 100 && instructionsOn == true) { instructions._alpha += 5; } else { if (instructions._alpha > 0 && instructionsOn != true) { instructions._alpha -= 5; if (instructions._alpha <= 0) { gotoAndStop('clear'); clearInterval(setInstructionsInterval); } } } } stop(); } frame 2 { clearInterval(setInstructionsInterval); setInstructionsInterval = setInterval(this, 'setInstructions', 40, instructionsType); instructionsOn = true; } frame 3 { clearInterval(setInstructionsInterval); setInstructionsInterval = setInterval(this, 'setInstructions', 40, instructionsType); instructionsOn = true; } frame 4 { clearInterval(setInstructionsInterval); setInstructionsInterval = setInterval(this, 'setInstructions', 40, instructionsType); instructionsOn = true; } } movieClip 1590 { frame 25 { this.animDone = true; stop(); } } movieClip 1593 { } movieClip 1598 { } movieClip 1599 { frame 1 { function moveSpotlight(spotlightIn) { if (spotlightIn == true && spotlightIsIn != true) { randomSpotlightIn = Math.round(Math.random() * 2 + 1); gotoAndPlay('inAnim' + randomSpotlightIn); spotlightIsIn = true; } else { if (spotlightIn == false && _currentframe != 1) { randomSpotlightOut = Math.round(Math.random() * 1 + 1); gotoAndPlay('outAnim' + randomSpotlightOut); spotlightIsIn = false; } } } spotlightMoving = false; stop(); } frame 2 { this.spotlightMoving = true; } frame 11 { this.spotlightMoving = false; this.stop(); } frame 12 { this.spotlightMoving = true; } frame 21 { this.spotlightMoving = false; this.stop(); } frame 22 { this.spotlightMoving = true; } frame 31 { this.spotlightMoving = false; this.stop(); } frame 32 { this.spotlightMoving = true; } frame 42 { gotoAndStop(1); } frame 43 { this.spotlightMoving = true; } frame 53 { gotoAndStop(1); } } movieClip 1601 { frame 1 { function attachUnitPicture() { unitPicture.unitPicture.removeMovieClip(); unitPicture.attachMovie('unitBody' + _root.userUnitLineup[teamSlotNumber].unitType, 'unitPicture', unitPicture.getNextHighestDepth()); unitPicture.unitPicture.gotoAndStop('idle'); if (_parent._parent.displayUnitNames == true) { unitName.text = _root.userUnitLineup[teamSlotNumber].unitName; } } function attachMessages() { if (arguments.length == 1) { messageTexts = arguments[0]; clearInterval(slotMessageInterval); slotMessageInterval = setInterval(this, 'attachMessages', 2200); attachMessages(); } else { if (messageTexts[nextMessageNum] != undefined) { messages.attachMovie('unitSlotMessage', 'message' + nextMessageNum, messages.getNextHighestDepth(), {'messageText': messageTexts[nextMessageNum]}); } if (messageTexts[nextMessageNum].indexOf('Lvl. Up') > -1) { messages.attachMovie('levelUpEmbellish', 'levelUpEmbellish', messages.getNextHighestDepth(), {'_x': 33}); _root.soundManager.sfx.spcLvlUp.start(); } ++nextMessageNum; if (nextMessageNum >= messageTexts.length) { clearInterval(slotMessageInterval); } } } var nextMessageNum = 0; var messageTexts = new Array(); selectButton.onRelease = function () { if (selectedSpotlight.spotlightMoving == false) { selectedSpotlight.moveSpotlight(true); if (_root.teamSlotSelected != teamSlotNumber) { var v3 = -1; while (++v3 < _root.maxPlayerTeamSize) { if (_parent['unitSlot' + v3].teamSlotNumber == _root.teamSlotSelected && v3 != teamSlotNumber) { _parent['unitSlot' + v3].selectedSpotlight.moveSpotlight(false); } } _root.teamSlotSelected = teamSlotNumber; } } }; } } movieClip 1602 { frame 1 { function fadeInUnitSlots() { if (this['unitSlot' + fadingInSlot].teamSlotNumber != fadingInSlot) { this['unitSlot' + fadingInSlot].teamSlotNumber = fadingInSlot; } if (this['unitSlot' + fadingInSlot]._alpha < 100) { this['unitSlot' + fadingInSlot]._alpha += 20; } else { if (this['unitSlot' + fadingInSlot]._alpha >= 100) { if (_root.userUnitLineup[fadingInSlot].unitName != undefined) { this['unitSlot' + fadingInSlot].selectButton.enabled = true; this['unitSlot' + fadingInSlot].attachUnitPicture(); if (_parent.unitSlotMessages[fadingInSlot] != undefined) { this['unitSlot' + fadingInSlot].attachMessages(_parent.unitSlotMessages[fadingInSlot]); } } else { this['unitSlot' + fadingInSlot].selectButton.enabled = false; } ++fadingInSlot; if (fadingInSlot >= _root.maxPlayerTeamSize) { clearInterval(fadeInInterval); } } } } function refreshUnitSlots() { clearInterval(fadeInInterval); var fadingOutSlot = 0; do { this['unitSlot' + fadingOutSlot].unitPicture.unitPicture.removeMovieClip(); this['unitSlot' + fadingOutSlot].selectButton.enabled = false; if (_root.teamSlotSelected != fadingOutSlot) { this['unitSlot' + fadingOutSlot].selectedSpotlight.moveSpotlight(false); } else { this['unitSlot' + fadingOutSlot].selectedSpotlight.moveSpotlight(true); } (eval('unitSlot' + fadingOutSlot))._alpha = 0; } while (++fadingOutSlot < _root.maxPlayerTeamSize); fadingInSlot = 0; fadeInInterval = setInterval(this, 'fadeInUnitSlots', 40); } refreshUnitSlots(); } } movieClip 1617 { frame 1 { if (_root.userUnitLineup.length >= _root.userSettings.maxTeamSize) { gotoAndStop('teamSize'); } else { unitName.restrict = 'A-Z a-z 0-9'; searchButton.buttonText = '<font size=\'14\'><u>Hire</u></font>'; searchButton.buttonHit.onRelease = function () { errorMessage = _root.newUnitFromTemplate(unitName.text, selectedProfession, selectedDeity); if (errorMessage == undefined) { _parent._parent.unitSlots.refreshUnitSlots(); _root.fadeTransition.gotoAndPlay('quickFadeNoEffect'); errorMessage = ''; _parent.gotoAndPlay('hireUnitOut'); this.enabled = false; if (_root.userSettings.tutorialObjective <= 0) { _root.saveUserSettings(); } } }; cancelButton.buttonText = '<font size=\'14\'><u>Cancel</u></font>'; cancelButton.buttonHit.onRelease = function () { _parent.gotoAndPlay('hireUnitOut'); this.enabled = false; }; professionDropDown.topMessage = 'Select One...'; professionDropDown.select = new Array(); professionDropDown.selectHelpMessages = new Array(); professionDropDown.selectFunction = new Array(); professionDropDown.overFunction = new Array(); professionDropDown.outFunction = new Array(); professionDropDown.varNumbers = new Array(); var i = 0; do { professionDropDown.select[i] = _root.jobStats[_root.unlockUnitOrder[i]].name; professionDropDown.selectHelpMessages[i] = '<font size=\'11\'><b><u>' + _root.jobStats[_root.unlockUnitOrder[i]].name + ':</u></b></font><br />' + _root.jobStats[_root.unlockUnitOrder[i]].description; professionDropDown.selectFunction[i] = function () { professionDropDown.topMessage = this._parent.selectText; professionDropDown.droppedDown = false; selectedProfession = this._parent.varNumber; _root.helpDialog.clearHelpMessage(); }; professionDropDown.overFunction[i] = function () { _root.helpDialog.newHelpMessage('professionPicture', this._parent.varNumber, this._parent._parent._parent.selectHelpMessages[this._parent.idNumber]); }; professionDropDown.outFunction[i] = function () { _root.helpDialog.clearHelpMessage(); }; professionDropDown.varNumbers.push(_root.unlockUnitOrder[i]); } while (++i < _root.unlockUnitOrder.length && i < _root.userSettings.unitTypesUnlocked); deityDropDown.topMessage = 'Select One...'; deityDropDown.select = new Array(); deityDropDown.selectHelpMessages = new Array(); deityDropDown.selectFunction = new Array(); deityDropDown.overFunction = new Array(); deityDropDown.outFunction = new Array(); var i = 0; while (i < _root.userSettings.deitiesUnlocked) { deityDropDown.select[i] = _root.deityStats[i].deityName; deityDropDown.selectHelpMessages[i] = '<font size=\'12\'><b><u>' + _root.deityStats[i].deityName + ':</u></b></font><br />' + _root.deityStats[i].deityDescription; deityDropDown.selectFunction[i] = function () { deityDropDown.topMessage = this._parent.selectText; deityDropDown.droppedDown = false; selectedDeity = this._parent.idNumber; _root.helpDialog.clearHelpMessage(); }; deityDropDown.overFunction[i] = function () { _root.helpDialog.newHelpMessage('deityPicture', this._parent.idNumber, deityDropDown.selectHelpMessages[this._parent.idNumber]); }; deityDropDown.outFunction[i] = function () { _root.helpDialog.clearHelpMessage(); }; } unitName.restrict = 'A-Za-z'; unitName.onChanged = function () { unitName.text = (unitName.text.charAt(0)).toUpperCase() + (unitName.text.slice(1)).toLowerCase(); }; stop(); } } frame 2 { cancelButton.buttonText = '<u>Cancel</u>'; cancelButton.buttonHit.onRelease = function () { _parent.gotoAndPlay('hireUnitOut'); this.enabled = false; }; } } movieClip 1619 { } movieClip 1622 { frame 1 { stop(); } frame 2 { var i = 0; do { _parent.unitSlots['unitSlot' + i].selectButton.enabled = false; } while (++i < _root.maxPlayerTeamSize); hireUnitInput.setMask(parchmentMask); _parent.editUnit.buttonHit.enabled = false; _parent.dismissUnit.buttonHit.enabled = false; _parent.hireNewUnit.buttonHit.enabled = false; } frame 16 { stop(); } frame 32 { var i = 0; do { if (_root.userUnitLineup[i].unitLevel != undefined) { _parent.unitSlots['unitSlot' + i].selectButton.enabled = true; } } while (++i < _root.maxPlayerTeamSize); _parent.editUnit.buttonHit.enabled = true; _parent.dismissUnit.buttonHit.enabled = true; _parent.hireNewUnit.buttonHit.enabled = true; gotoAndStop('clear'); } } movieClip 1623 { frame 1 { function manageTeamMenu() { if (animPanel.animDone == true) { if (_root.teamSlotSelected >= 0 && _root.teamSlotSelected < _root.maxPlayerTeamSize) { if (editUnit._alpha < 100) { if (editUnit.fullAlphaDone == true) { editUnit._alpha = 100; } else { editUnit._alpha += 5; } } else { editUnit.fullAlphaDone = true; editUnit.buttonHit.enabled = true; } if (dismissUnit._alpha < 100) { if (dismissUnit.fullAlphaDone == true) { dismissUnit._alpha = 100; } else { dismissUnit._alpha += 5; } } else { dismissUnit.fullAlphaDone = true; dismissUnit.buttonHit.enabled = true; } if (this.unitMenuInfo._alpha < 100) { if (unitMenuInfo.fullAlphaDone == true) { unitMenuInfo._alpha = 100; } else { unitMenuInfo._alpha += 5; } } else { unitMenuInfo.fullAlphaDone = true; unitMenuInfo.enabled = true; } unitMenuInfo.displayUnitName = _root.userUnitLineup[_root.teamSlotSelected].unitName; unitMenuInfo.displayUnitInfo = 'Level ' + _root.userUnitLineup[_root.teamSlotSelected].unitLevel + ' ' + _root.jobStats[_root.userUnitLineup[_root.teamSlotSelected].unitType].name; } else { editUnit._alpha = 0; dismissUnit._alpha = 0; editUnit.buttonHit.enabled = false; dismissUnit.buttonHit.enabled = false; unitMenuInfo._alpha = 0; unitMenuInfo.displayUnitName = ''; unitMenuInfo.displayUnitInfo = ''; } if (hireNewUnit._alpha < 100) { hireNewUnit._alpha += 5; } if (exitSymbol._alpha < 100 && _parent.tutorialComplete == true) { exitSymbol._alpha += 5; } } if (_root.userSettings.tutorialObjective >= 0) { if (_root.userUnitLineup.length < 3) { tutArrow1._alpha = 100; tutArrow2._alpha = 0; tutArrow3._alpha = 0; tutArrow4._alpha = 0; tutArrow5._alpha = 0; if (_root.userSettings.tutorialObjective == 3) { --_root.userSettings.tutorialObjective; } exitSymbol.exit.enabled = false; } else { tutArrow1._alpha = 0; if (_root.userSettings.tutorialObjective == 2) { ++_root.userSettings.tutorialObjective; } if (_root.teamSlotSelected < 0) { if (_parent.unitsEdited.Contains(0) < 0) { tutArrow2._alpha = 100; } else { tutArrow2._alpha = 0; } if (_parent.unitsEdited.Contains(1) < 0) { tutArrow3._alpha = 100; } else { tutArrow3._alpha = 0; } if (_parent.unitsEdited.Contains(2) < 0) { tutArrow4._alpha = 100; } else { tutArrow4._alpha = 0; } } else { if (_parent.unitsEdited.Contains(_root.teamSlotSelected) < 0) { tutArrow5._alpha = 100; } else { tutArrow5._alpha = 0; } tutArrow2._alpha = 0; tutArrow3._alpha = 0; tutArrow4._alpha = 0; } exitSymbol.exit.enabled = false; if (_parent.unitsEdited.length == 3) { _parent.tutorialComplete = true; exitSymbol.exit.enabled = true; tutArrow6._alpha = 100; _root.userSettings.tutorialObjective = 4; } } } } _root.teamSlotSelected = -1; editUnit.buttonText = '<font size=\'13\'><u>Edit Unit</u>'; dismissUnit.buttonText = '<font size=\'13\'><u>Dismiss Unit</u>'; hireNewUnit.buttonText = '<font size=\'13\'><u>Hire New Unit</u>'; exitButton.buttonText = '<font size=\'13\'><u>Back</u>'; editUnit.buttonHit.enabled = false; dismissUnit.buttonHit.enabled = false; hireNewUnit.buttonHit.onRelease = function () { if (_parent.warning._currentframe == 1) { hireUnitPanel.gotoAndPlay('hireUnitIn'); } }; editUnit.buttonHit.onRelease = function () { if (_root.userSettings.tutorialObjective != 2 && _parent.warning._currentframe == 1) { _parent.fadeOutCurrentMenu = true; _parent.targetTeamMenu = 'manageUnit'; this.enabled = false; } else { if (_parent.warning._currentframe == 1) { _root.helpDialog.newHelpMessage('errorMessage', 'noPicture', 'Try hiring two new units!'); } } }; dismissUnit.buttonHit.onRelease = function () { if (_root.teamSlotSelected != 0 && _root.userSettings.tutorialObjective <= 0 && _parent.warning._currentframe == 1) { _parent.warning.gotoAndPlay('dismissUnitWarning'); } else { if (_root.teamSlotSelected == 0 && _parent.warning._currentframe == 1) { _root.helpDialog.newHelpMessage('errorMessage', 'noPicture', 'You cannot dismiss your hero!'); } else { if (_root.userSettings.tutorialObjective > 0 && _parent.warning._currentframe == 1) { _root.helpDialog.newHelpMessage('errorMessage', 'noPicture', 'Finish the tutorial first!'); } } } }; exitSymbol.exit.onRelease = function () { if (_parent.warning._currentframe == 1) { _parent.fadeOutCurrentMenu = true; _parent.targetTeamMenu = 'setupTeam'; this.enabled = false; } }; clearInterval(manageTeamMenuInterval); manageTeamMenuInterval = setInterval(this, 'manageTeamMenu', 40); stop(); } } movieClip 1627 { frame 41 { stop(); animDone = true; } } movieClip 1637 { } movieClip 1652 { } movieClip 1654 { frame 1 { unitName.restrict = 'A-Za-z'; unitName.text = _root.userUnitLineup[_root.teamSlotSelected].unitName; unitInfo.text = 'Level ' + _root.userUnitLineup[_root.teamSlotSelected].unitLevel + ' ' + _root.jobStats[_root.userUnitLineup[_root.teamSlotSelected].unitType].name; unitDeity.text = _root.deityStats[_root.userUnitLineup[_root.teamSlotSelected].unitDeity].deityName + ' (' + Math.round(_root.userUnitLineup[_root.teamSlotSelected].unitFavour) + ' Favour)'; unitPicture.attachMovie('unitBody' + _root.userUnitLineup[_root.teamSlotSelected].unitType, 'unitPicture', unitPicture.getNextHighestDepth()); unitPicture.unitPicture.gotoAndStop('idle'); unitName.onChanged = function () { if (unitName.text == '' || unitName.text == undefined) { var v4 = 'Please enter a name!'; } else { var v3 = 0; do { if (_root.userUnitLineup[v3].unitName == unitName.text) { var v4 = 'Someone already has this name!'; } } while (++v3 < _root.userUnitLineup.length); if (v4 == undefined) { unitName.text = unitName.text.capAfterSpace(); _root.userUnitLineup[_root.teamSlotSelected].unitName = unitName.text; _parent._parent._parent.menuTitle.menuTitle.menuTitle.text = _root.userUnitLineup[_root.teamSlotSelected].unitName; } } }; favourInfo.buttonHit.onRollOver = function () { _root.helpDialog.newHelpMessage('largeDialog', 0, '<u>Favour:</u><li>Units lose favour when sent to judgement. Units that fall below 0 favour die permanently.</li><li>High favour means a higher chance of causing status effects and knocking back enemies.</li><li>Units gain favour in different ways, depending on the god they worship.</li>'); }; favourInfo.buttonHit.onRollOut = function () { _root.helpDialog.clearHelpMessage(); }; stop(); } frame 2 { clearInterval(unitInfoManagementInterval); skillName.text = _root.skillStats[skillInfoNumber].name; skillCharge.text = _root.skillStats[skillInfoNumber].charge; skillPreparation.text = Math.round(_root.skillStats[skillInfoNumber].rechargeTime / 24); skillEffect.text = Math.abs(_root.skillStats[skillInfoNumber].basePower); if (_root.skillStats[skillInfoNumber].basePower == 0 && _root.damageDebrisStats[skillInfoNumber].damageAmount) { skillEffect.text = _root.damageDebrisStats[skillInfoNumber].damageAmount; } if (_root.skillStats[skillInfoNumber].basePower < 0 || _root.damageDebrisStats[skillInfoNumber].damageAmount < 0 && _root.skillStats[skillInfoNumber].basePower == 0) { skillEffectSymbol.gotoAndStop('heal'); } else { skillEffectSymbol.gotoAndStop('damageNormal'); } skillDescription.text = _root.skillStats[skillInfoNumber].description; picture.attachMovie('skillPicture' + skillInfoNumber, 'picture', picture.getNextHighestDepth()); stop(); } frame 3 { _root.soundManager.sfx.spcClick.start(); } frame 75 { gotoAndStop('unitInfo'); } } movieClip 1659 { } movieClip 1663 { } movieClip 1665 { frame 1 { function manageScrollBar() { if (dragStarted == true) { if (_root._ymouse < sliderPositionStart.y + 96 && _root._ymouse > sliderPositionStart.y) { var v6 = {'x': _root._xmouse, 'y': _root._ymouse}; globalToLocal(v6); slider._y = v6.y; } else { if (_root._ymouse < sliderPositionStart.y) { slider._y = sliderPositionStartY; } else { if (_root._ymouse > sliderPositionStart.y + 96) { slider._y = sliderPositionStartY + 96; } } } _parent.slidingText._y = _parent.slidingTextStart - _parent.slidingTextHeight * ((slider._y - sliderPositionStartY) / 96); if (!Key.isDown(1)) { dragStarted = false; } } else { if (Key.isDown(1)) { if (backBar.hitTest(_root._xmouse, _root._ymouse, true)) { var v5 = {'x': _root._xmouse, 'y': _root._ymouse}; this.globalToLocal(v5); var v4 = v5.y - slider._height / 2; if (v4 >= sliderPositionStartY && v4 <= sliderPositionStartY + 96) { slider._y = v4; } else { if (v4 < sliderPositionStartY) { slider._y = sliderPositionStartY; } else { if (v4 > sliderPositionStartY + 96) { slider._y = sliderPositionStartY + 96; } } } _parent.slidingText._y = _parent.slidingTextStart - _parent.slidingTextHeight * ((slider._y - sliderPositionStartY) / 96); } } } } var sliderPositionStartY = slider._y; var sliderPositionStart = {'x': slider._x, 'y': slider._y}; localToGlobal(sliderPositionStart); slider.slider.onPress = function () { dragStarted = true; }; clearInterval(manageScrollBarInterval); manageScrollBarInterval = setInterval(this, 'manageScrollBar', 40); } } movieClip 1667 { frame 1 { function setNewList(listValues, selectFunction, overFunction, outFunction) { var v1 = 0; while (slidingText['listElement' + v1] != undefined) { if (slidingText['listElement' + v1] != undefined) { slidingText['listElement' + v1].removeMovieClip(); } ++v1; } v1 = 0; while (v1 < listValues.length) { listText = (listValues[v1].split('::'))[0]; listVar = (listValues[v1].split('::'))[1]; var v3 = {'_x': 0, '_y': v1 * 20, 'elementNumber': v1, 'listElementText': listText, 'listElementVar': listVar}; slidingText.attachMovie('standardListElement', 'listElement' + v1, slidingText.getNextHighestDepth(), v3); slidingText['listElement' + v1].elementButton.onRelease = selectFunction; slidingText['listElement' + v1].elementButton.onRollOver = overFunction; slidingText['listElement' + v1].elementButton.onRollOut = outFunction; slidingText['listElement' + v1].elementBack.gotoAndStop(v1 % 2 + 1); ++v1; } slidingTextHeight = slidingText._height - 110.5; if (slidingTextHeight < 0) { slidingTextHeight = 0; } slidingTextEnd = slidingTextStart + slidingTextHeight; } function highlightElement(elementNumber) { var v1 = 0; while (slidingText['listElement' + v1] != undefined) { if (elementNumber != v1) { slidingText['listElement' + v1].elementHighlight.gotoAndStop('clear'); } else { slidingText['listElement' + v1].elementHighlight.gotoAndStop('highlighted'); } ++v1; } } slidingTextStart = slidingText._y; slidingText.setMask(slidingTextMask); } } movieClip 1676 { frame 1 { stop(); } } movieClip 1677 { frame 1 { function setNewSkill(blockNumber) { this.blockNumber = blockNumber; if (_parent.selectedEquipSkill == skillNumber) { _parent.selectedEquipSkill = undefined; } skillSelected.gotoAndStop('clear'); skillNumber = _root.userUnitLineup[_root.teamSlotSelected].unitSkills[blockNumber]; if (picture.picture != undefined) { picture.picture.removeMovieClip(); } picture.attachMovie('skillPicture' + skillNumber, 'picture', picture.getNextHighestDepth()); if (skillNumber != undefined) { ++_parent.equippedSkills; } skillButton.enabled = true; } skillButton.onRelease = function () { if (_parent.elementsEnabled != false) { _parent.selectedEquipSkill = skillNumber; _parent.selectedSkillBlock = blockNumber; skillSelected.gotoAndStop('selected'); this.enabled = false; var v3 = 0; while (_parent['unitSkill' + v3] != undefined) { if (v3 != blockNumber) { _parent['unitSkill' + v3].skillButton.enabled = true; _parent['unitSkill' + v3].skillSelected.gotoAndStop('clear'); } ++v3; } _parent.managementInfo.gotoAndStop('unitInfo'); } }; skillButton.onRollOver = function () { if (skillNumber != undefined && _parent.elementsEnabled != false) { _parent.managementInfo.skillInfoNumber = skillNumber; _parent.managementInfo.gotoAndStop('skillInfo'); } }; skillButton.onRollOut = function () { if (skillNumber != undefined) { _parent.managementInfo.gotoAndStop('unitInfo'); } }; } } movieClip 1699 { frame 1 { plusButton.onRelease = function () { var v3 = 0; do { if (v3 != statNumber && _root.userUnitLineup[_root.teamSlotSelected][_parent.statTitle[v3]] - 1 >= 0 && _root.userUnitLineup[_root.teamSlotSelected][_parent.statTitle[statNumber]] + 1 <= 100) { --_root.userUnitLineup[_root.teamSlotSelected][_parent.statTitle[v3]]; ++_root.userUnitLineup[_root.teamSlotSelected][_parent.statTitle[statNumber]]; } } while (++v3 < 5); _parent.updateAllPriorities(); }; minusButton.onRelease = function () { var v3 = 0; do { if (v3 != statNumber && _root.userUnitLineup[_root.teamSlotSelected][_parent.statTitle[v3]] + 1 <= 100 && _root.userUnitLineup[_root.teamSlotSelected][_parent.statTitle[statNumber]] - 1 >= 0) { ++_root.userUnitLineup[_root.teamSlotSelected][_parent.statTitle[v3]]; --_root.userUnitLineup[_root.teamSlotSelected][_parent.statTitle[statNumber]]; } } while (++v3 < 5); _parent.updateAllPriorities(); }; } } movieClip 1704 { frame 1 { function updateStats() { statDisplay0.text = 'Health: ' + Math.round(_root.userUnitLineup[_root.teamSlotSelected].unitMaxHP); statDisplay1.text = 'Charge: ' + Math.round(_root.userUnitLineup[_root.teamSlotSelected].unitMaxCharge); statDisplay2.text = 'Attack: ' + Math.round(_root.userUnitLineup[_root.teamSlotSelected].unitAttackPower * 100) / 100; statDisplay3.text = 'Skills: ' + Math.round(_root.userUnitLineup[_root.teamSlotSelected].unitMagicPower * 100) / 100; statDisplay4.text = 'Speed: ' + Math.round(_root.userUnitLineup[_root.teamSlotSelected].unitSpeed * 100) / 100; expPoints.text = 'Experience Points: ' + Math.round(_root.userUnitLineup[_root.teamSlotSelected].unitEXP); } function updateAllPriorities() { var v3 = 0; do { this['statPriority' + v3].priorityText.text = Math.round(_root.userUnitLineup[_root.teamSlotSelected][statTitle[v3]]) + '%'; } while (++v3 < 6); } if (_root.userSettings.tutorialObjective >= 0) { gotoAndStop('hideStats'); } else { var statTitle = ['unitMaxHPPriority', 'unitMaxChargePriority', 'unitAttackPowerPriority', 'unitMagicPowerPriority', 'unitSpeedPriority']; statInfo0.helpDialog = 'Health: The ability to sustain damage. Higher health means better survival.'; statInfo1.helpDialog = 'Charge: The ability to concentrate energy. Higher charge means more skill uses.'; statInfo2.helpDialog = 'Attack: The damaging power of physical attacks.'; statInfo3.helpDialog = 'Skills: The power of the damaging or healing effect of all skills.'; statInfo4.helpDialog = 'Speed: The movement speed of the unit. Fast units are more efficient and evasive.'; var i = 0; while (i < 5) { this['statPriority' + i].statNumber = i; ++i; } var i = 0; do { this['statInfo' + i].buttonHit.onRollOver = function () { _root.helpDialog.newHelpMessage('smallDialog', 0, this._parent.helpDialog); }; this['statInfo' + i].buttonHit.onRollOut = function () { _root.helpDialog.clearHelpMessage(); }; } while (++i < 5); updateStats(); stop(); } updateAllPriorities(); } } movieClip 1715 { frame 1 { skillNumber = Number((_parent._parent.selectedLearnSkill.split(':'))[0]); if (_root.userUnitLineup[_root.teamSlotSelected].unitMaxCharge < _root.skillStats[skillNumber].charge) { gotoAndStop('noCharge'); } var percentChance = (_parent._parent.selectedLearnSkill.split(':'))[2]; if (_root.skillStats[skillNumber].preReq != undefined) { if ((_parent._parent.selectedLearnSkill.split(':'))[1] == 0) { var prerequisiteString = 'The chance of success is greatly increased if ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' knows "<font color=\'#FFFFCC\'>' + _root.skillStats[_root.skillStats[skillNumber].preReq].name + '</font>". ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' knows this skill.<br /><br />'; } else { var prerequisiteString = 'The chance of success is greatly increased if ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' knows "<font color=\'#FFFFCC\'>' + _root.skillStats[_root.skillStats[skillNumber].preReq].name + '</font>". ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' does NOT know this skill.<br /><br />'; } } else { var prerequisiteString = ''; } skillMessage.htmlText = 'Are you sure that ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' should attempt to learn "<font color=\'#FFFFCC\'>' + _root.skillStats[skillNumber].name + '</font>", sir? If ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' is not experienced enough to learn the skill successfully, there could be disastrous results.<br /><br />' + prerequisiteString + 'Chance of success: <font size=\'16\'>' + percentChance + '%</font>'; trainButton.buttonText = '<U>Train Unit</U>'; cancelButton.buttonText = '<U>Cancel</U>'; trainButton.onRelease = function () { var v1 = Math.round(Math.random() * 100); if (percentChance >= v1) { skillLearnt = true; } else { skillLearnt = false; } gotoAndPlay('trainingSkill'); }; cancelButton.onRelease = function () { _parent.gotoAndPlay('learnSkillOut'); }; stop(); } frame 2 { trainingText.htmlText = 'Teaching ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' "<font color=\'#FFFFCC\'>' + _root.skillStats[skillNumber].name + '</font>"...'; unitPicture.attachMovie('unitBody' + _root.userUnitLineup[_root.teamSlotSelected].unitType, 'unitPicture', unitPicture.getNextHighestDepth()); unitPicture.unitPicture.gotoAndStop('powerUp'); unitPicture.nullAnimScript = true; } frame 45 { if (skillLearnt) { resultsMessage.htmlText = _root.userUnitLineup[_root.teamSlotSelected].unitName + ' has learnt "<font color=\'#FFFFCC\'>' + _root.skillStats[skillNumber].name + '</font>" successfully! You may now equip ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' with this skill.'; _root.userUnitLineup[_root.teamSlotSelected].unitSkillsKnown.unshift(skillNumber); } else { var randomPenalty = Math.round(Math.random() * (_root.skillStats[skillNumber].trainPenalty.length - 1)); var penaltyID = _root.skillStats[skillNumber].trainPenalty[randomPenalty]; switch (penaltyID) { case 0: var randomPenaltyMessage = Math.round(Math.random() * 2); if (randomPenaltyMessage == 0) { penaltyMessage = 'Fortunately, what little skill ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' has allowed him to emerge from training unharmed.'; } if (randomPenaltyMessage == 1) { penaltyMessage = 'Luckily, ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + '\'s mediocrity did not injure him in any way.'; } if (randomPenaltyMessage == 2) { penaltyMessage = 'The gods laugh at ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ', but allow him to go unharmed.'; } break; case 1: if (_root.userUnitLineup[_root.teamSlotSelected].unitDeity < 4) { _root.userUnitLineup[_root.teamSlotSelected].unitFavour -= 3; penaltyMessage = 'His disability to learn was frowned upon by ' + _root.deityStats[_root.userUnitLineup[_root.teamSlotSelected].unitDeity].deityName + '... ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' lost 3 favour with the gods!'; } else { penaltyMessage = 'Thankfully, ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + '\'s independence allowed him to come out of training unharmed.'; } break; case 2: if (_root.userUnitLineup[_root.teamSlotSelected].unitDeity < 4) { _root.userUnitLineup[_root.teamSlotSelected].unitFavour -= 5; penaltyMessage = 'His disability to learn has disgruntled ' + _root.deityStats[_root.userUnitLineup[_root.teamSlotSelected].unitDeity].deityName + '... ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' lost 5 favour with the gods!'; } else { penaltyMessage = 'Thankfully, ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + '\'s independence allowed him to come out of training unharmed.'; } break; case 3: if (_root.userUnitLineup[_root.teamSlotSelected].unitDeity < 4) { _root.userUnitLineup[_root.teamSlotSelected].unitFavour -= 7; penaltyMessage = 'His disability to learn has INFURIATED ' + _root.deityStats[_root.userUnitLineup[_root.teamSlotSelected].unitDeity].deityName + '! ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' lost 7 favour with the gods!'; } else { penaltyMessage = 'Thankfully, ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + '\'s independence allowed him to come out of training unharmed.'; } break; case 4: _root.userUnitLineup[_root.teamSlotSelected].unitMaxHP -= 2; penaltyMessage = 'His foolishness caused him a minor injury, permanently lowering his maximum health by 2.'; break; case 5: _root.userUnitLineup[_root.teamSlotSelected].unitMaxCharge -= 2; penaltyMessage = 'The training severely traumatized ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ', permanently lowering his skill charge by 2.'; break; case 6: _root.userUnitLineup[_root.teamSlotSelected].unitAttackPower -= 0.05; penaltyMessage = 'His weapon arm was also slightly hurt during the process, permanently lowering his attack power by 0.05.'; break; case 7: _root.userUnitLineup[_root.teamSlotSelected].unitMagicPower -= 0.05; penaltyMessage = 'Both the mind and memory of ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' were damaged as he trained, permanently lowering his skill power by 0.05.'; break; case 8: _root.userUnitLineup[_root.teamSlotSelected].unitSpeed -= 0.05; penaltyMessage = 'On another page of bad luck, ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' also injured his legs, permanently lowering his speed by 0.02.'; break; case 9: _root.userUnitLineup[_root.teamSlotSelected].beginStatusEffects.push('1:240:1'); penaltyMessage = 'The process, unfortunately, involved the use of dangerous substances. ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' will be poisoned as he enters his next battle.'; break; case 10: _root.userUnitLineup[_root.teamSlotSelected].beginStatusEffects.push('2:200:1'); penaltyMessage = 'He was unable to withstand the great temperatures that the training exposed him to. ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' will be burnt as he enters his next battle.'; break; case 11: _root.userUnitLineup[_root.teamSlotSelected].beginStatusEffects.push('5:300:200'); penaltyMessage = 'The tiring lessons have almost driven him mad. ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' will be disoriented as he enters his next battle.'; break; case 12: _root.userUnitLineup[_root.teamSlotSelected].beginStatusEffects.push('3:300:0.55'); penaltyMessage = 'The frigid cold of training has made him stiff and slow. ' + _root.userUnitLineup[_root.teamSlotSelected].unitName + ' will be frozen as he enters his next battle.'; } if (_root.userUnitLineup[_root.teamSlotSelected].unitFavour < 0) { _root.userUnitLineup[_root.teamSlotSelected].unitFavour = 0; } resultsMessage.htmlText = _root.userUnitLineup[_root.teamSlotSelected].unitName + ' was unable to learn "<font color=\'#FFFFCC\'>' + _root.skillStats[skillNumber].name + '</font>"! ' + penaltyMessage; } --_root.userUnitLineup[_root.teamSlotSelected].unitTrainingPoints; _parent._parent.setUnitManagement(); _root.saveUserSettings(); closeBut.buttonText = '<U>Close</U>'; closeBut.buttonHit.onRelease = function () { _parent.gotoAndPlay('learnSkillOut'); }; } frame 60 { stop(); } frame 61 { resultsMessage.htmlText = _root.userUnitLineup[_root.teamSlotSelected].unitName + ' does not have the necessary charge power to use "<font color=\'#FFFFCC\'>' + _root.skillStats[skillNumber].name + '</font>"! A few level increases might be required, sir.'; closeBut.buttonText = '<U>Close</U>'; closeBut.buttonHit.onRelease = function () { _parent.gotoAndPlay('learnSkillOut'); }; } } movieClip 1716 { frame 1 { stop(); } frame 2 { _parent.elementsEnabled = false; learnSkill.setMask(parchmentMask); } frame 16 { stop(); } frame 30 { _parent.elementsEnabled = true; gotoAndStop('clear'); } } movieClip 1717 { frame 2 { function splitAndOrder(a, b) { var v4 = Number(((a.split('::'))[1].split(':'))[2]); var v3 = Number(((b.split('::'))[1].split(':'))[2]); if (v4 > v3) { return -1; } else { if (v4 < v3) { return 1; } else { var v2 = a.substr(25); var v1 = b.substr(25); if (v2 < v1) { return -1; } else { if (v2 > v1) { return 1; } else { return 0; } } } } } function setUnitManagement() { selectedLearnSkill = -1; selectedKnownSkill = -1; selectedEquipSkill = -1; selectedSkillBlock = -1; knownSkills = 0; equippedSkills = 0; statsDisp.updateStats(); var v7 = new Array(); var v6 = 0; var v5 = 1; while (v5 < _root.skillStats.length) { if (_root.skillStats[v5].compatibility.Contains(_root.userUnitLineup[_root.teamSlotSelected].unitType) >= 0 && _root.userUnitLineup[_root.teamSlotSelected].unitSkillsKnown.Contains(v5) < 0 && (_root.skillStats[v5].deityRestrict == undefined || _root.skillStats[v5].deityRestrict.Contains(_root.userUnitLineup[_root.teamSlotSelected].unitDeity) < 0)) { if (_root.skillStats[v5].preReq != undefined) { if (_root.userUnitLineup[_root.teamSlotSelected].unitSkillsKnown.Contains(_root.skillStats[v5].preReq) >= 0) { preReqKnown = 0; } else { preReqKnown = -1; } var v3 = Math.round((Math.max(_root.userUnitLineup[_root.teamSlotSelected].unitEXP - _root.skillStats[v5].learnRequirement, 0) / _root.skillStats[v5].learnRequirement * 1.05) * 100 + _root.skillStats[v5].preReqWeight * preReqKnown); } else { var v3 = Math.round((Math.max(_root.userUnitLineup[_root.teamSlotSelected].unitEXP - _root.skillStats[v5].learnRequirement, 0) / _root.skillStats[v5].learnRequirement * 1.05) * 100); } if (v3 < 0) { v3 = 0; } else { if (v3 > 100) { v3 = 100; } } var v4 = '<font color="#777777"><b>'; if (_root.userUnitLineup[_root.teamSlotSelected].unitMaxCharge < _root.skillStats[v5].charge) { v4 = '<font color="#777777"><b>'; } else { if (v3 >= 75) { v4 = '<font color="#FFFFFF"><b>'; } else { if (v3 >= 50) { v4 = '<font color="#999999"><b>'; } else { if (v3 >= 25) { v4 = '<font color="#888888"><b>'; } } } } v7[v6] = v4 + _root.skillStats[v5].name + '</b></font>::' + v5 + ':' + preReqKnown + ':' + v3; ++v6; } ++v5; } v7.sort(splitAndOrder); var v8 = function () { if (elementsEnabled != false) { this._parent._parent._parent.highlightElement(this._parent.elementNumber); selectedLearnSkill = this._parent.listElementVar; _root.helpDialog.clearHelpMessage(); } }; var v9 = function () { if (elementsEnabled != false) { managementInfo.skillInfoNumber = (this._parent.listElementVar.split(':'))[0]; managementInfo.gotoAndStop('skillInfo'); _root.helpDialog.newHelpMessage('noBack', 'none', (this._parent.listElementVar.split(':'))[2] + '% Chance of Learning'); } }; var v10 = function () { managementInfo.gotoAndStop('unitInfo'); _root.helpDialog.clearHelpMessage(); }; learnSkillsList.setNewList(v7, v8, v9, v10); trainingPoints.text = 'Training Points: ' + _root.userUnitLineup[_root.teamSlotSelected].unitTrainingPoints; v7 = new Array(); v6 = 0; v5 = 0; while (v5 < _root.userUnitLineup[_root.teamSlotSelected].unitSkillsKnown.length) { if (_root.userUnitLineup[_root.teamSlotSelected].unitSkills.Contains(_root.userUnitLineup[_root.teamSlotSelected].unitSkillsKnown[v5]) < 0) { v7[v6] = _root.skillStats[_root.userUnitLineup[_root.teamSlotSelected].unitSkillsKnown[v5]].name + '::' + _root.userUnitLineup[_root.teamSlotSelected].unitSkillsKnown[v5]; ++v6; ++knownSkills; } ++v5; } v7.sort(); v8 = function () { if (elementsEnabled != false) { this._parent._parent._parent.highlightElement(this._parent.elementNumber); selectedKnownSkill = this._parent.listElementVar; } }; v9 = function () { if (elementsEnabled != false) { managementInfo.skillInfoNumber = (this._parent.listElementVar.split(':'))[0]; managementInfo.gotoAndStop('skillInfo'); } }; v10 = function () { managementInfo.gotoAndStop('unitInfo'); }; equipSkillsList.setNewList(v7, v8, v9, v10); v5 = 0; while (this['unitSkill' + v5] != undefined) { this['unitSkill' + v5].setNewSkill(v5); ++v5; } } var elementsEnabled = true; setUnitManagement(); equipSkill.onRelease = function () { if (selectedSkillBlock >= 0 && selectedKnownSkill >= 0) { if (elementsEnabled != false) { _root.userUnitLineup[_root.teamSlotSelected].unitSkills[selectedSkillBlock] = selectedKnownSkill; setUnitManagement(); } } else { managementInfo.gotoAndPlay('errorMessage'); managementInfo.errorMessage = 'Please select a skill block and a skill to equip.'; } }; equipSkill.onRollOver = function () { _root.helpDialog.newHelpMessage('noBack', 'none', 'Equip Selected Skill'); }; equipSkill.onRollOut = function () { _root.helpDialog.clearHelpMessage(); }; unequipSkill.onRelease = function () { if (selectedSkillBlock >= 0) { if (elementsEnabled != false) { delete _root.userUnitLineup[_root.teamSlotSelected].unitSkills[selectedSkillBlock]; setUnitManagement(); } } else { managementInfo.gotoAndPlay('errorMessage'); managementInfo.errorMessage = 'Please select a skill to unequip.'; } }; unequipSkill.onRollOver = function () { _root.helpDialog.newHelpMessage('noBack', 'none', 'Unequip Selected Skill'); }; unequipSkill.onRollOut = function () { _root.helpDialog.clearHelpMessage(); }; learnSkill.onRelease = function () { if (selectedLearnSkill >= 0 && _root.userUnitLineup[_root.teamSlotSelected].unitTrainingPoints > 0) { if (elementsEnabled != false) { learnSkillDialog.gotoAndPlay('learnSkillIn'); } } else { if (_root.userUnitLineup[_root.teamSlotSelected].unitTrainingPoints <= 0) { managementInfo.gotoAndPlay('errorMessage'); managementInfo.errorMessage = _root.userUnitLineup[_root.teamSlotSelected].unitName + ' does not have enough training points!'; } } }; learnSkill.onRollOver = function () { _root.helpDialog.newHelpMessage('noBack', 'none', 'Learn Selected Skill'); }; learnSkill.onRollOut = function () { _root.helpDialog.clearHelpMessage(); }; stop(); } } movieClip 1723 { frame 1 { stop(); } frame 2 { continueButton.buttonText = 'Continue'; continueButton.buttonHit.onRelease = function () { _parent.instructionsOn = false; _parent.advanceTutorialHelp(0); }; } } movieClip 1724 { frame 1 { function manageTeamMenu() { if (exitSymbol._alpha < 100 && _parent.skillsEquipped == true) { exitSymbol._alpha += 5; } else { if (exitSymbol._alpha > 0 && _parent.skillsEquipped != true) { exitSymbol._alpha -= 5; } } if (unitManagementMenu._alpha < 100 && bottomPanel.animDone == true) { unitManagementMenu._alpha += 5; } if (_root.userSettings.tutorialObjective >= 0) { if (_parent.unitsEdited.Contains(_root.teamSlotSelected) < 0) { _parent.unitsEdited.push(_root.teamSlotSelected); } if (unitManagementMenu.knownSkills == 0 && unitManagementMenu.equippedSkills >= 0 || unitManagementMenu.equippedSkills == 5) { _parent.skillsEquipped = true; unitManagementMenu.tutArrow1._alpha = 0; unitManagementMenu.tutArrow2._alpha = 0; unitManagementMenu.tutArrow3._alpha = 0; tutArrow4._alpha = 100; exitSymbol.exit.enabled = true; } else { unitManagementMenu.tutArrow2._x = 204.1; var v3 = 0; while (v3 < 5) { if (unitManagementMenu['unitSkill' + v3].skillNumber == undefined) { unitManagementMenu.tutArrow2._x = 60 * v3 + 204.1; break; } ++v3; } if (unitManagementMenu.selectedKnownSkill < 0) { unitManagementMenu.tutArrow1._alpha = 100; unitManagementMenu.tutArrow2._alpha = 0; } else { unitManagementMenu.tutArrow1._alpha = 0; if (unitManagementMenu.selectedSkillBlock < 0) { unitManagementMenu.tutArrow2._alpha = 100; } else { unitManagementMenu.tutArrow2._alpha = 0; } } if (unitManagementMenu.selectedSkillBlock >= 0 && unitManagementMenu.selectedKnownSkill > 0) { unitManagementMenu.tutArrow3._alpha = 100; } else { unitManagementMenu.tutArrow3._alpha = 0; } tutArrow4._alpha = 0; exitSymbol.exit.enabled = false; _parent.skillsEquipped = false; } } } if (_root.userSettings.tutorialObjective > 0) { if (_parent.unitsEdited.Contains(_root.teamSlotSelected) < 0) { _parent.unitsEdited.push(_root.teamSlotSelected); } if (unitManagementMenu.knownSkills - unitManagementMenu.equippedSkills > 0) { _parent.skillsEquipped = false; } } clearInterval(manageTeamMenuInterval); manageTeamMenuInterval = setInterval(this, 'manageTeamMenu', 40); exitSymbol.exit.onRelease = function () { _parent.fadeOutCurrentMenu = true; _parent.targetTeamMenu = 'manageTeam'; this.enabled = false; if (_root.userSettings.tutorialObjective <= 0) { _root.saveUserSettings(); } }; } } movieClip 1727 { frame 16 { _root.soundManager.sfx.spcLightning.start(); } frame 45 { stop(); } } movieClip 1741 { frame 1 { function updateDropDownSelect() { if (select[0] != undefined && droppedDown == true && buttonsOpen != true) { var i = 0; do { buttonHolder.attachMovie('dropDownSelectLarge', 'dropDownSelect' + i, buttonHolder.getNextHighestDepth(), {'idNumber': i, 'varNumber': varNumbers[i], 'selectText': select[i], '_y': 16 * i, '_alpha': 0}); (eval('buttonHolder.dropDownSelect' + i + '.button')).onRelease = selectFunction[i]; (eval('buttonHolder.dropDownSelect' + i + '.button')).onRollOver = overFunction[i]; (eval('buttonHolder.dropDownSelect' + i + '.button')).onRollOut = outFunction[i]; } while (++i < select.length); selectMask._height = 275 - testTopStart.y - selectMask._y; if (buttonHolder._height > selectMask._height) { bottomBar._y = selectMask._y + selectMask._height; } buttonsOpen = true; } else { if (droppedDown == false && buttonsOpen == true) { var i = select.length - 1; do { (eval('buttonHolder.dropDownSelect' + i)).removeMovieClip(); } while (--i >= 0); selectMask._height = 0.1; buttonsOpen = false; } } var i = 0; do { if (eval('buttonHolder.dropDownSelect' + i) != undefined && (eval('buttonHolder.dropDownSelect' + i))._alpha < 100) { (eval('buttonHolder.dropDownSelect' + i))._alpha += 10; } } while (++i < select.length); if (buttonHolder._height > selectMask._height && bottomBar._alpha < 100) { bottomBar._alpha += 10; } else { if (buttonHolder._height <= selectMask._height && bottomBar._alpha > 0) { bottomBar._alpha -= 10; if (bottomBar._alpha <= 0) { clearInterval(updateDropDown); } } } if (Key.isDown(1) && !hitTest(_root._xmouse, _root._ymouse, true)) { droppedDown = false; } if (!selectMask.hitTest(_root._xmouse, _root._ymouse, true) && buttonHolder._height > selectMask._height) { var testMousePosition = {'x': _root._xmouse, 'y': _root._ymouse}; globalToLocal(testMousePosition); if (testMousePosition.y < selectMask._y && buttonHolder._y < selectMask._y) { buttonHolder._y += 2; } else { if (testMousePosition.y > selectMask._y + selectMask._height && buttonHolder._y > selectMask._y - (buttonHolder._height - selectMask._height)) { buttonHolder._y -= 2; } } } } droppedDown = false; buttonsOpen = false; var testTopStart = {'x': 0, 'y': 0}; localToGlobal(testTopStart); buttonHolder.setMask(selectMask); dropButton.onRelease = function () { if (droppedDown != true) { droppedDown = true; clearInterval(this._parent.updateDropDown); this._parent.updateDropDown = setInterval(this._parent, 'updateDropDownSelect', 40); } else { if (droppedDown == true) { droppedDown = false; } } }; } } movieClip 1743 { frame 1 { selectedLocation = -1; _root.enduranceMode = 0; _root.enduranceDifficulty = -1; highScores.buttonText = 'View High Scores'; highScores.buttonHit.onRelease = function () { _parent._parent.fadeOutCurrentMenu = true; _parent._parent.targetTeamMenu = 'highScores'; this.enabled = false; }; beginBattle.buttonText = 'Begin Battle!'; beginBattle.buttonHit.onRelease = function () { if (seletedLocation >= 0 && _root.enduranceDifficulty >= 0) { if (_root.enduranceMode == 2) { var v3 = -2; _root.campaignStats.missionData[v3] = new Array(); _root.campaignStats.missionData[v3].victoryCond = new Array(); _root.campaignStats.missionData[v3].victoryCond[1] = true; var v4 = ['Practitioners', 'The Simple', 'Barbarians']; _root.campaignStats.missionData[v3].maxDeployed = 4; } else { var v3 = -1; _root.campaignStats.missionData[v3] = new Array(); _root.campaignStats.missionData[v3].victoryCond = new Array(); _root.campaignStats.missionData[v3].victoryCond[_root.enduranceMode + 2] = true; if (_root.enduranceMode == 0) { var v4 = ['Infinity Wave', 'Everlasting Armament', 'Eternity Entente']; } else { if (_root.enduranceMode == 1) { var v4 = ['Celeritas Typhoon', 'Swift Sanctimony', 'Instantantania']; } } } _root.campaignStats.missionData[v3].environmentNumber = selectedLocation; _root.campaignStats.missionData[v3].playerNumber = Math.round(Math.random() + 1); _root.campaignStats.missionData[v3].deployInterval = 144; _root.campaignStats.missionData[v3].maxDeployed = 4; _root.campaignStats.missionData[v3].enemyTeamName = v4[Math.round(Math.random() * (v4.length - 1))]; _root.campaignStats.missionData[v3].enemyTeamAI = 1; _root.campaignStats.missionData[v3].enemyTeamColours = [124, 5, 5]; _root.campaignStats.missionData[v3].enemyTeamUnits = new Array(); if (_root.enduranceMode != 2) { do { _root.campaignStats.missionData[v3].enemyTeamUnits.push(_root.survivalEnemies[_root.enduranceDifficulty][Math.round(Math.random() * (_root.survivalEnemies[_root.enduranceDifficulty].length - 1))]); } while (_root.campaignStats.missionData[v3].enemyTeamUnits.length < 8); _root.campaignStats.missionData[v3].enemyTeamAI = 2; } else { if (_root.enduranceMode == 2) { do { _root.campaignStats.missionData[v3].enemyTeamUnits.push(_root.survivalEnemies[_root.enduranceDifficulty][Math.round(Math.random() * (_root.survivalEnemies[_root.enduranceDifficulty].length - 1))]); } while (_root.campaignStats.missionData[v3].enemyTeamUnits.length < 12); _root.campaignStats.missionData[v3].enemyTeamAI = 1; } } _root.lastMenu = 'enduranceMenu'; _root.beginNewMission(v3); this.enabled = false; errorText.text = ''; } else { errorText.text = 'Please fill in all fields!'; } }; var campaignProgress = _root.userSettings.campaignProgress.split(':'); var locationInfo = new Array(); var i = 1; while (i < _root.campaignStats.locationData.length) { var i2 = 0; do { var missionNumber = _root.campaignStats.locationData[i].campaignMissions[i2]; var missionCampaign = parseInt((_root.campaignStats.missionData[missionNumber].missionAvailable.split(':'))[0]); if (campaignProgress[missionCampaign] >= Number((_root.campaignStats.missionData[missionNumber].missionAvailable.split(':'))[1]) && campaignProgress[missionCampaign] != undefined) { locationInfo.push(_root.campaignStats.locationData[i].locationInfo + '::' + i); break; } } while (++i2 < _root.campaignStats.locationData[i].campaignMissions.length); ++i; } locationInfo.sort(); locationDropDown.topMessage = 'Select One...'; locationDropDown.select = new Array(); locationDropDown.selectFunction = new Array(); locationDropDown.overFunction = new Array(); locationDropDown.outFunction = new Array(); locationDropDown.varNumbers = new Array(); var i = 0; do { locationDropDown.select[i] = (locationInfo[i].split('::'))[0]; locationDropDown.selectHelpMessages[i] = (locationInfo[i].split('::'))[1]; locationDropDown.selectFunction[i] = function () { locationDropDown.topMessage = this._parent.selectText; locationDropDown.droppedDown = false; selectedLocation = this._parent.varNumber; locationTitle = (locationInfo[this._parent.idNumber].split('::'))[0]; locationText = (locationInfo[this._parent.idNumber].split('::'))[1]; if (locationText.length >= 163) { locationText = locationText.slice(0, 160) + '...'; } picture.picture.removeMovieClip(); picture.attachMovie('locationPicture' + selectedLocation, 'picture', picture.getNextHighestDepth()); }; locationDropDown.overFunction[i] = function () { locationTitle = (locationInfo[this._parent.idNumber].split('::'))[0]; locationText = (locationInfo[this._parent.idNumber].split('::'))[1]; if (locationText.length >= 163) { locationText = locationText.slice(0, 160) + '...'; } picture.picture.removeMovieClip(); picture.attachMovie('locationPicture' + this._parent.varNumber, 'picture', picture.getNextHighestDepth()); }; locationDropDown.outFunction[i] = function () { if (selectedLocation > 0) { locationTitle = (_root.campaignStats.locationData[selectedLocation].locationInfo.split('::'))[0]; locationText = (_root.campaignStats.locationData[selectedLocation].locationInfo.split('::'))[1]; if (locationText.length >= 163) { locationText = locationText.slice(0, 160) + '...'; } picture.picture.removeMovieClip(); picture.attachMovie('locationPicture' + selectedLocation, 'picture', picture.getNextHighestDepth()); } else { locationTitle = 'Location Information:'; locationText = 'Please select a location!'; picture.picture.removeMovieClip(); } }; locationDropDown.varNumbers.push((locationInfo[i].split('::'))[2]); } while (++i < locationInfo.length); difficultyDrop.topMessage = 'Select One...'; difficultyDrop.select = new Array(); difficultyDrop.select[0] = 'Normal'; difficultyDrop.select[1] = 'Hard'; difficultyDrop.select[2] = 'Deadly'; difficultyDrop.selectHelpMessages = new Array(); difficultyDrop.selectFunction = new Array(); difficultyDrop.overFunction = new Array(); difficultyDrop.outFunction = new Array(); var i = 0; do { difficultyDrop.selectFunction[i] = function () { difficultyDrop.topMessage = this._parent.selectText; difficultyDrop.droppedDown = false; _root.enduranceDifficulty = this._parent.idNumber; _root.helpDialog.clearHelpMessage(); }; difficultyDrop.overFunction[i] = function () { if (this._parent.idNumber == 0) { _root.helpDialog.newHelpMessage('noBack', 0, 'Score x 1'); } else { if (this._parent.idNumber == 1) { _root.helpDialog.newHelpMessage('noBack', 0, 'Score x 1.5'); } else { if (this._parent.idNumber == 2) { _root.helpDialog.newHelpMessage('noBack', 0, 'Score x 2'); } } } }; difficultyDrop.outFunction[i] = function () { _root.helpDialog.clearHelpMessage(); }; } while (++i < 3); battleTypes = new Array(); battleTypes[0] = 'Survival::Do as much damage as possible before your team is defeated! (No experience, training points or judgement.)'; battleTypes[1] = 'Time Attack::Your units each have 2 lives! Kill to keep your timer from running out! (No experience, training points or judgement.)'; battleTypes[2] = 'Practice::Out of campaign missions? Practice for experience and training points! (No high scores. Judgement will occur!)'; typeDrop.topMessage = 'Survival'; typeDrop.select = new Array(); typeDrop.select[0] = 'Survival'; typeDrop.select[1] = 'Time Attack'; if (_root.userSettings.deitiesUnlocked == 5) { typeDrop.select[2] = 'Practice'; } typeDrop.selectFunction = new Array(); typeDrop.overFunction = new Array(); typeDrop.outFunction = new Array(); var i = 0; do { typeDrop.selectFunction[i] = function () { typeDrop.topMessage = this._parent.selectText; typeDrop.droppedDown = false; _root.enduranceMode = this._parent.idNumber; typeTitle = (battleTypes[_root.enduranceMode].split('::'))[0]; typeText = (battleTypes[_root.enduranceMode].split('::'))[1]; }; typeDrop.overFunction[i] = function () { typeTitle = (battleTypes[this._parent.idNumber].split('::'))[0]; typeText = (battleTypes[this._parent.idNumber].split('::'))[1]; }; typeDrop.outFunction[i] = function () { typeTitle = (battleTypes[_root.enduranceMode].split('::'))[0]; typeText = (battleTypes[_root.enduranceMode].split('::'))[1]; }; } while (++i < 3 && _root.userSettings.deitiesUnlocked == 5 || i < 2); stop(); } } movieClip 1744 { frame 1 { function fadeObjects() { if (objects._alpha < 100 && back1.animDone && back2.animDone) { objects._alpha += 5; } else { if (objects._alpha > 100) { clearInterval(fadeObjectsInterval); } } if (exitSymbol._alpha < 100) { exitSymbol._alpha += 2; } } clearInterval(fadeObjectsInterval); fadeObjectsInterval = setInterval(this, 'fadeObjects', 40); exitSymbol.exit.onRelease = function () { _root.lastMenu = 'enduranceMenu'; _parent.fadeOutCurrentMenu = true; _parent.targetTeamMenu = 'exitTeamMenu'; this.enabled = false; }; } } movieClip 1748 { } movieClip 1778 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 1780 { frame 1 { function getScores() { i = 1; while (i < 11) { (eval('_name' + i + '_')).text = 'Loading...'; (eval('_score' + i + '_')).text = '...Loading'; ++i; } __top10_send__ = new LoadVars(); __top10_receive__ = new LoadVars(); __top10_url_1__ = _root.anonymous(heroicEvil); __top10_url_2__ = '/top10_b'; if (_root.enduranceMode == 0 || _root.enduranceMode == 2) { scoresTitle.text = 'Survival\nHigh Scores'; __top10_send__.hid = 1032; __top10_send__.kid = _root.anonymous(surStats); personalScore.text = 'Your high score:\n' + _root.userSettings.survivalHS; } else { if (_root.enduranceMode == 1) { scoresTitle.text = 'Time Attack\nHigh Scores'; __top10_send__.hid = 1033; __top10_send__.kid = _root.anonymous(timeStats); personalScore.text = 'Your high score:\n' + _root.userSettings.timeAttackHS; } } __top10_send__.sendAndLoad(__top10_url_1__ + __top10_url_2__, __top10_receive__, 'POST'); __top10_receive__.onLoad = function (success) { if (success) { i = 1; while (i < 11) { (eval('_name' + i + '_')).text = __top10_receive__['name' + i]; (eval('_score' + i + '_')).text = __top10_receive__['score' + i]; ++i; } } else { __err__.gotoAndStop(2); } }; } survival.buttonText = 'Survival'; survival.buttonHit.onRelease = function () { _root.enduranceMode = 0; getScores(); }; timeAttack.buttonText = 'Time Attack'; timeAttack.buttonHit.onRelease = function () { _root.enduranceMode = 1; getScores(); }; exitSymbol.exit.onRelease = function () { _parent.fadeOutCurrentMenu = true; _parent.targetTeamMenu = 'endurance'; this.enabled = false; }; surStats = new Array('O', '3', 'W', '4', 'K', '0', 'N', '2', 'J', '0', 'X', '0'); timeStats = new Array('X', '5', 'A', '3', 'B', '2', 'B', '1', 'L', '0', 'U', '0'); heroicEvil = new Array('t', '18', ':', '4', 'w', '6', 'p', '3', '/', '3', 'm', '27', 'r', '8', 't', '1', 'l', '18', 'w', '3', 'm', '22', 'h', '0', 'o', '20', 'b', '8', 'o', '6', 'h', '16', 't', '0', 'a', '3', 'f', '11', 'o', '8', 'r', '4', 's', '10', '.', '2', 'c', '5', 'm', '5', 'a', '6', '/', '0', 'm', '1', 'c', '4', '.', '2', 'o', '1', 'w', '0', '/', '0'); getScores(); stop(); } } movieClip 1781 { frame 25 { exitSymbol.exit.onRelease = function () { _parent.fadeOutCurrentMenu = true; _parent.targetTeamMenu = 'endurance'; this.enabled = false; }; stop(); } } movieClip 1782 { frame 1 { function manageMenus() { if (fadeOutCurrentMenu == true && currentMenu._alpha > 0) { currentMenu._alpha -= 5; } if (currentMenu._alpha <= 0 && fadeOutCurrentMenu == true) { fadeOutCurrentMenu = false; if (targetTeamMenu == 'exitTeamMenu') { gotoAndPlay(targetTeamMenu); } else { gotoAndStop(targetTeamMenu); } _root.helpDialog.clearHelpMessage(); } } clearInterval(manageMenusInterval); manageMenusInterval = setInterval(this, 'manageMenus', 40); if (_root.bgMusicSet == 'mainMusic') { _root.soundManager.musicSet('mainMusic', 1.5, 0.95); } if (_root.lastMenu == 'campaignMenu') { gotoAndPlay('instantMenu'); if (_root.bgMusicSet == 'campaignMusic') { _root.soundManager.musicSet('campaignMusic', 1.5, 0.7); } if (_root.bgMusicSet == 'campaignMusic2') { _root.soundManager.musicSet('campaignMusic2', 1.5, 0.7); } } else { if (_root.lastMenu == 'mainMenu' || _root.targetTeamMenu == 'highScores') { _root.soundManager.musicSet('mainMusic', 1.5, 0.95); } else { if (_root.lastMenu == 'gameResults' || _root.lastMenu == 'instructionsMenu') { _root.soundManager.musicSet('campaignMusic', 1.5, 0.7); } } } } frame 73 { skillsEquipped = true; tutorialComplete = true; if (_root.userSettings.tutorialObjective >= 0) { unitsEdited = new Array(); teamColourChanged = false; tutorialComplete = false; } if (_root.targetTeamMenu != '' && _root.targetTeamMenu != undefined) { gotoAndStop(_root.targetTeamMenu); _root.targetTeamMenu = ''; } else { gotoAndStop('setupTeam'); } } frame 75 { menuTitle.menuTitle.menuTitle.text = 'Team Management'; } frame 76 { menuTitle.menuTitle.menuTitle.text = 'Unit Lineup'; } frame 77 { menuTitle.menuTitle.menuTitle.text = _root.userUnitLineup[_root.teamSlotSelected].unitName; } frame 78 { menuTitle.menuTitle.menuTitle.text = 'Field Battle'; } frame 79 { menuTitle.menuTitle.menuTitle.text = 'High Scores'; } frame 105 { if (_root.lastMenu == 'campaignMenu' || _root.lastMenu == 'gameResults') { _root.fadeTransition.targetFrame = 'campaignMenu'; } else { if (_root.userSettings.tutorialObjective > 0) { _root.fadeTransition.targetFrame = 'instructions'; } else { _root.fadeTransition.targetFrame = 'mainMenuReload'; } } _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFade'); _root.lastMenu = 'subControls'; this.stop(); } } frame 6 { stop(); } movieClip 1787 { frame 1 { gotoAndStop('map' + _root.userSettings.lastCampaignMap); } } movieClip 1794 { frame 1 { function gotoButton(buttonType) { gotoAndStop(buttonType); button.onRollOver = function () { _root.helpDialog.newHelpMessage('noBack', 0, (_root.campaignStats.locationData[locationNumber].locationInfo.split('::'))[0]); }; button.onRollOut = function () { _root.helpDialog.clearHelpMessage(); }; button.onRelease = function () { if (_root.campaignInterfacePath.interfaceOpen != true) { _root.campaignInterfacePath.availableMissions = availableMissions; _root.campaignInterfacePath.selectedLocation = locationNumber; _root.campaignInterfacePath.gotoAndPlay('interfaceIn'); _root.helpDialog.clearHelpMessage(); } }; } } frame 2 { if (_parent.locationsLoaded == false) { _parent.loadLocations(); } stop(); } } movieClip 1797 { } movieClip 1799 { frame 1 { stop(); } frame 2 { stop(); ship.onRelease = function () { gotoAndPlay('map' + _root.userSettings.lastCampaignMap); }; } frame 26 { stop(); _root.userSettings.lastCampaignMap = 2; _root.saveUserSettings(); _root.helpDialog.clearHelpMessage(); _root.fadeTransition.targetFrame = 'mapLoad'; _root.fadeTransition.targetObject = '_root.subMenu'; _root.fadeTransition.gotoAndPlay('beginFade'); } frame 55 { stop(); _root.userSettings.lastCampaignMap = 1; _root.saveUserSettings(); _root.helpDialog.clearHelpMessage(); _root.fadeTransition.targetFrame = 'mapLoad'; _root.fadeTransition.targetObject = '_root.subMenu'; _root.fadeTransition.gotoAndPlay('beginFade'); } } movieClip 1800 { frame 1 { function loadLocations() { var campaignProgress = _root.userSettings.campaignProgress.split(':'); var i = 1; do { var i2 = 0; do { var missionNumber = _root.campaignStats.locationData[i].campaignMissions[i2]; var missionCampaign = parseInt((_root.campaignStats.missionData[missionNumber].missionAvailable.split(':'))[0]); if (campaignProgress[missionCampaign] >= Number((_root.campaignStats.missionData[missionNumber].missionAvailable.split(':'))[1]) && campaignProgress[missionCampaign] != undefined) { (eval('location' + i)).locationNumber = i; (eval('location' + i)).availableMissions = new Array(); if (campaignProgress[missionCampaign] <= Number((_root.campaignStats.missionData[missionNumber].missionAvailable.split(':'))[2])) { (eval('location' + i)).gotoButton('redButton'); (eval('location' + i)).availableMissions.push(missionNumber); } else { if ((eval('location' + i))._currentframe == 1 || (eval('location' + i))._currentframe == 2) { (eval('location' + i)).gotoButton('blueButton'); } } } } while (++i2 < _root.campaignStats.locationData[i].campaignMissions.length); } while (++i < _root.campaignStats.locationData.length); if ((_root.userSettings.campaignProgress.split(':'))[0] >= 11) { mapShip.gotoAndStop('ship'); } } var locationsLoaded = false; gotoAndStop('map' + _root.userSettings.lastCampaignMap); } } movieClip 1803 { } movieClip 1806 { frame 1 { manageTeamButton.buttonText = 'Manage Team'; manageTeamButton.buttonHit.onRelease = function () { if (_parent.campaignInterface.closePossible != false) { _root.fadeTransition.targetFrame = 'subControls'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFade'); _root.saveUserSettings(); this.enabled = false; } }; exitButton.onRelease = function () { if (_parent.campaignInterface.closePossible != false) { if (_parent.campaignInterface.interfaceOpen == true) { _parent.campaignInterface.gotoAndPlay('interfaceOut'); } else { _root.fadeTransition.targetFrame = 'mainMenuReload'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFade'); _root.saveUserSettings(); this.enabled = false; } } }; if (_root.userUnitLineup.length < _root.userSettings.maxTeamSize) { warning.text = 'Your team could be bigger! Hire some new units first!'; } else { if ((_root.userSettings.campaignProgress.split(':'))[1] == '1' && (_root.userSettings.campaignProgress.split(':'))[2] != '3' && ((_root.userSettings.campaignProgress.split(':'))[2] == '1' && (_root.userSettings.campaignProgress.split(':'))[1] != '3')) { warning.text = 'If you can\'t beat one mission, try another!'; } else { warning.text = ''; } } } } movieClip 1816 { frame 1 { if (_parent.availableMissions.length > 0) { missionDropDown.topMessage = 'Select a Mission...'; } else { missionDropDown.topMessage = 'No Missions Available'; } missionDropDown.select = new Array(); missionDropDown.selectFunction = new Array(); missionDropDown.missionIDs = new Array(); var i = 0; do { if (_parent.availableMissions[i] != undefined) { missionDropDown.select.push((_root.campaignStats.missionData[_parent.availableMissions[i]].missionInfo.split(':'))[0]); missionDropDown.missionIDs[i] = _parent.availableMissions[i]; missionDropDown.selectFunction[i] = function () { missionDropDown.topMessage = this._parent.selectText; missionDropDown.droppedDown = false; _parent.selectedMission = this._parent._parent._parent.missionIDs[this._parent.idNumber]; }; } } while (++i < _parent.availableMissions.length); displayLine = (_root.campaignStats.locationData[_parent.selectedLocation].locationInfo.split('::'))[0]; displayParagraph = (_root.campaignStats.locationData[_parent.selectedLocation].locationInfo.split('::'))[1]; picture.attachMovie('locationPicture' + _parent.selectedLocation, 'picture', picture.getNextHighestDepth()); beginMission.buttonText = '<font size=\'13\'>Begin Mission'; beginMission.buttonHit.onRelease = function () { if (_parent.selectedMission >= 0) { _parent.gotoAndPlay('dialogIn'); this.enabled = false; } }; closeButton.onRelease = function () { if (_parent.closePossible != false) { _parent.gotoAndPlay('interfaceOut'); this.enabled = false; } }; _parent.selectedMission = -1; } } movieClip 1824 { } movieClip 1827 { frame 1 { doneUnveil = false; } frame 30 { doneUnveil = true; stop(); } } movieClip 1828 { frame 1 { function updateDialog(firstDialog) { if (Key.isDown(1) && paragraphMask.doneUnveil == true || firstDialog == true) { ++nextDialogText; if ((dialogText[nextDialogText].split('::'))[0] != undefined) { var v4 = (dialogText[nextDialogText].split('::'))[0]; var v5 = (dialogText[nextDialogText].split('::'))[2]; var v6 = (dialogText[nextDialogText].split('::'))[3]; if ((v4 == '!rnd' || v4 == '!newRnd') && _root.userUnitLineup.length > 1) { if (nameUnitNumber == undefined || v4 == '!newRnd') { lastNameUnitNumber = nameUnitNumber; do { nameUnitNumber = Math.round(Math.random() * (_root.userUnitLineup.length - 2)) + 1; } while (lastNameUnitNumber == nameUnitNumber && v4 == '!newRnd' && _root.userUnitLineup.length >= 3); } v4 = _root.userUnitLineup[nameUnitNumber].unitName; v5 = 'professionPicture' + _root.userUnitLineup[nameUnitNumber].unitType; } else { if ((v4 == '!rnd' || v4 == '!newRnd') && _root.userUnitLineup.length <= 1) { v4 = 'Soldier'; v5 = 'soldierPortrait'; } else { if (v4 == '!hero') { v4 = _root.userUnitLineup[0].unitName; v5 = 'professionPicture0'; } } } displayLine = v4; paragraph.displayText.text = (dialogText[nextDialogText].split('::'))[1]; portrait.picture.removeMovieClip(); portrait.attachMovie(v5, 'picture', picture.getNextHighestDepth()); if (lastPicture != v6) { this.picture['dialogPicture' + lastPictureNumber].gotoAndPlay('closePicture'); picture.attachMovie('dialogPictures', 'dialogPicture' + nextDialogText, picture.getNextHighestDepth(), {'dialogPicture': v6}); lastPicture = v6; lastPictureNumber = nextDialogText; } paragraphMask.gotoAndPlay(1); } else { if (missionStarted != true) { _root.beginNewMission(_parent.selectedMission); missionStarted = true; } } } } var dialogText = new Array(); dialogText = _root.campaignStats.missionData[_parent.selectedMission].missionDialog; var nextDialogText = -1; paragraph.setMask(paragraphMask); skipButton.buttonText = 'Skip Dialog'; skipButton.buttonHit.onRelease = function () { if (missionStarted != true) { _root.beginNewMission(_parent.selectedMission); missionStarted = true; } }; updateDialog(true); clearInterval(updateDialogInterval); updateDialogInterval = setInterval(this, 'updateDialog', 40, false); } } movieClip 1829 { frame 1 { function fadeObjects() { if (interfaceObjects._alpha < 100 && objectsOn == true) { interfaceObjects._alpha += 5; } else { if (interfaceObjects._alpha > 0 && objectsOn == false) { interfaceObjects._alpha -= 10; } } if (closePossible == false && _parent.campaignMenuOverlay._alpha > 0) { _parent.campaignMenuOverlay._alpha -= 10; if (_parent.campaignMenuOverlay.manageTeamButton.enabled == true) { _parent.campaignMenuOverlay.manageTeamButton.enabled = false; } if (_parent.campaignMenuOverlay.exitButton.enabled == true) { _parent.campaignMenuOverlay.exitButton.enabled = false; } } else { if (closePossible != false && _parent.campaignMenuOverlay._alpha < 100) { _parent.campaignMenuOverlay._alpha += 5; if (_parent.campaignMenuOverlay.manageTeamButton.enabled != true) { _parent.campaignMenuOverlay.manageTeamButton.enabled = true; } if (_parent.campaignMenuOverlay.exitButton.enabled != true) { _parent.campaignMenuOverlay.exitButton.enabled = true; } } } } _root.campaignInterfacePath = this; interfaceOpen = false; objectsOn = false; clearInterval(campaignInterfaceInterval); campaignInterfaceInterval = setInterval(this, 'fadeObjects', 50); var i = 0; do { _parent.mapButtons['location' + i].button.enabled = true; } while (++i < _root.campaignStats.locationData.length); _parent.mapButtons.mapShip.ship.enabled = true; stop(); } frame 2 { interfaceOpen = true; var i = 0; do { _parent.mapButtons['location' + i].button.enabled = false; } while (++i < _root.campaignStats.locationData.length); _parent.mapButtons.mapShip.ship.enabled = false; } frame 30 { objectsOn = true; _parent.fog.stop(); stop(); } frame 31 { objectsOn = false; closePossible = true; _parent.fog.play(); } frame 60 { gotoAndStop('clear'); } frame 61 { objectsOn = false; closePossible = false; } frame 118 { objectsOn = true; stop(); } } movieClip 1833 { } movieClip 1848 { frame 1 { function manageFlyingDots() { if (numFlyingDots < maxNumFlyingDots) { var v2 = new Object(); v2._x = Math.random() * 250 - 50; v2._y = Math.random() * -100 - 50; v2._xscale = Math.random() * 50 + 75; v2._yscale = v2._xscale; if (dotMoveMode == 1) { v2.dotSpeed = Math.random() * 8; } else { if (dotMoveMode == 0) { v2.dotSpeed = Math.random() * 4; } } v2.onEnterFrame = function () { if (dotMoveMode == 1) { testMoveX = this.dotSpeed * Math.abs(this._x / 10); if (testMoveX < 8) { testMoveX = 8; } testMoveY = this.dotSpeed * Math.abs(this._y - 100) / 5; if (testMoveY < 10) { testMoveY = 10; } } else { if (dotMoveMode == 0) { testMoveY = 2 * this.dotSpeed; testMoveX = testMoveY; } } this._x += testMoveX; this._y += testMoveY; if (this._y > 300 || this._x > 600) { --numFlyingDots; this.removeMovieClip(); } }; attachMovie('spcFlyingDot', 'flyingDot' + numFlyingDots, this.getNextHighestDepth(), v2); ++numFlyingDots; } } maxNumFlyingDots = 10; numFlyingDots = 0; clearInterval(manageFlyingDotsInterval); manageFlyingDotsInterval = setInterval(this, 'manageFlyingDots', 40); } } movieClip 1868 { } movieClip 1884 { frame 1 { if (_root.removeAG) { armorGames.enabled = false; armorGames.visible = false; } armorGames.onRelease = function () { if (_alpha > 50) { getURL('http://www.ArmorGames.com', '_blank'); } }; stop(); } } movieClip 1888 { } movieClip 1893 { frame 1 { stop(); } frame 2 { lineIn = true; } frame 21 { stop(); } frame 22 { lineIn = false; } } movieClip 1894 { frame 1 { function updateCredits() { if (line.lineIn) { if (cText._alpha < 100) { cText._alpha += 3; } else { if (cText._alpha > 100) { cText._alpha = 100; } } if (_parent.image._alpha < 100) { _parent.image._alpha += 3; } else { if (_parent.image._alpha > 100) { _parent.image._alpha = 100; } } } else { if (cText._alpha > 0) { cText._alpha -= 3; } if (_parent.image._alpha > 0) { _parent.image._alpha -= 3; } else { if (cText._alpha <= 0 && !updatingText) { lastCredUpdate = curCredInt; updatingText = true; } } } if (curCredInt > lastCredUpdate + 40 && updatingText) { if (credits[curCredText] != undefined) { cText.cCaption.htmlText = (credits[curCredText].split('::'))[0]; cText.cName.htmlText = (credits[curCredText].split('::'))[1]; if ((credits[curCredText].split('::'))[4] != undefined) { cText.cPart.htmlText = (credits[curCredText].split('::'))[4]; } else { cText.cPart.htmlText = ''; } credChangeInt = Number((credits[curCredText].split('::'))[2]); _parent.image.gotoAndStop('cred' + (credits[curCredText].split('::'))[3]); line.gotoAndPlay('lineIn'); ++curCredText; lastCredUpdate = curCredInt; updatingText = false; } else { _parent.play(); } } else { if (curCredInt > lastCredUpdate + credChangeInt && line.lineIn && !updatingText && !credPause) { line.gotoAndPlay('lineOut'); } } if (Key.isDown(32) && curCredInt > lastPause + 24 && line.lineIn && !updatingText) { if (!credPause) { credPause = true; _parent.image.credPause._alpha = 100; lastPause = curCredInt; } else { credPause = false; _parent.image.credPause._alpha = 0; lastPause = curCredInt; } } ++curCredInt; } var credits = ['<FONT SIZE="18">Programming, Concept, Graphics and Coordination</FONT>::<P><FONT COLOR="#B5C1E1" SIZE="28"><A HREF="http://www.nighttowers.com" TARGET="_blank"><U>F. Fernando ("Septenary")</U></A></FONT></P>::200::1', '<FONT SIZE="18">Unit Animations</FONT>::<P><FONT SIZE="24">Aaron Mogenson</FONT></P>::175::2', '<FONT SIZE="18">Background Music</FONT>::<P><FONT SIZE="24">"MaestroRage"</FONT></P>::175::3', '<FONT SIZE="18">Voice Acting</FONT>::<P><FONT SIZE="15">Ty Konzak ("Aramek")<BR />Stephen ("Shard-Spider") Lynch<BR /><A HREF="http://aerilandau.net/klaymen/" TARGET="_blank">John ("Klaymen") Eberle</A></FONT></P>::200::4::<FONT SIZE="15">Voice of Hero.....<BR />Voice of Soldier.....<BR />Voice of Alterand.....<BR />', '<FONT SIZE="18">Image Resources</FONT>::<P><FONT SIZE="15"><A HREF="http://cobweb-stock.deviantart.com/" TARGET="_blank"><U>"Cobweb-Stock"</U></A><BR /><A HREF="http://falln-stock.deviantart.com/" TARGET="_blank"><U>"Falln-Stock"</U></A><BR /><A HREF="http://punishedstock.deviantart.com/" TARGET="_blank"><U>"PunishedStock"</U></A><BR /><A HREF="http://justeline.deviantart.com/" TARGET="_blank"><U>"Justeline"</U></A></FONT></P>::160::5::<FONT SIZE="15">Images of Hero.....<BR />Images of Chancellus.....<BR />Images of Soldier.....<BR />Images of Alterand.....</FONT>', '<FONT SIZE="18">Image Resources</FONT>::<P><FONT SIZE="15"><A HREF="http://s-a-stocks.deviantart.com/" TARGET="_blank"><U>"S-A-Stocks"</U></A><BR /><A HREF="http://miss69-stock.deviantart.com/" TARGET="_blank"><U>"Miss69-Stock"</U></A><BR /><A HREF="http://anodyne-stock.deviantart.com/" TARGET="_blank"><U>"Anodyne-Stock"</U></A><BR /><A HREF="http://redheadstock.deviantart.com/" TARGET="_blank"><U>"RedHeadStock"</U></A></FONT></P>::140::6::<FONT SIZE="15">Images of Night Tower.....<BR />Sword and Shield Images.....<BR />Various Brushes.....<BR />Various Brushes.....</FONT>', '<FONT SIZE="18">Image Resources</FONT>::<P><FONT SIZE="15"><A HREF="http://d00bie.deviantart.com/" TARGET="_blank"><U>"D00bie"</U></A><BR /><A HREF="http://shadymedusa.deviantart.com/" TARGET="_blank"><U>"ShadyMedusa"</U></A><BR /><A HREF="http://www.sxc.hu/profile/bradimarte"><U>"Bradimarte"</U></A><BR /><A HREF="http://www.sxc.hu/photo/631590" TARGET="_blank"><U>"Bdopudja"</U></A><BR /><A HREF="http://www.sxc.hu/" TARGET="_blank"><U>www.Sxc.hu</U></A></FONT></P>::140::7::<FONT SIZE="15">Various Brushes.....<BR />Various Brushes.....<BR />Various Photographs.....<BR />Various Photographs.....<BR />Various Photographs Obtained.....</FONT>', '<FONT SIZE="18">Playtesting</FONT>::<P><FONT SIZE="18"><A HREF="http://www.final-fusion.net/" TARGET="_blank"><U>Tyler Nicholas</U></A></FONT><BR /><FONT SIZE="15"><A HREF="http://www.godlygamer.com/" TARGET="_blank"><U>Bryce Knoblauch</U></A></FONT></P>::150::8']; curCredText = 0; curCredInt = 0; credChangeInt = 0; lastCredUpdate = -20; updatingText = false; credPause = false; lastPause = 0; clearInterval(updateCreditsInt); updateCreditsInt = setInterval(this, 'updateCredits', 40); } } movieClip 1901 { frame 1 { continueButton.buttonText = '<U>Continue...</U>'; continueButton.buttonHit.onRelease = function () { _parent.play(); }; } } movieClip 1902 { frame 50 { function updateDialog() { var cinematicDialogUpdated = false; if (nextDialogCue > 0 && nextSoundCue == true) { var cinematicDialogCleared = false; if (cinematicStopped != true) { ++nextDialogText; var nameProcessing = (dialogText[nextDialogText].split('::'))[0]; var portraitProcessing = (dialogText[nextDialogText].split('::'))[2]; if (pictureProcessing != lastPicture) { (eval('picture.dialogPicture' + (nextDialogText - 1))).gotoAndPlay('pictureOut'); } if (nameProcessing == '!rnd' && _root.userUnitLineup.length > 1) { var nameUnitNumber = Math.round(Math.random() * (_root.userUnitLineup.length - 2)) + 1; nameProcessing = _root.userUnitLineup[nameUnitNumber].unitName; portraitProcessing = 'professionPicture' + _root.userUnitLineup[nameUnitNumber].unitType; } else { if (nameProcessing == '!rnd' && _root.userUnitLineup.length <= 1) { nameProcessing = 'Soldier'; portraitProcessing = 'soldierPortrait'; } else { if (nameProcessing == '!hero') { nameProcessing = _root.userUnitLineup[0].unitName; portraitProcessing = 'professionPicture0'; } else { if (nameProcessing == '!clear') { clearDialog(); cinematicDialogCleared = true; } else { if (nameProcessing == undefined) { nameProcessing = 'Soldier'; portraitProcessing = 'soldierPortrait'; } } } } } if (cinematicDialogCleared != true) { displayLine = nameProcessing; paragraph.displayText.text = (dialogText[nextDialogText].split('::'))[1]; portrait.picture.removeMovieClip(); portrait.attachMovie(portraitProcessing, 'picture', picture.getNextHighestDepth()); if ((dialogText[nextDialogText].split('::'))[3] != 'noSnd') { var cinematicDialog = new Sound(); cinematicDialog.attachSound((dialogText[nextDialogText].split('::'))[3]); cinematicDialog.onSoundComplete = function () { nextSoundCue = true; clearDialog(); updateDialog(); }; nextSoundCue = false; } else { nextSoundCue = true; } dialogObjects._visible = true; cinematicDialog.start(); paragraphMask.gotoAndPlay(1); } } --nextDialogCue; if (nextDialogCue <= 0 && cinematicStopped == true) { nextDialogCue = 0; cinematicStopped = false; play(); } cinematicDialogUpdated = true; } return cinematicDialogUpdated; } function clearDialog() { displayLine = ''; paragraph.displayText.text = ''; portrait.picture.removeMovieClip(); dialogObjects._visible = false; } function setDialogCue(stopCinematic) { ++nextDialogCue; if (stopCinematic == true) { stop(); cinematicStopped = true; } updateDialog(); } nextDialogText = -1; nextDialogCue = 0; nextSoundCue = true; cinematicStopped = false; dialogObjects._visible = false; paragraph.setMask(paragraphMask); skipCinematic.buttonText = 'Skip Cinematic'; skipCinematic.buttonHit.onRelease = function () { gotoAndPlay('cinematicSkipped'); cinematicDialog.stop(); }; gotoAndPlay(_root.nextGameCinematic); } frame 51 { _root.soundManager.musicSet('introCin', 2, 1.2); _root.soundManager.sfx.spcThunder.setVolume(40); var dialogText = ['!hero::Tulinaa...::hero::introCin1', '!hero::Xew...::hero::introCin2', '!hero::Resquar...::hero::introCin3', '!hero::Kasayel...::hero::introCin4', '!hero::Tell me, soldier, when did the gods first come to our peaceful land?::hero::introCin5', 'Soldier::That was far beyond my lifetime... I\'m afraid I don\'t know, sir.::soldierPortrait::introCin6', '!hero::When did these beings begin to destroy our world... begin to crumble our lives?::hero::introCin7', 'Soldier::Sir? I don\'t think that...::soldierPortrait::introCin8', '!hero::When did these gods bring us into their war, demanding sacrifices, choosing sides? Creating death?::hero::introCin9', 'Soldier::Sir! I do not believe we should speak thus... it is blasphemy!::soldierPortrait::introCin10', '!hero::Blasphemy? Ha! I say gods, and yet gods they are not... no, these are mere magicians, perched on the highest of thrones!::hero::introCin11', '!hero::Heh... no, no. We, the humans, shall be our own gods, soldier! We will be our own gods...::hero::introCin12']; } frame 125 { setDialogCue(false); } frame 171 { setDialogCue(false); } frame 210 { setDialogCue(false); } frame 253 { setDialogCue(false); } frame 320 { setDialogCue(true); } frame 350 { setDialogCue(false); } frame 500 { setDialogCue(false); } frame 505 { setDialogCue(true); } frame 540 { setDialogCue(false); } frame 645 { setDialogCue(false); } frame 710 { setDialogCue(true); } frame 711 { setDialogCue(false); } frame 836 { setDialogCue(false); } frame 887 { setDialogCue(true); } frame 888 { setDialogCue(false); } frame 1122 { _root.soundManager.sfx.spcThunder.start(); } frame 1127 { setDialogCue(false); } frame 1152 { _root.soundManager.sfx.spcLightning.start(); } frame 1247 { _root.soundManager.sfx.spcThunder.start(); } frame 1315 { setDialogCue(true); } frame 1316 { _root.soundManager.sfx.spcSacrifice.start(); } frame 1484 { flyingDots.dotMoveMode = 1; } frame 1515 { _root.soundManager.maxBGMusicVolume = 0; _root.soundManager.fadePower = 7.5; } frame 1648 { _root.soundManager.sfx.spcThunder.setVolume(100); _root.nextGameCinematic = ''; ++_root.userSettings.cinematicsWatched; _root.saveUserSettings(); if (_root.userSettings.tutorialObjective >= 0) { _root.fadeTransition.targetFrame = 'instructions'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFadeSlow'); stop(); } else { _parent.gotoAndPlay(2); } } frame 1687 { _root.chancellusEnd = false; _root.nextGameCinematic = ''; _root.soundManager.sfx.spcThunder.setVolume(100); if (_root.lastMenu == 'mainMenu') { _root.fadeTransition.targetFrame = 'mainMenuReload'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFade'); } else { ++_root.userSettings.cinematicsWatched; _root.saveUserSettings(); if (_root.userSettings.tutorialObjective >= 0) { _root.fadeTransition.targetFrame = 'instructions'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFadeSlow'); } else { _parent.gotoAndPlay(2); } } stop(); } frame 1689 { dialogObjects._visible = false; paragraph.setMask(paragraphMask); skipCinematic.buttonText = 'Skip Cinematic'; skipCinematic.buttonHit.onRelease = function () { gotoAndPlay('credits'); cinematicDialog.stop(); }; _root.soundManager.musicSet('campaignMusic2', 2, 0.3); var dialogText = ['Alterand::I told you that Kasayel has no tolerance.::alterandPortrait::endCin1', 'Alterand::His throne is grand, his wrath is endless. Why else would I side with him?::alterandPortrait::endCin2', 'Alterand::You will not survive.::alterandPortrait::endCin3', 'Alterand::...You did not survive.::alterandPortrait::endCin4', 'Alterand::But I have the knowledge. I have conquered death.::alterandPortrait::endCin5', 'Alterand::Learn the Tower\'s tactics, and perhaps we will fight again...::alterandPortrait::endCin6']; } frame 1769 { setDialogCue(false); } frame 1895 { setDialogCue(true); } frame 1896 { setDialogCue(false); } frame 2068 { setDialogCue(true); } frame 2069 { setDialogCue(false); } frame 2177 { setDialogCue(false); } frame 2310 { setDialogCue(false); } frame 2526 { setDialogCue(false); } frame 2685 { setDialogCue(true); } frame 2692 { _root.soundManager.maxBGMusicVolume = 0; _root.soundManager.fadePower = 0.5; } frame 3007 { _root.soundManager.musicSet('creditsMusic', 2, 1); if (_root.lastMenu == 'mainMenu') { skipCinematic.buttonText = 'Skip Credits'; skipCinematic.buttonHit.onRelease = function () { gotoAndPlay('cinematicSkipped'); cinematicDialog.stop(); }; } else { skipCinematic.buttonText = ''; skipCinematic._alpha = 0; skipCinematic.buttonHit.enabled = false; } _root.chancellusEnd = false; _root.nextGameCinematic = ''; } frame 3029 { stop(); } frame 3037 { if (_root.removeAG) { armorGames.enabled = false; armorGames.visible = false; } armorGames.onRelease = function () { getURL('http://www.ArmorGames.com', '_blank'); }; } frame 3050 { if (_root.lastMenu == 'mainMenu') { stop(); _root.nextGameCinematic = ''; _root.fadeTransition.targetFrame = 'mainMenuReload'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFade'); _root.disabledMainMenu = false; } } frame 3071 { stop(); } frame 3133 { _root.nextGameCinematic = ''; _root.fadeTransition.targetFrame = 'mainMenuReload'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFade'); _root.saveUserSettings(); _root.chancellusEnd = false; stop(); } } movieClip 1903 { frame 1 { if (_root.nextGameCinematic == 'credits') { gotoAndStop('gameCinematic'); _root.lastMenu = 'mainMenu'; } else { if (Number((_root.userSettings.campaignProgress.split(':'))[0]) == 1 && _root.userSettings.cinematicsWatched == 0 || _root.chancellusEnd) { gotoAndStop('gameCinematic'); _root.lastMenu = 'campaignMenu'; } else { if (_root.lastMenu == 'subControls' || _root.lastMenu == 'campaignMenu') { gotoAndStop('campaignMap'); } _root.lastMenu = 'campaignMenu'; } } } frame 5 { if (_root.bgMusicSet != 'campaignMusic' && _root.userSettings.lastCampaignMap == 1) { _root.soundManager.musicSet('campaignMusic', 3, 0.7); } else { if (_root.bgMusicSet != 'campaignMusic2' && _root.userSettings.lastCampaignMap == 2) { _root.soundManager.musicSet('campaignMusic2', 3, 0.7); } } } frame 74 { if (_root.bgMusicSet != 'campaignMusic' && _root.userSettings.lastCampaignMap == 1) { _root.soundManager.musicSet('campaignMusic', 3, 0.7); } else { if (_root.bgMusicSet != 'campaignMusic2' && _root.userSettings.lastCampaignMap == 2) { _root.soundManager.musicSet('campaignMusic2', 3, 0.7); } } stop(); } } frame 7 { stop(); } movieClip 1913 { frame 159 { buildTeam.buttonText = 'Build Team'; } frame 190 { buildTeam.buttonHit.onRelease = function () { _root.fadeTransition.targetFrame = 'subControls'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFade'); this.enabled = false; }; stop(); } } movieClip 1916 { frame 37 { beginBattle.buttonText = 'Begin Battle'; } frame 68 { beginBattle.buttonHit.onRelease = function () { _root.beginNewMission(0); this.enabled = false; }; stop(); } } movieClip 1919 { frame 37 { continueButton.buttonText = 'Continue...'; } frame 68 { continueButton.buttonHit.onRelease = function () { gotoAndPlay('continue'); this.enabled = false; }; stop(); } frame 95 { _parent.gotoAndStop('mainInstructions'); } } movieClip 1964 { frame 1 { function switchInstruction(targetFrame) { _alpha = 0; gotoAndStop(targetFrame); clearInterval(fadeInterval); fadeInterval = setInterval(this, 'fadeInstruction', 40); } function fadeInstruction() { if (_alpha < 100) { _alpha = _alpha + 3; } else { clearInterval(fadeInterval); } } stop(); } } movieClip 1965 { frame 1 { function scrollText() { var v2 = {'x': _root._xmouse, 'y': _root._ymouse}; globalToLocal(v2); if (v2.y > listMask._y + listMask._height && scrollingText._y - 3 > 32 - (scrollingText._height - listMask._height) - 12) { scrollingText._y -= 3; } else { if (v2.y < listMask._y && scrollingText._y + 3 < 32) { scrollingText._y += 3; } else { if (v2.y > listMask._y + listMask._height) { scrollingText._y = 32 - (scrollingText._height - listMask._height) - 12; } else { if (v2.y < listMask._y) { scrollingText._y = 32; } } } } } instructions = ['controls::Battle Controls Recap', 'save::Saving Your Game', 'trainingPoints::Training Points', 'damageNumbers::Damage Numbers', 'statPriority::Statistic Priority', 'favour::Favour', 'gods::The Difference Between Gods', 'skillSymbols::Skill Symbols and Numbers', 'statusEffects::Status Effects List']; var i = 0; while (i < instructions.length) { scrollingText.attachMovie('instructionButton', 'instruction' + i, scrollingText.getNextHighestDepth(), {'_y': i * 20, 'idText': (instructions[i].split('::'))[0], 'buttonText': (instructions[i].split('::'))[1]}); if (i % 2 == 1) { scrollingText['instruction' + i].nextFrame(); } ++i; } if (scrollingText._height > listMask._height) { listLong._alpha = 100; clearInterval(scrollTextInterval); scrollTextInterval = setInterval(this, 'scrollText', 40); } scrollingText.setMask(listMask); } } movieClip 1966 { frame 1 { if (_root.userSettings.tutorialObjective < 4) { arrow1._alpha = 0; } } frame 30 { exitButton.exit.onRelease = function () { _parent.gotoAndPlay('mainInstructionsOut'); if (_root.userSettings.tutorialObjective > 0) { _root.userSettings.tutorialObjective = -1; _root.saveUserSettings(); _root.fadeTransition.targetFrame = 'campaignMenu'; } else { _root.fadeTransition.targetFrame = 'mainMenuReload'; } }; stop(); } } movieClip 1967 { frame 1 { _root.lastMenu = 'instructionsMenu'; _root.soundManager.musicSet('mainMusic', 1.5, 0.95); } frame 74 { if (_root.userSettings.tutorialObjective == 0) { gotoAndStop('introText'); } else { if (_root.userSettings.tutorialObjective == 4) { gotoAndStop('preIntroBattle'); } else { if (_root.userSettings.tutorialObjective > 4) { gotoAndStop('postIntroBattle'); } else { gotoAndStop('mainInstructions'); } } } } frame 110 { _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFade'); _root.lastMenu = 'instructions'; this.stop(); } } frame 8 { stop(); } movieClip 1972 { } movieClip 1975 { } movieClip 1978 { frame 1 { this.onEnterFrame = function () { this.tacticalMoon._x -= 0.3; this.tacticalTower._x -= 0.8; }; } } movieClip 1981 { } movieClip 1982 { frame 1 { loadStatus = 'Preloading Stage Elements...'; loading.loadStatusText.text = loadStatus; if (_parent._framesloaded >= _parent._totalframes) { gotoAndPlay('initialize'); } } frame 2 { gotoAndPlay('loadStage'); } frame 3 { loadStatus = 'Initializing Stage...'; loading.loadStatusText.text = loadStatus; _parent.gotoAndStop('preloaded'); gotoAndPlay('loadElevation'); } frame 25 { loadStatus = 'Creating Elevation Values...'; loading.loadStatusText.text = loadStatus; _parent.groundHeights = new Array(); groundX = 0; groundY = 0; lastGroundTest = groundX; groundWidth = _parent.backgroundManager.background1.ground._width; elevationsLoaded = false; } frame 26 { testingGroundPoint = 1; groundPointsInterval = 20; groundX = lastGroundTest; groundPoint = new Array(); var testingGroundPoint = 0; while (++testingGroundPoint <= 2) { var groundY = 0; while (++groundY <= 300) { var testHeight = {'x': groundX, 'y': groundY}; localToGlobal(testHeight); if (_parent.backgroundManager.background1.ground.hitTest(testHeight.x, testHeight.y, true)) { groundPoint[testingGroundPoint] = testHeight.y; break; } } groundX += groundPointsInterval; } groundX = lastGroundTest; testingGroundPoint = 1; if (groundPoint[1] == undefined && groundPoint[2] != undefined) { groundPoint[1] = groundPoint[2]; } if (groundPoint[1] != undefined && groundPoint[2] == undefined) { groundPoint[2] = groundPoint[1]; } pointTestD = (groundPoint[2] - groundPoint[1]) / groundPointsInterval; while (groundX <= lastGroundTest + groundPointsInterval) { _parent.groundHeights[groundX] = groundPoint[1] + (groundX - lastGroundTest - 1) * pointTestD; ++groundX; } lastGroundTest = groundX; if (groundX >= groundWidth) { gotoAndPlay('loadFinalize'); } } frame 27 { gotoAndPlay('loadElevation2'); } frame 28 { _root.gameInterfacePath.overlay.gotoAndStop('battleOpener'); if (_root.gamePath.playerNumber == 1) { _root.gamePath.fieldScroll = 0; } else { if (_root.gamePath.playerNumber == 2) { _root.gamePath.fieldScroll = -_root.gamePath.fieldWidth + 1; } } } frame 80 { stop(); } } movieClip 1987 { frame 1 { stop(); } } movieClip 1999 { } movieClip 2048 { } movieClip 2068 { } movieClip 2073 { } movieClip 2078 { } movieClip 2080 { } movieClip 2082 { } movieClip 2084 { } movieClip 2086 { } movieClip 2089 { } movieClip 2091 { } movieClip 2096 { } movieClip 2099 { } movieClip 2102 { } movieClip 2104 { } movieClip 2106 { } movieClip 2110 { } movieClip 2111 { } movieClip 2112 { } movieClip 2114 { frame 1 { function deployNewUnit(partyNumber) { var v6 = -1; while (++v6 <= deployedUnits) { if (this['playerUnit' + v6].partyNumber == partyNumber && !_parent.victoryConditions[3]) { error = true; break; } else { if (this['playerUnit' + v6].partyNumber == partyNumber && _parent.victoryConditions[3]) { this['playerUnit' + v6].removeMovieClip(); break; } } } if (error != true) { deployUnit = new Object(); deployUnit.partyNumber = partyNumber; deployUnit.unitNumber = deployedUnits; deployUnit.unitAttackPower = _parent.unitLineups[playerNumber][partyNumber].unitAttackPower; deployUnit.unitName = _parent.unitLineups[playerNumber][partyNumber].unitName; deployUnit.unitType = _parent.unitLineups[playerNumber][partyNumber].unitType; deployUnit.unitLevel = _parent.unitLineups[playerNumber][partyNumber].unitLevel; deployUnit.unitDeity = _parent.unitLineups[playerNumber][partyNumber].unitDeity; deployUnit.unitEXP = _parent.unitLineups[playerNumber][partyNumber].unitEXP; deployUnit.unitFavour = _parent.unitLineups[playerNumber][partyNumber].unitFavour; deployUnit.unitMagicPower = _parent.unitLineups[playerNumber][partyNumber].unitMagicPower; deployUnit.unitMaxHP = _parent.unitLineups[playerNumber][partyNumber].unitMaxHP; deployUnit.unitSpeed = _parent.unitLineups[playerNumber][partyNumber].unitSpeed; if (_root.jobStats[deployUnit.unitType].mounted) { deployUnit.unitSpeed += 1; } deployUnit.unitMaxCharge = _parent.unitLineups[playerNumber][partyNumber].unitMaxCharge; deployUnit.spcChatStatus = _parent.unitLineups[playerNumber][partyNumber].spcChat; deployUnit.bodyAlpha = _parent.unitLineups[playerNumber][partyNumber].alpha; if (!deployUnit.bodyAlpha) { deployUnit.bodyAlpha = 100; } if (_parent.unitLineups[playerNumber][partyNumber].grVar) { deployUnit.grVar = _parent.unitLineups[playerNumber][partyNumber].grVar; } else { deployUnit.grVar = 1; } if (_parent.unitLineups[playerNumber][partyNumber].zombie) { deployUnit.zombie = _parent.unitLineups[playerNumber][partyNumber].beginStatusEffects[0]; } deployUnit.playerNumber = playerNumber; if (_parent.victoryConditions[3] && playerNumber == _parent.playerNumber) { _parent.unitLineups[playerNumber][partyNumber].beginStatusEffects.push('8:999999999:360'); } deployUnit.skills = new Array(); deployUnit.skillStatus = new Array(); deployUnit.skillRecharge = new Array(); deployUnit.skillsDefined = 0; v6 = -1; while (++v6 < 5) { if (_parent.unitLineups[this.playerNumber][partyNumber].unitSkills[v6] != undefined) { deployUnit.skills[v6] = _parent.unitLineups[this.playerNumber][partyNumber].unitSkills[v6]; deployUnit.skillStatus[v6] = 1; ++deployUnit.skillsDefined; } else { deployUnit.skillStatus[v6] = 4; } deployUnit.skillRecharge[v6] = 0; } deployUnit.attackEnabled = true; deployUnit.closeAtkAnim = false; deployUnit.currentAttackPower = deployUnit.unitAttackPower; deployUnit.currentFavour = deployUnit.unitFavour; deployUnit.currentHP = deployUnit.unitMaxHP; deployUnit.currentMagicPower = deployUnit.unitMagicPower; deployUnit.currentMaxHP = deployUnit.unitMaxHP; deployUnit.currentSpeed = deployUnit.unitSpeed; deployUnit.currentCharge = deployUnit.unitMaxCharge; deployUnit.currentMaxCharge = deployUnit.unitMaxCharge; deployUnit.currentChargeSpeed = deployUnit.unitMaxCharge * 0.015; deployUnit.aiFreezeSkill = -1; deployUnit.aiFreezeWalk = true; deployUnit.attackTime = false; deployUnit.deRe = false; deployUnit.actionMaxX = 0; deployUnit.baseUnitsOverlapping = 0; deployUnit.closeRangeAttack = false; deployUnit.debrisNumber = 0; deployUnit.enemiesTargetingUnit; deployUnit.framesAlive = 0; deployUnit.lastAbilityUse = 0; deployUnit.lastLowPriority = 0; deployUnit.lastMedPriority = 0; deployUnit.lastResquarFavour = 0; deployUnit.lastStatusEffectCheck = 0; deployUnit.lastTargetSwitch = 0; deployUnit.nextAttackSkill = -1; deployUnit.nextUnitMode = 2; deployUnit.nextUnitModeDelay = 0; deployUnit.numUnitsOverlapping = 0; deployUnit.overlapAdjust = 0; deployUnit.overlapAdjustmenetLevel = 0; deployUnit.overrideTargetEnemy = -1; deployUnit.prepareTime = 0; deployUnit.preparingSkill = false; deployUnit.projectileNumber = 0; deployUnit.prjWTrls = new Array(); deployUnit.projectileOffset = 0; deployUnit.reviveTime = 0; deployUnit.recordedUnitDistances = new Array(); deployUnit.selectedAbility = -1; deployUnit.selectedGlow = false; deployUnit.statusEffects = new Array(); deployUnit.statusEffectStart = new Array(); deployUnit.statusEffectDuration = new Array(); deployUnit.statusEffectSPC = new Array(); deployUnit.targetEnemy = -1; deployUnit.targetPlayerNumber = this.inversePlayerNumber; deployUnit.unitDead = false; deployUnit.unitMode = 2; this.attachMovie('unitTemplate', 'playerUnit' + deployUnit.unitNumber, deployUnit.unitNumber, deployUnit); this['playerUnit' + deployUnit.unitNumber].attachMovie('unitBody' + deployUnit.unitType, 'unitBody', 1, {'_y': -300, 'datPath': this['playerUnit' + deployUnit.unitNumber]}); this['playerUnit' + deployUnit.unitNumber].createEmptyMovieClip('healthBar', this['playerUnit' + deployUnit.unitNumber].getNextHighestDepth()); if (this['playerUnit' + deployUnit.unitNumber].lives) { this['playerUnit' + deployUnit.unitNumber].healthBar.attachMovie('livesNum', 'livesNum', hpBarPath.getNextHighestDepth()); } _parent.plUnCo[playerNumber][deployUnit.unitNumber] = new Array(); if (_root.campaignStats.missionData[_root.currentMission].enemySkewDeploy && playerNumber == _parent.enemyNumber && partyNumber != 0 && _root.gamePath['AIManager' + playerNumber].skewedDeploys < _parent.unitLineups[this.playerNumber].length / 2) { var v10 = Math.round(Math.random()); } if (playerNumber == 1 && !v10 || playerNumber == 2 && v10) { _parent.plUnCo[playerNumber][deployUnit.unitNumber][0] = -this['playerUnit' + deployUnit.unitNumber].unitBody._width; if (v10) { this['playerUnit' + deployUnit.unitNumber].desX = this['playerUnit' + deployUnit.unitNumber].unitBody._width + 100; ++_root.gamePath['AIManager' + playerNumber].skewedDeploys; } else { this['playerUnit' + deployUnit.unitNumber].desX = this['playerUnit' + deployUnit.unitNumber].unitBody._width + 55; } } else { if (playerNumber == 2 && !v10 || playerNumber == 1 && v10) { _parent.plUnCo[playerNumber][deployUnit.unitNumber][0] = _parent.fieldWidth + this['playerUnit' + deployUnit.unitNumber].unitBody._width; if (v10) { this['playerUnit' + deployUnit.unitNumber].desX = _parent.fieldWidth - this['playerUnit' + deployUnit.unitNumber].unitBody._width - 100; ++_root.gamePath['AIManager' + playerNumber].skewedDeploys; } else { this['playerUnit' + deployUnit.unitNumber].desX = _parent.fieldWidth - this['playerUnit' + deployUnit.unitNumber].unitBody._width - 55; } } } _parent.plUnCo[playerNumber][deployUnit.unitNumber][1] = _parent.groundHeights[Math.round(_parent.plUnCo[playerNumber][deployUnit.unitNumber][0])] + 5; v6 = 0; while (_parent.unitLineups[playerNumber][partyNumber].beginStatusEffects[v6] != undefined) { var v5 = _parent.unitLineups[playerNumber][partyNumber].beginStatusEffects[v6]; var v8 = Number((v5.split(':'))[0]); var v9 = Number((v5.split(':'))[1]); var v7 = Number((v5.split(':'))[2]); newStatusEffect(deployUnit.unitNumber, v8, v9, v7); ++v6; } if (playerNumber == _parent.playerNumber) { _root.userUnitLineup[partyNumber].beginStatusEffects = []; } if (partyNumber == 0) { this['playerUnit' + deployUnit.unitNumber].attachMovie('leaderSymbol', 'leaderSymbol', this['playerUnit' + deployUnit.unitNumber].unitBody.getNextHighestDepth(), {'_y': -300}); leaderDeployed = true; } delete deployUnit; ++deployedUnits; return true; } else { return false; } } function changeDestinationFlags() { var v3 = -1; while (++v3 <= deployedUnits) { if (this['destinationFlag' + v3] != undefined) { this['destinationFlag' + v3].removeMovieClip(); } } if (_parent.selectedUnitManager == playerNumber) { for (v3 in _parent.selectedUnit) { if (this['playerUnit' + _parent.selectedUnit[v3]].deRe != true && this['playerUnit' + _parent.selectedUnit[v3]] != undefined && this['playerUnit' + _parent.selectedUnit[v3]].targetEnemy < 0) { attachMovie('destinationFlagTemplate', 'destinationFlag' + _parent.selectedUnit[v3], v3 + 100); this['destinationFlag' + _parent.selectedUnit[v3]]._x = this['playerUnit' + _parent.selectedUnit[v3]].desX; this['destinationFlag' + _parent.selectedUnit[v3]]._y = _parent.groundHeights[Math.round(this['playerUnit' + _parent.selectedUnit[v3]].desX)] - (this['destinationFlag' + _parent.selectedUnit[v3]]._height - 5); } } } } function splitAndOrder(a, b) { var v1 = Number((a.split(':'))[0]); var v2 = Number((b.split(':'))[0]); if (v1 < v2) { return -1; } else { if (v1 > v2) { return 1; } else { return 0; } } } function updateUnitManager() { var v4 = -1; while (++v4 < deployedUnits) { this['playerUnit' + v4].overlapAdjustmentLevel = 0; this['playerUnit' + v4].numUnitsOverlapping = 0; } v4 = minNotDead; var v13 = false; var v14 = false; var v15 = false; while (++v4 < deployedUnits) { if (this['playerUnit' + v4].unitDead != true) { var v8 = _root.gamePath.plUnCo[playerNumber][v4][0] + this['playerUnit' + v4].unitBody.bodyWidthBlock._x; var v6 = _root.gamePath.plUnCo[playerNumber][v4][0] + (this['playerUnit' + v4].unitBody.bodyWidthBlock._x + this['playerUnit' + v4].unitBody.bodyWidthBlock._width); var v9 = _root.gamePath.plUnCo[playerNumber][v4][0]; var v5 = v4; while (++v5 <= deployedUnits) { var v10 = _root.gamePath.plUnCo[playerNumber][v5][0] + this['playerUnit' + v5].unitBody.bodyWidthBlock._x; var v7 = _root.gamePath.plUnCo[playerNumber][v5][0] + (this['playerUnit' + v5].unitBody.bodyWidthBlock._x + this['playerUnit' + v5].unitBody.bodyWidthBlock._width); if ((v8 >= v10 && v8 <= v7 || v6 >= v10 && v6 <= v7 || v9 >= v10 && v9 <= v7) && v4 != v5) { ++this['playerUnit' + v4].numUnitsOverlapping; ++this['playerUnit' + v5].numUnitsOverlapping; ++this['playerUnit' + v5].overlapAdjustmentLevel; } } if (playerNumber < inversePlayerNumber) { v5 = -1; while (++v5 < _root['gameUnitsPath' + inversePlayerNumber].deployedUnits) { _root['gameUnitsPath' + inversePlayerNumber]['playerUnit' + v5].baseUnitsOverlapping = 0; v10 = _root.gamePath.plUnCo[inversePlayerNumber][v5][0] + _root['gameUnitsPath' + inversePlayerNumber]['playerUnit' + v5].unitBody.bodyWidthBlock._x; v7 = _root.gamePath.plUnCo[inversePlayerNumber][v5][0] + (_root['gameUnitsPath' + inversePlayerNumber]['playerUnit' + v5].unitBody.bodyWidthBlock._x + _root['gameUnitsPath' + inversePlayerNumber]['playerUnit' + v5].unitBody.bodyWidthBlock._width); if (v8 >= v10 && v8 <= v7 || v6 >= v10 && v6 <= v7 || v9 >= v10 && v9 <= v7) { ++_root['gameUnitsPath' + inversePlayerNumber]['playerUnit' + v5].baseUnitsOverlapping; ++this['playerUnit' + v4].numUnitsOverlapping; ++this['playerUnit' + v4].overlapAdjustmentLevel; } } } this['playerUnit' + v4].updateUnit(); if (this['playerUnit' + v4].framesAlive > this['playerUnit' + v4].lastMedPriority + 4) { this['playerUnit' + v4].updateUnitMedPriority(); } if (this['playerUnit' + v4].framesAlive > this['playerUnit' + v4].lastLowPriority + 24) { this['playerUnit' + v4].updateUnitLowPriority(); } v15 = true; } else { if (this['playerUnit' + v4].reviveTime && _parent.failedPlayer != playerNumber) { --this['playerUnit' + v4].reviveTime; _parent.overlayManager['reviveTextP' + playerNumber + 'U' + v4].reviveText.text = Math.round(this['playerUnit' + v4].reviveTime / 24); _parent.overlayManager['reviveTextP' + playerNumber + 'U' + v4]._x = _parent.overlayManager['reviveTextP' + playerNumber + 'U' + v4].baseX + _parent.fieldScroll * 0.5; if (this['playerUnit' + v4].reviveTime <= 0) { this['playerUnit' + v4].reviveTime = 0; this['playerUnit' + v4].unitDead = false; this['playerUnit' + v4].unitBody._alpha = 0; this['playerUnit' + v4].currentHP = this['playerUnit' + v4].currentMaxHP; this['playerUnit' + v4].nextUnitMode = 1; this['playerUnit' + v4].unitMode = 1; this['playerUnit' + v4].taInRa = false; var v11 = {'x': _root.gameBackgroundPath.background1['corpseP' + playerNumber + 'U' + v4]._x, 'y': _root.gameBackgroundPath.background1['corpseP' + playerNumber + 'U' + v4]._y}; _root.gameBackgroundPath.background1.localToGlobal(v11); _root.gameBackgroundPath.background1['corpseP' + playerNumber + 'U' + v4].fadeOutBody(); _parent.overlayManager['reviveTextP' + playerNumber + 'U' + v4].removeMovieClip(); _parent.overlayManager.attachMovie('unitRevival', 'unitRevival' + v4, _parent.overlayManager.getNextHighestDepth(), {'_y': v11.y, 'baseX': v11.x - _parent.fieldScroll * 0.5}); this['playerUnit' + v4].unitBody.gotoAndStop('idle'); var v12 = unitsDead.Contains(this['playerUnit' + v4].partyNumber); unitsDead.splice(v12, 1); _root.gameInterfacePath.newDisplayMessage(this['playerUnit' + v4].unitName + ' has been revived!', playerNumber); if (this['playerUnit' + v4].zombie) { newStatusEffect(v4, 8, Number((this['playerUnit' + v4].zombie.split(':'))[1]), Number((this['playerUnit' + v4].zombie.split(':'))[2])); } attackClosest(v4); } v14 = true; } else { if (!v13 && _root.gameBackgroundPath.background1['corpseP' + playerNumber + 'U' + v4] != undefined) { if (deployedUnits - fadedCorpses > 5 && _root.gameBackgroundPath.background1['corpseP' + playerNumber + 'U' + v4].deathDone) { _root.gameBackgroundPath.background1['corpseP' + playerNumber + 'U' + v4].fadeOutBody(); if (!v14 && !v15) { minNotDead = v4; } ++fadedCorpses; } v13 = true; } } } if (this['playerUnit' + v4].projectileNumber > 0) { this['playerUnit' + v4].projectileMovement(); } } } function newProjectile(startX, startY, endX, endY, skillNumber, unitProjecting) { if (skillNumber > 0) { var v12 = _root.skillStats[skillNumber].projectileType; var v23 = _root.skillStats[skillNumber].maxRange; } else { if (skillNumber == 0) { var v12 = _root.jobStats[this['playerUnit' + unitProjecting].unitType].projectileType; var v23 = _root.jobStats[this['playerUnit' + unitProjecting].unitType].attackMaxRange; } } var v17 = _root.projectileStats[v12].baseSpeed; var v21 = _root.projectileStats[v12].baseHeight; var v19 = _root.projectileStats[v12].projectileTrailDiversity; if (this['playerUnit' + unitProjecting].projectileOffset) { var v7 = this['playerUnit' + unitProjecting].projectileOffset; } else { var v7 = 20; } var v5 = endX; do { endX = v5; endX += Math.random() * v7 - v7 / 2; } while (v5 > startX && endX < startX || v5 < startX && endX > startX); var v22 = Math.abs(endX - startX); var v6 = startY - v21 * (v22 / v23); for (;;) { if (!(v6 > endY && endY != undefined)) break; --v6; } var v10 = (startX + endX) / 2; var v13 = ((v6 - startY) * (startX - endX) + (endY - startY) * (v10 - startX)) / ((startX - endX) * (Math.pow(v10, 2) - Math.pow(startX, 2)) + (v10 - startX) * (Math.pow(endX, 2) - Math.pow(startX, 2))); var v15 = (v6 - startY - v13 * (Math.pow(v10, 2) - Math.pow(startX, 2))) / (v10 - startX); var v16 = startY - v13 * Math.pow(startX, 2) - v15 * startX; var v20 = Math.atan2(startY - v6, v10 - startX) / 0.0174532925199433; var v18 = v17 * Math.cos((v20 / 180) * Math.PI); arrowCreate = new Object(); arrowCreate._x = startX; arrowCreate._y = v13 * Math.pow(arrowCreate._x, 2) + v15 * arrowCreate._x + v16; arrowCreate.startX = startX; arrowCreate.projectileA = v13; arrowCreate.projectileB = v15; arrowCreate.projectileC = v16; arrowCreate.vertexReached = false; arrowCreate.vertexX = v10; arrowCreate.vertexY = v6; arrowCreate.projectileSpeed = v18; arrowCreate.projectileType = v12; if (skillNumber > 0) { arrowCreate.debrisType = _root.skillStats[skillNumber].projectileDebrisType; } else { if (skillNumber == 0) { arrowCreate.debrisType = _root.projectileStats[v12].projectileDebrisType; } } arrowCreate.projectileTrails = 0; arrowCreate.projectileTrailDiversity = v19; arrowCreate.abilityNumber = this['playerUnit' + unitProjecting].selectedAbility; arrowCreate.targetPlayerNumber = this['playerUnit' + unitProjecting].targetPlayerNumber; arrowCreate.hitGround = _root.skillStats[skillNumber].projectileHitGround; createProjectileNumber = this['playerUnit' + unitProjecting].projectileNumber; this['playerUnit' + unitProjecting].attachMovie('projectile' + v12, 'arrow' + createProjectileNumber, this['playerUnit' + unitProjecting].getNextHighestDepth(), arrowCreate); ++this['playerUnit' + unitProjecting].projectileNumber; arrowCreate; createProjectileNumber; delete eval(v19); } function newDebris() { var v5 = arguments[0]; var v6 = arguments[1]; var v7 = arguments[2]; var v10 = arguments[3]; if (arguments.length > 4) { var v9 = arguments[4]; var v11 = arguments[5]; } else { var v9 = 100; var v11 = 0; } var v8 = this['playerUnit' + v5].debrisNumber; if (v6 <= 0) { this['playerUnit' + v5].attachMovie('debris' + v6, 'debris' + v8, this['playerUnit' + v5].getNextHighestDepth(), {'_x': v7, '_y': v10, '_xscale': v9, '_rotation': v11}); } else { this['playerUnit' + v5].attachMovie('debris' + v6, 'debris' + v8, this['playerUnit' + v5].getNextHighestDepth(), {'_x': v7, '_y': v10, '_xscale': this['playerUnit' + v5].unitBody._xscale, 'unitNumber': v5, 'debrisNumber': v8, 'debrisType': v6, '_xscale': v9, '_rotation': v11}); } ++this['playerUnit' + v5].debrisNumber; _root.soundManager.gameFieldSFX('debrisHit', v6, v7); if (_root.damageDebrisStats[v6].shakeTime) { _parent.shakeTime = _root.damageDebrisStats[v6].shakeTime; _parent.shakeMagnitude = _root.damageDebrisStats[v6].shakeMagnitude; } } function unitSelectSkill(skillSetUnitNumber, newSkillBlock, newTargetManager, newTargetEnemy) { if (this['playerUnit' + skillSetUnitNumber].unitMode <= 2 && !this['playerUnit' + skillSetUnitNumber].aiFreezeWalk) { var v4 = this['playerUnit' + skillSetUnitNumber].skills[newSkillBlock]; this['playerUnit' + skillSetUnitNumber].targetEnemy = newTargetEnemy; this['playerUnit' + skillSetUnitNumber].targetPlayerNumber = newTargetManager; this['playerUnit' + skillSetUnitNumber].selectedAbility = v4; this['playerUnit' + skillSetUnitNumber].selectedAbilityBlock = newSkillBlock; this['playerUnit' + skillSetUnitNumber].nextUnitMode = 2; this['playerUnit' + skillSetUnitNumber].actionMaxX = _root.skillStats[v4].maxRange; this['playerUnit' + skillSetUnitNumber].taInRa = false; delete this['playerUnit' + skillSetUnitNumber].nextSelectSkill; } else { this['playerUnit' + skillSetUnitNumber].nextSelectSkill = new Object({'nSB': newSkillBlock, 'nTM': newTargetManager, 'nTE': newTargetEnemy}); this['playerUnit' + skillSetUnitNumber].nextUnitMode = 2; } if (this['playerUnit' + skillSetUnitNumber].aiFreezeSkill >= 0) { this['playerUnit' + skillSetUnitNumber].aiFreezeSkill = -1; } } function unitSetAttackTarget() { if (arguments.length == 1) { var v6 = arguments[0]; for (i in _parent.selectedUnit) { if (this['playerUnit' + _parent.selectedUnit[i]] != undefined) { this['playerUnit' + _parent.selectedUnit[i]].targetEnemy = v6; this['playerUnit' + _parent.selectedUnit[i]].targetPlayerNumber = inversePlayerNumber; this['playerUnit' + _parent.selectedUnit[i]].actionMaxX = _root.jobStats[this['playerUnit' + _parent.selectedUnit[i]].unitType].attackMaxRange; this['playerUnit' + _parent.selectedUnit[i]].selectedAbility = 0; this['playerUnit' + _parent.selectedUnit[i]].nextUnitMode = 2; this['playerUnit' + _parent.selectedUnit[i]].deRe = false; this['playerUnit' + _parent.selectedUnit[i]].desX = _parent.plUnCo[inversePlayerNumber][v6][0]; } } } else { if (arguments.length == 2) { var v6 = arguments[0]; var v5 = arguments[1]; if (this['playerUnit' + v5] != undefined) { this['playerUnit' + v5].targetEnemy = v6; this['playerUnit' + v5].targetPlayerNumber = inversePlayerNumber; this['playerUnit' + v5].actionMaxX = _root.jobStats[this['playerUnit' + v5].unitType].attackMaxRange; this['playerUnit' + v5].selectedAbility = 0; this['playerUnit' + v5].nextUnitMode = 2; this['playerUnit' + v5].deRe = false; } } } changeDestinationFlags(); } function damageUnit(targetUnit, sourceEnemy, sourcePlayer, strikeAbilityNumber, spcDamage) { var v5 = 0; var v4 = this['playerUnit' + targetUnit]; var v6 = _root['gameUnitsPath' + sourcePlayer]['playerUnit' + sourceEnemy]; if (typeof spcDamage != 'number') { if (strikeAbilityNumber == 0) { v5 = _root.jobStats[v6.unitType].baseAttackPower * v6.currentAttackPower; if (v6.closeRangeAttack) { v5 /= 2; } var v13 = Math.round(Math.random() * 100); if (v6.currentFavour * _root.jobStats[v6.unitType].baseForce >= v13) { var v10 = 10; } } else { if (strikeAbilityNumber > 0) { var v7 = _root.skillStats[strikeAbilityNumber]; if (v7.staticPower > 0) { v5 = v7.staticPower * v4.currentMaxHP; } else { v5 = v7.basePower * v6.currentMagicPower; } var v13 = Math.round(Math.random() * 100); if (v6.currentFavour * v7.force >= v13) { var v10 = 10; } if (v7.statusEffect > 0 && v7.statusEffect != undefined) { var v15 = Math.round(Math.random() * 100); if (v7.statusEffectChance * v6.currentFavour >= v15) { newStatusEffect(targetUnit, v7.statusEffect, v7.statusEffectDuration, v7.statusEffectSPC); } } } } _parent.newRandomChat(sourcePlayer, v6.unitNumber, 1, v6.spcChatStatus); } else { if (strikeAbilityNumber == -1) { v5 = spcDamage; } else { if (strikeAbilityNumber == -2) { v5 = spcDamage; } } } if (storedv7.maxPower) { this['playerUnit' + targetUnit].currentMaxHP -= v5; } v4.currentHP -= v5; if (v4.currentHP > v4.currentMaxHP) { v4.currentHP = v4.currentMaxHP; } _root.gameUnitsPath1.attachMovie('damageNumber', 'damageNumber', _root.gameUnitsPath1.getNextHighestDepth(), {'_x': v4.unitBody._x, '_y': v4.unitBody._y, 'damageNumber': v5, 'playerNum': playerNumber}); if (storedv10) { v4.unitMode = 0; if (_parent.plUnCo[this.playerNumber][targetUnit][0] < _parent.plUnCo[sourcePlayer][sourceEnemy][0]) { v4._xscale = 100; v4.knockedBackSpeed = -storedv10; } else { if (_parent.plUnCo[this.playerNumber][targetUnit][0] > _parent.plUnCo[sourcePlayer][sourceEnemy][0]) { v4.unitBody._xscale = -100; v4.knockedBackSpeed = storedv10; } } } if (v4.currentHP <= 0) { v4.currentHP = 0; if (v4.unitType != 9) { killAndDestroy(targetUnit); } if (v6.unitDeity == 3) { v6.currentFavour += 8; if (v6.currentFavour > 100) { v6.currentFavour = 100; } } } else { if (v4.currentHP > v4.currentMaxHP) { v4.currentHP = v4.currentMaxHP; } } redrawHealthBar(targetUnit); if (playerNumber == _parent.enemyNumber && v5 > 0) { _parent.statDamageDealt += v5; } else { if (playerNumber == _parent.playerNumber && v5 > 0) { _parent.statDamageTaken += v5; } } if (v4.unitMode == 1 && v4.targetEnemy < 0 && strikeAbilityNumber != -2) { attackClosest(targetUnit); } if (_parent.victoryConditions[2] && playerNumber == _parent.enemyNumber) { _parent.score += v5 * _parent.scoreMod; } } function debrisDamageTest(unitNumber, debrisNumber, debrisType) { if (_root.damageDebrisStats[debrisType].targetPlayer == 1) { var v3 = this.playerNumber; } else { if (_root.damageDebrisStats[debrisType].targetPlayer == 2) { var v3 = this.inversePlayerNumber; } } var v12 = _root.damageDebrisStats[debrisType].damageAmount * this['playerUnit' + unitNumber].currentMagicPower; var v5 = _root.damageDebrisStats[debrisType].statusEffect; var v10 = _root.damageDebrisStats[debrisType].statusEffectDuration; var v11 = _root.damageDebrisStats[debrisType].statusEffectChance * this['playerUnit' + unitNumber].currentFavour; var v8 = _root.damageDebrisStats[debrisType].statusEffectSPC; var v14 = _root.damageDebrisStats[debrisType].hitTestType; if (v14 == 1) { if (this['playerUnit' + unitNumber]['debris' + debrisNumber].hitBlock.hitTest(_root['gameUnitsPath' + v3])) { var v4 = 0; do { if (this['playerUnit' + unitNumber]['debris' + debrisNumber].hitBlock.hitTest(_root['gameUnitsPath' + v3]['playerUnit' + v4].unitBody) && _root['gameUnitsPath' + v3]['playerUnit' + v4].unitDead != true) { _root['gameUnitsPath' + v3].damageUnit(v4, unitNumber, this.playerNumber, -1, v12); if (v5 > 0 && v5 != undefined) { var v6 = Math.round(Math.random() * 100); if (v11 > v6) { _root['gameUnitsPath' + v3].newStatusEffect(v4, v5, v10, v8); } } } } while (++v4 < _root['gameUnitsPath' + v3].deployedUnits); } } } function newStatusEffect(targetUnit, statusEffect, statusEffectDuration, statusEffectSPC) { var v2 = this['playerUnit' + targetUnit]; var v5 = v2.statusEffects.Contains(statusEffect); if (v5 >= 0) { if (statusEffect == 8) { } if (statusEffectDuration > v2.statusEffectDuration[v5]) { v2.statusEffectDuration[v5] += statusEffectDuration; } } else { var v4 = false; var v3 = 0; do { if (v2.statusEffects[v3] == 0) { v5 = v3; v4 = true; } } while (!v4 && ++v3 < v2.statusEffects.length); if (v4 == false) { v5 = v2.statusEffects.length; } v2.statusEffects[v5] = statusEffect; v2.statusEffectDuration[v5] = statusEffectDuration; v2.statusEffectStart[v5] = v2.framesAlive; v2.statusEffectSPC[v5] = statusEffectSPC; switch (statusEffect) { case 3: v2.currentSpeed *= statusEffectSPC; break; case 5: v2.projectileOffset = statusEffectSPC; break; case 6: v2.nextUnitMode = v2.unitMode; v2.unitMode = 1; v2.nextUnitModeDelay = statusEffectDuration; break; case 7: v2.currentAttackPower *= statusEffectSPC; } v2.attachMovie('statusEffectSymbol' + statusEffect, 'statusEffect' + v5, v2.getNextHighestDepth(), {'_x': v2.unitBody._x, '_y': v2.unitBody._y - v2.unitBody._height - 15 * v5}); } } function removeStatusEffect(targetUnit, statusEffectSlot) { var v2 = this['playerUnit' + targetUnit]; switch (v2.statusEffects[statusEffectSlot]) { case 3: v2.currentSpeed /= v2.statusEffectSPC[statusEffectSlot]; break; case 5: v2.projectileOffset = 0; break; case 7: v2.currentAttackPower /= v2.statusEffectSPC[statusEffectSlot]; break; case 8: v2.reviveTime = v2.statusEffectSPC[statusEffectSlot]; } v2.statusEffects[statusEffectSlot] = 0; v2['statusEffect' + statusEffectSlot].removeMovieClip(); } function redrawHealthBar(targetUnit) { var v3 = this['playerUnit' + targetUnit].healthBar; v3.clear(); if (!this['playerUnit' + targetUnit].unitDead) { var v4 = (this['playerUnit' + targetUnit].currentHP / this['playerUnit' + targetUnit].currentMaxHP) * 25 / 2; v3.lineStyle(0.25, _parent.playerSettings[playerNumber].hexColour, 100); v3.beginFill(_parent.playerSettings[playerNumber].hexColourLight2, 100); v3.moveTo(-v4, 4); v3.lineTo(v4, 4); v3.lineTo(v4, 2); v3.lineTo(-v4, 2); v3.endFill(); } } function killAndDestroy(unitNumber) { var v4 = this['playerUnit' + unitNumber]; _root.gameBackgroundPath.background1.attachMovie('unitDeaths', 'corpseP' + playerNumber + 'U' + unitNumber, _root.gameBackgroundPath.background1.getNextHighestDepth(), {'_x': v4.unitBody._x, '_y': v4.unitBody._y, '_alpha': v4.unitBody._alpha, 'endY': _parent.plUnCo[playerNumber][unitNumber][1], '_xscale': v4.unitBody._xscale, 'playerNumber': playerNumber, 'lives': v4.lives - 1, 'unitNumber': unitNumber, 'grVar': v4.grVar}); _root.gameBackgroundPath.background1['corpseP' + playerNumber + 'U' + unitNumber].datPath = _root.gameBackgroundPath.background1['corpseP' + playerNumber + 'U' + unitNumber]; _root.gameBackgroundPath.background1['corpseP' + playerNumber + 'U' + unitNumber].gotoAndStop('unitDeath' + v4.unitType); _root.soundManager.gameFieldSFX('deaths', v4.unitType, v4.unitBody._x); v4.unitBody.gotoAndStop('death'); v4.unitDead = true; v4.targetEnemy = -1; v4.targetPlayerNumber = 0; for (var v6 in v4.statusEffects) { removeStatusEffect(unitNumber, v6); } v4.statusEffects = []; if (playerNumber == _parent.playerNumber) { _parent.newRandomChat(playerNumber, unitNumber, 2, v4.spcChatStatus); } if (!(_parent.victoryConditions[3] && playerNumber == _parent.playerNumber && v4.reviveTime)) { unitsDead.push(v4.partyNumber); if (playerNumber == _parent.playerNumber) { _root.gameInterfacePath.newDisplayMessage(v4.unitName + ' has been sent for judgement!', playerNumber); } else { if (playerNumber == _parent.enemyNumber) { _root.gameInterfacePath.newDisplayMessage('Enemy ' + v4.unitName + ' has been defeated!', playerNumber); } } if (v4.partyNumber == 0) { v4.leaderSymbol.removeMovieClip(); leaderDead = true; } } if (playerNumber == _parent.enemyNumber) { ++_parent.statDefeatedEnemies; if (_parent.victoryConditions[3]) { var v7 = 167 * _parent.scoreMod / _parent.score; if (v7 > 1) { v7 = 1; } var v9 = Math.round(v4.unitLevel * 12 * 2 * v7); _parent.timeAttack += v9; _parent.overlayManager.attachMovie('timerNum', 'timerNum' + mainIntervalsPassed, _parent.overlayManager.getNextHighestDepth(), {'dispNum': Math.round(v9 / 12), 'textType': 1, '_x': 15, '_y': 171}); } if (_parent.victoryConditions[2] || _parent.victoryConditions[3]) { _parent.addToEnemies(); } } else { if (playerNumber == _parent.playerNumber) { ++_parent.statDefeatedUnits; } } var v8 = _parent.selectedUnit.Contains(unitNumber); if (v8 >= 0 && _parent.selectedUnitManager == playerNumber) { _parent.selectedUnit.splice(v8, 1); _root.gameInterfacePath.unitDisplay.newSelected(); changeDestinationFlags(); _parent.playerSelectingTarget = false; } _parent.testVictory(playerNumber); } function attackClosest(targetUnit) { var v5 = this['playerUnit' + targetUnit].getTargetDistances(inversePlayerNumber); if (v5.length > 0) { var v4 = (v5[0].split(':'))[1]; if (_root['gameUnitsPath' + inversePlayerNumber]['playerUnit' + v4].unitDead == false) { unitSetAttackTarget(v4, targetUnit); } return true; } else { this['playerUnit' + targetUnit].taInRa = false; this['playerUnit' + targetUnit].deRe = true; this['playerUnit' + targetUnit].targetEnemy = -1; this['playerUnit' + targetUnit].targetPlayerNumber = -1; this['playerUnit' + targetUnit].selectedAbility = -1; this['playerUnit' + targetUnit].nextUnitMode = 1; return false; } } var deployedUnits = 0; var minNotDead = -1; var fadedCorpses = 0; var leaderDeployed = false; var unitsDead = new Array(); var overlapAdjust = new Array(); var unitFlagPositions = new Array(); var abilityRanges = new Array(); } } movieClip 2118 { } movieClip 2125 { frame 1 { stop(); } } movieClip 2130 { frame 1 { stop(); } frame 2 { attackButton.onRelease = function () { if (_root.gamePath.gamePaused != true) { _root.gamePath.playerSelectingTarget = true; _root.gamePath.selectTargetEvent = 0; _root.gamePath.skillSelectingTarget = 0; _root.gamePath.skillSelectingAbility = 0; } }; } } movieClip 2131 { } movieClip 2135 { frame 1 { this.stop(); } } movieClip 2137 { frame 1 { function setSkill(unitNumber, skillNumber, blockNumber) { this.unitNumber = unitNumber; unitPath = _root['gameUnitsPath' + _root.gamePath.playerNumber]['playerUnit' + unitNumber]; this.blockNumber = blockNumber; this.dispNumber = blockNumber + 1; this.skillNumber = unitPath.skills[blockNumber]; this.lastErrorMessage = 0; updateSkill(); clearInterval(skillManagement); skillManagement = setInterval(this, 'updateSkill', 500); skillPicture.attachMovie('skillPicture' + skillNumber, 'picture', skillPicture.getNextHighestDepth()); if (skillPicture._currentframe == 1) { skillPicture.gotoAndStop('skillUndefined'); } skillButtonEvent = _root.skillStats[skillNumber].invokeMethod; } function clearSkill() { clearInterval(skillManagement); removeMovieClip(skillPicture.picture); gotoAndStop('noSkill'); skillStatus; skillManagement; unitNumber; skillNumber; delete eval(blockNumber); } function updateSkill() { skillStatus = unitPath.skillStatus[blockNumber]; if (skillStatus == 1) { gotoAndStop('skillUp'); } else { if (skillStatus == 2) { gotoAndStop('skillDown'); } else { if (skillStatus == 3) { gotoAndStop('skillRecharging'); maxSkillRecharge = _root.skillStats[skillNumber].rechargeTime; currentSkillRecharge = unitPath.skillRecharge[blockNumber]; skillRecharging.gotoAndStop(Math.round((currentSkillRecharge / maxSkillRecharge) * 100)); } else { if (skillStatus == 4) { gotoAndStop('skillDisabled'); } } } } if ((unitPath.selectedAbility == skillNumber || unitPath.nextSelectSkill.nSB == blockNumber || unitPath.nextAttackSkill == skillNumber) && !skillFrame.filters.length) { skillFrame.filters = []; skillFrameFilters = skillFrame.filters; skillFrameFilters.push(_parent._parent.skillGlow); skillFrame.filters = skillFrameFilters; } else { if (unitPath.selectedAbility != skillNumber && unitPath.nextSelectSkill.nSB != blockNumber && skillFrame.filters) { skillFrame.filters = []; } } } stop(); } frame 2 { function attemptSkill() { if (unitPath.currentCharge >= _root.skillStats[skillNumber].charge) { if (skillButtonEvent == 1) { if (_root.skillStats[skillNumber].alliance == 1) { targetManager = _root.gamePath.enemyNumber; } else { if (_root.skillStats[skillNumber].alliance == 2) { targetManager = _root.gamePath.playerNumber; } } if (_root.skillStats[skillNumber].alliance == 1 && Key.isDown(16) && (_root.skillStats[skillNumber].effectType == 'projectile' || _root.skillStats[skillNumber].effectType == 'attack')) { if (_root['gameUnitsPath' + _root.gamePath.playerNumber].attackClosest(unitNumber)) { _root['gameUnitsPath' + _root.gamePath.playerNumber].unitSelectSkill(unitNumber, blockNumber, targetManager, unitPath.targetEnemy); _root.gamePath.playerSelectingTarget = false; } } else { _root.gamePath.playerSelectingTarget = true; _root.gamePath.selectTargetEvent = 1; _root.gamePath.skillSelectingTarget = blockNumber; _root.gamePath.skillSelectingAbility = skillNumber; _root.gamePath.mouse.gotoAndStop('standard'); } } else { if (skillButtonEvent == 2) { _root['gameUnitsPath' + _root.gamePath.playerNumber].unitSelectSkill(unitNumber, blockNumber, _root.gamePath.playerNumber, unitNumber); _root.gamePath.playerSelectingTarget = false; } } } else { _root.gameInterfacePath.skillInfo.gotoAndStop('skillError'); _root.gameInterfacePath.skillInfo.errorMessage.text = _root['gameUnitsPath' + _root.gamePath.playerNumber]['playerUnit' + unitNumber].unitName + ' needs ' + _root.skillStats[skillNumber].charge + ' charge to use this skill!'; _root.soundManager.sfx.spcClick.start(); _root.gamePath.lastSkillError = _root.gamePath.currentTime; _root.gamePath.playerSelectingTarget = false; } _root.helpDialog.clearHelpMessage(); _root.gameInterfacePath.spcMessage.text = ''; } skillButton.onRollOver = function () { if (_root.gamePath.currentTime > _root.gamePath.lastSkillError + 2000) { _root.gameInterfacePath.skillInfo.gotoAndStop('skillOver'); _root.gameInterfacePath.skillInfo.skillName.text = _root.skillStats[skillNumber].name + ':'; _root.gameInterfacePath.skillInfo.skillCharge.text = _root.skillStats[skillNumber].charge; _root.gameInterfacePath.skillInfo.skillRecharge.text = Math.round(_root.skillStats[skillNumber].rechargeTime / 24); _root.gameInterfacePath.skillInfo.skillEffect.text = Math.abs(_root.skillStats[skillNumber].basePower); if (_root.skillStats[skillNumber].basePower == 0 && _root.damageDebrisStats[skillNumber].damageAmount) { _root.gameInterfacePath.skillInfo.skillEffect.text = _root.damageDebrisStats[skillNumber].damageAmount; } if (_root.skillStats[skillNumber].basePower < 0 || _root.damageDebrisStats[skillNumber].damageAmount < 0 && _root.skillStats[skillNumber].basePower == 0) { _root.gameInterfacePath.skillInfo.skillEffectSymbol.gotoAndStop('heal'); } else { _root.gameInterfacePath.skillInfo.skillEffectSymbol.gotoAndStop('damageNormal'); } _root.helpDialog.newHelpMessage('smallDialog', 0, _root.skillStats[skillNumber].description); if (_root.skillStats[skillNumber].alliance == 1 && _root.skillStats[skillNumber].effectType == 'projectile' || _root.skillStats[skillNumber].effectType == 'attack') { _root.gameInterfacePath.spcMessage.text = 'Hold SHIFT while selecting to auto-target closest enemy.'; } } }; skillButton.onRollOut = function () { if (_root.gameInterfacePath.skillInfo._currentframe == 2) { _root.gameInterfacePath.skillInfo.gotoAndStop('clear'); } _root.helpDialog.clearHelpMessage(); _root.gameInterfacePath.spcMessage.text = ''; }; skillButton.onRelease = attemptSkill; } frame 4 { function attemptSkill() { _root.gameInterfacePath.skillInfo.gotoAndStop('skillError'); _root.gameInterfacePath.skillInfo.errorMessage.text = 'This skill is still recharging!'; _root.soundManager.sfx.spcClick.start(); _root.gamePath.lastSkillError = _root.gamePath.currentTime; } skillButton.onRelease = attemptSkill; } frame 5 { function attemptSkill() { _root.gameInterfacePath.skillInfo.gotoAndStop('skillError'); _root.gameInterfacePath.skillInfo.errorMessage.text = 'This skill is currently disabled!'; _root.soundManager.sfx.spcClick.start(); _root.gamePath.lastSkillError = _root.gamePath.currentTime; } skillButton.onRelease = attemptSkill; } } movieClip 2139 { frame 1 { stop(); } } movieClip 2144 { frame 1 { function getUnitListing() { if (_root.gamePath.selectedUnit.length == 0 || _root.gamePath.selectedUnit.length == undefined) { var selectedTeam = _root.gamePath.playerNumber; selectUnit.topMessage = 'No Selection'; } else { if (_root.gamePath.selectedUnit.length > 1) { var selectedTeam = _root.gamePath.selectedUnitManager; selectUnit.topMessage = _root.gamePath.selectedUnit.length + ' Units'; } } selectUnit.select = new Array(); selectUnit.selectHelpMessages = new Array(); selectUnit.selectFunction = new Array(); selectUnit.overFunction = new Array(); selectUnit.outFunction = new Array(); selectUnit.varNumbers = new Array(); var v4 = 0; var v3 = 0; while (_root['gameUnitsPath' + selectedTeam]['playerUnit' + v3] != undefined) { if (_root['gameUnitsPath' + selectedTeam]['playerUnit' + v3].unitDead != true && (_root.gamePath.selectedUnit.length > 1 && _root.gamePath.selectedUnit.Contains(v3) >= 0 || _root.gamePath.selectedUnit.length == 0)) { selectUnit.select[v4] = _root['gameUnitsPath' + selectedTeam]['playerUnit' + v3].unitName; selectUnit.selectHelpMessages[v4] = '<font size=\'12\'><b><u>' + _root['gameUnitsPath' + selectedTeam]['playerUnit' + v3].unitName + ':</u></b></font><br />Level ' + _root['gameUnitsPath' + selectedTeam]['playerUnit' + v3].unitLevel + ' ' + _root.jobStats[_root['gameUnitsPath' + selectedTeam]['playerUnit' + v3].unitType].name + '. ' + _root['gameUnitsPath' + selectedTeam]['playerUnit' + v3].unitFavour + ' ' + _root.deityStats[_root['gameUnitsPath' + selectedTeam]['playerUnit' + v3].unitDeity].deityName + ' favour.'; selectUnit.selectFunction[v4] = function () { selectUnit.topMessage = this._parent.selectText; selectUnit.droppedDown = false; _root.gamePath.selectedFromDropDown = true; _root.gamePath.selectedUnitFromList = this._parent.varNumber; _root.gamePath.selectedManagerFromList = selectedTeam; _root.gamePath.changeSelection(); _root.helpDialog.clearHelpMessage(); }; selectUnit.overFunction[v4] = function () { _root.helpDialog.newHelpMessage('professionPicture', _root['gameUnitsPath' + selectedTeam]['playerUnit' + this._parent.varNumber].unitType, selectUnit.selectHelpMessages[this._parent.idNumber]); }; selectUnit.outFunction[v4] = function () { _root.helpDialog.clearHelpMessage(); }; selectUnit.varNumbers.push(v3); ++v4; } ++v3; } } } frame 2 { stop(); } } movieClip 2145 { frame 1 { function updateUnitDisplay() { if (_root.gamePath.selectedUnit.length == 1) { unitHP = selectUnitPath.currentHP; unitMaxHP = selectUnitPath.currentMaxHP; hpDisplay.gotoAndStop(Math.round((unitHP / unitMaxHP) * hpDisplay._totalframes)); unitCharge = selectUnitPath.currentCharge; unitMaxCharge = selectUnitPath.currentMaxCharge; if (selectUnitPath.currentFavour <= 15) { displayFavour = '<font color=\'#FF8888\'>(' + Math.round(selectUnitPath.currentFavour) + ')</font>'; } else { displayFavour = '(' + Math.round(selectUnitPath.currentFavour) + ')'; } if (_root.gamePath.selectedUnitManager == _root.gamePath.playerNumber) { hpText = 'HP:' + Math.round(unitHP); chargeText = 'C:' + Math.floor(unitCharge); chargeDisplay.gotoAndStop(Math.round((unitCharge / unitMaxCharge) * hpDisplay._totalframes)); } else { chargeDisplay.gotoAndStop(1); hpText = ''; chargeText = ''; } i = 0; while (i <= 4) { if (Key.isDown(49 + i) && _root.gamePath.mainIntervalsPassed > lastSkillAttempt + 12) { this['skillBlock' + i].attemptSkill(); lastSkillAttempt = _root.gamePath.mainIntervalsPassed; break; } ++i; } } else { if (_root.gamePath.selectedUnit.length > 1) { hpDisplay.gotoAndStop(1); chargeDisplay.gotoAndStop(1); hpText = ''; chargeText = ''; displayFavour = ''; } else { if (_root.gamePath.selectedUnit.length == 0) { hpDisplay.gotoAndStop(1); chargeDisplay.gotoAndStop(1); hpText = ''; chargeText = ''; displayFavour = ''; } } } } function newSelected() { var v3 = -1; while (++v3 < 5) { this['skillBlock' + v3].clearSkill(); } _root.gameInterfacePath.skillInfo.gotoAndStop('clear'); if (_root.gamePath.selectedUnit.length == 1) { selectUnitPath = _root['gameUnitsPath' + _root.gamePath.selectedUnitManager]['playerUnit' + _root.gamePath.selectedUnit[0]]; displayName = selectUnitPath.unitName; if (displayName == undefined) { displayName = ''; } if (selectUnitPath.grVar == 1) { unitProfession = _root.jobStats[selectUnitPath.unitType].name; } else { unitProfession = _root.jobStats[selectUnitPath.unitType].varNames[selectUnitPath.grVar - 2]; } unitLevel = selectUnitPath.unitLevel; if (unitProfession != undefined && unitLevel != undefined) { displayProfession = 'Lvl. ' + unitLevel + ' ' + unitProfession; } else { displayProfession = ''; } var v4 = _root.gamePath.playerSettings[_root.gamePath.selectedUnitManager].teamName; if (v4.length >= 13) { v4 = v4.slice(0, 10); v4 += '...'; } teamName = '<font color="#' + _root.gamePath.playerSettings[_root.gamePath.selectedUnitManager].hexColourLight + '">' + v4 + '</font>'; displayDeity = _root.deityStats[selectUnitPath.unitDeity].deityName; if (displayDeity == undefined) { displayDeity = 'Godless'; } if (_root.gamePath.selectedUnitManager == _root.gamePath.playerNumber) { v3 = -1; while (++v3 < 5) { this['skillBlock' + v3].setSkill(_root.gamePath.selectedUnit[0], _root['gameUnitsPath' + _root.gamePath.playerNumber]['playerUnit' + _root.gamePath.selectedUnit[0]].skills[v3], v3); } if (selectUnitPath.attackEnabled == true) { attackButton.gotoAndStop('attackEnabled'); } else { attackButton.gotoAndStop('attackDisabled'); } favourInfo.enabled = true; favourInfo._alpha = 100; } else { attackButton.gotoAndStop('noAttack'); favourInfo.enabled = false; favourInfo._alpha = 0; } selectUnit.gotoAndStop('clear'); } else { if (_root.gamePath.selectedUnit.length > 1) { displayName = ''; displayProfession = ''; var v4 = _root.gamePath.playerSettings[_root.gamePath.selectedUnitManager].teamName; if (v4.length >= 13) { v4 = v4.slice(0, 10); v4 += '...'; } teamName = '<font color="#' + _root.gamePath.playerSettings[_root.gamePath.selectedUnitManager].hexColourLight + '">' + v4 + '</font>'; attackButton.gotoAndStop('attackEnabled'); displayDeity = ''; selectUnit.gotoAndStop('selectUnit'); selectUnit.getUnitListing(); favourInfo.enabled = false; favourInfo._alpha = 0; } else { if (_root.gamePath.selectedUnit.length == 0) { displayName = ''; displayProfession = ''; teamName = ''; attackButton.gotoAndStop('noAttack'); displayDeity = ''; selectUnit.gotoAndStop('selectUnit'); selectUnit.getUnitListing(); favourInfo.enabled = false; favourInfo._alpha = 0; } } } _root.helpDialog.clearHelpMessage(); _root.gameInterfacePath.spcMessage.text = ''; updateUnitDisplay(); } favourInfo.onRollOver = function () { var v3 = selectUnitPath.unitDeity; var v4 = selectUnitPath.currentFavour; var v2 = _root.deityStats[selectUnitPath.unitDeity].deityDescription; if (v4 <= 15) { v2 += ' <font color=\'#FF8888\'>This unit is low on favour!</font>'; } _root.helpDialog.newHelpMessage('deityPicture', v3, v2); }; favourInfo.onRollOut = function () { _root.helpDialog.clearHelpMessage(); }; favourInfo.enabled = false; favourInfo._alpha = 0; lastSkillAttempt = 0; } } movieClip 2152 { frame 1 { stop(); } } movieClip 2160 { } movieClip 2165 { frame 1 { stop(); } } movieClip 2169 { frame 1 { function manageScrollBar() { if (dragStarted == true) { if (_root._ymouse < sliderPositionStart.y + 112 && _root._ymouse > sliderPositionStart.y) { var v6 = {'x': _root._xmouse, 'y': _root._ymouse}; globalToLocal(v6); slider._y = v6.y; } else { if (_root._ymouse < sliderPositionStart.y) { slider._y = sliderPositionStartY; } else { if (_root._ymouse > sliderPositionStart.y + 112) { slider._y = sliderPositionStartY + 112; } } } _parent.slidingText._y = _parent.slidingTextStart - _parent.slidingTextHeight * ((slider._y - sliderPositionStartY) / 112); if (!Key.isDown(1)) { dragStarted = false; } _root.gamePath.interfaceClicked = true; } else { if (Key.isDown(1)) { if (backBar.hitTest(_root._xmouse, _root._ymouse, true)) { var v5 = {'x': _root._xmouse, 'y': _root._ymouse}; this.globalToLocal(v5); var v4 = v5.y - slider._height / 2; if (v4 >= sliderPositionStartY && v4 <= sliderPositionStartY + 112) { slider._y = v4; } else { if (v4 < sliderPositionStartY) { slider._y = sliderPositionStartY; } else { if (v4 > sliderPositionStartY + 112) { slider._y = sliderPositionStartY + 112; } } } _parent.slidingText._y = _parent.slidingTextStart - _parent.slidingTextHeight * ((slider._y - sliderPositionStartY) / 112); } } } } var sliderPositionStartY = slider._y; var sliderPositionStart = {'x': slider._x, 'y': slider._y}; localToGlobal(sliderPositionStart); slider.slider.onPress = function () { dragStarted = true; }; clearInterval(manageScrollBarInterval); manageScrollBarInterval = setInterval(this, 'manageScrollBar', 40); } } movieClip 2171 { frame 1 { function setNewList(listValues, selectFunction, overFunction, outFunction) { var v1 = 0; while (slidingText['listElement' + v1] != undefined) { slidingText['listElement' + v1].removeMovieClip(); ++v1; } v1 = 0; while (v1 < listValues.length) { listText = (listValues[v1].split('::'))[0]; listVar = (listValues[v1].split('::'))[1]; var v3 = {'_x': 0, '_y': v1 * 20, 'elementNumber': v1, 'listElementText': listText, 'listElementVar': listVar, 'listElementFunction': selectFunction}; slidingText.attachMovie('standardListElement', 'listElement' + v1, slidingText.getNextHighestDepth(), v3); slidingText['listElement' + v1].elementButton.onRelease = selectFunction; slidingText['listElement' + v1].elementButton.onRollOver = overFunction; slidingText['listElement' + v1].elementButton.onRollOut = outFunction; slidingText['listElement' + v1].elementBack.gotoAndStop(v1 % 2 + 1); ++v1; } slidingTextStart = slidingText._y; slidingTextHeight = slidingText._height - 123.5; if (slidingTextHeight < 0) { slidingTextHeight = 0; } slidingTextEnd = slidingTextStart + slidingTextHeight; } slidingText.setMask(slidingTextMask); } } movieClip 2172 { frame 2 { function defineDeployMenu() { var listValues = new Array(); var listHelpMessages = new Array(); var currentListValue = 0; var i = 0; while (i < _root.gamePath.unitLineups[_root.gamePath.playerNumber].length) { if (_root.gamePath.undeployableUnits.Contains(i) < 0) { if (i == 0) { listValues[currentListValue] = '<font color=\'#FFCC00\'><b>' + _root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitName + '</b></font>::' + i; } else { listValues[currentListValue] = _root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitName + '::' + i; } listHelpMessages[i] = '<font size=\'12\'><b><u>' + _root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitName + ':</u></b></font><br />Level ' + _root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitLevel + ' ' + _root.jobStats[_root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitType].name + '. ' + Math.round(_root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitFavour) + ' ' + _root.deityStats[_root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitDeity].deityName + ' favour.'; ++currentListValue; } ++i; } listValues.sort(); listSelectFunction = function () { if (_root.gamePath.gamePaused != true && _parent.deployRecharge <= 0 && _root['gameUnitsPath' + _root.gamePath.playerNumber].deployedUnits - _root['gameUnitsPath' + _root.gamePath.playerNumber].unitsDead.length < _root.gamePath.maxDeployedUnits) { if ((eval('_root.gamePath.unitManager' + _root.gamePath.playerNumber)).deployNewUnit(this._parent.listElementVar) == true) { _root.helpDialog.clearHelpMessage(); _root.gameInterfacePath.unitDisplay.selectUnit.getUnitListing(); _root.gamePath.undeployableUnits.push(this._parent.listElementVar); _parent.deployRecharge = _root.gamePath.deployUnitInterval; defineDeployMenu(); } } }; listOverFunction = function () { if (_root.gamePath.gamePaused != true) { managementInfo.skillInfoNumber = (this._parent.listElementVar.split(':'))[0]; _root.helpDialog.newHelpMessage('professionPicture', _root.gamePath.unitLineups[_root.gamePath.playerNumber][this._parent.listElementVar].unitType, listHelpMessages[this._parent.listElementVar]); } }; listOutFunction = function () { _root.helpDialog.clearHelpMessage(); }; deployList.setNewList(listValues, listSelectFunction, listOverFunction, listOutFunction); } function manageDeployMenu() { if ((_parent.deployRecharge > 0 || _parent.maxAreDeployed == true) && _y > startY - 20) { this._y -= (this._y - (startY - 20)) / 5; } else { if (droppedDown == false && _y < startY) { this._y += (startY - this._y) / 5; } else { if (droppedDown == false && _y > startY) { this._y -= (this._y - startY) / 5; } else { if (droppedDown == true && this._y < startY + startHeight - 20) { this._y += (startY + startHeight - 20 - this._y) / 5; } } } } } droppedDown = false; startY = -(_height - 20); _y = startY; startHeight = _height; dropDownButton.buttonText = 'Deploy a Unit'; dropDownButton.buttonHit.onRelease = function () { if (_root.gamePath.gamePaused != true) { if (droppedDown == false) { droppedDown = true; dropDownButton.buttonText = '<U>>Close Menu<</U>'; } else { droppedDown = false; dropDownButton.buttonText = '<U>Deploy a Unit</U>'; } _root.gamePath.interfaceClicked = true; } }; defineDeployMenu(); clearInterval(manageDeployMenuInterval); manageDeployMenuInterval = setInterval(this, 'manageDeployMenu', 40); stop(); } } movieClip 2176 { } movieClip 2180 { } movieClip 2183 { } movieClip 2188 { } movieClip 2189 { frame 1 { function manageFog() { fogSpeed = _parent.fogSpeed; fog1._x -= fogSpeed; fog2._x -= fogSpeed; if (fog1._x <= -600) { fog1._x = 0; fog2._x = 600; } } fog1._x = 0; fog2._x = 600; clearInterval(manageFogInterval); manageFogInterval = setInterval(this, 'manageFog', 40); } } movieClip 2191 { } movieClip 2192 { frame 1 { stop(); } frame 2 { _root.soundManager.sfx.spcDoorCreak.start(); } frame 88 { stop(); } } movieClip 2203 { frame 1 { teamName1.text = _root.gamePath.playerSettings[1].teamName; teamName2.text = _root.gamePath.playerSettings[2].teamName; teamLeader1.text = 'Leader: ' + _root.gamePath.unitLineups[1][0].unitName; teamLeader2.text = 'Leader: ' + _root.gamePath.unitLineups[2][0].unitName; } } movieClip 2219 { } movieClip 2226 { frame 1 { stop(); } frame 2 { gotoAndPlay('lightning' + Math.ceil(Math.random() * 3)); _root.soundManager.sfx.spcThunder.start(); } frame 16 { this.gotoAndStop('clear'); } frame 33 { this.gotoAndStop('clear'); } frame 48 { this.gotoAndStop('clear'); } } movieClip 2227 { frame 1 { function recalculateDeityDisplay() { var i = -1; while (++i <= 3) { if (_root.gamePath.deityRanks[i] < 20) { var deityRankString = 'Fallen'; } else { if (_root.gamePath.deityRanks[i] < 40) { var deityRankString = 'Recovering'; } else { if (_root.gamePath.deityRanks[i] < 60) { var deityRankString = 'Powerful'; } else { if (_root.gamePath.deityRanks[i] < 80) { var deityRankString = 'Godly'; } else { var deityRankString = 'Almighty'; } } } } (eval('deity' + i + 'Strength')).text = deityRankString + ' (' + _root.gamePath.deityRanks[i] + '/100)'; } sacrificeButton.buttonText = 'Make Sacrifice'; continueButton.buttonText = 'Begin Battle!'; continueButton._xscale = 120; continueButton._yscale = 120; selectedSacrificeUnit = -1; selectedSacrificeDeity = -1; unitDropDown.topMessage = 'Select Unit...'; unitDropDown.select = new Array(); unitDropDown.selectHelpMessages = new Array(); unitDropDown.overrideID = new Array(); unitDropDown.selectFunction = new Array(); unitDropDown.overFunction = new Array(); unitDropDown.outFunction = new Array(); var i = 1; var dropDownCreate = 0; do { if (_root.gamePath.undeployableUnits.Contains(i) < 0) { unitDropDown.select[dropDownCreate] = _root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitName; unitDropDown.selectHelpMessages[dropDownCreate] = '<font size=\'12\'><b><u>' + _root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitName + ':</u></b></font><br />Level ' + _root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitLevel + ' ' + _root.jobStats[_root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitType].name + '. ' + _root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitFavour + ' ' + _root.deityStats[_root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitDeity].deityName + ' favour.'; unitDropDown.overrideID[dropDownCreate] = i; unitDropDown.selectFunction[dropDownCreate] = function () { unitDropDown.topMessage = this._parent.selectText; unitDropDown.droppedDown = false; selectedSacrificeUnit = this._parent._parent._parent.overrideID[this._parent.idNumber]; _root.helpDialog.clearHelpMessage(); }; unitDropDown.overFunction[dropDownCreate] = function () { _root.helpDialog.newHelpMessage('professionPicture', _root.gamePath.unitLineups[_root.gamePath.playerNumber][i].unitType, this._parent._parent._parent.selectHelpMessages[this._parent.idNumber]); }; unitDropDown.outFunction[dropDownCreate] = function () { _root.helpDialog.clearHelpMessage(); }; ++dropDownCreate; } } while (++i < _root.gamePath.unitLineups[_root.gamePath.playerNumber].length); deityDropDown.topMessage = 'Select Deity...'; deityDropDown.select = new Array(); deityDropDown.selectFunction = new Array(); var i = 0; var dropDownCreate = 0; do { deityDropDown.select[dropDownCreate] = _root.deityStats[i].deityName; deityDropDown.selectFunction[dropDownCreate] = function () { deityDropDown.topMessage = this._parent.selectText; deityDropDown.droppedDown = false; selectedSacrificeDeity = this._parent.idNumber; }; ++dropDownCreate; } while (++i <= 3); } recalculateDeityDisplay(); sacrificeButton.buttonHit.onRelease = function () { if (selectedSacrificeUnit >= 0 && selectedSacrificeDeity >= 0 && selectedSacrificeDeity < 4) { var v2 = (_root.getTeamLevel() - _root.gamePath.unitLineups[_root.gamePath.playerNumber][selectedSacrificeUnit].unitLevel) / 2; if (v2 < 1) { v2 = 1; } _root.gamePath.deityRanks[selectedSacrificeDeity] += Math.round(25 * v2); if (_root.gamePath.deityRanks[selectedSacrificeDeity] > 100) { _root.gamePath.deityRanks[selectedSacrificeDeity] = 100; } _root.gamePath.undeployableUnits.push(selectedSacrificeUnit); if (_root.gamePath.unitLineups[_root.gamePath.playerNumber][selectedSacrificeUnit].unitDeity == selectedSacrificeDeity) { _root.userUnitLineup[selectedSacrificeUnit].unitFavour += 50; if (_root.userUnitLineup[selectedSacrificeUnit].unitFavour > 100) { _root.userUnitLineup[selectedSacrificeUnit].unitFavour = 100; } lastSacrifice.htmlText = _root.gamePath.unitLineups[_root.gamePath.playerNumber][selectedSacrificeUnit].unitName + ' has been sacrificed to ' + _root.deityStats[selectedSacrificeDeity].deityName + '!<br />' + _root.gamePath.unitLineups[_root.gamePath.playerNumber][selectedSacrificeUnit].unitName + ' gained 50 favour!'; } else { _root.userUnitLineup[selectedSacrificeUnit].unitFavour += 25; if (_root.userUnitLineup[selectedSacrificeUnit].unitFavour > 100) { _root.userUnitLineup[selectedSacrificeUnit].unitFavour = 100; } lastSacrifice.htmlText = _root.gamePath.unitLineups[_root.gamePath.playerNumber][selectedSacrificeUnit].unitName + ' has been sacrificed to ' + _root.deityStats[selectedSacrificeDeity].deityName + '!<br />' + _root.gamePath.unitLineups[_root.gamePath.playerNumber][selectedSacrificeUnit].unitName + ' gained 25 favour!'; } recalculateDeityDisplay(); _root.gameInterfacePath.deployMenu.defineDeployMenu(); sacrificeLightning.gotoAndPlay('startLightning'); } }; continueButton.buttonHit.onRelease = function () { _parent.play(); }; whySacrifice.onRollOver = function () { _root.helpDialog.newHelpMessage('largeDialog', 'noPicture', '<b><u>Why Sacrifice?</u></b><br><li>Sacrificed units gain favour.</li><li>Units sacrificed to their own god gain even more favour.</li><li>The skills of units that worship the god you sacrifice to will become stronger.</li>'); }; whySacrifice.onRollOut = function () { _root.helpDialog.clearHelpMessage(); }; } } movieClip 2231 { frame 1 { objectivesText.htmlText = ''; if (_root.gamePath.victoryConditions[0] == true) { objectivesText.htmlText += 'Regicide: First team to defeat the enemy leader wins.<br />'; } if (_root.gamePath.victoryConditions[1] == true) { objectivesText.htmlText += 'Deathmatch: First team to defeat all opposing units wins.<br />'; } if (_root.gamePath.victoryConditions[2] == true) { objectivesText.htmlText += 'Survival: Kill as many enemies as possible before your team is defeated!<br />'; } if (_root.gamePath.victoryConditions[3] == true) { objectivesText.htmlText += 'Time Attack: Your units each have 2 lives! Kill to keep your timer up!<br />'; } if (_root.campaignStats.missionData[_root.currentMission].victoryCondSPC) { objectivesText.htmlText += _root.campaignStats.missionData[_root.currentMission].victoryCondSPC; } } } movieClip 2232 { frame 5 { doorOpener.fogSpeed = 1; } frame 102 { doorOpener.fogSpeed = 3; _root.soundManager.musicSet('preBattleMusic', 3, 1); _root.soundManager.sfx.spcDrawSword.start(); } frame 115 { _root.soundManager.sfx.spcBattleStart.start(); } frame 274 { gotoAndPlay('battleStart'); } frame 295 { stop(); } frame 316 { _root.helpDialog.clearHelpMessage(); } frame 324 { doorOpener.gotoAndPlay('openSesame'); if (_root.campaignStats.missionData[_root.currentMission].bossMusic) { _root.soundManager.musicSet('bossMusic', 0.6, 1); } else { _root.soundManager.musicSet('battleMusic', 0.6, 1); } _root.gamePath.gotoAndStop('mainGameBegin'); } frame 504 { _root.gameInterfacePath.unPause(); } } movieClip 2234 { frame 1 { fogSpeed = 1; } frame 116 { _root.soundManager.sfx.spcDoorSlam.start(); } frame 135 { stop(); } } movieClip 2248 { } movieClip 2251 { frame 20 { stop(); isIn = true; } } movieClip 2254 { frame 1 { stop(); } } movieClip 2255 { frame 1 { rankUpString = (_root.campaignStats.missionData[_root.currentMission].rankUp.split('::'))[0]; rankUpType = (_root.campaignStats.missionData[_root.currentMission].rankUp.split('::'))[1]; ++_root.userSettings.campaignRank; if (rankUpType == 1) { ++_root.userSettings.maxTeamSize; rankUpTypeString = 'Up to ' + _root.userSettings.maxTeamSize + ' people are now willing to join your team!'; spcText.gotoAndStop('newSlot'); } else { if (rankUpType == 2) { ++_root.userSettings.maxTeamSize; ++_root.userSettings.unitTypesUnlocked; rankUpTypeString = 'You have unlocked the ' + _root.jobStats[_root.unlockUnitOrder[_root.userSettings.unitTypesUnlocked - 1]].name + ' unit type!<br>Up to ' + _root.userSettings.maxTeamSize + ' people are now willing to join your team!'; unitSpotlight.gotoAndPlay('spotlightIn'); unitPicture.attachMovie('unitBody' + _root.unlockUnitOrder[_root.userSettings.unitTypesUnlocked - 1], 'picture', unitPicture.getNextHighestDepth()); unitPicture.picture.gotoAndStop('idle'); } else { if (rankUpType == 3) { _root.userSettings.fieldBattle = true; rankUpTypeString = 'You may now fight field battles for high scores!<br>You can access this feature from the main menu.'; spcText.gotoAndStop('fieldBattle'); } } } rankUp.htmlText = rankUpString + '<br>Your team description is now: <font size=\'15\'>' + _root.campaignRanks[_root.userSettings.campaignRank] + '</font>!<br>' + rankUpTypeString; continueButton.buttonText = 'Continue...'; continueButton.buttonHit.onRelease = function () { _parent._parent._parent.play(); this.enabled = false; }; } } movieClip 2256 { frame 1 { stop(); } frame 30 { stop(); } } movieClip 2257 { frame 1 { if (_root.gamePath.victoryConditions[2]) { winningTeam.text = 'Survival has Ended!'; if (_root.gamePath.score > _root.userSettings.survivalHS) { _root.userSettings.survivalHS = Math.round(_root.gamePath.score); } victoryCondition.text = 'You scored ' + Math.round(_root.gamePath.score) + '! Your high score is ' + _root.userSettings.survivalHS + '!'; ab20_09 = new LoadVars(); ab20_09.z = _root.userSettings.teamName; ab20_09.x = ab20.encodeNum(Math.round(_root.gamePath.score)); ab20_09.c = 1032; ab20_09.v = 'KJXONW'; ab20_09.sendAndLoad('http://armorbot.com/s_b', ab20_09, 'POST'); } else { if (_root.gamePath.victoryConditions[3]) { winningTeam.text = 'Time Attack Completed!'; if (_root.gamePath.score > _root.userSettings.timeAttackHS) { _root.userSettings.timeAttackHS = Math.round(_root.gamePath.score); } victoryCondition.text = 'You scored ' + Math.round(_root.gamePath.score) + '! Your high score is ' + _root.userSettings.timeAttackHS + '!'; ab20_09 = new LoadVars(); ab20_09.z = _root.userSettings.teamName; ab20_09.x = ab20.encodeNum(Math.round(_root.gamePath.score)); ab20_09.c = 1033; ab20_09.v = 'LBBAUX'; ab20_09.sendAndLoad('http://armorbot.com/s_b', ab20_09, 'POST'); } else { if (_root.gamePath.failedPlayer == 1) { winningTeam.text = _root.gamePath.playerSettings[2].teamName; } else { winningTeam.text = _root.gamePath.playerSettings[1].teamName; } if (_root.gamePath.victoryConditions[0]) { victoryCondition.text = 'is victorious by defeating the opposing leader!'; } else { if (_root.gamePath.victoryConditions[1]) { victoryCondition.text = 'is victorious by defeating the opposing team!'; } } if (_root.gamePath.failedPlayer == _root.gamePath.playerNumber) { victoryCondition.text += ' (You have lost!)'; } else { victoryCondition.text += ' (You have won!)'; } viewHighScores._alpha = 0; viewHighScores.buttonHit.enabled = false; } } if (_root.gamePath.failedPlayer != _root.gamePath.playerNumber && _root.currentMission > 0 && (_root.campaignStats.missionData[_root.currentMission].missionAvailable.split(':'))[3] != undefined) { ++_root.userSettings.teamVictories; var i = 0; var currentCampaignProgress = _root.userSettings.campaignProgress.split(':'); while (!doneAdvancing) { missionPath = Number(((_root.campaignStats.missionData[_root.currentMission].missionAvailable.split(':'))[3].split(','))[i]); if (isNaN(missionPath)) { var doneAdvancing = true; } else { currentCampaignProgress[missionPath] = Number(currentCampaignProgress[missionPath]); ++currentCampaignProgress[missionPath]; ++i; } } _root.userSettings.campaignProgress = currentCampaignProgress.join(':'); } else { if (_root.currentMission > 0) { ++_root.userSettings.teamDefeats; } } currentDate = new Date(); currentTime = currentDate.getTime(); battleTimeTaken = currentTime - _root.gamePath.beginBattleTime; battleHours = Math.floor(battleTimeTaken / 86400000); battleMinutes = Math.floor((battleTimeTaken % 86400000) / 60000); battleSeconds = Math.floor((battleTimeTaken % 60000) / 1000); if (battleHours < 10) { battleHours = '0' + battleHours; } if (battleMinutes < 10) { battleMinutes = '0' + battleMinutes; } if (battleSeconds < 10) { battleSeconds = '0' + battleSeconds; } battleTime.text = 'The battle lasted ' + battleHours + ':' + battleMinutes + ':' + battleSeconds + '.'; statDeployedUnits.text = 'Deployed ' + _root['gameUnitsPath' + _root.gamePath.playerNumber].deployedUnits + ' units.'; statDefeatedEnemies.text = 'Defeated ' + _root.gamePath.statDefeatedEnemies + ' enemies.'; statDefeatedUnits.text = 'Had ' + _root.gamePath.statDefeatedUnits + ' of your units sent to judgement.'; statDamageTaken.text = 'Took a total of ' + Math.round(_root.gamePath.statDamageTaken) + ' damage.'; statDamageDealt.text = 'Dealt a total of ' + Math.round(_root.gamePath.statDamageDealt) + ' damage.'; statSkillsUsed.text = 'Used ' + _root.gamePath.statSkillsUsed + ' skills.'; if (!_root.gamePath.victoryConditions[3] && !_root.gamePath.victoryConditions[2]) { continueButton.buttonText = '<u>Continue</u>'; } else { continueButton.buttonText = '<u>Unit Lineup</u>'; } continueButton.buttonHit.onRelease = function () { if (!_root.chancellusEnd) { if (_root.campaignStats.missionData[_root.currentMission].rankUp != undefined && rankUp._currentframe == 1 && _root.gamePath.failedPlayer != _root.gamePath.playerNumber) { rankUp.gotoAndPlay('rankUp'); } else { if (_root.currentMission == -1) { _parent.gotoAndPlay('skipJudgement'); } else { _parent.gotoAndPlay('res1Out'); } } this.enabled = false; } else { _root.fadeTransition.targetFrame = 'campaignMenu'; _root.fadeTransition.targetObject = '_root'; _root.nextGameCinematic = 'conclusion'; _root.fadeTransition.gotoAndPlay('beginFadeSlow'); _root.lastMenu = 'gameResults'; _root.userSettings.deitiesUnlocked = 5; } }; viewHighScores.buttonText = '<u>View High Scores!</u>'; viewHighScores.buttonHit.onRelease = function () { _root.fadeTransition.targetFrame = 'subControls'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFadeSlow'); _root.lastMenu = 'gameResults'; _root.targetTeamMenu = 'highScores'; this.enabled = false; _root.saveUserSettings(); }; } } movieClip 2263 { frame 1 { function judgeUnits() { if (unitsJudged < unitsDead.length) { judgingUnit = unitsDead[unitsJudged]; judgedUnitName = _root.userUnitLineup[judgingUnit].unitName; if (!unitSpotlight.isIn) { unitSpotlight.gotoAndPlay('spotlightIn'); } unitPicture.picture.removeMovieClip(); pastJudgements += judgedMessage; if (judgingUnit != 0) { _root.userUnitLineup[judgingUnit].unitFavour -= 15; if (_root.userUnitLineup[judgingUnit].unitDeity == 4) { _root.userUnitLineup[judgingUnit].unitFavour = 0; } } if (_root.userUnitLineup[judgingUnit].unitFavour <= 0) { unitPicture.attachMovie('unitDeaths', 'picture', unitPicture.getNextHighestDepth()); unitPicture.picture.gotoAndStop('unitDeath' + _root.userUnitLineup[judgingUnit].unitType); _root.userUnitLineup.splice(judgingUnit, 1); var v3 = unitsJudged + 1; while (v3 < unitsDead.length) { --unitsDead[v3]; ++v3; } if (_root.userUnitLineup[judgingUnit].unitDeity == 4) { judgedMessage = '<br />None of the gods chose to help ' + judgedUnitName + ', who has died!'; } else { judgedMessage = '<br />' + judgedUnitName + '\'s favour was too low to pass judgement, and has died!'; } } else { if (judgingUnit == 0) { judgedMessage = '<br />' + judgedUnitName + ' has returned from judgement!'; } else { judgedMessage = '<br />' + judgedUnitName + ' has passed judgement, and has ' + Math.round(_root.userUnitLineup[judgingUnit].unitFavour) + ' favour remaining.'; } unitPicture.attachMovie('unitBody' + _root.userUnitLineup[judgingUnit].unitType, 'picture', unitPicture.getNextHighestDepth()); unitPicture.picture.gotoAndStop('moving'); } ++unitsJudged; judged.htmlText = '<font size=\'10\'>' + pastJudgements + '</font><font size=\'15\'>' + judgedMessage + '</font>'; } else { if (unitsJudged == 0) { judged.htmlText = 'No units were sent for judgement! Congratulations!'; } continueOk = true; clearInterval(judgingUnitsInterval); judgingUnitsInterval = setInterval(this, 'judgeUnits', 24); } if (continueOk == true && continueButton._alpha < 100) { continueButton._alpha += 5; } else { if (continueOk == true && continueButton._alpha >= 100) { continueButton.buttonHit.enabled = true; } } } var i = 0; while (i < _root['gameUnitsPath' + _root.gamePath.playerNumber].deployedUnits) { editUnitFavour = _root['gameUnitsPath' + _root.gamePath.playerNumber]['playerUnit' + i].currentFavour; editUnitPartyNumber = _root['gameUnitsPath' + _root.gamePath.playerNumber]['playerUnit' + i].partyNumber; _root.userUnitLineup[editUnitPartyNumber].unitFavour = editUnitFavour; ++i; } favourInfo.buttonHit.onRollOver = function () { _root.helpDialog.newHelpMessage('largeDialog', 0, '<u>Favour:</u><li>Units lose favour when sent to judgement. Units that fall below 0 favour die permanently.</li><li>High favour means a higher chance of causing status effects and knocking back enemies.</li><li>Units gain favour in different ways, depending on the god they worship.</li>'); }; favourInfo.buttonHit.onRollOut = function () { _root.helpDialog.clearHelpMessage(); }; unitsJudged = 0; pastJudgements = ''; judgedMessage = ''; continueOk = false; unitsDead = _root['gameUnitsPath' + _root.gamePath.playerNumber].unitsDead; unitsDead.sort(); clearInterval(judgingUnitsInterval); judgingUnitsInterval = setInterval(this, 'judgeUnits', 2200); judgeUnits(); continueButton.buttonText = '<u>Continue</u>'; continueButton.buttonHit.onRelease = function () { _parent.play(); this.enabled = false; }; continueButton.buttonHit.enabled = false; } } movieClip 2266 { frame 1 { function fadeButtons() { if (_root.teamSlotSelected != undefined && editUnit._alpha < 100 && _root.userSettings.tutorialObjective < 0) { editUnit._alpha += 5; } if (editUnit._alpha >= 100 && !editIn) { editUnit.buttonHit.enabled = true; editIn = true; } if (menuButton._alpha < 100) { menuButton._alpha += 5; } if (editTeam._alpha < 100 && _root.userSettings.tutorialObjective < 0) { editTeam._alpha += 5; } } displayUnitNames = true; delete _root.teamSlotSelected; if (!_root.gamePath.victoryConditions[2] && !_root.gamePath.victoryConditions[3] && _root.userSettings.tutorialObjective < 0) { unitSlotMessages = new Array(); var i = 0; while (i < _root['gameUnitsPath' + _root.gamePath.playerNumber].deployedUnits) { editUnitPartyNumber = _root['gameUnitsPath' + _root.gamePath.playerNumber]['playerUnit' + i].partyNumber; unitSlotMessages[editUnitPartyNumber] = new Array(); if (editUnitPartyNumber == 0) { editUnitEXP = (_root['gameUnitsPath' + _root.gamePath.playerNumber]['playerUnit' + i].unitEXP - _root.userUnitLineup[editUnitPartyNumber].unitEXP) * 0.8 + _root.userUnitLineup[editUnitPartyNumber].unitEXP; } else { editUnitEXP = _root['gameUnitsPath' + _root.gamePath.playerNumber]['playerUnit' + i].unitEXP; } if (_root.userUnitLineup[editUnitPartyNumber].unitEXP < editUnitEXP) { unitSlotMessages[editUnitPartyNumber].push('Exp. + ' + Math.round(editUnitEXP - _root.userUnitLineup[editUnitPartyNumber].unitEXP)); _root.userUnitLineup[editUnitPartyNumber].unitEXP = editUnitEXP; if (_root.attemptUnitLevel(editUnitPartyNumber) == true) { unitSlotMessages[editUnitPartyNumber].push('Lvl. Up (' + _root.userUnitLineup[editUnitPartyNumber].unitLevel + ')'); } } if (_root.gamePath.failedPlayer != _root.gamePath.playerNumber) { ++_root.userUnitLineup[editUnitPartyNumber].unitTrainingPoints; unitSlotMessages[editUnitPartyNumber].push('Train Pt. +1'); } ++i; } } clearInterval(fadeButtonsInterval); fadeButtonsInterval = setInterval(this, 'fadeButtons', 40); if (_root.userSettings.tutorialObjective < 0) { editUnit.buttonText = '<u>Edit Unit</u>'; editUnit.buttonHit.onRelease = function () { _root.fadeTransition.targetFrame = 'subControls'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFadeSlow'); _root.lastMenu = 'gameResults'; _root.targetTeamMenu = 'manageUnit'; this.enabled = false; _root.saveUserSettings(); }; editTeam.buttonText = '<u>Edit Team</u>'; editTeam.buttonHit.onRelease = function () { _root.fadeTransition.targetFrame = 'subControls'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFadeSlow'); _root.lastMenu = 'gameResults'; _root.targetTeamMenu = 'manageTeam'; this.enabled = false; _root.saveUserSettings(); }; } else { editTeam.buttonHit.enabled = false; editTeam._alpha = 0; } editUnit.buttonHit.enabled = false; if (_root.lastMenu == 'campaignMenu' && _root.userSettings.tutorialObjective < 0) { menuButton.buttonText = '<u>Campaign Menu</u>'; menuButton.buttonHit.onRelease = function () { _root.fadeTransition.targetFrame = 'campaignMenu'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFadeSlow'); _root.lastMenu = 'gameResults'; this.enabled = false; _root.saveUserSettings(); }; } else { if (_root.lastMenu == 'enduranceMenu') { if (_root.gamePath.victoryConditions[2] || _root.gamePath.victoryConditions[3]) { menuButton.buttonText = '<u>View High Scores!</u>'; menuButton.buttonHit.onRelease = function () { _root.fadeTransition.targetFrame = 'subControls'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFadeSlow'); _root.lastMenu = 'gameResults'; _root.targetTeamMenu = 'highScores'; this.enabled = false; _root.saveUserSettings(); }; } else { menuButton.buttonText = '<u>Field Battle</u>'; menuButton.buttonHit.onRelease = function () { _root.fadeTransition.targetFrame = 'subControls'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFadeSlow'); _root.lastMenu = 'gameResults'; _root.targetTeamMenu = 'endurance'; this.enabled = false; _root.saveUserSettings(); }; } } else { if (_root.userSettings.tutorialObjective > 0) { menuButton.buttonText = '<u>Complete Training</u>'; menuButton.buttonHit.onRelease = function () { _root.userSettings.tutorialObjective = 11; _root.fadeTransition.targetFrame = 'instructions'; _root.fadeTransition.targetObject = '_root'; _root.fadeTransition.gotoAndPlay('beginFadeSlow'); _root.lastMenu = 'gameResults'; this.enabled = false; _root.saveUserSettings(); }; } } } } } movieClip 2267 { frame 115 { clearInterval(_root.gamePath.gameIntervals.unitsUpdate1); clearInterval(_root.gamePath.gameIntervals.unitsUpdate2); _root.soundManager.maxBGMusicVolume = 0; _root.soundManager.fadePower = 1; _root.helpDialog.clearHelpMessage(); } frame 155 { stop(); } frame 180 { stop(); } frame 205 { stop(); } } movieClip 2300 { frame 1 { switch (_root.userSettings.tutorialObjective) { case 5: gotoAndPlay('instructions1'); break; case 6: gotoAndPlay('instructions2'); break; case 7: gotoAndPlay('instructions3'); break; case 8: gotoAndPlay('instructions4'); break; case 9: gotoAndPlay('instructions5'); break; case 10: gotoAndPlay('instructions6'); } } frame 15 { exitButton.onRelease = function () { _parent.backBlackOn = false; _root.gameInterfacePath.nextChatMessage = _root.gamePath.playerNumber + ':Instructions:Press A and D (or LEFT and RIGHT) to scroll the field!'; play(); }; stop(); } frame 33 { _root.gameInterfacePath.unPause(); stop(); } frame 48 { exitButton.onRelease = function () { _parent.backBlackOn = false; _root.gameInterfacePath.nextChatMessage = _root.gamePath.playerNumber + ':Instructions:Deploy a unit using the top right menu!'; play(); }; stop(); } frame 66 { _root.gameInterfacePath.unPause(); stop(); } frame 81 { exitButton.onRelease = function () { _parent.backBlackOn = false; _root.gameInterfacePath.nextChatMessage = _root.gamePath.playerNumber + ':Instructions:Select units by clicking on them, or clicking and dragging over them!'; play(); }; stop(); } frame 100 { _root.gameInterfacePath.unPause(); stop(); } frame 115 { exitButton.onRelease = function () { _parent.backBlackOn = false; _root.gameInterfacePath.nextChatMessage = _root.gamePath.playerNumber + ':Instructions:Press S (or DOWN) to move selected units across the field!'; play(); }; stop(); } frame 135 { _root.gameInterfacePath.unPause(); stop(); } frame 150 { exitButton.onRelease = function () { _parent.backBlackOn = false; _root.gameInterfacePath.nextChatMessage = _root.gamePath.playerNumber + ':Instructions:With units selected, press W (or UP), then click on the enemy!'; play(); }; stop(); } frame 170 { _root.gameInterfacePath.unPause(); stop(); } frame 185 { exitButton.onRelease = function () { _parent.backBlackOn = false; _root.gameInterfacePath.nextChatMessage = _root.gamePath.playerNumber + ':Instructions:Click a skill block or press a number (1 - 5) to use a skill!'; play(); }; stop(); } frame 204 { _root.gameInterfacePath.unPause(); stop(); } } movieClip 2302 { frame 1 { function fade() { if (this._alpha < 100 && _parent.backBlackOn) { this._alpha += 5; } } yes.buttonText = 'Yes'; yes.buttonHit.onRelease = function () {}; no.buttonText = 'No'; no.buttonHit.onRelease = function () { _root.gameInterfacePath.unPause(); _root.gamePath.interfaceClicked = true; _parent.backBlackOn = false; }; clearInterval(fadeInt); fadeInt = setInterval(this, 'fade', 40); } } movieClip 2303 { frame 1 { function fadeBackBlack(firstBlack) { if (firstBlack == true) { backBlackOn = true; clearInterval(fadeBlackInterval); fadeBlackInterval = setInterval(this, 'fadeBackBlack', 40, false); } if (backBlackOn == true && backBlack._alpha < 100) { backBlack._alpha += 5; } else { if (backBlackOn != true && backBlack._alpha > 0) { backBlack._alpha -= 5; if (backBlack._alpha <= 0) { gotoAndStop('clear'); clearInterval(fadeBlackInterval); } } } } stop(); } frame 2 { unPause.onRelease = function () { _root.gameInterfacePath.unPause(); _root.gamePath.interfaceClicked = true; backBlackOn = false; }; backBlack.gotoAndStop(2); fadeBackBlack(true); } frame 5 { fadeBackBlack(true); backBlack.gotoAndStop(1); } } movieClip 2304 { frame 1 { function updateSelector() { if (Key.isDown(1)) { if (this.selectingStage == 0) { this.selectStartX = _root._xmouse; this.selectStartY = _root._ymouse; this.selectingStage = 1; } if (Math.abs(_root._xmouse - this.selectStartX) > 5 || Math.abs(_root._ymouse - this.selectStartY) > 5) { this.selectingStage = 2; this.clear(); this.beginFill(11189196, 50); this.moveTo(this.selectStartX, this.selectStartY); this.lineTo(_root._xmouse, this.selectStartY); this.lineTo(_root._xmouse, _root._ymouse); this.lineTo(this.selectStartX, _root._ymouse); this.endFill(); } } else { if (this.selectingStage > 0) { _root.gamePath.changeSelection(); this.clear(); this.selectingStage = 0; } } } function updateInterfaceManager() { selector.updateSelector(); unitDisplay.updateUnitDisplay(); if (_parent.mainIntervalsPassed > lastInterfaceLow + 24) { updateInterfaceLow(); } if (displayMessage != '' && messageBack._alpha < 100) { messageBack._alpha += 10; } else { if (displayMessage == '' && messageBack._alpha > 0) { messageBack._alpha -= 10; } } maxAreDeployed = false; if (_root['gameUnitsPath' + _parent.playerNumber].deployedUnits >= _parent.unitLineups[_parent.playerNumber].length) { if (deployRechargeBar._currentframe != 4) { deployRechargeBar.gotoAndStop('allDeployed'); } if (deployRechargeBar._alpha < 100) { deployRechargeBar._alpha += 5; } if (deployRecharge > 0) { --deployRecharge; } maxAreDeployed = true; } else { if (_root['gameUnitsPath' + _parent.playerNumber].deployedUnits - _root['gameUnitsPath' + _parent.playerNumber].unitsDead.length >= _parent.maxDeployedUnits) { if (deployRechargeBar._currentframe != 3) { deployRechargeBar.gotoAndStop('maxDeployed'); } if (deployRechargeBar._alpha < 100) { deployRechargeBar._alpha += 5; } if (deployRecharge > 0) { --deployRecharge; } maxAreDeployed = true; } else { if (deployRecharge > 0) { if (deployRechargeBar._currentframe != 2) { deployRechargeBar.gotoAndStop('deployRecharge'); } if (deployRechargeBar._alpha < 100) { deployRechargeBar._alpha += 5; } deployRechargeBar.bar._xscale = (deployRecharge / _parent.deployUnitInterval) * 100; --deployRecharge; } else { if (deployRechargeBar._alpha > 0) { deployRechargeBar._alpha -= 5; if (deployRechargeBar._alpha <= 0) { deployRechargeBar.gotoAndStop('clear'); } } } } } if (_root.currentMission != -1) { score.text = ''; } else { score.text = 'Score: ' + Math.round(_parent.score); } } function updateInterfaceLow() { if (_parent.mainIntervalsPassed > lastDisplayMessage + 70 && displayMessage != '') { displayMessage = ''; messageBack.displayMessage.htmlText = displayMessage; } _parent.displayChat.htmlText = ''; var v2 = chatMessages.length; while (v2 > 0) { if (_parent.mainIntervalsPassed > parseInt((chatMessages[v2 - 1].split(':TimeStart:'))[1]) + 140) { chatMessages.splice(v2 - 1, 1); } else { _parent.displayChat.htmlText += (chatMessages[v2 - 1].split(':TimeStart:'))[0]; } --v2; } if (nextChatMessage != '') { nextChatMessageDisplay = '<font color="#' + _parent.playerSettings[(nextChatMessage.split(':'))[0]].hexColourLight + '"><u>' + (nextChatMessage.split(':'))[1] + ':</u> </font><font color="#FFFFFF">' + (nextChatMessage.split(':'))[2] + '</font><br />'; chatMessages.push(nextChatMessageDisplay + ':TimeStart:' + _parent.mainIntervalsPassed); nextChatMessage = ''; } lastInterfaceLow = _parent.mainIntervalsPassed; } function newDisplayMessage(disMessage, disColour) { if (disMessage.length > 40) { dynamicFontTag = '<font size="10">'; } else { if (disMessage.length > 30) { dynamicFontTag = '<font size="12">'; } else { dynamicFontTag = '<font size="14">'; } } dynamicFontTagEnd = '</font>'; if (disColour != 0) { messageBackColour.setTint(_parent.playerSettings[disColour].colourR, _parent.playerSettings[disColour].colourG, _parent.playerSettings[disColour].colourB, 20); disColour = 0; } else { messageBackColour.setTint(255, 255, 255, 0); } displayMessage = disMessage; messageBack.displayMessage.htmlText = dynamicFontTag + displayMessage + dynamicFontTagEnd; lastDisplayMessage = _parent.mainIntervalsPassed; } function pauseGame() { if (!_parent.gamePaused) { clearInterval(_parent.gameIntervals.globalUpdate); clearInterval(_parent.gameIntervals.unitsUpdate1); clearInterval(_parent.gameIntervals.unitsUpdate2); clearInterval(_parent.gameIntervals.interfaceUpdate); _parent.gamePaused = true; return true; } else { return undefined; } } function unPause() { clearInterval(_parent.gameIntervals.globalUpdate); clearInterval(_parent.gameIntervals.unitsUpdate1); clearInterval(_parent.gameIntervals.unitsUpdate2); clearInterval(_parent.gameIntervals.interfaceUpdate); _parent.gameIntervals.globalUpdate = setInterval(_parent, 'updateGlobal', 80); _parent.gameIntervals.unitsUpdate1 = setInterval(_root.gameUnitsPath1, 'updateUnitManager', 40); _parent.gameIntervals.unitsUpdate2 = setInterval(_root.gameUnitsPath2, 'updateUnitManager', 40); _parent.gameIntervals.interfaceUpdate = setInterval(this, 'updateInterfaceManager', 80); _parent.gamePaused = false; overlay.gotoAndStop('clear'); } displayMessage = ''; nextDisplayMessage = ''; lastDisplayMessage = 0; messageBackColour = new Color(messageBack); chatMessages = new Array(); filteredChatMessages = new Array(); nextChatMessage = ''; lastInterfaceLow = 0; guideRepeated = false; var skillGlow = new flash.filters.GlowFilter(16777215, 5, 7, 7, 2, 1, false, false); selector.selectingStage = 0; selector.lineStyle(2, 6719658); selector.updateSelector = updateSelector; qualityButton.buttonText = 'Toggle Quality'; qualityButton.buttonHit.onRelease = function () { if (_root.userSettings.graphicsQuality == 'Auto') { _root.userSettings.graphicsQuality = 'High'; } else { if (_root.userSettings.graphicsQuality == 'High') { _root.userSettings.graphicsQuality = 'Medium'; } else { if (_root.userSettings.graphicsQuality == 'Medium') { _root.userSettings.graphicsQuality = 'Low'; } else { if (_root.userSettings.graphicsQuality == 'Low') { _root.userSettings.graphicsQuality = 'High'; } } } } _root._quality = _root.userSettings.graphicsQuality.toUpperCase(); _root.autoQuality = false; }; autoQualityButton.buttonText = 'Auto Quality'; autoQualityButton.buttonHit.onRelease = function () { _root.userSettings.graphicsQuality = 'Auto'; _root.autoQuality = true; }; pauseGameButton.buttonText = 'Pause Game'; pauseGameButton.buttonHit.onRelease = function () { if (pauseGame() == true) { overlay.gotoAndStop('paused'); } }; if (_root.userSettings.tutorialObjective > 0) { repeatInstructions.buttonText = 'Repeat Guide'; repeatInstructions.buttonHit.onRelease = function () { overlay.gotoAndStop('instructions'); pauseGame(); tutArrow._alpha = 0; _parent.playerSelectingTarget = false; guideRepeated = true; }; } else { repeatInstructions._alpha = 0; repeatInstructions.buttonHit.enabled = false; } stop(); } } movieClip 2307 { frame 1 { stop(); bloodOn = false; } frame 11 { stop(); bloodOn = true; } } movieClip 2308 { frame 1 { function addToEnemies() { if (victoryConditions[2] || victoryConditions[3]) { possEnem = _root.survivalEnemies[_root.enduranceDifficulty]; } var v2 = possEnem[Math.round(Math.random() * (possEnem.length - 1))]; var v3 = unitLineups[enemyNumber].length; unitLineups[enemyNumber][v3] = new Array(); for (i2 in _root.predefinedEnemies[v2]) { unitLineups[enemyNumber][v3][i2] = _root.predefinedEnemies[v2][i2]; } if (unitLineups[enemyNumber][v3].unitName == '!rnd') { var v4 = 0; do { randomEnemyName = Math.round(Math.random() * (_root.randomEnemyNames.length - 1)); } while (enemyNamesUsed.Contains(randomEnemyName) >= 0 && ++v4 < _root.randomEnemyNames.length); enemyNamesUsed.push(randomEnemyName); unitLineups[enemyNumber][v3].unitName = _root.randomEnemyNames[randomEnemyName]; } } Mouse.hide(); onMouseMove = function () { mouse._x = _root._xmouse; mouse._y = _root._ymouse; }; mouse._x = _root._xmouse; mouse._y = _root._ymouse; environmentNumber = _root.campaignStats.missionData[_root.currentMission].environmentNumber; playerNumber = _root.campaignStats.missionData[_root.currentMission].playerNumber; if (playerNumber == 1) { enemyNumber = 2; } else { if (playerNumber == 2) { enemyNumber = 1; } } victoryConditions = _root.campaignStats.missionData[_root.currentMission].victoryCond; deployUnitInterval = _root.campaignStats.missionData[_root.currentMission].deployInterval; maxDeployedUnits = _root.campaignStats.missionData[_root.currentMission].maxDeployed; failedPlayer = 0; fieldScrollOffset = 0; gameIntervals = new Array(); gamePaused = true; getUnitTargetManager = 0; interfaceClicked = false; lastSkillError = 0; lastUp = 0; mainIntervalsPassed = 0; numPlayers = 1; playerSelectingTarget = false; plUnCo = new Array(); plUnCo[1] = new Array(); plUnCo[2] = new Array(); selectTargetEvent = 0; skillSelectingTarget = 0; selectedUnit = new Array(); selectedUnitManager = 1; statDamageDealt = 0; statDamageTaken = 0; statDefeatedEnemies = 0; statDefeatedUnits = 0; statSkillsUsed = 0; undeployableUnits = new Array(); lastAdvanceTutorial = -130; tutorialAdvance = false; playerSettings = new Array(); playerSettings[playerNumber] = new Array(); playerSettings[playerNumber].AISetting = 1; playerSettings[playerNumber].teamName = _root.userSettings.teamName; playerSettings[playerNumber].colourR = _root.userSettings.colourR; playerSettings[playerNumber].colourG = _root.userSettings.colourG; playerSettings[playerNumber].colourB = _root.userSettings.colourB; playerSettings[playerNumber].hexColour = _root.RGBToHex(playerSettings[playerNumber].colourR, playerSettings[playerNumber].colourG, playerSettings[playerNumber].colourB); playerSettings[playerNumber].hexColourLight = _root.RGBToHexLight(playerSettings[playerNumber].colourR, playerSettings[playerNumber].colourG, playerSettings[playerNumber].colourB); playerSettings[playerNumber].hexColourLight2 = _root.RGBToHexLight2(playerSettings[enemyNumber].colourR, playerSettings[enemyNumber].colourG, playerSettings[enemyNumber].colourB); playerSettings[enemyNumber] = new Array(); playerSettings[enemyNumber].AISetting = 2; playerSettings[enemyNumber].teamName = _root.campaignStats.missionData[_root.currentMission].enemyTeamName; playerSettings[enemyNumber].colourR = _root.campaignStats.missionData[_root.currentMission].enemyTeamColours[0]; playerSettings[enemyNumber].colourG = _root.campaignStats.missionData[_root.currentMission].enemyTeamColours[1]; playerSettings[enemyNumber].colourB = _root.campaignStats.missionData[_root.currentMission].enemyTeamColours[2]; playerSettings[enemyNumber].hexColour = _root.RGBToHex(playerSettings[enemyNumber].colourR, playerSettings[enemyNumber].colourG, playerSettings[enemyNumber].colourB); playerSettings[enemyNumber].hexColourLight = _root.RGBToHexLight(playerSettings[enemyNumber].colourR, playerSettings[enemyNumber].colourG, playerSettings[enemyNumber].colourB); playerSettings[enemyNumber].hexColourLight2 = _root.RGBToHexLight2(playerSettings[enemyNumber].colourR, playerSettings[enemyNumber].colourG, playerSettings[enemyNumber].colourB); selectGlow = new flash.filters.GlowFilter(playerSettings[playerNumber].hexColour, 5, 6, 6, 2, 1, false, false); selectGlowEnemy = new flash.filters.GlowFilter(playerSettings[enemyNumber].hexColour, 5, 6, 6, 2, 1, false, false); newlySelectedGlow = new flash.filters.GlowFilter(16720418, 6, 10, 10, 3, 1, false, false); unitLineups = new Array(); enemyNamesUsed = new Array(); unitLineups[playerNumber] = _root.userUnitLineup; unitLineups[enemyNumber] = new Array(); var i = 0; while (i < _root.campaignStats.missionData[_root.currentMission].enemyTeamUnits.length) { unitLineups[enemyNumber][i] = new Array(); for (i2 in _root.predefinedEnemies[_root.campaignStats.missionData[_root.currentMission].enemyTeamUnits[i]]) { unitLineups[enemyNumber][i][i2] = _root.predefinedEnemies[_root.campaignStats.missionData[_root.currentMission].enemyTeamUnits[i]][i2]; } if (unitLineups[enemyNumber][i].unitName == '!rnd') { do { randomEnemyName = Math.round(Math.random() * (_root.randomEnemyNames.length - 1)); } while (enemyNamesUsed.Contains(randomEnemyName) >= 0); enemyNamesUsed.push(randomEnemyName); unitLineups[enemyNumber][i].unitName = _root.randomEnemyNames[randomEnemyName]; } ++i; } _root.soundManager.maxBGMusicVolume = 0; _root.soundManager.fadePower = 3; stop(); } frame 2 { function updateGlobal() { var v9 = new Date(); currentTime = v9.getTime(); if (Key.isDown(40) || Key.isDown(32) || Key.isDown(83)) { playerSelectingTarget = false; var v3 = {'x': _root._xmouse, 'y': _root._ymouse}; this['unitManager' + playerNumber].globalToLocal(v3); if (selectedUnitManager == playerNumber) { for (var v6 in selectedUnit) { selectUnitPath = this['unitManager' + playerNumber]['playerUnit' + selectedUnit[v6]]; v3.x = Math.max(v3.x, 50); v3.x = Math.min(v3.x, fieldWidth - 50); if (selectUnitPath != undefined) { if (v3.x > selectUnitPath.unitBody._x + 10 || v3.x < selectUnitPath.unitBody._x - 10) { selectUnitPath.desX = v3.x; selectUnitPath.deRe = false; selectUnitPath.selectedAbility = -1; selectUnitPath.taInRa = false; selectUnitPath.targetEnemy = -1; selectUnitPath.nextUnitMode = 2; if (selectUnitPath.unitMode != 2 && selectUnitPath.nextUnitModeDelay <= 0) { selectUnitPath.nextUnitModeDelay += 11 * v6 + 1; } this['unitManager' + playerNumber].changeDestinationFlags(); } } } } } if (Key.isDown(38) || Key.isDown(87)) { if (selectedUnitManager == playerNumber && selectedUnit.length > 0 && playerSelectingTarget != true && lastUp < mainIntervalsPassed - 5) { playerSelectingTarget = true; selectTargetEvent = 0; skillSelectingTarget = 0; skillSelectingAbility = 0; lastUp = mainIntervalsPassed; } else { if (playerSelectingTarget && lastUp < mainIntervalsPassed - 5) { playerSelectingTarget = false; lastUp = mainIntervalsPassed; } } } if (_root.userSettings.tutorialObjective > 0) { if (tutorialAdvance && mainIntervalsPassed > lastAdvanceTutorial + 60 || _root.userSettings.tutorialObjective == 4) { ++_root.userSettings.tutorialObjective; interfaceManager.overlay.gotoAndStop('instructions'); interfaceManager.pauseGame(); lastAdvanceTutorial = mainIntervalsPassed; tutorialAdvance = false; interfaceManager.tutArrow._alpha = 0; playerSelectingTarget = false; } else { if (mainIntervalsPassed > lastAdvanceTutorial + 264 && !tutorialAdvance && !interfaceManager.guideRepeated && _root.userSettings.tutorialObjective <= 9) { interfaceManager.tutArrow._alpha = 100; } } if ((_root.userSettings.tutorialObjective == 5 && fieldScroll != 0 || _root.userSettings.tutorialObjective == 6 && this['unitManager' + playerNumber].deployedUnits > 0 || _root.userSettings.tutorialObjective == 7 && selectedUnit.length > 0 || _root.userSettings.tutorialObjective == 8 && (plUnCo[playerNumber][0][0] > 250 || plUnCo[playerNumber][1][0] > 250 || plUnCo[playerNumber][2][0] > 250) || _root.userSettings.tutorialObjective == 9 && statDamageDealt > 0) && !tutorialAdvance) { lastAdvanceTutorial = mainIntervalsPassed; tutorialAdvance = true; } } if (victoryConditions[3]) { if (timeAttack > 0) { --timeAttack; var v8 = Math.floor(timeAttack / 12 / 60); var v4 = Math.round(timeAttack / 12) % 60; var v7 = (timeAttack % 12) * 5; if (v4 < 10) { v4 = '0' + v4; } if (v7 < 10) { v7 = '0' + v7; } interfaceManager.timer.text = 'Time: ' + v8 + ':' + v4 + ':' + v7; if (mainIntervalsPassed > lastScore + 6) { score += scoreMod; lastScore = mainIntervalsPassed; var v5 = Math.round(timeAttack / 12); if (v5 < 10 && lstTimerCntDwn != v5) { overlayManager.attachMovie('timerNum', 'timerNum' + mainIntervalsPassed, overlayManager.getNextHighestDepth(), {'dispNum': v5, 'textType': 0, '_x': 15, '_y': 171}); lstTimerCntDwn = v5; } } } if (timeAttack <= 0) { testVictory(playerNumber); } } ++mainIntervalsPassed; } function interfaceClick() { if (interfaceClicked == true) { interfaceClicked = false; return true; } else { if (interfaceManager.hitTest(_root._xmouse, _root._ymouse, true) && !interfaceManager.interfaceCut.hitTest(_root._xmouse, _root._ymouse, true) && interfaceManager.selector.selectingStage != 2) { return true; } else { return false; } } } function changeSelection() { if (!interfaceClick() || selectedFromDropDown) { if (playerSelectingTarget) { if (selectTargetEvent == 0 && selectedUnitManager == playerNumber) { var v3 = -1; while (++v3 < this['unitManager' + enemyNumber].deployedUnits) { if (this['unitManager' + enemyNumber]['playerUnit' + v3].unitBody.hitTest(_root._xmouse, _root._ymouse, true) && this['unitManager' + enemyNumber]['playerUnit' + v3].unitDead != true) { this['unitManager' + playerNumber].unitSetAttackTarget(v3); _root.soundManager.unitSoundVoice(1); _root['gameUnitsPath' + enemyNumber]['playerUnit' + v3].newlySelectedGlowing = 1; playerSelectingTarget = false; break; } } } else { if (selectTargetEvent == 1 && skillSelectingTarget >= 0 && skillSelectingAbility > 0) { if (_root.skillStats[skillSelectingAbility].alliance == 1) { getUnitTargetManager = enemyNumber; } else { if (_root.skillStats[skillSelectingAbility].alliance == 2) { getUnitTargetManager = playerNumber; } } var v3 = -1; while (++v3 < this['unitManager' + getUnitTargetManager].deployedUnits) { if (this['unitManager' + getUnitTargetManager]['playerUnit' + v3].unitBody.hitTest(_root._xmouse, _root._ymouse, true) && this['unitManager' + getUnitTargetManager]['playerUnit' + v3].unitDead != true && !(v3 == selectedUnit[0] && getUnitTargetManager == playerNumber)) { this['unitManager' + playerNumber].unitSelectSkill(selectedUnit[0], skillSelectingTarget, getUnitTargetManager, v3); _root.soundManager.unitSoundVoice(1); _root['gameUnitsPath' + getUnitTargetManager]['playerUnit' + v3].newlySelectedGlowing = 1; this['unitManager' + playerNumber].changeDestinationFlags(); playerSelectingTarget = false; break; } } } } } else { selectedUnitManager = 0; checkPlayerNumber = playerNumber; selectedUnit = []; var v6 = false; while (!v6) { var v4 = -1; var v3 = -1; while (++v3 < this['unitManager' + checkPlayerNumber].deployedUnits) { this['unitManager' + checkPlayerNumber]['playerUnit' + v3].isSelected = false; this['unitManager' + checkPlayerNumber]['playerUnit' + v3].unitBody.filters = []; if (selectedUnitManager != playerNumber || checkPlayerNumber == playerNumber) { if (this['unitManager' + checkPlayerNumber]['playerUnit' + v3].unitBody.hitTest(_root._xmouse, _root._ymouse, true) && interfaceManager.selector.selectingStage != 2 || this['unitManager' + checkPlayerNumber]['playerUnit' + v3].unitBody.hitTest(interfaceManager.selector) && interfaceManager.selector.selectingStage == 2 || selectedUnitFromList == v3 && selectedManagerFromList == checkPlayerNumber) { if (this['unitManager' + checkPlayerNumber]['playerUnit' + v3].unitDead != true) { selectedUnitManager = checkPlayerNumber; if (interfaceManager.selector.selectingStage == 1) { selectedUnit[0] = v3; v4 = v3; } else { if (interfaceManager.selector.selectingStage == 2) { selectedUnit.push(v3); this['unitManager' + checkPlayerNumber]['playerUnit' + v3].isSelected = true; this['unitManager' + checkPlayerNumber]['playerUnit' + v3].newlySelectedGlowing = 0; var v5 = this['unitManager' + checkPlayerNumber]['playerUnit' + v3].unitBody.filters; if (selectedUnitManager != playerNumber) { v5.push(selectGlowEnemy); } else { v5.push(selectGlow); } this['unitManager' + checkPlayerNumber]['playerUnit' + v3].unitBody.filters = v5; this['unitManager' + checkPlayerNumber]['playerUnit' + v3].unitBody.selectedGlow = true; } } } } } } if (interfaceManager.selector.selectingStage == 1 && v4 >= 0) { this['unitManager' + checkPlayerNumber]['playerUnit' + v4].isSelected = true; this['unitManager' + checkPlayerNumber]['playerUnit' + v4].newlySelectedGlowing = 0; v5 = this['unitManager' + checkPlayerNumber]['playerUnit' + v4].unitBody.filters; if (selectedUnitManager != playerNumber) { v5.push(selectGlowEnemy); } else { v5.push(selectGlow); } this['unitManager' + checkPlayerNumber]['playerUnit' + v4].unitBody.filters = v5; this['unitManager' + checkPlayerNumber]['playerUnit' + v4].unitBody.selectedGlow = true; } if (checkPlayerNumber == 1 && checkPlayerNumber != enemyNumber) { checkPlayerNumber = 2; } else { if (checkPlayerNumber == 2 && checkPlayerNumber != enemyNumber) { checkPlayerNumber = 1; } else { v6 = true; } } } this['unitManager' + playerNumber].changeDestinationFlags(); interfaceManager.unitDisplay.newSelected(); selectedFromDropDown = false; selectedUnitFromList = -1; selectedManagerFromList = -1; } } } function newRandomChat(sourcePlayerNumber, sourcePlayerUnit, eventID, spcID) { if (!spcID) { var v2 = ''; var v6 = _root['gameUnitsPath' + sourcePlayerNumber].inversePlayerNumber; var v8 = _root['gameUnitsPath' + sourcePlayerNumber]['playerUnit' + sourcePlayerUnit].unitName; var v4 = playerSettings[v6].teamName; var v3 = _root['gameUnitsPath' + v6]['playerUnit' + _root['gameUnitsPath' + sourcePlayerNumber]['playerUnit' + sourcePlayerUnit].targetEnemy].unitName; if (v3 == undefined) { v3 = 'Sir'; } if (v4 == undefined) { v4 = 'These Guys'; } if (eventID == 1) { var v7 = Math.round(Math.random() * 18); if (!v7) { newChatNumber = Math.round(Math.random() * 20); switch (newChatNumber) { case 0: v2 = 'Your death approaches quickly, rogue!'; break; case 1: v2 = 'Oh, I\'m sorry. Did that hurt?'; break; case 2: v2 = 'Your defense is lacking.'; break; case 3: v2 = 'Getting a bit tired, are we?'; break; case 4: v2 = 'You\'re tiring me.'; break; case 5: v2 = 'Well? How does it feel to be so weak?'; break; case 6: v2 = v4 + ' will die!'; break; case 7: v2 = 'I will make this slow and painful, ' + v3 + '.'; break; case 8: v2 = 'Say your prayers, ' + v3 + '!'; break; case 9: v2 = 'Ha! ' + v3 + ' thinks he can defeat ME!'; break; case 10: v2 = 'All will know that you died at my hands.'; break; case 11: v2 = 'How many times do I have to strike you?'; break; case 12: v2 = 'You\'d better get your monks over here, ' + v3 + '.'; break; case 13: v2 = 'Watch the glorious victory of ' + v8 + '!'; break; case 14: v2 = 'I will kill you eventually.'; break; case 15: v2 = 'I could take all of ' + v4 + ' by myself!'; break; case 16: v2 = 'My attacks are almost always fatal.'; break; case 17: v2 = v3 + '? ' + 'Weak.'; break; case 18: v2 = 'Your defeat will strengthen you.'; break; case 19: v2 = 'What can I say? I\'m just that strong.'; break; case 20: v2 = 'Enjoy your judgement, ' + v3 + '.'; break; default: v2 = 'My attacks will break you!'; } } } else { if (eventID == 2) { var v7 = Math.round(Math.random() * 7); if (!v7) { newChatNumber = Math.round(Math.random() * 20); switch (newChatNumber) { case 0: v2 = 'Gah!'; break; case 1: v2 = 'Agh!'; break; case 2: v2 = 'I can\'t continue...'; break; case 3: v2 = 'I will return...'; break; case 4: v2 = 'Death...'; break; case 5: v2 = 'Ahh. That hurts...'; break; case 6: v2 = 'Avenege me!'; break; case 7: v2 = 'Ahh... That wasn\'t so bad.'; break; case 8: v2 = 'No!'; break; case 9: v2 = 'Gah! This cannot be!'; break; case 10: v2 = 'Ugh... enemy got lucky...'; break; case 11: v2 = 'Urgh...'; break; case 12: v2 = 'I... can\'t see...'; break; case 13: v2 = 'No pain...'; break; case 14: v2 = 'Heal me...'; break; case 15: v2 = 'Go on...'; break; case 16: v2 = 'Underestimated them...'; break; case 17: v2 = 'Feeling weak...'; break; case 18: v2 = 'Photomorus...'; break; case 19: v2 = 'Sorry, General...'; break; case 20: v2 = 'Sir... I will be judged...'; break; default: v2 = 'Too late...'; } } } } if (!v7) { interfaceManager.nextChatMessage = sourcePlayerNumber + ':' + _root['gameUnitsPath' + sourcePlayerNumber]['playerUnit' + sourcePlayerUnit].unitName + ':' + v2; } } } function testVictory(failedPlayerT) { if (!failedPlayer) { var v3 = -1; if (this['unitManager' + failedPlayerT].leaderDead && victoryConditions[0] || _root.chancellusEnd) { v3 = 0; } else { if (this['unitManager' + failedPlayerT].unitsDead.length >= unitLineups[failedPlayerT].length && (victoryConditions[1] || (victoryConditions[2] || victoryConditions[3]) && failedPlayerT == playerNumber)) { v3 = 1; } else { if (victoryConditions[3] && timeAttack <= 0) { v3 = 2; } } } if (v3 >= 0 && (!startChancellusEnd || _root.chancellusEnd)) { if (_root.chancellusEnd) { failedPlayerT = playerNumber; } interfaceManager.overlay.gotoAndStop('battleCloser'); this.failedPlayer = failedPlayerT; victoryCondition = v3; displayChat.htmlText = ''; selectedUnit = []; this['unitManager' + playerNumber].changeDestinationFlags(); interfaceManager.unitDisplay.newSelected(); _root.helpDialog.clearHelpMessage(); playerSelectingTarget = false; mouse.gotoAndStop('standard'); interfaceManager.unitDisplay.selectUnit.gotoAndStop('clear'); interfaceManager.deployMenu.droppedDown = false; interfaceManager.pauseGameButton.buttonHit.enabled = false; interfaceManager.autoQualityButton.buttonHit.enabled = false; interfaceManager.qualityButton.buttonHit.enabled = false; clearInterval(gameIntervals.globalUpdate); clearInterval(gameIntervals.interfaceUpdate); } } } function spcTimer() { if (mainIntervalsPassed > finalSendTime + 80) { interfaceManager.newDisplayMessage('Chancellus: Divination Wrath', _parent.playerNumber); overlayManager.attachMovie('chancellusFinal', 'chancellusFinal', overlayManager.getNextHighestDepth()); clearInterval(spcTimerInt); } } _root.gamePath = this; _root.gameInterfacePath = interfaceManager; _root.gameUnitsPath1 = unitManager1; _root.gameUnitsPath2 = unitManager2; _root.gameBackgroundPath = backgroundManager; unitManager1.playerNumber = 1; unitManager1.inversePlayerNumber = 2; unitManager2.playerNumber = 2; unitManager2.inversePlayerNumber = 1; switch (_root.enduranceDifficulty) { case 0: scoreMod = 1; break; case 1: scoreMod = 1.5; break; case 2: scoreMod = 2; break; default: } if (victoryConditions[2]) { score = 0; interfaceManager.score.text = 'Score: 0'; interfaceManager.timer.text = ''; } else { if (victoryConditions[3]) { lastScore = 0; timeAttack = 1080; score = 0; interfaceManager.score.text = 'Score: ' + score; interfaceManager.timer.text = 'Time: 1:30:00'; lstTimerCntDwn = 0; } else { interfaceManager.score.text = ''; interfaceManager.timer.text = ''; } } if (playerSettings[1].AISetting == 2) { attachMovie('AIManager', 'AIManager1', 3); } if (playerSettings[2].AISetting == 2) { attachMovie('AIManager', 'AIManager2', 3); } backgroundManager.background1.gotoAndStop(_root.environmentStats[environmentNumber].ground); backgroundManager.background2.gotoAndStop(_root.environmentStats[environmentNumber].background2); backgroundManager.background3.gotoAndStop(_root.environmentStats[environmentNumber].background3); backgroundManager.background4.gotoAndStop(_root.environmentStats[environmentNumber].background4); if (_root.environmentStats[environmentNumber].sun) { overlayManager.attachMovie('sun' + _root.environmentStats[environmentNumber].sun, 'sun', overlayManager.getNextHighestDepth()); overlayManager.sun.currentFrameRecord = 0; overlayManager.sun.lastAlphaDirectionRays = 0; overlayManager.sun.lastAlphaDirectionGlare = 0; overlayManager.sun._x = _root.environmentStats[environmentNumber].sunX; overlayManager.sun._y = _root.environmentStats[environmentNumber].sunY; if (_root.environmentStats[environmentNumber].sunFlip) { overlayManager.sun._xscale = -100; } } if (_root.environmentStats[environmentNumber].fieldOverlay) { fieldOverlayX = backgroundManager.background1.fieldOverlayPoint._x; fieldOverlayY = backgroundManager.background1.fieldOverlayPoint._y; overlayManager.attachMovie('fieldOverlay' + _root.environmentStats[environmentNumber].fieldOverlay, 'fieldOverlay', overlayManager.getNextHighestDepth(), {'_y': fieldOverlayY}); fieldOverlayScroll = _root.environmentStats[environmentNumber].fieldOverlayScroll; } unitManager1._width = 1200; unitManager2._width = 1200; backgroundManager.background1._width = 1200; backgroundManager.background2._width = 1000; backgroundManager.background3._width = 800; backgroundManager.background4._width = 650; backgroundManager.background1._x = 0; backgroundManager.background2._x = 0; backgroundManager.background3._x = 0; backgroundManager.background4._x = 0; scrollSpeed = 16; stageWidth = 600; fieldWidth = 1200; unitManagerScroll = (unitManager1._width - stageWidth) / fieldWidth; background1Scroll = (backgroundManager.background1._width - stageWidth) / fieldWidth; background2Scroll = (backgroundManager.background2._width - stageWidth) / fieldWidth; background3Scroll = (backgroundManager.background3._width - stageWidth) / fieldWidth; background4Scroll = (backgroundManager.background4._width - stageWidth) / fieldWidth; fieldScroll = 0; onEnterFrame = function () { if (!gamePaused) { if (Key.isDown(37) || Key.isDown(65)) { if (fieldScroll + scrollSpeed < 0) { fieldScroll += scrollSpeed; } else { fieldScroll = 0; } } else { if (Key.isDown(39) || Key.isDown(68)) { if (fieldScroll - scrollSpeed > -fieldWidth) { fieldScroll -= scrollSpeed; } else { fieldScroll = -fieldWidth; } } } } unitManager1._x = unitManagerScroll * fieldScroll; unitManager2._x = unitManagerScroll * fieldScroll; backgroundManager.background1._x = background1Scroll * fieldScroll; backgroundManager.background2._x = background2Scroll * fieldScroll; backgroundManager.background3._x = background3Scroll * fieldScroll; backgroundManager.background4._x = background4Scroll * fieldScroll; if (fieldOverlayScroll) { overlayManager.fieldOverlay._x = fieldOverlayScroll * fieldScroll + fieldOverlayX; } if (shakeTime > 0) { --shakeTime; var v2 = Math.random() * shakeMagnitude * (Math.random() * 2 - 1); backgroundManager.background2._x += v2; backgroundManager.background3._x += v2; backgroundManager.background4._x += v2; if (fieldOverlayScroll) { overlayManager.fieldOverlay._x += v2; } } if (Key.isDown(2)) { Mouse.hide(); } if (playerSelectingTarget && mouse._currentframe != 2) { mouse.gotoAndStop('attack'); if (skillSelectingAbility <= 0) { _root.helpDialog.newHelpMessage('noBack', 'none', '<font size=\'10\'>Click an ENEMY... UP to cancel</font>'); } else { if (_root.skillStats[skillSelectingAbility].alliance == 1 || skillSelectingAbility == undefined) { _root.helpDialog.newHelpMessage('noBack', 'none', '<font size=\'10\'>' + _root.skillStats[skillSelectingAbility].name + ' (Click Enemy)</font>'); } else { if (_root.skillStats[skillSelectingAbility].alliance == 2) { _root.helpDialog.newHelpMessage('noBack', 'none', '<font size=\'10\'>' + _root.skillStats[skillSelectingAbility].name + ' (Click Ally)</font>'); } } } helpDialogSelectingTarget = true; } else { if (!playerSelectingTarget) { if (helpDialogSelectingTarget) { _root.helpDialog.clearHelpMessage(); helpDialogSelectingTarget = false; } mouse.gotoAndStop('standard'); } } }; stop(); } frame 3 { if (AIManager1 != undefined) { AIManager1.newAI(1); unitManager1.AISettings = 2; } if (AIManager2 != undefined) { AIManager2.newAI(2); unitManager2.AISettings = 2; } var date = new Date(); var beginBattleTime = date.getTime(); interfaceManager.unitDisplay.newSelected(); this.stop(); } }




http://swfchan.com/10/49790/info.shtml
Created: 27/4 -2019 12:50:11 Last modified: 27/4 -2019 12:50:11 Server time: 22/12 -2024 09:25:59