Frame 1
function goToGiabUrl() {
_root.getURL("http://gameinabottle.com/", "_blank");
}
var _cm = new ContextMenu();
_cm.hideBuiltInItems();
this.menu = _cm;
var menuItem_cmi = new ContextMenuItem("(C) 2008 - GameInABottle.com", goToGiabUrl);
_cm.customItems.push(menuItem_cmi);
stop();
Frame 2
Frame 3
this.main = new com.giab.games.gemc.armor.Main(this);
Frame 4
stop();
Frame 5
gotoAndStop (4);
Symbol 2 MovieClip Frame 1
_alpha = 0;
Symbol 23 MovieClip Frame 1
gotoAndStop(_parent._parent._parent.headSprite);
Symbol 43 MovieClip Frame 1
this.onEnterFrame = function () {
if (loaded) {
this._parent.btnPlay._alpha = Math.min(100, this._parent.btnPlay._alpha + 8);
} else {
percent = Math.min(Math.min((((getTimer() - this.startTime) / 1000) * 100) / 3.4, 100), Math.max(Math.floor(((_root.getBytesLoaded() - 10000) / (_root.getBytesTotal() - 10000)) * 100), 0));
loaderbar._width = percent * 5;
if (percent == 100) {
this.loaded = true;
this._parent.btnPlay._alpha = 0;
this._parent.btnPlay._visible = true;
}
}
};
this.startTime = getTimer();
this.loaded = false;
this._parent.btnPlay._visible = false;
stop();
Symbol 48 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 1
var CPMStarPoolID = 1052;
var CPMStarSubPoolID = 18;
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
stop();
Instance of Symbol 50 MovieClip "btnPlay" in Symbol 64 MovieClip Frame 1
on (press) {
_root.gotoAndPlay(2);
}
Instance of Symbol 54 MovieClip in Symbol 64 MovieClip Frame 1
on (release) {
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
_root.getURL("http://armorgames.com/?gemCraft=preloaderLogo", "_blank");
__com_mochibot__("ad9ec260", this, 10301, true);
}
Instance of Symbol 63 MovieClip in Symbol 64 MovieClip Frame 1
on (release) {
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
_root.getURL("http://gameinabottle.com", "_blank");
__com_mochibot__("8e409578", this, 10301, true);
}
Symbol 65 MovieClip Frame 1
this.gotoAndStop(2);
Symbol 1272 MovieClip [__Packages.com.giab.games.gemc.armor.Main] Frame 0
class com.giab.games.gemc.armor.Main
{
var levelCollection, isIntroOver, mcRoot, mcwRoot, btnOptions, mcOptions, mcSaveError, mcSeparator, mcContextTutor, optStep, isOptionsDragging, isPaused, ctrlOptions, ctrlContextTutor, preferences, vfxEngine, zCurrSoundMc, ctrlUpgrades, ctrlIngame, ctrlTutorial, ctrlMainMenu, ctrlCredits, ctrlLevelSelector, ctrlStatistics, ctrlLoadSave, ctrlStartup, ctrlBgr, ctrlBadges, nextScreen, currentScreen, screenTransTimer, sndLevelselectorambient, sndMainmenuambient, sndScreenZoneChange, selectedLevel, sounds;
function Main (pMcRoot) {
var vThis = this;
levelCollection = new com.giab.games.gemc.armor.LevelCollection(this);
isIntroOver = false;
var _local3 = _root.createEmptyMovieClip("mainLoop", com.giab.games.gemc.armor.const.Z.MAIN_LOOP);
_local3.onEnterFrame = function () {
vThis.doEnterFrame();
};
mcRoot = pMcRoot;
mcwRoot = new com.giab.games.gemc.armor.mcw.McwRoot(mcRoot);
btnOptions = mcRoot.attachMovie("btnOptions", "btnOptions", com.giab.games.gemc.armor.const.Z.BTN_OPTIONS);
btnOptions._y = 500;
mcOptions = mcRoot.attachMovie("mcOptions", "mcOptions", com.giab.games.gemc.armor.const.Z.MC_OPTIONS);
mcOptions._visible = false;
mcOptions._y = 500;
mcSaveError = mcRoot.attachMovie("mcSaveError", "mcSaveError", com.giab.games.gemc.armor.const.Z.MC_SAVEERROR);
mcSaveError._visible = false;
mcSaveError._y = 500;
mcSeparator = _root.attachMovie("mcSeparator", "mcSeparator", com.giab.games.gemc.armor.const.Z.SEPARATOR);
mcSeparator._y = 500;
mcContextTutor = _root.attachMovie("contextTutor", "contextTutor", com.giab.games.gemc.armor.const.Z.CONTEXTTUT);
mcContextTutor._y = 500;
mcContextTutor._alpha = 0;
mcContextTutor._visible = false;
mcContextTutor.filters = [new flash.filters.DropShadowFilter(12, 45, 0, 70, 20, 20, 1.1, 1, false, false, false)];
optStep = 10;
isOptionsDragging = false;
isPaused = false;
ctrlOptions = new com.giab.games.gemc.armor.ctrl.CtrlOptions(this);
ctrlOptions.initiateOptionsPanel();
ctrlContextTutor = new com.giab.games.gemc.armor.ctrl.CtrlContextTutor(this);
preferences = new com.giab.games.gemc.armor.entity.Preferences();
vfxEngine = new com.giab.games.gemc.armor.util.VfxEngine(preferences);
zCurrSoundMc = com.giab.games.gemc.armor.const.Z.SOUNDS_MIN;
initiateSoundObjects();
ctrlUpgrades = new com.giab.games.gemc.armor.ctrl.CtrlUpgrades(mcwRoot.mcwUpgrades, this);
ctrlIngame = new com.giab.games.gemc.armor.ctrl.CtrlIngame(mcwRoot.mcwIngame, this);
ctrlTutorial = new com.giab.games.gemc.armor.ctrl.CtrlTutorial(mcwRoot.mcwTutorial, this);
ctrlMainMenu = new com.giab.games.gemc.armor.ctrl.CtrlMainMenu(mcwRoot.mcwMainMenu, this);
ctrlCredits = new com.giab.games.gemc.armor.ctrl.CtrlCredits(mcwRoot.mcwCredits, this);
ctrlLevelSelector = new com.giab.games.gemc.armor.ctrl.CtrlLevelSelector(mcwRoot.mcwLevelSelector, this);
ctrlStatistics = new com.giab.games.gemc.armor.ctrl.CtrlStatistics(mcwRoot.mcwStatistics, this);
ctrlLoadSave = new com.giab.games.gemc.armor.ctrl.CtrlLoadSave(mcwRoot.mcwLoadSave, this);
ctrlStartup = new com.giab.games.gemc.armor.ctrl.CtrlStartup(mcwRoot.mcwStartup, this);
ctrlBgr = new com.giab.games.gemc.armor.ctrl.CtrlBgr(mcwRoot.mcwBgr, this);
ctrlBadges = new com.giab.games.gemc.armor.ctrl.CtrlBadges(mcwRoot.mcwBadges, this);
mcwRoot.mcwLevelSelector.mc._y = 480;
mcwRoot.mcwIngame.mc._y = 480;
nextScreen = com.giab.common.const.ScreenId.STARTUP;
switchScreenVisibility();
ctrlOptions.renderOptions();
setAllSoundsVolume();
}
function doEnterFrame() {
if (isPaused) {
if (isOptionsDragging) {
ctrlOptions.renderOptions();
}
} else {
ctrlContextTutor.doEnterFrame();
var _local3 = (640 - _root._xmouse) + _root._ymouse;
if (_local3 > 80) {
optStep = Math.min(10, optStep + 1);
}
if (_local3 < 45) {
optStep = Math.max(0, optStep - 1);
}
if (isIntroOver) {
btnOptions._x = com.giab.common.easing.Back2.easeInOut(10 - optStep, 581, -38, 10);
btnOptions._y = com.giab.common.easing.Back2.easeInOut(10 - optStep, -43, 38, 10);
}
if (currentScreen == com.giab.common.const.ScreenId.MAINMENU) {
ctrlMainMenu.doEnterFrame();
} else if (currentScreen == com.giab.common.const.ScreenId.LEVELSELECTOR) {
ctrlLevelSelector.doEnterFrame();
} else if (currentScreen == com.giab.common.const.ScreenId.CREDITS) {
ctrlCredits.doEnterFrame();
} else if (currentScreen == com.giab.common.const.ScreenId.TUTORIAL) {
ctrlTutorial.doEnterFrame();
} else if (currentScreen == com.giab.common.const.ScreenId.INGAME) {
ctrlIngame.doEnterFrame();
if (ctrlIngame.isRunningOnDoubleSpeed) {
ctrlIngame.doEnterFrame();
ctrlIngame.doEnterFrame();
}
} else if (currentScreen == com.giab.common.const.ScreenId.UPGRADES) {
ctrlUpgrades.doEnterFrame();
} else if (currentScreen == com.giab.common.const.ScreenId.BADGES) {
ctrlBadges.doEnterFrame();
} else if (currentScreen == com.giab.common.const.ScreenId.STATISTICS) {
ctrlStatistics.doEnterFrame();
} else if (currentScreen == com.giab.common.const.ScreenId.STARTUP) {
ctrlStartup.doEnterFrame();
} else if ((currentScreen == com.giab.common.const.ScreenId.LOADSAVE_LOAD) || (currentScreen == com.giab.common.const.ScreenId.LOADSAVE_SAVE)) {
ctrlLoadSave.doEnterFrame();
} else if (currentScreen == com.giab.common.const.ScreenId.TRANS_BGR_TO_MAP) {
screenTransTimer++;
mcwRoot.mcwBgr.mc._y = com.giab.common.easing.Strong2.easeInOut(screenTransTimer, 0, -480, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME);
mcwRoot.mcwLevelSelector.mc._y = com.giab.common.easing.Strong2.easeInOut(screenTransTimer, 480, -480, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME);
mcSeparator._y = com.giab.common.easing.Strong2.easeInOut(screenTransTimer, 480, -880, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME);
if (screenTransTimer == 9) {
stopAllSounds();
sndLevelselectorambient.start(0, 9999);
}
if (screenTransTimer > com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME) {
switchScreenVisibility();
}
} else if (currentScreen == com.giab.common.const.ScreenId.TRANS_MAP_TO_BGR) {
screenTransTimer++;
mcwRoot.mcwBgr.mc._y = com.giab.common.easing.Strong2.easeInOut(screenTransTimer, -480, 480, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME);
mcwRoot.mcwLevelSelector.mc._y = com.giab.common.easing.Strong2.easeInOut(screenTransTimer, 0, 480, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME);
mcSeparator._y = com.giab.common.easing.Strong2.easeInOut(screenTransTimer, -400, 880, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME);
if (screenTransTimer == 9) {
stopAllSounds();
sndMainmenuambient.start(0, 9999);
}
if (screenTransTimer > com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME) {
switchScreenVisibility();
}
} else if (currentScreen == com.giab.common.const.ScreenId.TRANS_MAP_TO_INGAME) {
screenTransTimer++;
mcwRoot.mcwLevelSelector.mc._y = com.giab.common.easing.Strong2.easeInOut(screenTransTimer, 0, -480, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME);
mcwRoot.mcwIngame.mc._y = com.giab.common.easing.Strong2.easeInOut(screenTransTimer, 480, -480, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME);
mcSeparator._y = com.giab.common.easing.Strong2.easeInOut(screenTransTimer, 480, -880, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME);
ctrlIngame.moveAllMovieClips(com.giab.common.easing.Strong2.easeInOut(screenTransTimer, 480, -480, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME) - com.giab.common.easing.Strong2.easeInOut(screenTransTimer - 1, 480, -480, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME));
if (screenTransTimer == 9) {
stopAllSounds();
this["sndIngameambient" + (Math.floor(Math.random() * 3.99) + 1)].start(0, 9999);
}
if (screenTransTimer > com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME) {
switchScreenVisibility();
}
} else if (currentScreen == com.giab.common.const.ScreenId.TRANS_INGAME_TO_MAP) {
screenTransTimer++;
mcwRoot.mcwIngame.mc._y = com.giab.common.easing.Strong2.easeInOut(screenTransTimer, 0, 480, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME);
mcwRoot.mcwLevelSelector.mc._y = com.giab.common.easing.Strong2.easeInOut(screenTransTimer, -480, 480, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME);
mcSeparator._y = com.giab.common.easing.Strong2.easeInOut(screenTransTimer, -400, 880, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME);
ctrlIngame.moveAllMovieClips(com.giab.common.easing.Strong2.easeInOut(screenTransTimer, 0, 480, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME) - com.giab.common.easing.Strong2.easeInOut(screenTransTimer - 1, 0, 480, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME));
if (screenTransTimer == 9) {
stopAllSounds();
sndLevelselectorambient.start(0, 9999);
}
if (screenTransTimer > com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME) {
switchScreenVisibility();
}
} else if (currentScreen == com.giab.common.const.ScreenId.TRANS_STARTUP_TO_MAINMENU) {
screenTransTimer++;
mcwRoot.mcwBgr.mc._y = com.giab.common.easing.Strong2.easeInOut(screenTransTimer, -480, 480, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME);
mcSeparator._y = com.giab.common.easing.Strong2.easeInOut(screenTransTimer, -400, 880, com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME);
if (screenTransTimer == 9) {
stopAllSounds();
sndMainmenuambient.start(0, 9999);
}
if (screenTransTimer > com.giab.games.gemc.armor.const.GameSpecs.SCR_TRANS_TIME) {
nextScreen = com.giab.common.const.ScreenId.MAINMENU;
switchScreenVisibility();
}
}
if (((((currentScreen == com.giab.common.const.ScreenId.STARTUP) || (currentScreen == com.giab.common.const.ScreenId.TRANS_MAP_TO_INGAME)) || (currentScreen == com.giab.common.const.ScreenId.TRANS_INGAME_TO_MAP)) || (currentScreen == com.giab.common.const.ScreenId.INGAME)) || (currentScreen == com.giab.common.const.ScreenId.LEVELSELECTOR)) {
} else {
ctrlBgr.doEnterFrame();
}
}
}
function switchScreenVisibility() {
screenTransTimer = 0;
ctrlContextTutor.dismissAllTutorsInQueue();
vfxEngine.removeAllVfx();
Key.removeListener(ctrlIngame.keyListener);
Mouse.removeListener(ctrlIngame.mouseListener);
ctrlIngame.mcPanel.removeMovieClip();
if ((currentScreen == com.giab.common.const.ScreenId.INGAME) && (nextScreen == com.giab.common.const.ScreenId.LEVELSELECTOR)) {
currentScreen = com.giab.common.const.ScreenId.TRANS_INGAME_TO_MAP;
sndScreenZoneChange.start();
} else if ((currentScreen == com.giab.common.const.ScreenId.LEVELSELECTOR) && (nextScreen == com.giab.common.const.ScreenId.INGAME)) {
currentScreen = com.giab.common.const.ScreenId.TRANS_MAP_TO_INGAME;
sndScreenZoneChange.start();
ctrlIngame.setScene(selectedLevel);
ctrlIngame.mcw.mc._y = 480;
ctrlIngame.b.resetInfoPanel();
} else if (currentScreen == com.giab.common.const.ScreenId.LEVELSELECTOR) {
sndScreenZoneChange.start();
currentScreen = com.giab.common.const.ScreenId.TRANS_MAP_TO_BGR;
} else if (((nextScreen == com.giab.common.const.ScreenId.LEVELSELECTOR) && (currentScreen != com.giab.common.const.ScreenId.TRANS_BGR_TO_MAP)) && (currentScreen != com.giab.common.const.ScreenId.TRANS_INGAME_TO_MAP)) {
currentScreen = com.giab.common.const.ScreenId.TRANS_BGR_TO_MAP;
sndScreenZoneChange.start();
} else {
currentScreen = nextScreen;
}
mcwRoot.mcStartup._visible = false;
mcwRoot.mcMainMenu._visible = false;
mcwRoot.mcTutorial._visible = false;
mcwRoot.mcUpgrades._visible = false;
mcwRoot.mcCredits._visible = false;
mcwRoot.mcModeSelector._visible = false;
mcwRoot.mcLoadSave._visible = false;
mcwRoot.mcStatistics._visible = false;
mcwRoot.mcBadges._visible = false;
mcwRoot.mcHighScores._visible = false;
if (((currentScreen == com.giab.common.const.ScreenId.TRANS_MAP_TO_INGAME) || (currentScreen == com.giab.common.const.ScreenId.TRANS_INGAME_TO_MAP)) || (currentScreen == com.giab.common.const.ScreenId.INGAME)) {
mcwRoot.mcIngame._visible = true;
ctrlIngame.mcForest._x = mcwRoot.mcIngame._x + 30;
ctrlIngame.mcForest._y = mcwRoot.mcIngame._y + 30;
ctrlIngame.mcForest._visible = true;
ctrlIngame.mcBuildings._x = mcwRoot.mcIngame._x + 30;
ctrlIngame.mcBuildings._y = mcwRoot.mcIngame._y + 30;
ctrlIngame.mcBuildings._visible = true;
} else {
mcwRoot.mcIngame._visible = false;
ctrlIngame.mcForest._visible = false;
ctrlIngame.mcBuildings._visible = false;
}
if (((((currentScreen == com.giab.common.const.ScreenId.STARTUP) || (currentScreen == com.giab.common.const.ScreenId.TRANS_MAP_TO_INGAME)) || (currentScreen == com.giab.common.const.ScreenId.TRANS_INGAME_TO_MAP)) || (currentScreen == com.giab.common.const.ScreenId.INGAME)) || (currentScreen == com.giab.common.const.ScreenId.LEVELSELECTOR)) {
mcwRoot.mcBgr._visible = false;
} else {
mcwRoot.mcBgr._visible = true;
}
if (((((currentScreen == com.giab.common.const.ScreenId.TRANS_MAP_TO_BGR) || (currentScreen == com.giab.common.const.ScreenId.TRANS_BGR_TO_MAP)) || (currentScreen == com.giab.common.const.ScreenId.TRANS_MAP_TO_INGAME)) || (currentScreen == com.giab.common.const.ScreenId.TRANS_INGAME_TO_MAP)) || (currentScreen == com.giab.common.const.ScreenId.LEVELSELECTOR)) {
mcwRoot.mcLevelSelector._visible = true;
} else {
mcwRoot.mcLevelSelector._visible = false;
}
if (currentScreen == com.giab.common.const.ScreenId.MAINMENU) {
ctrlMainMenu.initiate();
} else if (currentScreen == com.giab.common.const.ScreenId.TUTORIAL) {
ctrlTutorial.initiate();
} else if (currentScreen == com.giab.common.const.ScreenId.UPGRADES) {
ctrlUpgrades.initiate();
} else if (currentScreen == com.giab.common.const.ScreenId.BADGES) {
ctrlBadges.initiate();
} else if (currentScreen == com.giab.common.const.ScreenId.INGAME) {
ctrlIngame.initiate();
} else if (currentScreen == com.giab.common.const.ScreenId.CREDITS) {
ctrlCredits.initiate();
} else if (currentScreen == com.giab.common.const.ScreenId.LEVELSELECTOR) {
ctrlLevelSelector.initiate();
} else if (currentScreen == com.giab.common.const.ScreenId.STATISTICS) {
ctrlStatistics.initiate();
} else if (currentScreen == com.giab.common.const.ScreenId.STARTUP) {
ctrlStartup.initiate();
} else if ((currentScreen == com.giab.common.const.ScreenId.LOADSAVE_LOAD) || (currentScreen == com.giab.common.const.ScreenId.LOADSAVE_SAVE)) {
ctrlLoadSave.initiate();
} else if (currentScreen == com.giab.common.const.ScreenId.TRANS_STARTUP_TO_MAINMENU) {
ctrlBgr.initiate();
sndScreenZoneChange.start();
}
}
function initiateSoundObjects() {
sounds = new Array();
var _local2 = new Array("ContextTutor", "CounterRoll", "GiabHit0", "GiabHit1", "GiabHit2", "GiabHit3", "GiabHit4", "GiabHit5", "GiabHit6", "GiabHit7", "GiabHit8", "GiabHit9", "TickOver", "TickPress", "Unlock", "Buildtower", "Buildwatertrench", "Contexttutor", "Forgottenambient", "Forgottenboom", "Gembomb1", "Gembomb2", "Gembomb3", "Gemcombine", "Gemcreate", "Gemplace1", "Gemplace2", "Gemplacetotower", "Hitarmor1", "Hitarmor2", "Hitarmor3", "Hitarmor4", "Hitmonster1", "Hitmonster2", "Hitmonster3", "Hitmonster4", "Hitmonster5", "Hitmonster6", "Ingameambient1", "Ingameambient2", "Ingameambient3", "Ingameambient4", "Killboss1", "Killboss2", "Killboss3", "Killepicboss", "Killmonster1", "Killmonster2", "Killmonster3", "Killmonster4", "Killmonster5", "Killmonster6", "Killmonster7", "Killmonster8", "Killmonster9", "Killmonster10", "Killmonster11", "Killmonster12", "Killmonster13", "Killmonster14", "Levelavailabletdoe", "Levelenddefeat", "Levelendvictory", "Levelhiddentoavailable", "Levellockedtoavailable", "Levelselectorambient", "Levelselectorinfopanel", "Mainmenuambient", "Manapool", "Manareachesmax", "Monsterattacksplayerbase", "Newwave", "Shot", "Upgraderedist", "Wavebrickspeedup", "Speedup", "Speeddown", "Levelup", "Selectspell");
i = 0;
while (i < _local2.length) {
this["snd" + _local2[i]] = new Sound(mcwRoot.mc.createEmptyMovieClip("mcSnd" + _local2[i], zCurrSoundMc++));
pushSound(this["snd" + _local2[i]], "sndLib" + _local2[i]);
i++;
}
var i;
}
function pushSound(pSnd, pId) {
pSnd.attachSound(pId);
sounds.push(pSnd);
}
function setAllSoundsVolume() {
var _local2;
if (!isPaused) {
_local2 = 0;
while (_local2 < sounds.length) {
Sound(sounds[_local2]).setVolume(preferences.soundVolume);
_local2++;
}
} else {
_local2 = 0;
while (_local2 < sounds.length) {
Sound(sounds[_local2]).setVolume(0);
_local2++;
}
}
}
}
Symbol 1273 MovieClip [__Packages.com.giab.common.Mcw] Frame 0
class com.giab.common.Mcw
{
var mc;
function Mcw (pSource) {
var _local2;
mc = pSource;
for (_local2 in pSource) {
this[_local2] = pSource[_local2];
}
for (_local2 in this) {
if (((this[_local2] instanceof MovieClip) || (this[_local2] instanceof TextField)) || (this[_local2] instanceof Button)) {
this[_local2].useHandCursor = false;
this[_local2].tabEnabled = false;
this[_local2].tabChildren = false;
}
if (MovieClip(this[_local2])._name.indexOf("btn") == 0) {
this[_local2].useHandCursor = true;
}
}
}
}
Symbol 1274 MovieClip [__Packages.com.giab.games.gemc.armor.mcw.McwRoot] Frame 0
class com.giab.games.gemc.armor.mcw.McwRoot extends com.giab.common.Mcw
{
var mcwMainMenu, mcMainMenu, mcwTutorial, mcTutorial, mcwUpgrades, mcUpgrades, mcwCredits, mcCredits, mcwIngame, mcIngame, mcwLoadSave, mcLoadSave, mcwStatistics, mcStatistics, mcwLevelSelector, mcLevelSelector, mcwStartup, mcStartup, mcwBadges, mcBadges, mcwBgr, mcBgr;
function McwRoot (pSource) {
super(pSource);
mcwMainMenu = new com.giab.games.gemc.armor.mcw.McwMainMenu(mcMainMenu);
mcwTutorial = new com.giab.games.gemc.armor.mcw.McwTutorial(mcTutorial);
mcwUpgrades = new com.giab.games.gemc.armor.mcw.McwUpgrades(mcUpgrades);
mcwCredits = new com.giab.games.gemc.armor.mcw.McwCredits(mcCredits);
mcwIngame = new com.giab.games.gemc.armor.mcw.McwIngame(mcIngame);
mcwLoadSave = new com.giab.games.gemc.armor.mcw.McwLoadSave(mcLoadSave);
mcwStatistics = new com.giab.games.gemc.armor.mcw.McwStatistics(mcStatistics);
mcwLevelSelector = new com.giab.games.gemc.armor.mcw.McwLevelSelector(mcLevelSelector);
mcwStartup = new com.giab.games.gemc.armor.mcw.McwStartup(mcStartup);
mcwBadges = new com.giab.games.gemc.armor.mcw.McwBadges(mcBadges);
mcwBgr = new com.giab.games.gemc.armor.mcw.McwBgr(mcBgr);
}
}
Symbol 1275 MovieClip [__Packages.com.giab.games.gemc.armor.mcw.McwMainMenu] Frame 0
class com.giab.games.gemc.armor.mcw.McwMainMenu extends com.giab.common.Mcw
{
function McwMainMenu (pSource) {
super(pSource);
}
}
Symbol 1276 MovieClip [__Packages.com.giab.games.gemc.armor.mcw.McwTutorial] Frame 0
class com.giab.games.gemc.armor.mcw.McwTutorial extends com.giab.common.Mcw
{
function McwTutorial (pSource) {
super(pSource);
}
}
Symbol 1277 MovieClip [__Packages.com.giab.games.gemc.armor.mcw.McwUpgrades] Frame 0
class com.giab.games.gemc.armor.mcw.McwUpgrades extends com.giab.common.Mcw
{
function McwUpgrades (pSource) {
super(pSource);
}
}
Symbol 1278 MovieClip [__Packages.com.giab.games.gemc.armor.mcw.McwStatistics] Frame 0
class com.giab.games.gemc.armor.mcw.McwStatistics extends com.giab.common.Mcw
{
function McwStatistics (pSource) {
super(pSource);
}
}
Symbol 1279 MovieClip [__Packages.com.giab.games.gemc.armor.mcw.McwLevelSelector] Frame 0
class com.giab.games.gemc.armor.mcw.McwLevelSelector extends com.giab.common.Mcw
{
function McwLevelSelector (pSource) {
super(pSource);
}
}
Symbol 1280 MovieClip [__Packages.com.giab.games.gemc.armor.mcw.McwCredits] Frame 0
class com.giab.games.gemc.armor.mcw.McwCredits extends com.giab.common.Mcw
{
function McwCredits (pSource) {
super(pSource);
}
}
Symbol 1281 MovieClip [__Packages.com.giab.games.gemc.armor.mcw.McwIngame] Frame 0
class com.giab.games.gemc.armor.mcw.McwIngame extends com.giab.common.Mcw
{
function McwIngame (pSource) {
super(pSource);
}
}
Symbol 1282 MovieClip [__Packages.com.giab.games.gemc.armor.mcw.McwLoadSave] Frame 0
class com.giab.games.gemc.armor.mcw.McwLoadSave extends com.giab.common.Mcw
{
function McwLoadSave (pSource) {
super(pSource);
}
}
Symbol 1283 MovieClip [__Packages.com.giab.games.gemc.armor.mcw.McwStartup] Frame 0
class com.giab.games.gemc.armor.mcw.McwStartup extends com.giab.common.Mcw
{
function McwStartup (pSource) {
super(pSource);
}
}
Symbol 1284 MovieClip [__Packages.com.giab.games.gemc.armor.mcw.McwBgr] Frame 0
class com.giab.games.gemc.armor.mcw.McwBgr extends com.giab.common.Mcw
{
function McwBgr (pSource) {
super(pSource);
}
}
Symbol 1285 MovieClip [__Packages.com.giab.games.gemc.armor.mcw.McwBadges] Frame 0
class com.giab.games.gemc.armor.mcw.McwBadges extends com.giab.common.Mcw
{
function McwBadges (pSource) {
super(pSource);
}
}
Symbol 1286 MovieClip [__Packages.com.giab.games.gemc.armor.util.VfxEngine] Frame 0
class com.giab.games.gemc.armor.util.VfxEngine
{
var prefs, z, zLow, zHigh, vfxes, isScreenShaking, screenShakingEnergy;
function VfxEngine (pPrefs) {
prefs = pPrefs;
z = com.giab.games.gemc.armor.const.Z.VFX_MIN;
zLow = com.giab.games.gemc.armor.const.Z.VFX_LOW_MIN;
zHigh = com.giab.games.gemc.armor.const.Z.VFX_HIGH_MIN;
vfxes = new Array();
}
function fadeOutAllVfx() {
var _local2;
_local2 = 0;
while (_local2 < vfxes.length) {
vfxes[_local2].mc._alpha = vfxes[_local2].mc._alpha * 0.65;
_local2++;
}
}
function doEnterFrame() {
var _local3;
_local3 = 0;
while (_local3 < vfxes.length) {
if (com.giab.common.interfaces.IVfx(vfxes[_local3]).doEnterFrame()) {
vfxes[_local3].mc.removeMovieClip();
vfxes.splice(_local3, 1);
_local3--;
}
_local3++;
}
if (isScreenShaking) {
screenShakingEnergy--;
if (screenShakingEnergy < 1) {
isScreenShaking = false;
_root._x = 0;
_root._y = 0;
} else {
_root._x = (Math.random() - 0.5) * screenShakingEnergy;
_root._y = (Math.random() - 0.5) * screenShakingEnergy;
}
}
}
function removeAllVfx() {
var _local3;
_local3 = 0;
while (_local3 < vfxes.length) {
vfxes[_local3].mc.removeMovieClip();
_local3++;
}
vfxes = new Array();
isScreenShaking = false;
_root._x = 0;
_root._y = 0;
}
function startScreenShaking(pEnergy) {
isScreenShaking = true;
screenShakingEnergy = pEnergy;
}
function stepZ() {
z++;
if (z > (com.giab.games.gemc.armor.const.Z.VFX_MIN + 10000)) {
z = com.giab.games.gemc.armor.const.Z.VFX_MIN;
}
return(z);
}
function stepZLow() {
zLow++;
if (zLow > (com.giab.games.gemc.armor.const.Z.VFX_LOW_MIN + 10000)) {
zLow = com.giab.games.gemc.armor.const.Z.VFX_LOW_MIN;
}
return(zLow);
}
function stepZHigh() {
zHigh++;
if (zHigh > (com.giab.games.gemc.armor.const.Z.VFX_HIGH_MIN + 10000)) {
zHigh = com.giab.games.gemc.armor.const.Z.VFX_HIGH_MIN;
}
return(zHigh);
}
function canCreateVfx() {
if (prefs.particlesNum == 0) {
return(false);
}
var _local3 = ((prefs.particlesNum == 1) ? 20 : (((prefs.particlesNum == 2) ? 40 : (((prefs.particlesNum == 3) ? 70 : (((prefs.particlesNum == 4) ? 120 : 400)))))));
var _local2 = vfxes.length / _local3;
if (_local2 < 0.6) {
return(true);
}
return(((((Math.round() * 0.4) + 0.6) < _local2) ? true : false));
}
function createScore(pX, pY, pAmount, pType) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxScore(pX, pY, stepZHigh(), pAmount, pType));
}
function createLevelBadgeGlare(pX, pY) {
var _local2;
_local2 = 0;
while (_local2 < 5) {
if (canCreateVfx()) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxGlare(pX, pY, stepZHigh()));
}
_local2++;
}
}
function createCarreerBadgeGlare(pX, pY) {
var _local2;
_local2 = 0;
while (_local2 < 9) {
if (canCreateVfx()) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxGlare(pX, pY, stepZHigh()));
}
_local2++;
}
}
function createTowerShotGlare(pX, pY, pRgb, pFrame) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxTowerShotGlare(pX, pY, stepZ(), pRgb, pFrame));
}
function createShotImpact(pX, pY, pRgb) {
var _local2;
_local2 = 0;
while (_local2 < 3) {
if (canCreateVfx()) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxShotImpactLine(pX, pY, stepZ(), pRgb));
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxShotImpactDot(pX, pY, stepZ(), pRgb));
}
_local2++;
}
}
function createMonsterBlast(pMonster) {
if (pMonster.isEpicBoss) {
startScreenShaking(20);
} else if (pMonster.isBoss) {
startScreenShaking(7);
}
var _local3;
var _local4 = com.giab.common.toolbox.ColorToolbox.hsbToRgb([pMonster.hue, 100, 100]);
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxSmokeRing(pMonster.x, pMonster.y, stepZ(), (pMonster.isEpicBoss ? 180 : ((pMonster.isBoss ? 120 : 70)))));
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxCorpse(pMonster.x, pMonster.y, stepZ(), (pMonster.isEpicBoss ? 150 : ((pMonster.isBoss ? 110 : 70))), pMonster.mc.body._rotation, this, pMonster.isEpicBoss));
_local3 = 0;
while (_local3 < (pMonster.isEpicBoss ? 12 : ((pMonster.isBoss ? 7 : 5)))) {
if (canCreateVfx()) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxShotImpactLine(pMonster.x, pMonster.y, stepZ(), _local4));
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxShotImpactDot(pMonster.x, pMonster.y, stepZ(), _local4));
}
_local3++;
}
_local3 = 0;
while (_local3 < (pMonster.isEpicBoss ? 24 : ((pMonster.isBoss ? 12 : 9)))) {
if (canCreateVfx()) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxAsh(pMonster.x, pMonster.y, stepZ(), _local4));
}
_local3++;
}
}
function createBlackAsh(pX, pY) {
if (canCreateVfx()) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxAsh(pX, pY, stepZ(), [0, 0, 0]));
}
}
function createWaveBrickBlast(pColor) {
var _local2;
_local2 = 0;
while (_local2 < 6) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxSmoke(7 + (Math.random() * 20), 25 + (Math.random() * 81), stepZ(), [0, 0, 0]));
_local2++;
}
_local2 = 0;
while (_local2 < 11) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxWaveBrickFragment(7 + (Math.random() * 20), 25 + (Math.random() * 81), stepZ()));
_local2++;
}
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxSmoke(14 + (Math.random() * 8), 33 + (Math.random() * 8), stepZ(), pColor));
}
function createTowerBuildSmoke(pX, pY) {
var _local2;
_local2 = 0;
while (_local2 < 2) {
if (canCreateVfx()) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxSmoke((pX + (Math.random() * 40)) - 20, (pY + (Math.random() * 40)) - 20, stepZ(), [70, 70, 70]));
}
_local2++;
}
_local2 = 0;
while (_local2 < 8) {
if (canCreateVfx()) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxSmoke((pX + (Math.random() * 60)) - 30, (pY + (Math.random() * 40)) - 20, stepZLow(), [70, 70, 70]));
}
_local2++;
}
}
function createWaterTrenchBuildSmoke(pX, pY) {
var _local2;
_local2 = 0;
while (_local2 < 4) {
if (canCreateVfx()) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxSmoke((pX + (Math.random() * 20)) - 10, (pY + (Math.random() * 20)) - 10, stepZLow(), [10, 10, 30]));
}
_local2++;
}
}
function createPlayerBaseAttackSmoke(pX, pY, pRgb) {
var _local4;
var _local3;
var _local2;
_local4 = 0;
while (_local4 < 10) {
_local3 = (Math.random() * Math.PI) * 2;
_local2 = (Math.random() * 10) + 30;
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxSmoke(pX + (Math.cos(_local3) * _local2), pY + (Math.sin(_local3) * _local2), stepZLow(), pRgb));
_local4++;
}
}
function createPlayerBaseDestroyedSmoke(pX, pY) {
var _local4;
var _local3;
var _local2;
_local4 = 0;
while (_local4 < 18) {
_local3 = (Math.random() * Math.PI) * 2;
_local2 = (Math.random() * 15) + 32;
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxSmoke(pX + (Math.cos(_local3) * _local2), pY + (Math.sin(_local3) * _local2), stepZLow(), [0, 0, 0]));
_local4++;
}
_local4 = 0;
while (_local4 < 4) {
_local3 = (Math.random() * Math.PI) * 2;
_local2 = Math.random() * 30;
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxSmoke(pX + (Math.cos(_local3) * _local2), pY + (Math.sin(_local3) * _local2), stepZ(), [0, 0, 0]));
_local4++;
}
}
function createGemBlast(pX, pY, pRadius, pRgb) {
var _local2;
startScreenShaking(10);
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxSmokeRing(pX, pY, stepZ(), pRadius * 3.8, pRgb));
_local2 = 0;
while (_local2 < 5) {
if (canCreateVfx()) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxShotImpactDot(pX, pY, stepZ(), pRgb));
}
_local2++;
}
}
function createChargedBolt(pX, pY) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxChargedBolt(pX, pY, stepZ()));
}
function createMapChargedBolt(pX, pY) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxMapChargedBolt(pX, pY, stepZHigh()));
}
function createForgottenAsh(pX, pY) {
vfxes.push(new com.giab.games.gemc.armor.vfx.VfxAsh(pX, pY, stepZ(), null, true));
}
}
Symbol 1287 MovieClip [__Packages.com.giab.games.gemc.armor.entity.Preferences] Frame 0
class com.giab.games.gemc.armor.entity.Preferences
{
var so, soundVolumeBase, qualityBase, particlesNumBase, isScrollingMapDegraded, isTutorialPressed, isStatusInfoEnabled, isIngameAdEnabled;
function Preferences () {
so = SharedObject.getLocal("giabGemcraftPreferences", "/");
soundVolumeBase = ((so.data.soundVolumeBase == undefined) ? 70 : (so.data.soundVolumeBase));
qualityBase = ((so.data.qualityBase == undefined) ? 100 : (so.data.qualityBase));
particlesNumBase = ((so.data.particlesNumBase == undefined) ? 100 : (so.data.particlesNumBase));
isScrollingMapDegraded = ((so.data.isScrollingMapDegraded == undefined) ? true : (so.data.isScrollingMapDegraded));
isTutorialPressed = ((so.data.isTutorialPressed == 1) ? true : false);
isStatusInfoEnabled = ((so.data.isStatusInfoEnabled == undefined) ? true : (so.data.isStatusInfoEnabled));
isIngameAdEnabled = ((so.data.isIngameAdEnabled == undefined) ? true : (so.data.isIngameAdEnabled));
flush(20000);
}
function flush() {
so.data.soundVolumeBase = soundVolumeBase;
so.data.qualityBase = qualityBase;
so.data.particlesNumBase = particlesNumBase;
so.data.isStatusInfoEnabled = isStatusInfoEnabled;
so.data.isIngameAdEnabled = isIngameAdEnabled;
so.data.isScrollingMapDegraded = isScrollingMapDegraded;
so.data.isTutorialPressed = (isTutorialPressed ? 1 : 0);
so.flush(20000);
}
}
Symbol 1288 MovieClip [__Packages.com.giab.games.gemc.armor.const.Z] Frame 0
class com.giab.games.gemc.armor.const.Z
{
function Z () {
}
static var MC_SAVEERROR = 999300;
static var MC_OPTIONS = 999200;
static var BTN_OPTIONS = 999100;
static var SEPARATOR = 540000;
static var CONTEXTTUT = 500000;
static var INGAME_OUTCOME_INFOPANEL = 480000;
static var VFX_HIGH_MIN = 470000;
static var LEVELOUTCOMEPANEL = 460000;
static var GEMCREATESHAPEHELPER = 425000;
static var INGAME_INFOPANEL = 420000;
static var DRAGGEDGEM = 410000;
static var INGAME_STATIC_MIN = 400000;
static var MCBUILDINGSELECTGLARE = 330000;
static var MCSLOTSELECTGLARE = 320000;
static var HEALTHMARKER_MIN = 302000;
static var MCTPLAVM = 300000;
static var VFX_MIN = 200000;
static var SHOT_MIN = 110000;
static var STONE_MIN = 100000;
static var MCBUILDINGS = 72000;
static var MCFOREST = 71000;
static var VFX_LOW_MIN = 50000;
static var MONSTER_MIN = 12000;
static var LEVELSELECTOR_INFOPANEL = 11000;
static var MAP_LEVELICON_MIN = 10000;
static var SOUNDS_MIN = 10;
static var MCBLURIMAGE = 8;
static var BMPSCENE = 5;
static var MOUSELISTENER = 3;
static var KEYLISTENER = 2;
static var MAIN_LOOP = 1;
}
Symbol 1289 MovieClip [__Packages.com.giab.common.interfaces.IVfx] Frame 0
interface com.giab.common.interfaces.IVfx
{
}
Symbol 1290 MovieClip [__Packages.com.giab.games.gemc.armor.vfx.VfxScore] Frame 0
class com.giab.games.gemc.armor.vfx.VfxScore implements com.giab.common.interfaces.IVfx
{
var mc, type;
function VfxScore (pX, pY, pZ, pAmount, pType) {
if (pType == 0) {
mc = _root.attachMovie("vfxScore", "vfxScore" + pZ, pZ);
mc.tf.text = com.giab.common.toolbox.NumberFormatter.format(pAmount);
} else if (pType == 1) {
mc = _root.attachMovie("vfxScoreLevelBadge", "vfxScore" + pZ, pZ);
mc.tf.text = com.giab.common.toolbox.NumberFormatter.format(pAmount);
} else {
mc = _root.attachMovie("vfxScoreCarreerBadge", "vfxScore" + pZ, pZ);
mc.tf.text = "Total score + " + com.giab.common.toolbox.NumberFormatter.format(pAmount);
}
type = pType;
mc._x = pX;
mc._y = pY;
}
function doEnterFrame() {
if (type == 0) {
mc._y = mc._y - 0.7;
if (mc._alpha > 90) {
mc._alpha = mc._alpha - 0.3;
} else {
mc._alpha = mc._alpha - 1.2;
}
} else if (type == 1) {
mc._y = mc._y - 0.9;
if (mc._alpha > 80) {
mc._alpha = mc._alpha - 0.1;
} else {
mc._alpha = mc._alpha - 0.8;
}
} else {
mc._y = mc._y - 0.8;
if (mc._alpha > 80) {
mc._alpha = mc._alpha - 0.1;
} else {
mc._alpha = mc._alpha - 0.7;
}
}
if (mc._alpha < 1) {
return(true);
}
return(false);
}
}
Symbol 1291 MovieClip [__Packages.com.giab.common.toolbox.NumberFormatter] Frame 0
class com.giab.common.toolbox.NumberFormatter
{
function NumberFormatter () {
}
static function format(pNum) {
var _local1 = 0;
var _local5 = Math.round(pNum).toString();
var _local2 = _local5.split("");
var _local3 = 0;
_local1 = _local2.length - 1;
while (_local1 > 0) {
_local3++;
if (_local3 == 3) {
_local2.splice(_local1, 0, ".");
_local3 = 0;
}
_local1--;
}
var _local4 = "";
_local1 = 0;
while (_local1 < _local2.length) {
_local4 = _local4 + _local2[_local1];
_local1++;
}
return(_local4);
}
}
Symbol 1292 MovieClip [__Packages.com.giab.games.gemc.armor.vfx.VfxGlare] Frame 0
class com.giab.games.gemc.armor.vfx.VfxGlare implements com.giab.common.interfaces.IVfx
{
var mc, rota;
function VfxGlare (pX, pY, pZ) {
mc = _root.attachMovie("vfxGlare", "vfxGlare" + pZ, pZ);
mc.gotoAndStop(Math.floor(Math.random() * 2.99) + 1);
mc._x = (pX + (Math.random() * 40)) - 20;
mc._y = (pY + (Math.random() * 40)) - 20;
rota = (Math.random() * 8) - 4;
}
function doEnterFrame() {
mc._alpha = mc._alpha - ((Math.random() * 0.5) + 0.6);
mc._rotation = mc._rotation + rota;
if (mc._alpha < 1) {
return(true);
}
return(false);
}
}
Symbol 1293 MovieClip [__Packages.com.giab.games.gemc.armor.vfx.VfxTowerShotGlare] Frame 0
class com.giab.games.gemc.armor.vfx.VfxTowerShotGlare implements com.giab.common.interfaces.IVfx
{
var mc;
function VfxTowerShotGlare (pX, pY, pZ, pRgb, pFrame) {
mc = _root.attachMovie("vfxTowerShotGlare", "vfxTowerShotGlare" + pZ, pZ);
mc._x = pX;
mc._y = pY;
var _local3 = new flash.geom.ColorTransform(0, 0, 0, 1, pRgb[0], pRgb[1], pRgb[2], 0);
var _local5 = new flash.geom.Transform(mc.mcColor);
_local5.colorTransform = _local3;
mc.mcColor.blendMode = "add";
mc.mcColor.gotoAndStop(pFrame);
}
function doEnterFrame() {
mc._alpha = mc._alpha - 10;
if (mc._alpha < 1) {
return(true);
}
return(false);
}
}
Symbol 1294 MovieClip [__Packages.com.giab.games.gemc.armor.vfx.VfxShotImpactLine] Frame 0
class com.giab.games.gemc.armor.vfx.VfxShotImpactLine implements com.giab.common.interfaces.IVfx
{
var mc;
function VfxShotImpactLine (pX, pY, pZ, pRgb) {
mc = _root.attachMovie("vfxShotImpactLine", "vfxShotImpactLine" + pZ, pZ);
mc._x = pX;
mc._y = pY;
mc._width = (Math.random() * 15) + 15;
mc._rotation = Math.random() * 360;
var _local3 = new flash.geom.ColorTransform(0, 0, 0, 1, pRgb[0], pRgb[1], pRgb[2], 0);
var _local5 = new flash.geom.Transform(mc);
_local5.colorTransform = _local3;
mc.blendMode = "add";
}
function doEnterFrame() {
mc._alpha = mc._alpha - 8;
if (mc._alpha < 1) {
return(true);
}
return(false);
}
}
Symbol 1295 MovieClip [__Packages.com.giab.games.gemc.armor.vfx.VfxShotImpactDot] Frame 0
class com.giab.games.gemc.armor.vfx.VfxShotImpactDot implements com.giab.common.interfaces.IVfx
{
var mc, vX, vY;
function VfxShotImpactDot (pX, pY, pZ, pRgb) {
mc = _root.attachMovie("shot", "vfxShotImpactDot" + pZ, pZ);
mc._x = pX;
mc._y = pY;
mc._xscale = (mc._yscale = 80);
vX = (Math.random() * 2) - 1;
vY = (Math.random() * 2) - 1;
var _local3 = new flash.geom.ColorTransform(0, 0, 0, 1, pRgb[0], pRgb[1], pRgb[2], 0);
var _local5 = new flash.geom.Transform(mc.mcColor);
_local5.colorTransform = _local3;
mc.mcColor.blendMode = "add";
}
function doEnterFrame() {
mc._alpha = mc._alpha - ((Math.random() * 3) + 5);
mc._xscale = mc._xscale - 2;
mc._yscale = mc._yscale - 2;
mc._x = mc._x + vX;
mc._y = mc._y + vY;
if (mc._alpha < 1) {
return(true);
}
return(false);
}
}
Symbol 1296 MovieClip [__Packages.com.giab.games.gemc.armor.entity.Monster] Frame 0
class com.giab.games.gemc.armor.entity.Monster
{
var lifespan, isWeak, isKilled, ctrl, pathXs, pathYs, segmentDirections, segmentLengths, hp, hpMax, speed, speedMax, armorLevel, score, scoreInit, mana, manaInit, isHealingWhenNotHit, isBoss, isEpicBoss, isPoisoned, poisonDamage, mcHealth, poisonTimeLeft, mc, isSlowed, slowTimeLeft, isShocked, x, y, shockTimeLeft, currentDistInSegment, currentSegment, targetRota, timeUntilWarpIn, hue, bodyType;
function Monster (pCtrl, pScore, pMana, pHp, pSpeed, pArmorLevel, pIsWeak) {
lifespan = 0;
isWeak = pIsWeak;
isKilled = false;
var _local2;
ctrl = pCtrl;
pathXs = new Array();
pathYs = new Array();
_local2 = 0;
while (_local2 < ctrl.pathXs.length) {
pathXs.push(((((ctrl.pathXs[_local2] * 34) + 30) + 17) + (Math.random() * 12)) - 6);
pathYs.push(((((ctrl.pathYs[_local2] * 34) + 30) + 17) + (Math.random() * 12)) - 6);
_local2++;
}
segmentDirections = new Array();
segmentLengths = new Array();
_local2 = 0;
while (_local2 < (pathXs.length - 1)) {
segmentLengths.push(Math.sqrt(Math.pow(pathXs[_local2] - pathXs[_local2 + 1], 2) + Math.pow(pathYs[_local2] - pathYs[_local2 + 1], 2)));
segmentDirections.push((Math.atan2(pathYs[_local2 + 1] - pathYs[_local2], pathXs[_local2 + 1] - pathXs[_local2]) * 180) / Math.PI);
_local2++;
}
hp = (hpMax = pHp);
speed = (speedMax = pSpeed * 0.5);
armorLevel = pArmorLevel;
score = (scoreInit = pScore);
mana = (manaInit = pMana);
isHealingWhenNotHit = false;
isBoss = false;
isEpicBoss = false;
}
function doEnterFrame() {
if ((lifespan++) > 450) {
mana = Math.max(manaInit * 0.5, mana - 0.005);
score = Math.max(scoreInit * 0.5, score - 0.1);
}
if (isPoisoned) {
hp = hp - poisonDamage;
mcHealth._visible = true;
mcHealth.gotoAndStop(Math.min(100, Math.max(1, Math.round(100 - ((hp / hpMax) * 100)))));
if ((hp < 1) && (isKilled != true)) {
ctrl.c.killMonster(this);
} else if ((poisonTimeLeft--) < 1) {
isPoisoned = false;
mc.body.poisonedAura._visible = false;
}
}
if (isHealingWhenNotHit) {
hp = Math.min(hpMax, hp + (hpMax / 500));
mcHealth.gotoAndStop(Math.min(100, Math.max(1, Math.round(100 - ((hp / hpMax) * 100)))));
}
if (isSlowed) {
if ((slowTimeLeft--) < 1) {
isSlowed = false;
mc.body.slowedAura._visible = false;
speed = speedMax;
}
}
if (isShocked) {
mc._x = (x + (Math.random() * 4)) - 2;
mc._y = (y + (Math.random() * 4)) - 2;
if ((shockTimeLeft--) < 1) {
isShocked = false;
mc.body.shockedAura._visible = false;
}
} else {
currentDistInSegment = currentDistInSegment + speed;
if (currentDistInSegment > segmentLengths[currentSegment]) {
currentDistInSegment = currentDistInSegment - segmentLengths[currentSegment];
currentSegment++;
targetRota = segmentDirections[currentSegment];
if (currentSegment > (segmentLengths.length - 1)) {
ctrl.c.monsterAttacksPlayerBase(this);
}
}
if (mc.body._rotation != targetRota) {
var _local2 = mc.body._rotation - targetRota;
if (_local2 < -180) {
_local2 = 360 + _local2;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
mc.body._rotation = mc.body._rotation - Math.min(6, Math.max(-6, _local2));
if (mc.body._rotation > 360) {
mc.body._rotation = mc.body._rotation - 360;
}
if (mc.body._rotation < 0) {
mc.body._rotation = mc.body._rotation + 360;
}
}
mc._x = com.giab.common.toolbox.MathToolbox.convertCoord(0, segmentLengths[currentSegment], currentDistInSegment, pathXs[currentSegment], pathXs[currentSegment + 1]);
mc._y = com.giab.common.toolbox.MathToolbox.convertCoord(0, segmentLengths[currentSegment], currentDistInSegment, pathYs[currentSegment], pathYs[currentSegment + 1]);
if (isKilled != true) {
x = mc._x;
y = mc._y;
}
}
mcHealth._x = mc._x;
mcHealth._y = mc._y - 30;
}
function doEnterFrameWaiting() {
timeUntilWarpIn = timeUntilWarpIn - 0.15;
if (timeUntilWarpIn < 0) {
ctrl.c.summonMonster(this);
}
}
function sufferSplashDamage(pShotData, pDist) {
var _local4 = Math.abs(hue - pShotData.hue);
if (_local4 > 180) {
_local4 = 360 - _local4;
}
var _local5 = com.giab.common.toolbox.MathToolbox.convertCoord(0, 180, _local4, 0.4, 1.6);
if (isNaN(_local5) || (isWeak)) {
_local5 = 1;
}
var _local3 = (pShotData.getDamageMin() + (Math.random() * (pShotData.getDamageMax() - pShotData.getDamageMin()))) * _local5;
if (pDist > 0) {
_local3 = _local3 * ((0.7 * (pShotData.splashRadius - pDist)) / pShotData.splashRadius);
}
_local3 = _local3 * ((pShotData.chanceOfCriticalHit > Math.random()) ? 3 : 1);
if (_local3 > 0) {
if (_local3 > armorLevel) {
ctrl.main["sndHitmonster" + (Math.floor(Math.random() * 5.99) + 1)].start();
} else {
ctrl.main["sndHitarmor" + (Math.floor(Math.random() * 3.99) + 1)].start();
}
}
_local3 = Math.max(0, _local3 - armorLevel);
hp = hp - _local3;
if (hp < hpMax) {
mcHealth._visible = true;
mcHealth.gotoAndStop(Math.min(100, Math.max(1, Math.round(100 - ((hp / hpMax) * 100)))));
}
if ((hp < 1) && (isKilled != true)) {
ctrl.c.killMonster(this);
} else if (pDist == 0) {
if (pShotData.chanceOfReducingArmorLevel > Math.random()) {
armorLevel = Math.max(0, armorLevel - 1);
}
if (pShotData.chanceOfShock > Math.random()) {
isShocked = true;
mc.body.shockedAura._visible = true;
shockTimeLeft = 40;
}
if (pShotData.poisionDamagePerFrame > 0) {
isPoisoned = true;
mc.body.poisonedAura._visible = true;
var _local7 = poisonTimeLeft * poisonDamage;
poisonDamage = pShotData.poisionDamagePerFrame + (_local7 / 150);
poisonTimeLeft = 150;
}
if (pShotData.slowDuration > 0) {
isSlowed = true;
mc.body.slowedAura._visible = true;
speed = Math.max(0.3, Math.min(speed, speedMax * (1 - pShotData.slowMultiplier)));
slowTimeLeft = pShotData.slowDuration;
}
}
}
function sufferDamage(pShotData, pIsGemBomb) {
sufferSplashDamage(pShotData, 0, pIsGemBomb);
}
function spawn(pMc, pMcHealth) {
mc = pMc;
mcHealth = pMcHealth;
currentSegment = 0;
currentDistInSegment = 0;
mc._x = pathXs[0];
mc._y = pathYs[0];
mcHealth._x = mc._x;
mcHealth._y = mc._y - 30;
if (isBoss) {
mc._xscale = (mc._yscale = 100);
} else if (isEpicBoss) {
mc._xscale = (mc._yscale = 130);
} else {
mc._xscale = (mc._yscale = 60);
}
mc.body._rotation = (targetRota = segmentDirections[0]);
mc.body.shading.gotoAndStop(bodyType);
mc.body.colorBody.gotoAndStop(bodyType);
mc.body.shadow.gotoAndStop(bodyType);
mc.body.selectGlare.gotoAndStop(bodyType);
mc.body.shockedAura.gotoAndStop(bodyType);
mc.body.poisonedAura.gotoAndStop(bodyType);
mc.body.slowedAura.gotoAndStop(bodyType);
var vThis = this;
mc.body.onPress = function () {
vThis.ctrl.selectMonster(vThis);
};
var _local2 = com.giab.common.toolbox.ColorToolbox.hsbToRgb(new Array(hue, 75, (isEpicBoss ? 5 : ((isBoss ? 90 : 45)))));
var _local3 = new flash.geom.ColorTransform(0, 0, 0, 1, _local2[0], _local2[1], _local2[2], 0);
var _local4 = new flash.geom.Transform(mc.body.colorBody);
_local4.colorTransform = _local3;
if (hp == hpMax) {
mcHealth._visible = false;
}
if (ctrl.selectedMonster != this) {
mc.body.selectGlare._visible = false;
}
isShocked = false;
isSlowed = false;
isPoisoned = false;
mc.body.shockedAura._visible = false;
mc.body.slowedAura._visible = false;
mc.body.poisonedAura._visible = false;
slowTimeLeft = 0;
shockTimeLeft = 0;
poisonTimeLeft = 0;
poisonDamage = 0;
}
}
Symbol 1297 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlIngame] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlIngame
{
var b, c, d, main, mcw, mcSlotSelectGlare, mcBuildingSelectGlare, mcRange, mcGemCreateShapeHelper, bmpScene, bmpBuildings, mcBuildings, bmpForest, mcForest, bmpTowerPlaceAvailMap, mcTowerPlaceAvailMap, bmpWaterTrenchPlaceAvailMap, mcWaterTrenchPlaceAvailMap, mcInfoPanel, mcStatusInfoPanel, mcOutcomeInfoPanel, status, timer, towers, waterTrenches, monstersOnScene, monstersWaitingInWave, shots, screenStatus, screenStep, levelData, mcPanel, actionStatus, gemDragDeltaX, draggedGem, gemDragDeltaY, monsterKillChainCounter, monsterKillChainCooldownTimer, maxMonstersKilledInARow, isBrickSpeedUp, brickSpeed, manaChargePerFrame, score, manaChargeIngameMultiplier, timeUntilNextWave, monsterWaves, currentWave, isOutcomeVictory, mouseListener, bmpBlurImage, mcBlurImage, forgotten, levelStats, carreerBadges, levelBadges, hasPlayerLeveledUp, levelBadgeScores, carreerBadgeScores, lastZoneXMin, lastZoneXMax, lastZoneYMin, lastZoneYMax, isManaRelatedInfoPanelVisible, gemCreatingBaseManaCosts, inventorySlots, towerPlaceAvailArray, currentManaPoolCost, currentTowerBuildingManaCost, currentWaterTrenchBuildingManaCost, gemCombiningManaCost, isRunningOnDoubleSpeed, maxMana, scoreKey, manaKey, mana, gems, gemDragStartX, gemDragStartY, gemDragStartZ, selectedMonster, selectedTower, selectedSlotNum, waterTrenchPlaceAvailArray;
function CtrlIngame (pMcw, pMain) {
b = new com.giab.games.gemc.armor.ctrl.CtrlIngameB();
c = new com.giab.games.gemc.armor.ctrl.CtrlIngameC();
d = new com.giab.games.gemc.armor.ctrl.CtrlIngameD();
b.a = (c.a = (d.a = this));
c.b = (d.b = b);
b.c = (d.c = c);
b.d = (c.d = d);
main = pMain;
mcw = pMcw;
b.buttonsInit();
mcSlotSelectGlare = _root.attachMovie("mcSlotSelectGlare", "mcSlotSelectGlare", com.giab.games.gemc.armor.const.Z.MCSLOTSELECTGLARE);
mcBuildingSelectGlare = _root.attachMovie("mcBuildingSelectGlare", "mcBuildingSelectGlare", com.giab.games.gemc.armor.const.Z.MCBUILDINGSELECTGLARE);
mcRange = _root.attachMovie("towerRangeCircle", "towerRangeCircle", com.giab.games.gemc.armor.const.Z.MCBUILDINGSELECTGLARE + 10);
mcGemCreateShapeHelper = _root.attachMovie("gemCreateShapeHelper", "gemCreateShapeHelper", com.giab.games.gemc.armor.const.Z.GEMCREATESHAPEHELPER);
mcGemCreateShapeHelper._x = 574;
mcGemCreateShapeHelper._y = 148;
mcGemCreateShapeHelper._visible = false;
mcSlotSelectGlare._visible = false;
mcBuildingSelectGlare._visible = false;
mcRange._visible = false;
mcRange._x = 30;
mcRange._y = 30;
mcRange.mask._width = 510;
mcRange.mask._height = 442;
bmpScene = new flash.display.BitmapData(510, 442, false, 0);
mcw.mcScene.attachBitmap(bmpScene, com.giab.games.gemc.armor.const.Z.BMPSCENE);
bmpBuildings = new flash.display.BitmapData(510, 442, true, 0);
mcBuildings = _root.createEmptyMovieClip("mcForest", com.giab.games.gemc.armor.const.Z.MCBUILDINGS);
mcBuildings._x = 30;
mcBuildings._y = 30;
mcBuildings._visible = false;
mcBuildings.attachBitmap(bmpBuildings, com.giab.games.gemc.armor.const.Z.MCBUILDINGS + 1);
bmpForest = new flash.display.BitmapData(510, 442, true, 0);
mcForest = _root.createEmptyMovieClip("mcForest", com.giab.games.gemc.armor.const.Z.MCFOREST);
mcForest._x = 30;
mcForest._y = 30;
mcForest._visible = false;
mcForest.attachBitmap(bmpForest, com.giab.games.gemc.armor.const.Z.MCFOREST + 1);
bmpTowerPlaceAvailMap = new flash.display.BitmapData(510, 442, true, 0);
mcTowerPlaceAvailMap = _root.createEmptyMovieClip("mcTowerPlaceAvailMap", com.giab.games.gemc.armor.const.Z.MCTPLAVM);
mcTowerPlaceAvailMap._x = 30;
mcTowerPlaceAvailMap._y = 30;
mcTowerPlaceAvailMap._visible = false;
mcTowerPlaceAvailMap.attachBitmap(bmpTowerPlaceAvailMap, com.giab.games.gemc.armor.const.Z.MCTPLAVM + 1);
bmpWaterTrenchPlaceAvailMap = new flash.display.BitmapData(510, 442, true, 0);
mcWaterTrenchPlaceAvailMap = _root.createEmptyMovieClip("mcWaterTrenchPlaceAvailMap", com.giab.games.gemc.armor.const.Z.MCTPLAVM + 2);
mcWaterTrenchPlaceAvailMap._x = 30;
mcWaterTrenchPlaceAvailMap._y = 30;
mcWaterTrenchPlaceAvailMap._visible = false;
mcWaterTrenchPlaceAvailMap.attachBitmap(bmpWaterTrenchPlaceAvailMap, com.giab.games.gemc.armor.const.Z.MCTPLAVM + 3);
mcw.btnCastCreateGem.icon.gotoAndStop(1);
mcw.btnCastCombineGems.icon.gotoAndStop(2);
mcw.btnCastBuildWaterTrench.icon.gotoAndStop(3);
mcw.btnCastBuildTower.icon.gotoAndStop(4);
mcw.btnCastThrow.icon.gotoAndStop(5);
mcw.btnCastRiseMaxMana.icon.gotoAndStop(6);
mcInfoPanel = _root.attachMovie("infoPanel", "infoPanel", com.giab.games.gemc.armor.const.Z.INGAME_INFOPANEL);
mcInfoPanel.tfContent.autoSize = "center";
mcInfoPanel._visible = false;
mcInfoPanel._y = 1000;
mcStatusInfoPanel = _root.attachMovie("statusInfoPanel", "statusInfoPanel", com.giab.games.gemc.armor.const.Z.INGAME_INFOPANEL + 10);
mcStatusInfoPanel.tf.autoSize = true;
mcStatusInfoPanel._visible = false;
mcStatusInfoPanel._y = 442;
mcStatusInfoPanel._x = 40;
mcOutcomeInfoPanel = _root.attachMovie("infoPanelSimple", "outcomeInfoPanel", com.giab.games.gemc.armor.const.Z.INGAME_OUTCOME_INFOPANEL);
mcOutcomeInfoPanel.tf.autoSize = "center";
mcOutcomeInfoPanel._visible = false;
mcOutcomeInfoPanel._y = 1000;
}
function initiate() {
b.initiate();
}
function setScene(pLevelNum) {
b.setScene(pLevelNum);
}
function doEnterFrame() {
var _local3;
if (status != com.giab.common.const.IngameStatus.PAUSED_FOR_ALERT_PANEL) {
main.vfxEngine.doEnterFrame();
timer++;
_local3 = 0;
while (_local3 < towers.length) {
com.giab.games.gemc.armor.entity.Tower(towers[_local3]).doEnterFrame();
_local3++;
}
_local3 = 0;
while (_local3 < waterTrenches.length) {
com.giab.games.gemc.armor.entity.WaterTrench(waterTrenches[_local3]).doEnterFrame();
_local3++;
}
_local3 = 0;
while (_local3 < monstersOnScene.length) {
com.giab.games.gemc.armor.entity.Monster(monstersOnScene[_local3]).doEnterFrame();
_local3++;
}
_local3 = 0;
while (_local3 < monstersWaitingInWave.length) {
com.giab.games.gemc.armor.entity.Monster(monstersWaitingInWave[_local3]).doEnterFrameWaiting();
_local3++;
}
_local3 = 0;
while (_local3 < shots.length) {
com.giab.games.gemc.armor.entity.Shot(shots[_local3]).doEnterFrame();
_local3++;
}
}
if (status == com.giab.common.const.IngameStatus.PAUSED_FOR_ALERT_PANEL) {
} else if (screenStatus == com.giab.common.const.ScreenStatus.APPEARING) {
screenStep++;
renderHeader();
if (screenStep > 20) {
screenStep = 0;
screenStatus = com.giab.common.const.ScreenStatus.IDLE;
status = com.giab.common.const.IngameStatus.PLAYING;
timer = 0;
if (levelData.num == 0) {
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.CREATING_GEMS);
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.PLACE_GEMS_INTO_TOWERS);
} else if (levelData.num == 1) {
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.SPEED_THEM_UP);
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.COMBINE_GEMS);
} else if (levelData.num == 3) {
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.THROW_GEM_BOMBS);
} else if (levelData.num == 4) {
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.SWAP_GEMS_BETWEEN_TOWERS);
} else if (levelData.num == 5) {
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.MANA_POOL);
} else if (levelData.num == 7) {
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.WATER_TRENCH);
} else if (levelData.num == 8) {
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.SHORTCUT_KEYS);
} else if (levelData.num == 9) {
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.SHIFT_KEY);
}
}
} else if (screenStatus == com.giab.common.const.ScreenStatus.DISAPPEARING) {
screenStep++;
main.vfxEngine.fadeOutAllVfx();
if (screenStep == 10) {
stopAllSounds();
}
if (screenStep > 10) {
screenStep = 0;
mcPanel.removeMovieClip();
main.vfxEngine.removeAllVfx();
main.switchScreenVisibility();
}
} else if (status == com.giab.common.const.IngameStatus.PLAYING) {
if ((((((actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_IDLE) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_COMBINE)) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_THROW)) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_IDLE)) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_COMBINE)) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_THROW)) {
draggedGem.mc._x = _root._xmouse - gemDragDeltaX;
draggedGem.mc._y = _root._ymouse - gemDragDeltaY;
}
renderHeader();
renderInfoPanel();
if (monsterKillChainCounter > 0) {
if ((monsterKillChainCooldownTimer--) < 1) {
maxMonstersKilledInARow = Math.max(maxMonstersKilledInARow, monsterKillChainCounter);
monsterKillChainCounter = 0;
}
}
chargeManaByTime();
renderWaveBricks();
if (isBrickSpeedUp) {
brickSpeed = brickSpeed + 2;
}
if (brickSpeed > 1) {
setMana(getMana() + ((brickSpeed - 1) * manaChargePerFrame));
score = score + (80 * Math.round(brickSpeed * manaChargeIngameMultiplier));
}
timeUntilNextWave = Math.max(0, timeUntilNextWave - brickSpeed);
if ((timeUntilNextWave < 1) && (currentWave < (monsterWaves.length - 1))) {
d.buildNextMonsterWave();
}
} else if (status == com.giab.common.const.IngameStatus.GAMEOVER_PANEL_APPEARING) {
if (timer < 100) {
mcStatusInfoPanel._visible = false;
mcSlotSelectGlare._visible = false;
} else if (timer < 170) {
mcPanel._y = com.giab.common.easing.Back2.easeInOut(timer - 100, -480, 480, 70);
} else {
timer = 0;
if (isOutcomeVictory) {
status = com.giab.common.const.IngameStatus.GAMEOVER_PANEL_STATS_ROLLING;
main.sndCounterRoll.start(0, 999);
} else {
status = com.giab.common.const.IngameStatus.GAMEOVER_PANEL_SHOWING_IDLE;
}
}
} else if (status == com.giab.common.const.IngameStatus.GAMEOVER_PANEL_DISAPPEARING) {
mcPanel._y = com.giab.common.easing.Back2.easeIn(timer, 0, -480, 30);
if (timer > 30) {
if ((levelData.type == com.giab.common.const.LevelType.FINAL) && isOutcomeVictory) {
status = -2;
timer = 0;
stopAllSounds();
main.sndForgottenambient.start(0, 9999);
main.sndForgottenboom.start();
} else {
status = com.giab.common.const.IngameStatus.DISABLED;
screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
}
}
} else if (status == -2) {
if (timer == 1) {
var vThis = this;
mouseListener.onMouseDown = function () {
vThis.clickOnScene(0, 0);
};
bmpBlurImage = new flash.display.BitmapData(510, 442, true, 0);
mcBlurImage = _root.createEmptyMovieClip("mcForest", com.giab.games.gemc.armor.const.Z.MCBLURIMAGE);
mcBlurImage._x = 30;
mcBlurImage._y = 30;
mcBlurImage._visible = true;
mcBlurImage.attachBitmap(bmpBlurImage, com.giab.games.gemc.armor.const.Z.MCBLURIMAGE + 1);
bmpBlurImage.draw(bmpScene, new flash.geom.Matrix(1, 0, 0, 1, 0, 0));
var _local4 = new flash.filters.BlurFilter(5, 5, 3);
mcBlurImage.filters = [_local4];
mcBlurImage._alpha = 0;
forgotten = new com.giab.games.gemc.armor.entity.Forgotten(this, _root.attachMovie("forgotten", "forgotten", com.giab.games.gemc.armor.const.Z.MONSTER_MIN + 1000));
mcBlurImage._alpha = 100;
main.vfxEngine.startScreenShaking(10);
}
mcBlurImage._alpha = Math.max(0, mcBlurImage._alpha - 1);
forgotten.doEnterFrame();
} else if (status == -3) {
if (timer == 100) {
status = com.giab.common.const.IngameStatus.DISABLED;
screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.EPILOGUE);
}
} else if (status == com.giab.common.const.IngameStatus.GAMEOVER_PANEL_STATS_ROLLING) {
_local3 = 0;
while (_local3 < com.giab.games.gemc.armor.const.GameSpecs.STATID_NUM) {
mcPanel["tfStat" + _local3].text = com.giab.common.toolbox.NumberFormatter.format(Math.round(com.giab.common.easing.Strong2.easeOut(timer, 0, levelStats[_local3], 30)));
_local3++;
}
mcPanel.tfTotalScore.text = com.giab.common.toolbox.NumberFormatter.format(Math.round(com.giab.common.easing.Strong2.easeOut(timer, 0, getScore(), 30)));
mcw.mcScore.tf.text = com.giab.common.toolbox.NumberFormatter.format(Math.round(getScore() - com.giab.common.easing.Strong2.easeOut(timer, 0, getScore(), 30)));
if (timer > 30) {
main.sndCounterRoll.stop();
if ((levelBadges.length + carreerBadges.length) > 0) {
timer = 0;
status = com.giab.common.const.IngameStatus.GAMEOVER_PANEL_BADGES_LISTING;
} else {
if (hasPlayerLeveledUp) {
mcPanel.mcPromoted._visible = true;
main.sndLevelup.start();
} else {
mcPanel.mcPromoted._visible = false;
}
status = com.giab.common.const.IngameStatus.GAMEOVER_PANEL_SHOWING_IDLE;
}
}
} else if (status == com.giab.common.const.IngameStatus.GAMEOVER_PANEL_BADGES_LISTING) {
if ((timer % 15) == 0) {
main["sndGiabHit" + Math.min(9, Math.round(timer / 15) - 1)].start();
mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._visible = true;
if ((Math.round(timer / 15) - 1) < levelBadges.length) {
main.vfxEngine.createLevelBadgeGlare(mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._x + (mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._width / 2), mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._y + (mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._height / 2));
setScore(getScore() + levelBadgeScores[Math.round(timer / 15) - 1]);
main.vfxEngine.createScore(mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._x + (mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._width / 2), mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._y - 10, levelBadgeScores[Math.round(timer / 15) - 1], 1);
mcPanel.tfTotalScore.text = com.giab.common.toolbox.NumberFormatter.format(getScore());
} else {
main.vfxEngine.createCarreerBadgeGlare(mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._x + (mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._width / 2), mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._y + (mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._height / 2));
main.vfxEngine.createScore(mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._x + (mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._width / 2), mcPanel["mcBadge" + (Math.round(timer / 15) - 1)]._y - 10, carreerBadgeScores[(Math.round(timer / 15) - 1) - levelBadgeScores.length], 2);
}
}
if (timer > (15 * (levelBadges.length + carreerBadges.length))) {
status = com.giab.common.const.IngameStatus.GAMEOVER_PANEL_SHOWING_IDLE;
if (hasPlayerLeveledUp) {
mcPanel.mcPromoted._visible = true;
main.sndLevelup.start();
} else {
mcPanel.mcPromoted._visible = false;
}
}
} else if (status == com.giab.common.const.IngameStatus.GAMEOVER_PANEL_SHOWING_IDLE) {
}
}
function renderWaveBricks(pNewWave, pFirstWave) {
var _local2;
var _local6;
if (pFirstWave) {
_local2 = 0;
while (_local2 < 6) {
mcw["mcWaveInfoBrick" + _local2].body.gotoAndStop(Math.floor(Math.random() * 4.99) + 1);
_local2++;
}
}
if (pNewWave) {
if (!pFirstWave) {
_local2 = 0;
while (_local2 < 6) {
mcw["mcWaveInfoBrick" + _local2].body.gotoAndStop(mcw["mcWaveInfoBrick" + (_local2 + 1)].body._currentFrame);
_local2++;
}
}
isBrickSpeedUp = false;
brickSpeed = 1;
_local2 = 0;
while (_local2 < 7) {
if ((_local2 + currentWave) > (levelData.wavesNum - 2)) {
mcw["mcWaveInfoBrick" + _local2]._visible = false;
} else {
mcw["mcWaveInfoBrick" + _local2]._visible = true;
}
_local2++;
}
_local2 = 0;
while (_local2 < 7) {
mcw["mcWaveInfoBrick" + _local2].mcTf.tf.text = (_local2 + currentWave) + 2;
mcw["mcWaveInfoBrick" + _local2].tfShadow.text = (_local2 + currentWave) + 2;
_local6 = com.giab.games.gemc.armor.entity.Monster(com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + 1) + _local2]).monsterTypes[0]).hue;
var _local3 = com.giab.common.toolbox.ColorToolbox.hsbToRgb(new Array(_local6, (com.giab.games.gemc.armor.entity.Monster(com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + 1) + _local2]).monsterTypes[0]).isEpicBoss ? 0 : 100), 100));
var _local4 = new flash.geom.ColorTransform(0, 0, 0, 1, _local3[0], _local3[1], _local3[2], 0);
var _local5 = new flash.geom.Transform(mcw["mcWaveInfoBrick" + _local2].mcTf);
_local5.colorTransform = _local4;
mcw["mcWaveInfoBrick" + _local2].armoredWave._visible = false;
mcw["mcWaveInfoBrick" + _local2].fastWave._visible = false;
if (!com.giab.games.gemc.armor.entity.Monster(com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + 1) + _local2]).monsterTypes[0]).isEpicBoss) {
if (com.giab.games.gemc.armor.entity.Monster(com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + 1) + _local2]).monsterTypes[0]).armorLevel > 12) {
mcw["mcWaveInfoBrick" + _local2].armoredWave._visible = true;
}
if (com.giab.games.gemc.armor.entity.Monster(com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + 1) + _local2]).monsterTypes[0]).speedMax > 2.8) {
mcw["mcWaveInfoBrick" + _local2].fastWave._visible = true;
}
}
_local2++;
}
if (com.giab.games.gemc.armor.entity.Monster(com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[currentWave + 7]).monsterTypes[0]).isBoss) {
mcw.mcWaveInfoBrick6.body.gotoAndStop(6);
} else if (com.giab.games.gemc.armor.entity.Monster(com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[currentWave + 7]).monsterTypes[0]).isEpicBoss) {
mcw.mcWaveInfoBrick6.body.gotoAndStop(7);
} else {
mcw.mcWaveInfoBrick6.body.gotoAndStop(Math.floor(Math.random() * 4.99) + 1);
}
}
_local2 = 0;
while (_local2 < 7) {
mcw["mcWaveInfoBrick" + _local2]._y = Math.floor((27 + (80 * _local2)) + ((timeUntilNextWave / 1000) * 80));
_local2++;
}
}
function chargeManaByTime() {
setMana(getMana() + (manaChargePerFrame * manaChargeIngameMultiplier));
}
function renderInfoPanel() {
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.FORGOTTEN_SELECTED) {
d.renderForgottenInfoPanel();
return(undefined);
}
if (status != com.giab.common.const.IngameStatus.PLAYING) {
mcInfoPanel._visible = false;
mcInfoPanel._y = 1000;
return(undefined);
}
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.MONSTER_SELECTED) {
d.renderMonsterInfoPanel();
return(undefined);
}
var _local3;
if (((((lastZoneXMin == null) || (_root._xmouse < lastZoneXMin)) || (_root._xmouse > lastZoneXMax)) || (_root._ymouse < lastZoneYMin)) || (_root._ymouse > lastZoneYMax)) {
mcRange._visible = false;
if ((((_root._xmouse > 549) && (_root._xmouse < 633)) && (_root._ymouse > 137)) && (_root._ymouse < 473)) {
mcInfoPanel._x = 270;
mcInfoPanel._y = 40;
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_CREATEGEM_INITIATED) {
isManaRelatedInfoPanelVisible = true;
var _local8 = 11 - Math.floor((_root._ymouse - 137) / 28);
var _local10 = Math.round(gemCreatingBaseManaCosts[Math.floor(_local8 / 2)]);
mcInfoPanel._visible = true;
if (_local10 > getMana()) {
mcInfoPanel.tfTitle.text = "Not enough mana to create gem";
mcInfoPanel.tfTitle.textColor = 16724787 /* 0xFF3333 */;
mcInfoPanel.tfContent.text = (("Gem grade: " + (Math.floor(_local8 / 2) + 1)) + "\nMana cost: ") + _local10;
mcInfoPanel.tfContent.textColor = 16596542 /* 0xFD3E3E */;
} else {
mcInfoPanel.tfTitle.text = "Click to create gem";
mcInfoPanel.tfTitle.textColor = 16777113 /* 0xFFFF99 */;
mcInfoPanel.tfContent.text = (("Gem grade: " + (Math.floor(_local8 / 2) + 1)) + "\nMana cost: ") + _local10;
mcInfoPanel.tfContent.textColor = 14013745 /* 0xD5D531 */;
}
mcInfoPanel.tfTitleBlur._visible = false;
mcInfoPanel.plate._height = mcInfoPanel.tfContent._height + 40;
lastZoneXMin = 549;
lastZoneXMax = 633;
lastZoneYMin = 137 + ((11 - _local8) * 28);
lastZoneYMax = lastZoneYMin + 28;
} else {
isManaRelatedInfoPanelVisible = false;
var _local9 = (3 * Math.floor((_root._ymouse - 137) / 28)) + Math.floor((_root._xmouse - 549) / 28);
lastZoneXMin = 549 + ((_local9 % 3) * 28);
lastZoneXMax = lastZoneXMin + 28;
lastZoneYMin = 137 + (Math.floor(_local9 / 3) * 28);
lastZoneYMax = lastZoneYMin + 28;
if (inventorySlots[_local9] != null) {
c.renderInfoPanelGem(inventorySlots[_local9]);
} else {
mcInfoPanel._visible = false;
mcInfoPanel._y = 1000;
}
}
} else if ((((_root._xmouse > 30) && (_root._xmouse < 540)) && (_root._ymouse > 30)) && (_root._ymouse < 472)) {
isManaRelatedInfoPanelVisible = false;
var _local5 = Math.floor((_root._xmouse - 30) / 34);
var _local6 = Math.floor((_root._ymouse - 30) / 34);
lastZoneXMin = 30 + (34 * _local5);
lastZoneXMax = 64 + (34 * _local5);
lastZoneYMin = 30 + (34 * _local6);
lastZoneYMax = 64 + (34 * _local6);
mcInfoPanel._visible = false;
mcInfoPanel._y = 1000;
if (towerPlaceAvailArray[_local6].charAt(_local5) == "T") {
_local3 = 0;
while (_local3 < towers.length) {
if ((com.giab.games.gemc.armor.entity.Tower(towers[_local3]).x == (47 + (34 * _local5))) && (com.giab.games.gemc.armor.entity.Tower(towers[_local3]).y == (47 + (34 * _local6)))) {
if (com.giab.games.gemc.armor.entity.Tower(towers[_local3]).insertedObj != null) {
mcRange._visible = true;
mcRange.circle._width = (mcRange.circle._height = towers[_local3].range * 2);
mcRange.circle._x = towers[_local3].x - 30;
mcRange.circle._y = towers[_local3].y - 30;
c.renderInfoPanelGem(com.giab.games.gemc.armor.entity.Tower(towers[_local3]).insertedObj);
if (_local5 < 8) {
mcInfoPanel._x = 270;
} else {
mcInfoPanel._x = 40;
}
mcInfoPanel._y = 100;
}
}
_local3++;
}
}
} else if ((((_root._xmouse > 558) && (_root._xmouse < 625)) && (_root._ymouse > 32)) && (_root._ymouse < 133)) {
mcInfoPanel._visible = true;
mcInfoPanel.tfTitle.textColor = 6750207 /* 0x66FFFF */;
mcInfoPanel.tfContent.textColor = 3403483 /* 0x33EEDB */;
mcInfoPanel.tfTitleBlur._visible = false;
mcInfoPanel._x = 270;
mcInfoPanel._y = 40;
isManaRelatedInfoPanelVisible = true;
if ((_root._xmouse < 592) && (_root._ymouse < 66)) {
mcInfoPanel.tfTitle.text = "Gem bomb";
mcInfoPanel.tfContent.text = "Hot key: 1 or B\n\nThrow a gem at the enemy.\nCauses the gem to explode causing mass splash damage and shock.\n\nNo mana cost";
lastZoneXMin = 558;
lastZoneYMin = 32;
} else if (_root._ymouse < 66) {
mcInfoPanel.tfTitle.text = "Mana pool";
mcInfoPanel.tfContent.text = "Hot key: 4 or M\n\nRises the mana limit to 120% of the current limit and increases the mana (and score) gain speed/multiplier by 8%.\n\nCurrent mana cost: " + currentManaPoolCost;
if (currentManaPoolCost > getMana()) {
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat("\n\nNot enough mana");
mcInfoPanel.tfContent.textColor = 16596542 /* 0xFD3E3E */;
}
lastZoneXMin = 592;
lastZoneYMin = 32;
} else if ((_root._xmouse < 592) && (_root._ymouse < 100)) {
mcInfoPanel.tfTitle.text = "Build tower";
mcInfoPanel.tfContent.text = "Hot key: 2 or T\n\nPlace a tower at a free field on the scene. Insert gems into towers to fire at the monsters. Building mana cost increases with every tower places. Towers cannot be demolished.\n\nCurrent mana cost: " + Math.round(currentTowerBuildingManaCost);
if (Math.round(currentTowerBuildingManaCost) > getMana()) {
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat("\n\nNot enough mana");
mcInfoPanel.tfContent.textColor = 16596542 /* 0xFD3E3E */;
}
lastZoneXMin = 558;
lastZoneYMin = 66;
} else if (_root._ymouse < 100) {
mcInfoPanel.tfTitle.text = "Build water trench";
mcInfoPanel.tfContent.text = "Hot key: 5 or W\n\nPlace a water trench in the path of the monsters to slow them down. Mana cost increases with every trench placed. Water trenches cannot be removed.\n\nCurrent mana cost: " + Math.round(currentWaterTrenchBuildingManaCost);
if (Math.round(currentWaterTrenchBuildingManaCost) > getMana()) {
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat("\n\nNot enough mana");
mcInfoPanel.tfContent.textColor = 16596542 /* 0xFD3E3E */;
}
lastZoneXMin = 592;
lastZoneYMin = 66;
} else if (_root._xmouse < 592) {
mcInfoPanel.tfTitle.text = "Create gem";
mcInfoPanel.tfContent.text = "Hot key: 3 or C\n\nGems can be inserted in towers to fire at the monsters or can be thrown directly at them. Gems of higher grades are more powerful. The grade (and mana cost) of the created gem depends on which row you place it in the inventory.\n\nClick here, then roll over the inventory for details Hold Shift to create gems in all empty slots.";
lastZoneXMin = 558;
lastZoneYMin = 100;
} else {
mcInfoPanel.tfTitle.text = "Combine gems";
mcInfoPanel.tfContent.text = "Hot key: 6 or G\n\nGems can be combined to create more powerful gems. For the best results, combine gems of the same grade. Hold Ctrl to combine all gems of the same grade.\n\nMana cost: " + gemCombiningManaCost;
if (gemCombiningManaCost > getMana()) {
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat("\n\nNot enough mana");
mcInfoPanel.tfContent.textColor = 16596542 /* 0xFD3E3E */;
}
lastZoneXMin = 592;
lastZoneYMin = 100;
}
mcInfoPanel.plate._height = mcInfoPanel.tfContent._height + 40;
lastZoneXMax = lastZoneXMin + 34;
lastZoneYMax = lastZoneYMin + 34;
} else if (((_root._xmouse > 5.5) && (_root._xmouse < 27.5)) && (_root._ymouse > 30)) {
var _local7 = false;
_local3 = 0;
while (_local3 < Math.min(7, (levelData.wavesNum - currentWave) - 1)) {
if ((_root._ymouse > mcw["mcWaveInfoBrick" + _local3]._y) && (_root._ymouse < (mcw["mcWaveInfoBrick" + _local3]._y + 80))) {
_local7 = true;
mcInfoPanel.tfTitle.text = (mcInfoPanel.tfTitleBlur.text = (("Wave " + ((currentWave + _local3) + 2)) + " of ") + levelData.wavesNum);
mcInfoPanel.tfTitle.textColor = 16777215 /* 0xFFFFFF */;
mcInfoPanel.tfTitleBlur._visible = true;
mcInfoPanel.tfTitleBlur.textColor = com.giab.common.toolbox.ColorToolbox.rgbToHex(com.giab.common.toolbox.ColorToolbox.hsbToRgb([com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).monsterTypes[0].hue, 100, 100]));
mcInfoPanel.tfContent.textColor = 15722468 /* 0xEFE7E4 */;
mcInfoPanel.tfContent.text = "";
if (com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).content != com.giab.games.gemc.armor.const.WaveContent.EPIC_BOSS) {
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat(("Average monster hue: " + com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).monsterTypes[0].hue) + "\n\n");
}
if (com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).content == com.giab.games.gemc.armor.const.WaveContent.EPIC_BOSS) {
mcInfoPanel.tfTitleBlur._visible = false;
mcInfoPanel.tfTitle.textColor = 16770560 /* 0xFFE600 */;
} else if (com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).content == com.giab.games.gemc.armor.const.WaveContent.BOSS) {
mcInfoPanel.tfTitleBlur._visible = false;
mcInfoPanel.tfTitle.textColor = 15138560 /* 0xE6FF00 */;
}
var _local4 = com.giab.games.gemc.armor.entity.Monster(com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).monsterTypes[0]).hpMax;
if (com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).content == com.giab.games.gemc.armor.const.WaveContent.EPIC_BOSS) {
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat("Epic boss wave!\n");
} else if (com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).content == com.giab.games.gemc.armor.const.WaveContent.BOSS) {
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat("1 Boss monster\n");
} else if (com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).content == com.giab.games.gemc.armor.const.WaveContent.BOSS_2) {
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat("2 Boss monsters\n");
_local4 = _local4 * 2;
} else if (com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).content == com.giab.games.gemc.armor.const.WaveContent.BOSS_3) {
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat("3 Boss monsters\n");
_local4 = _local4 * 3;
} else if (com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).content == com.giab.games.gemc.armor.const.WaveContent.NORMAL_6) {
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat("6 monsters\n");
_local4 = _local4 * 6;
} else if (com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).content == com.giab.games.gemc.armor.const.WaveContent.NORMAL_12) {
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat("12 monsters\n");
_local4 = _local4 * 12;
} else if (com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).content == com.giab.games.gemc.armor.const.WaveContent.NORMAL_24) {
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat("24 monsters\n");
_local4 = _local4 * 24;
}
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat(("Hit points: " + com.giab.games.gemc.armor.entity.Monster(com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).monsterTypes[0]).hpMax) + newline);
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat(("Armor level: " + com.giab.games.gemc.armor.entity.Monster(com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).monsterTypes[0]).armorLevel) + newline);
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat(("Speed: " + com.giab.games.gemc.armor.entity.Monster(com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).monsterTypes[0]).speedMax) + "\n\n");
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat((((("Max mana gain per kill:\n( " + com.giab.games.gemc.armor.entity.Monster(com.giab.games.gemc.armor.entity.MonsterWave(monsterWaves[(currentWave + _local3) + 1]).monsterTypes[0]).mana) + " + ") + main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.MANA_CHARGE_PER_KILL)) + " ) * ") + manaChargeIngameMultiplier);
if (_local3 == 0) {
mcInfoPanel.tfContent.text = mcInfoPanel.tfContent.text.concat("\n\nClick to send next wave now");
}
}
_local3++;
}
lastZoneXMin = null;
if (!_local7) {
mcInfoPanel._visible = false;
mcInfoPanel._y = 1000;
} else {
mcInfoPanel._visible = true;
mcInfoPanel._x = 40;
mcInfoPanel._y = 40;
mcInfoPanel.plate._height = (mcInfoPanel.tfContent._height * 1.05) + 40;
}
} else if ((((_root._xmouse > 5) && (_root._xmouse < 25)) && (_root._ymouse > 5)) && (_root._ymouse < 25)) {
mcInfoPanel.tfContent.text = "";
mcInfoPanel.tfTitle.textColor = 16777215 /* 0xFFFFFF */;
mcInfoPanel.tfTitleBlur._visible = false;
mcInfoPanel._x = 40;
mcInfoPanel._y = 40;
mcInfoPanel.plate._height = 34;
mcInfoPanel._visible = true;
if (isRunningOnDoubleSpeed) {
mcInfoPanel.tfTitle.text = "Click to reset speed to 1x";
} else {
mcInfoPanel.tfTitle.text = "Click to speed up to 3x";
}
} else if ((((_root._xmouse > 34) && (_root._xmouse < 160)) && (_root._ymouse > 5)) && (_root._ymouse < 28)) {
mcInfoPanel.tfTitle.text = "Your best score: " + com.giab.common.toolbox.NumberFormatter.format(main.player.levelScores[levelData.num]);
mcInfoPanel.tfContent.text = "Glowing frame score: " + com.giab.common.toolbox.NumberFormatter.format(levelData.highestGradeScore);
mcInfoPanel.tfTitle.textColor = 16777011 /* 0xFFFF33 */;
mcInfoPanel.tfContent.textColor = 3407871 /* 0x33FFFF */;
mcInfoPanel.tfTitleBlur._visible = false;
mcInfoPanel._x = 40;
mcInfoPanel._y = 40;
mcInfoPanel._visible = true;
mcInfoPanel.plate._height = (mcInfoPanel.tfContent._height * 1.05) + 26;
} else if ((((_root._xmouse > 165) && (_root._xmouse < 295)) && (_root._ymouse > 5)) && (_root._ymouse < 28)) {
mcInfoPanel.tfTitle.text = "Monsters attacking: " + monstersOnScene.length;
mcInfoPanel.tfContent.text = "Monsters waiting: " + monstersWaitingInWave.length;
mcInfoPanel.tfTitle.textColor = 16777215 /* 0xFFFFFF */;
mcInfoPanel.tfContent.textColor = 13421772 /* 0xCCCCCC */;
mcInfoPanel.tfTitle.textColor = 16777215 /* 0xFFFFFF */;
mcInfoPanel.tfTitleBlur._visible = false;
mcInfoPanel._x = 40;
mcInfoPanel._y = 40;
mcInfoPanel._visible = true;
mcInfoPanel.plate._height = (mcInfoPanel.tfContent._height * 1.05) + 26;
} else {
isManaRelatedInfoPanelVisible = false;
mcInfoPanel._visible = false;
mcInfoPanel._y = 1000;
lastZoneXMin = null;
}
}
}
function renderHeader() {
if ((monstersOnScene.length + monstersWaitingInWave.length) == 0) {
mcw.mcMonstercounter.tf.text = "";
} else {
mcw.mcMonstercounter.tf.text = ((("Monsters: " + monstersOnScene.length) + "+(") + monstersWaitingInWave.length) + ")";
}
mcw.mcMana.tf.text = (("Mana: " + com.giab.common.toolbox.NumberFormatter.format(Math.floor(getMana()))) + "/") + com.giab.common.toolbox.NumberFormatter.format(Math.floor(maxMana));
mcw.mcManaBar.deltaPlus._alpha = Math.max(0, mcw.mcManaBar.deltaPlus._alpha - 5);
mcw.mcManaBar.deltaMinus._alpha = Math.max(0, mcw.mcManaBar.deltaMinus._alpha - 5);
mcw.mcScore.tf.text = com.giab.common.toolbox.NumberFormatter.format(getScore());
if (getScore() < main.player.levelScores[levelData.num]) {
if (getScore() < levelData.highestGradeScore) {
mcw.mcScore.tf.textColor = 11776947 /* 0xB3B3B3 */;
} else {
mcw.mcScore.tf.textColor = 3407871 /* 0x33FFFF */;
}
} else if (getScore() < levelData.highestGradeScore) {
mcw.mcScore.tf.textColor = 16777215 /* 0xFFFFFF */;
} else {
mcw.mcScore.tf.textColor = 16777011 /* 0xFFFF33 */;
}
var _local2 = getMana();
mcw.btnCastBuildTower.mcNa._visible = _local2 < currentTowerBuildingManaCost;
mcw.btnCastBuildWaterTrench.mcNa._visible = _local2 < currentWaterTrenchBuildingManaCost;
mcw.btnCastCombineGems.mcNa._visible = _local2 < gemCombiningManaCost;
mcw.btnCastCreateGem.mcNa._visible = _local2 < gemCreatingBaseManaCosts[0];
mcw.btnCastRiseMaxMana.mcNa._visible = _local2 < currentManaPoolCost;
if (_local2 < gemCreatingBaseManaCosts[0]) {
mcGemCreateShapeHelper.gotoAndStop(1);
} else if (_local2 < gemCreatingBaseManaCosts[1]) {
mcGemCreateShapeHelper.gotoAndStop(2);
} else if (_local2 < gemCreatingBaseManaCosts[2]) {
mcGemCreateShapeHelper.gotoAndStop(3);
} else if (_local2 < gemCreatingBaseManaCosts[3]) {
mcGemCreateShapeHelper.gotoAndStop(4);
} else if (_local2 < gemCreatingBaseManaCosts[4]) {
mcGemCreateShapeHelper.gotoAndStop(5);
} else if (_local2 < gemCreatingBaseManaCosts[5]) {
mcGemCreateShapeHelper.gotoAndStop(6);
} else {
mcGemCreateShapeHelper.gotoAndStop(7);
}
}
function setScore(pScore) {
scoreKey = Math.floor(Math.random() * 1000000) - 500000;
score = pScore + scoreKey;
}
function getScore() {
return(score - scoreKey);
}
function setMana(pMana) {
var _local2 = (isNaN(getMana()) ? 0 : (getMana()));
manaKey = Math.floor(Math.random() * 1000000) - 500000;
mana = Math.min(maxMana, Math.max(0, pMana)) + manaKey;
if (isManaRelatedInfoPanelVisible == true) {
lastZoneXMin = null;
renderInfoPanel();
}
mcw.mcManaBar.progress._width = (240 * getMana()) / maxMana;
if (getMana() == maxMana) {
if (mcw.mcManaBar.glow._visible != true) {
main.sndManareachesmax.start();
}
mcw.mcManaBar.glow._visible = true;
} else {
mcw.mcManaBar.glow._visible = false;
if (getMana() > (_local2 + (maxMana / 240))) {
mcw.mcManaBar.deltaPlus._alpha = 100;
mcw.mcManaBar.deltaPlus._x = (240 * _local2) / maxMana;
mcw.mcManaBar.deltaPlus._width = (240 * (getMana() - _local2)) / maxMana;
} else if (getMana() < _local2) {
mcw.mcManaBar.deltaMinus._alpha = 100;
mcw.mcManaBar.deltaPlus._alpha = 0;
mcw.mcManaBar.deltaMinus._x = (240 * getMana()) / maxMana;
mcw.mcManaBar.deltaMinus._width = (240 * (_local2 - getMana())) / maxMana;
}
}
}
function getMana() {
return(mana - manaKey);
}
function moveAllMovieClips(pY) {
var _local2;
mcForest._y = mcw.mc._y + 30;
mcBuildings._y = mcw.mc._y + 30;
_local2 = 0;
while (_local2 < monstersOnScene.length) {
com.giab.games.gemc.armor.entity.Monster(monstersOnScene[_local2]).mc._y = com.giab.games.gemc.armor.entity.Monster(monstersOnScene[_local2]).mc._y + pY;
com.giab.games.gemc.armor.entity.Monster(monstersOnScene[_local2]).mcHealth._y = com.giab.games.gemc.armor.entity.Monster(monstersOnScene[_local2]).mcHealth._y + pY;
_local2++;
}
_local2 = 0;
while (_local2 < shots.length) {
com.giab.games.gemc.armor.entity.Shot(shots[_local2]).mc._y = com.giab.games.gemc.armor.entity.Shot(shots[_local2]).mc._y + pY;
_local2++;
}
_local2 = 0;
while (_local2 < gems.length) {
com.giab.games.gemc.armor.entity.Gem(gems[_local2]).mc._y = com.giab.games.gemc.armor.entity.Gem(gems[_local2]).mc._y + pY;
_local2++;
}
}
function castRiseMaxMana() {
if (getMana() < currentManaPoolCost) {
return(undefined);
}
setMana(getMana() - currentManaPoolCost);
maxMana = Math.floor(maxMana * 1.2);
manaChargeIngameMultiplier = manaChargeIngameMultiplier + 0.08;
currentManaPoolCost = currentManaPoolCost + 120;
main.sndManapool.start();
}
function resetCastButtons() {
mcw.btnCastCreateGem.gotoAndStop(1);
mcw.btnCastCombineGems.gotoAndStop(1);
mcw.btnCastRiseMaxMana.gotoAndStop(1);
mcw.btnCastThrow.gotoAndStop(1);
mcw.btnCastBuildTower.gotoAndStop(1);
mcw.btnCastBuildWaterTrench.gotoAndStop(1);
}
function deselectEverything(pDeselectGem, pPlaceGemBack) {
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.IDLE;
if (pPlaceGemBack) {
draggedGem.mc._x = gemDragStartX;
draggedGem.mc._y = gemDragStartY;
}
if (pDeselectGem) {
draggedGem.mc.cooldown._visible = true;
draggedGem.mc.outlineDrag._visible = false;
draggedGem.mc.swapDepths(gemDragStartZ);
draggedGem = null;
}
selectedMonster.mc.body.selectGlare._visible = false;
forgotten.mc.selectGlare._visible = false;
selectedMonster = null;
selectedTower = null;
selectedSlotNum = null;
mcTowerPlaceAvailMap._visible = false;
mcWaterTrenchPlaceAvailMap._visible = false;
mcBuildingSelectGlare._visible = false;
mcSlotSelectGlare._visible = false;
mcGemCreateShapeHelper._visible = false;
mcRange._visible = false;
mcStatusInfoPanel._visible = false;
lastZoneXMin = null;
resetCastButtons();
renderInfoPanel();
d.renderStatusInfoPanel();
placeAllGemsToTheirSlots();
}
function initiateCastCombineGems() {
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_COMBINEGEMS_INITIATED) {
deselectEverything(false, false);
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.IDLE;
} else if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_COMBINE) {
resetCastButtons();
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_IDLE;
} else if ((actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_IDLE) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_THROW)) {
mcw.btnCastCombineGems.gotoAndStop(2);
main.sndSelectspell.start();
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_COMBINE;
} else if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_COMBINE) {
resetCastButtons();
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_IDLE;
} else if ((actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_IDLE) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_THROW)) {
mcw.btnCastCombineGems.gotoAndStop(2);
main.sndSelectspell.start();
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_COMBINE;
} else {
deselectEverything(false, false);
mcw.btnCastCombineGems.gotoAndStop(2);
main.sndSelectspell.start();
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.CAST_COMBINEGEMS_INITIATED;
}
d.renderStatusInfoPanel();
}
function initiateCastCreateGem() {
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_CREATEGEM_INITIATED) {
deselectEverything(false, false);
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.IDLE;
} else {
deselectEverything(true, true);
mcw.btnCastCreateGem.gotoAndStop(2);
main.sndSelectspell.start();
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.CAST_CREATEGEM_INITIATED;
mcGemCreateShapeHelper._visible = true;
}
lastZoneXMin = null;
renderInfoPanel();
d.renderStatusInfoPanel();
}
function initiateCastBuildWaterTrench() {
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_BUILDWATERTRENCH_INITIATED) {
deselectEverything(false, false);
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.IDLE;
} else {
deselectEverything(true, true);
mcw.btnCastBuildWaterTrench.gotoAndStop(2);
main.sndSelectspell.start();
mcWaterTrenchPlaceAvailMap._visible = true;
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.CAST_BUILDWATERTRENCH_INITIATED;
}
d.renderStatusInfoPanel();
}
function initiateCastBuildTower() {
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_BUILDTOWER_INITIATED) {
deselectEverything(false, false);
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.IDLE;
} else {
deselectEverything(true, true);
mcw.btnCastBuildTower.gotoAndStop(2);
main.sndSelectspell.start();
mcTowerPlaceAvailMap._visible = true;
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.CAST_BUILDTOWER_INITIATED;
}
d.renderStatusInfoPanel();
}
function initiateCastThrow() {
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_THROW_INITIATED) {
deselectEverything(true, true);
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.IDLE;
} else if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_THROW) {
resetCastButtons();
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_IDLE;
} else if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_THROW) {
resetCastButtons();
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_IDLE;
} else if ((actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_IDLE) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_COMBINE)) {
resetCastButtons();
mcw.btnCastThrow.gotoAndStop(2);
main.sndSelectspell.start();
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_THROW;
} else if ((actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_IDLE) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_COMBINE)) {
resetCastButtons();
mcw.btnCastThrow.gotoAndStop(2);
main.sndSelectspell.start();
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_THROW;
} else {
deselectEverything(false, false);
mcw.btnCastThrow.gotoAndStop(2);
main.sndSelectspell.start();
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.CAST_THROW_INITIATED;
}
d.renderStatusInfoPanel();
lastZoneXMin = null;
renderInfoPanel();
}
function selectTower(pTower) {
selectedTower = pTower;
mcBuildingSelectGlare.gotoAndStop(1);
mcBuildingSelectGlare._x = selectedTower.x - 17;
mcBuildingSelectGlare._y = selectedTower.y - 17;
mcBuildingSelectGlare._visible = true;
if (pTower.insertedObj != null) {
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_COMBINEGEMS_INITIATED) {
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_COMBINE;
startGemDrag(pTower.insertedObj);
} else if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_THROW_INITIATED) {
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_THROW;
startGemDrag(pTower.insertedObj);
} else {
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_IDLE;
startGemDrag(pTower.insertedObj);
}
d.renderStatusInfoPanel();
main["sndGemplace" + (Math.floor(Math.random() * 1.99) + 1)].start();
} else {
main.sndTickPress.start();
deselectEverything(true, true);
}
}
function selectSlot(pSlotNum) {
var _local2;
var _local8;
if (status != com.giab.common.const.IngameStatus.PLAYING) {
deselectEverything(true, true);
return(undefined);
}
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_IDLE) {
if (pSlotNum == selectedSlotNum) {
deselectEverything(true, true);
} else if (inventorySlots[pSlotNum] == null) {
inventorySlots[pSlotNum] = inventorySlots[selectedSlotNum];
inventorySlots[selectedSlotNum] = null;
inventorySlots[pSlotNum].mc._x = (549 + ((pSlotNum % 3) * 28)) + 14;
inventorySlots[pSlotNum].mc._y = (137 + (Math.floor(pSlotNum / 3) * 28)) + 14;
main["sndGemplace" + (Math.floor(Math.random() * 1.99) + 1)].start();
deselectEverything(true, true);
} else {
inventorySlots[selectedSlotNum].mc._x = (549 + ((pSlotNum % 3) * 28)) + 14;
inventorySlots[selectedSlotNum].mc._y = (137 + (Math.floor(pSlotNum / 3) * 28)) + 14;
inventorySlots[pSlotNum].mc._x = (549 + ((selectedSlotNum % 3) * 28)) + 14;
inventorySlots[pSlotNum].mc._y = (137 + (Math.floor(selectedSlotNum / 3) * 28)) + 14;
var _local10 = inventorySlots[selectedSlotNum];
inventorySlots[selectedSlotNum] = inventorySlots[pSlotNum];
inventorySlots[pSlotNum] = _local10;
main["sndGemplace" + (Math.floor(Math.random() * 1.99) + 1)].start();
deselectEverything(true, false);
}
} else if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_IDLE) {
if (selectedTower.insertedObj != null) {
var _local9 = false;
if (inventorySlots[pSlotNum] != null) {
_local9 = true;
_local8 = selectedTower.insertedObj;
selectedTower.removeObject();
selectedTower.insertObject(inventorySlots[pSlotNum]);
inventorySlots[pSlotNum] = _local8;
inventorySlots[pSlotNum].mc._x = (549 + ((pSlotNum % 3) * 28)) + 14;
inventorySlots[pSlotNum].mc._y = (137 + (Math.floor(pSlotNum / 3) * 28)) + 14;
_local8.mc.cooldown.gotoAndStop(1);
main.sndGemplacetotower.start();
deselectEverything(true, false);
}
if (_local9 != true) {
if (inventorySlots[pSlotNum] != null) {
var _local6 = false;
_local2 = 0;
while (_local2 < inventorySlots.length) {
if (inventorySlots[_local2] == null) {
pSlotNum = _local2;
_local6 = true;
break;
}
_local2++;
}
if (_local6 == false) {
deselectEverything(true, true);
return(undefined);
}
}
inventorySlots[pSlotNum] = selectedTower.insertedObj;
selectedTower.removeObject();
inventorySlots[pSlotNum].mc._x = (549 + ((pSlotNum % 3) * 28)) + 14;
inventorySlots[pSlotNum].mc._y = (137 + (Math.floor(pSlotNum / 3) * 28)) + 14;
_local8.mc.cooldown.gotoAndStop(1);
main["sndGemplace" + (Math.floor(Math.random() * 1.99) + 1)].start();
deselectEverything(true, false);
}
}
} else if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_CREATEGEM_INITIATED) {
if (Key.isDown(17)) {
var _local4 = false;
_local2 = 0;
while (_local2 < 36) {
if (b.castCreateGem(pSlotNum)) {
_local4 = true;
}
_local2++;
}
if (_local4) {
main.sndGemcreate.start();
}
} else {
var _local5 = false;
_local2 = 0;
while (_local2 < inventorySlots.length) {
if (inventorySlots[_local2] == null) {
_local5 = true;
break;
}
_local2++;
}
if (_local5) {
if (b.castCreateGem(pSlotNum)) {
main.sndGemcreate.start();
}
}
}
if (!Key.isDown(16)) {
deselectEverything(true, true);
}
} else {
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_COMBINEGEMS_INITIATED) {
if (inventorySlots[pSlotNum] != null) {
if (Key.isDown(17)) {
d.combineMultipleGems(pSlotNum);
} else {
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_COMBINE;
startGemDrag(inventorySlots[pSlotNum]);
d.renderStatusInfoPanel();
selectedSlotNum = pSlotNum;
mcSlotSelectGlare._x = 549 + ((pSlotNum % 3) * 28);
mcSlotSelectGlare._y = 137 + (Math.floor(pSlotNum / 3) * 28);
mcSlotSelectGlare._visible = true;
main.sndTickPress.start();
}
// unexpected jump
}
deselectEverything(true, false);
return(undefined);
}
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_COMBINE) {
if ((inventorySlots[pSlotNum] != null) && (pSlotNum != selectedSlotNum)) {
if (getMana() >= gemCombiningManaCost) {
main.sndGemcombine.start();
d.castCombineGems(selectedSlotNum, pSlotNum);
} else {
deselectEverything(true, true);
}
return(undefined);
}
deselectEverything(true, true);
return(undefined);
}
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_COMBINE) {
if (inventorySlots[pSlotNum] != null) {
if (getMana() >= gemCombiningManaCost) {
main.sndGemcombine.start();
var _local7 = null;
_local2 = 0;
while (_local2 < towers.length) {
if (towers[_local2] == selectedTower) {
_local7 = _local2;
break;
}
_local2++;
}
d.castCombineGemsFromTower(_local7, pSlotNum);
} else {
deselectEverything(true, true);
}
return(undefined);
}
deselectEverything(true, true);
return(undefined);
}
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_THROW_INITIATED) {
if (inventorySlots[pSlotNum] != null) {
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_THROW;
startGemDrag(inventorySlots[pSlotNum]);
d.renderStatusInfoPanel();
selectedSlotNum = pSlotNum;
mcSlotSelectGlare._x = 549 + ((pSlotNum % 3) * 28);
mcSlotSelectGlare._y = 137 + (Math.floor(pSlotNum / 3) * 28);
mcSlotSelectGlare._visible = true;
main.sndTickPress.start();
} else {
deselectEverything(true, false);
}
} else if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_THROW) {
deselectEverything(true, true);
} else if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_THROW) {
deselectEverything(true, true);
} else {
deselectEverything(false, false);
if (inventorySlots[pSlotNum] != null) {
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_IDLE;
startGemDrag(inventorySlots[pSlotNum]);
main.sndTickPress.start();
d.renderStatusInfoPanel();
selectedSlotNum = pSlotNum;
mcSlotSelectGlare._x = 549 + ((pSlotNum % 3) * 28);
mcSlotSelectGlare._y = 137 + (Math.floor(pSlotNum / 3) * 28);
mcSlotSelectGlare._visible = true;
}
}
}
placeAllGemsToTheirSlots();
}
function clickOnScene(pX, pY) {
if (status == com.giab.common.const.IngameStatus.PLAYING) {
var _local3;
var _local4;
var _local9;
var _local8;
if (((((actionStatus == com.giab.games.gemc.armor.const.ActionStatus.IDLE) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.MONSTER_SELECTED)) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_CREATEGEM_INITIATED)) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_THROW_INITIATED)) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_COMBINEGEMS_INITIATED)) {
_local3 = 0;
while (_local3 < towers.length) {
if (((com.giab.games.gemc.armor.entity.Tower(towers[_local3]).x == ((30 + (pX * 34)) + 17)) && (com.giab.games.gemc.armor.entity.Tower(towers[_local3]).y == ((30 + (pY * 34)) + 17))) && (com.giab.games.gemc.armor.entity.Tower(towers[_local3]).insertedObj != null)) {
selectTower(towers[_local3]);
main.sndTickPress.start();
return(undefined);
}
_local3++;
}
deselectEverything(true, false);
} else {
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_IDLE) {
_local3 = 0;
while (_local3 < towers.length) {
if ((com.giab.games.gemc.armor.entity.Tower(towers[_local3]).x == ((30 + (pX * 34)) + 17)) && (com.giab.games.gemc.armor.entity.Tower(towers[_local3]).y == ((30 + (pY * 34)) + 17))) {
main.sndGemplacetotower.start();
if (com.giab.games.gemc.armor.entity.Tower(towers[_local3]).insertedObj != null) {
_local4 = com.giab.games.gemc.armor.entity.Tower(towers[_local3]).insertedObj;
towers[_local3].insertObject(inventorySlots[selectedSlotNum]);
inventorySlots[selectedSlotNum] = _local4;
_local4.mc.cooldown.gotoAndStop(1);
_local4.mc._x = (549 + ((selectedSlotNum % 3) * 28)) + 14;
_local4.mc._y = (137 + (Math.floor(selectedSlotNum / 3) * 28)) + 14;
} else {
towers[_local3].insertObject(inventorySlots[selectedSlotNum]);
inventorySlots[selectedSlotNum] = null;
}
deselectEverything(true, false);
return(undefined);
}
_local3++;
}
deselectEverything(true, true);
return(undefined);
}
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_BUILDWATERTRENCH_INITIATED) {
if (waterTrenchPlaceAvailArray[pY].charAt(pX) == ".") {
if (getMana() >= currentWaterTrenchBuildingManaCost) {
setMana(getMana() - currentWaterTrenchBuildingManaCost);
currentWaterTrenchBuildingManaCost = currentWaterTrenchBuildingManaCost + (com.giab.games.gemc.armor.const.GameSpecs.TOWERBUILDING_COST_INCREMENT - (main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.INITIAL_TOWER_BUILDING_MANA_COST) * 2));
waterTrenchPlaceAvailArray[pY] = (waterTrenchPlaceAvailArray[pY].substring(0, pX) + "W") + waterTrenchPlaceAvailArray[pY].substring(pX + 1);
bmpWaterTrenchPlaceAvailMap.draw(_root.towerPlaceForbidden, new flash.geom.Matrix(1, 0, 0, 1, pX * 34, pY * 34));
c.buildWaterTrench(pX, pY);
c.redrawBuildings();
}
}
if (!Key.isDown(16)) {
deselectEverything(false, false);
}
return(undefined);
}
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_BUILDTOWER_INITIATED) {
if (towerPlaceAvailArray[pY].charAt(pX) == ".") {
if (getMana() >= currentTowerBuildingManaCost) {
setMana(getMana() - currentTowerBuildingManaCost);
currentTowerBuildingManaCost = currentTowerBuildingManaCost + (com.giab.games.gemc.armor.const.GameSpecs.TOWERBUILDING_COST_INCREMENT - (main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.INITIAL_TOWER_BUILDING_MANA_COST) * 3));
towerPlaceAvailArray[pY] = (towerPlaceAvailArray[pY].substring(0, pX) + "T") + towerPlaceAvailArray[pY].substring(pX + 1);
bmpTowerPlaceAvailMap.draw(_root.towerPlaceForbidden, new flash.geom.Matrix(1, 0, 0, 1, pX * 34, pY * 34));
c.buildTower(pX, pY);
c.redrawBuildings();
}
}
if (!Key.isDown(16)) {
deselectEverything(false, false);
}
return(undefined);
}
if ((actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_THROW) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_THROW)) {
if (getMana() >= com.giab.games.gemc.armor.const.GameSpecs.MANACOST_THROW) {
setMana(getMana() - com.giab.games.gemc.armor.const.GameSpecs.MANACOST_THROW);
c.castGemBomb();
}
} else {
if (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_IDLE) {
var _local7 = false;
_local3 = 0;
while (_local3 < towers.length) {
if (((com.giab.games.gemc.armor.entity.Tower(towers[_local3]).x == ((30 + (pX * 34)) + 17)) && (com.giab.games.gemc.armor.entity.Tower(towers[_local3]).y == ((30 + (pY * 34)) + 17))) && (com.giab.games.gemc.armor.entity.Tower(towers[_local3]) != selectedTower)) {
_local7 = true;
break;
}
_local3++;
}
if (_local7) {
_local9 = selectedTower.insertedObj;
_local8 = towers[_local3].insertedObj;
selectedTower.removeObject();
towers[_local3].removeObject();
selectedTower.insertObject(_local8);
towers[_local3].insertObject(_local9);
deselectEverything(true, false);
main.sndGemplacetotower.start();
return(undefined);
}
deselectEverything(true, true);
return(undefined);
}
deselectEverything(true, true);
}
}
} else {
deselectEverything(true, true);
}
}
function shotHitsTarget(pShot) {
var _local2;
main.vfxEngine.createShotImpact(pShot.mc._x, pShot.mc._y, pShot.rgb);
if (status == com.giab.common.const.IngameStatus.PLAYING) {
setMana(getMana() + (pShot.shotData.manaAddPerHit * manaChargeIngameMultiplier));
renderHeader();
}
pShot.target.sufferDamage(pShot.shotData);
var _local6 = pShot.shotData.chanceOfBouncing > Math.random();
var _local5 = null;
var _local4;
_local2 = 0;
while (_local2 < monstersOnScene.length) {
_local4 = Math.sqrt(Math.pow(pShot.mc._x - monstersOnScene[_local2].x, 2) + Math.pow(pShot.mc._y - monstersOnScene[_local2].y, 2));
if (pShot.shotData.splashRadius > 0) {
if (_local4 < pShot.shotData.splashRadius) {
com.giab.games.gemc.armor.entity.Monster(monstersOnScene[_local2]).sufferSplashDamage(pShot.shotData, _local4);
}
}
if (_local6) {
if ((_local4 > 3) && (_local4 < 33)) {
_local5 = monstersOnScene[_local2];
}
}
_local2++;
}
if (_local5 != null) {
pShot.target = _local5;
pShot.vZ = 0;
pShot.altitude = 40;
} else {
pShot.mc.removeMovieClip();
_local2 = 0;
while (_local2 < shots.length) {
if (shots[_local2] == pShot) {
shots.splice(_local2, 1);
}
_local2++;
}
}
}
function selectMonster(pMonster) {
if (!Key.isDown(16)) {
selectedMonster.mc.body.selectGlare._visible = false;
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.MONSTER_SELECTED;
d.renderStatusInfoPanel();
selectedMonster = pMonster;
renderInfoPanel();
pMonster.mc.body.selectGlare._visible = true;
var _local2;
_local2 = 0;
while (_local2 < towers.length) {
com.giab.games.gemc.armor.entity.Tower(towers[_local2]).tryToTargetMonster(pMonster);
_local2++;
}
}
}
function selectForgotten() {
forgotten.mc.selectGlare._visible = true;
actionStatus = com.giab.games.gemc.armor.const.ActionStatus.FORGOTTEN_SELECTED;
renderInfoPanel();
}
function startGemDrag(pGem) {
if (status != com.giab.common.const.IngameStatus.PLAYING) {
deselectEverything(true, true);
return(undefined);
}
if (actionStatus != com.giab.games.gemc.armor.const.ActionStatus.CAST_CREATEGEM_INITIATED) {
if ((((((actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_IDLE) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_COMBINE)) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_THROW)) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_IDLE)) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_COMBINE)) || (actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_THROW)) {
gemDragStartX = pGem.mc._x;
gemDragStartY = pGem.mc._y;
gemDragDeltaX = _root._xmouse - pGem.mc._x;
gemDragDeltaY = _root._ymouse - pGem.mc._y;
draggedGem = pGem;
gemDragStartZ = draggedGem.mc.getDepth();
draggedGem.mc.swapDepths(com.giab.games.gemc.armor.const.Z.DRAGGEDGEM);
draggedGem.mc.cooldown._visible = false;
draggedGem.mc.outlineDrag._visible = true;
}
}
}
function placeAllGemsToTheirSlots() {
var _local2 = 0;
while (_local2 < 36) {
if (inventorySlots[_local2] != null) {
inventorySlots[_local2].mc._x = (549 + ((_local2 % 3) * 28)) + 14;
inventorySlots[_local2].mc._y = (137 + (Math.floor(_local2 / 3) * 28)) + 14;
}
_local2++;
}
}
}
Symbol 1298 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlIngameB] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlIngameB
{
var a, c, d;
function CtrlIngameB () {
}
function resetInfoPanel() {
a.deselectEverything(true, false);
a.mcw.mcScore.tf.text = "";
a.mcw.mcMana.tf.text = "";
a.mcw.mcMonstercounter.tf.text = "";
a.mcw.mcManaBar.progress._width = 1;
}
function resetArrays() {
var _local2;
a.shots = new Array();
a.monstersOnScene = new Array();
a.runeGhosts = new Array();
a.gems = new Array();
a.monstersWaitingInWave = new Array();
a.runeStones = new Array();
a.inventorySlots = new Array();
_local2 = 0;
while (_local2 < 36) {
a.inventorySlots.push(null);
_local2++;
}
}
function resetStatistics() {
a.levelStats = new Array();
var _local2;
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.STATID_NUM) {
a.levelStats[_local2] = 0;
_local2++;
}
a.monsterKillChainCounter = 0;
a.monsterKillChainCooldownTimer = 0;
}
function removeAllMovieClips() {
var _local2;
_local2 = 0;
while (_local2 < a.monstersOnScene.length) {
com.giab.games.gemc.armor.entity.Monster(a.monstersOnScene[_local2]).mc.removeMovieClip();
com.giab.games.gemc.armor.entity.Monster(a.monstersOnScene[_local2]).mcHealth.removeMovieClip();
_local2++;
}
_local2 = 0;
while (_local2 < a.shots.length) {
com.giab.games.gemc.armor.entity.Shot(a.shots[_local2]).mc.removeMovieClip();
_local2++;
}
_local2 = 0;
while (_local2 < a.gems.length) {
com.giab.games.gemc.armor.entity.Gem(a.gems[_local2]).mc.removeMovieClip();
_local2++;
}
a.mcSlotSelectGlare._visible = false;
a.mcInfoPanel._visible = false;
a.mcBuildingSelectGlare._visible = false;
a.mcStatusInfoPanel._visible = false;
a.mcTowerPlaceAvailMap._visible = false;
a.mcWaterTrenchPlaceAvailMap._visible = false;
a.mcGemCreateShapeHelper._visible = false;
resetArrays();
}
function resetIngameParameters() {
a.zCurrStone = com.giab.games.gemc.armor.const.Z.STONE_MIN;
a.zCurrShot = com.giab.games.gemc.armor.const.Z.SHOT_MIN;
a.zCurrMonster = com.giab.games.gemc.armor.const.Z.MONSTER_MIN;
a.lastMonsterSent = false;
}
function endGameWithDefeat() {
if (a.status != com.giab.common.const.IngameStatus.PLAYING) {
return(undefined);
}
a.deselectEverything(true, true);
a.mcRange._visible = false;
a.isRunningOnDoubleSpeed = false;
a.mcw.btnSpeedUp.gotoAndStop(1);
a.main.sndLevelenddefeat.start();
a.setMana(0);
a.renderHeader();
a.setMana(0);
a.renderHeader();
a.main.vfxEngine.startScreenShaking(12);
var vThis = this;
a.isOutcomeVictory = false;
a.status = com.giab.common.const.IngameStatus.GAMEOVER_PANEL_APPEARING;
a.renderInfoPanel();
a.timer = 0;
Key.removeListener(a.keyListener);
Mouse.removeListener(a.mouseListener);
a.keyListener.removeMovieClip();
a.mouseListener.removeMovieClip();
a.mcPanel = a.main.mcRoot.attachMovie("pnlOutcomeDefeat", "pnlOutcome", com.giab.games.gemc.armor.const.Z.LEVELOUTCOMEPANEL);
a.mcPanel.btnOk.onPress = function () {
if (vThis.a.status == com.giab.common.const.IngameStatus.GAMEOVER_PANEL_SHOWING_IDLE) {
vThis.a.status = com.giab.common.const.IngameStatus.GAMEOVER_PANEL_DISAPPEARING;
vThis.a.timer = 0;
vThis.a.main.nextScreen = com.giab.common.const.ScreenId.LEVELSELECTOR;
vThis.a.main.sndTickPress.start();
}
};
a.mcPanel.btnOk.onRollOver = function () {
vThis.a.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
};
a.mcPanel.btnOk.onRollOut = (a.mcPanel.btnOk.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
a.mcPanel.btnStrategyGuide.onRelease = function () {
_root.getURL(com.giab.games.gemc.armor.const.Url.STRATEGY_GUIDE + "?gemCraft=defeatPanelStrategyGuide", "_blank");
};
a.mcPanel.btnStrategyGuide.onRollOver = function () {
vThis.a.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
};
a.mcPanel.btnStrategyGuide.onRollOut = (a.mcPanel.btnStrategyGuide.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
a.mcPanel._x = ((640 - a.mcPanel._width) / 2) - 33;
a.mcPanel._y = -500;
}
function endGameWithVictory() {
if (a.status != com.giab.common.const.IngameStatus.PLAYING) {
return(undefined);
}
a.deselectEverything(true, true);
a.mcRange._visible = false;
a.isRunningOnDoubleSpeed = false;
a.main.sndLevelendvictory.start();
a.mcw.btnSpeedUp.gotoAndStop(1);
a.mouseListener.onMouseDown = function () {
};
var _local3;
var _local4;
var vThis = this;
a.main.ctrlStatistics.updatePlayerStatistics(a, a.main.player);
a.levelBadges = a.main.ctrlBadges.giveLevelBadges(a, a.main.player);
a.carreerBadges = a.main.ctrlBadges.giveCarreerBadges(a, a.main.player);
a.levelBadgeScores = a.main.ctrlBadges.giveBadgeScores(a.levelBadges);
a.carreerBadgeScores = a.main.ctrlBadges.giveBadgeScores(a.carreerBadges);
_local3 = 0;
while (_local3 < a.levelBadges.length) {
a.main.player.badges[a.levelBadges[_local3]]++;
_local3++;
}
_local3 = 0;
while (_local3 < a.carreerBadges.length) {
a.main.player.badges[a.carreerBadges[_local3]]++;
_local3++;
}
var _local10 = a.getScore();
_local3 = 0;
while (_local3 < a.levelBadges.length) {
_local10 = _local10 + a.levelBadgeScores[_local3];
_local3++;
}
_local3 = 0;
while (_local3 < a.carreerBadges.length) {
a.main.player.setTotalScore(a.main.player.getTotalScore() + a.carreerBadgeScores[_local3]);
_local3++;
}
var _local14 = a.main.player.levelScores[a.levelData.num];
if (_local10 > a.main.player.levelScores[a.levelData.num]) {
a.main.player.setTotalScore((a.main.player.getTotalScore() - a.main.player.levelScores[a.levelData.num]) + _local10);
a.main.player.levelScores[a.levelData.num] = _local10;
}
var _local13 = a.main.player.levelScores[a.levelData.num];
a.hasPlayerLeveledUp = false;
var _local9 = false;
while (_local9 != true) {
if (a.main.player.getTotalScore() > com.giab.games.gemc.armor.util.RatingCalculator.calculateRatingReq(a.main.player.getRating() + 1)) {
a.main.player.setRating(a.main.player.getRating() + 1);
a.main.player.setPointsToSpend(a.main.player.getPointsToSpend() + 4);
a.hasPlayerLeveledUp = true;
a.main.player.isUpgradesHighlighted = true;
} else {
_local9 = true;
}
}
a.main.ctrlLevelSelector.eventTypeQueue = new Array();
a.main.ctrlLevelSelector.eventTargetQueue = new Array();
a.main.ctrlLevelSelector.eventArgumentsPerQueueMember = new Array();
var _local11 = new Array();
a.main.ctrlLevelSelector.eventTargetQueue.push(a.levelData.num);
if (a.main.player.levelStatuses[a.levelData.num] == com.giab.common.const.LevelStatus.DONE) {
a.main.ctrlLevelSelector.eventTypeQueue.push(com.giab.common.const.LevelSelectorEvent.LEVEL_DONE_TO_REDONE);
_local11.push(_local14);
_local11.push(_local13);
a.main.ctrlLevelSelector.eventArgumentsPerQueueMember.push(_local11);
} else {
_local11.push(0);
_local11.push(_local13);
a.main.ctrlLevelSelector.eventTypeQueue.push(com.giab.common.const.LevelSelectorEvent.LEVEL_AVAILABLE_TO_DONE);
a.main.ctrlLevelSelector.eventArgumentsPerQueueMember.push(_local11);
}
_local3 = 0;
while (_local3 < a.main.levelCollection.levels.length) {
if (a.main.player.levelStatuses[_local3] == com.giab.common.const.LevelStatus.LOCKED) {
var _local7 = true;
_local4 = 0;
while (_local4 < com.giab.games.gemc.armor.entity.LevelData(a.main.levelCollection.levels[_local3]).levelCompletionReqs.length) {
if ((a.main.player.levelStatuses[com.giab.games.gemc.armor.entity.LevelData(a.main.levelCollection.levels[_local3]).levelCompletionReqs[_local4]] != com.giab.common.const.LevelStatus.DONE) && (com.giab.games.gemc.armor.entity.LevelData(a.main.levelCollection.levels[_local3]).levelCompletionReqs[_local4] != a.levelData.num)) {
_local7 = false;
}
_local4++;
}
if (_local7) {
a.main.ctrlLevelSelector.eventTypeQueue.push(com.giab.common.const.LevelSelectorEvent.LEVEL_LOCKED_TO_AVAILABLE);
a.main.ctrlLevelSelector.eventTargetQueue.push(_local3);
a.main.ctrlLevelSelector.eventArgumentsPerQueueMember.push(null);
}
}
_local3++;
}
_local3 = 0;
while (_local3 < a.main.levelCollection.levels.length) {
if (com.giab.games.gemc.armor.entity.LevelData(a.main.levelCollection.levels[_local3]).type == com.giab.common.const.LevelType.BONUS) {
if (a.main.player.levelStatuses[_local3] == com.giab.common.const.LevelStatus.HIDDEN) {
var _local6 = true;
_local4 = 0;
while (_local4 < com.giab.games.gemc.armor.entity.LevelData(a.main.levelCollection.levels[_local3]).levelCompletionReqs.length) {
var _local5 = a.main.levelCollection.levels[com.giab.games.gemc.armor.entity.LevelData(a.main.levelCollection.levels[_local3]).levelCompletionReqs[_local4]];
if (a.main.player.levelScores[com.giab.games.gemc.armor.entity.LevelData(a.main.levelCollection.levels[_local3]).levelCompletionReqs[_local4]] < _local5.highestGradeScore) {
_local6 = false;
}
_local4++;
}
if (_local6) {
a.main.ctrlLevelSelector.eventTypeQueue.push(com.giab.common.const.LevelSelectorEvent.LEVEL_HIDDEN_TO_AVAILABLE);
a.main.ctrlLevelSelector.eventTargetQueue.push(_local3);
a.main.ctrlLevelSelector.eventArgumentsPerQueueMember.push(null);
}
}
}
_local3++;
}
a.main.ctrlLoadSave.makeAutoSave();
a.isOutcomeVictory = true;
a.status = com.giab.common.const.IngameStatus.GAMEOVER_PANEL_APPEARING;
a.renderInfoPanel();
a.timer = 0;
Key.removeListener(a.keyListener);
Mouse.removeListener(a.mouseListener);
a.keyListener.removeMovieClip();
a.mouseListener.removeMovieClip();
a.mcPanel = a.main.mcRoot.attachMovie("pnlOutcomeVictory", "pnlOutcome", com.giab.games.gemc.armor.const.Z.LEVELOUTCOMEPANEL);
a.mcPanel.mcPlate.gotoAndStop(a.levelData.type + 1);
a.mcPanel.btnOk.onPress = function () {
if (((vThis.a.status == com.giab.common.const.IngameStatus.GAMEOVER_PANEL_SHOWING_IDLE) || (vThis.a.status == com.giab.common.const.IngameStatus.GAMEOVER_PANEL_BADGES_LISTING)) || (vThis.a.status == com.giab.common.const.IngameStatus.GAMEOVER_PANEL_STATS_ROLLING)) {
vThis.renderOutcomeVictoryFinalState();
vThis.a.status = com.giab.common.const.IngameStatus.GAMEOVER_PANEL_DISAPPEARING;
vThis.a.timer = 0;
vThis.a.main.nextScreen = com.giab.common.const.ScreenId.LEVELSELECTOR;
vThis.a.main.sndCounterRoll.stop("sndLibCounterRoll");
vThis.a.main.sndTickPress.start();
if (vThis.a.mcPanel.mcWhyDisable._visible == true) {
var _local1 = new LoadVars();
_local1.id = "9ava4ecf";
_local1.t_ads = 0;
_local1.sendAndLoad("http://www.flashgamestats.com/track_stats_v0.php", new LoadVars(), "GET");
}
}
vThis.a.main.preferences.flush();
};
a.mcPanel.btnOk.onRollOver = function () {
vThis.a.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
};
a.mcPanel.btnOk.onRollOut = (a.mcPanel.btnOk.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
a.mcPanel.btnMoreGames.onRelease = function () {
_root.getURL(com.giab.games.gemc.armor.const.Url.MOREGAMES + "?gemCraft=victoryPanelMoreGames", "_blank");
};
a.mcPanel.btnMoreGames.onRollOver = function () {
vThis.a.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
};
a.mcPanel.btnMoreGames.onRollOut = (a.mcPanel.btnMoreGames.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
_local3 = 0;
while (_local3 < com.giab.games.gemc.armor.const.GameSpecs.STATID_NUM) {
a.mcPanel["tfStat" + _local3].text = 0;
_local3++;
}
a.mcPanel.tfTotalScore.text = 0;
a.mcPanel.mcPromoted._visible = false;
_local3 = 0;
while (_local3 < 14) {
a.mcPanel["mcBadge" + _local3]._visible = false;
a.mcPanel["mcBadge" + _local3].tf._visible = false;
_local3++;
}
var _local8 = a.levelBadges.length + a.carreerBadges.length;
_local3 = 0;
while (_local3 < _local8) {
if (_local3 < 6) {
if (_local8 > 6) {
a.mcPanel["mcBadge" + _local3]._x = 343 + (_local3 * 44);
} else {
a.mcPanel["mcBadge" + _local3]._x = (475 - (_local8 * 22)) + (_local3 * 44);
}
} else {
a.mcPanel["mcBadge" + _local3]._x = (475 - ((_local8 - 6) * 22)) + ((_local3 - 6) * 44);
}
if (_local3 < a.levelBadges.length) {
a.mcPanel["mcBadge" + _local3].icon.gotoAndStop(a.levelBadges[_local3] + 2);
} else {
a.mcPanel["mcBadge" + _local3].icon.gotoAndStop(a.carreerBadges[_local3 - a.levelBadges.length] + 2);
}
a.mcPanel["mcBadge" + _local3].onRollOver = function () {
vThis.a.mcOutcomeInfoPanel.tf.text = ((vThis.a.main.ctrlBadges.badgeDescriptions[MovieClip(this).icon._currentFrame - 2] + "\n--- ") + com.giab.common.toolbox.NumberFormatter.format(vThis.a.main.ctrlBadges.badgeScores[MovieClip(this).icon._currentFrame - 2])) + " points ---";
vThis.a.mcOutcomeInfoPanel.plate._height = vThis.a.mcOutcomeInfoPanel.tf._height + 12;
vThis.a.mcOutcomeInfoPanel._visible = true;
vThis.a.mcOutcomeInfoPanel._x = _root._xmouse - (vThis.a.mcOutcomeInfoPanel.plate._width / 2);
vThis.a.mcOutcomeInfoPanel._y = (_root._ymouse - vThis.a.mcOutcomeInfoPanel.plate._height) - 40;
};
a.mcPanel["mcBadge" + _local3].onRollOut = function () {
vThis.a.mcOutcomeInfoPanel._visible = false;
vThis.a.mcOutcomeInfoPanel._y = 1000;
};
_local3++;
}
a.mcPanel._x = 10;
a.mcPanel._y = -500;
a.mcPanel.mcFeedback.tfFeedback.text = "";
a.mcPanel.mcWhyDisable._visible = false;
a.mcPanel.mcFeedback._visible = false;
a.mcPanel.mcThankYou._visible = false;
if (((((_root._url.indexOf("uqudos") != -1) || (_root._url.indexOf("gamezhero.com/") != -1)) || (_root._url.indexOf("shockwave.com/") != -1)) || (_root._url.indexOf("addictinggames.com/") != -1)) || (_root._url.indexOf("file://") == 0)) {
a.mcPanel.adArmor._visible = true;
a.mcPanel.adArmor.gotoAndStop(13);
a.mcPanel.btnDisableAds._visible = false;
a.mcPanel.mcTfDisableAds._visible = false;
a.mcPanel.mcNoAd._visible = false;
a.mcPanel.adBox._visible = false;
} else {
a.mcPanel.adBox._visible = false;
a.mcPanel.adArmor._visible = false;
a.mcPanel.adPlate._visible = false;
a.mcPanel.isAdLoaded = false;
a.mcPanel.btnDisableAds.gotoAndStop(2);
}
}
function renderOutcomeVictoryFinalState() {
var _local2;
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.STATID_NUM) {
a.mcPanel["tfStat" + _local2].text = com.giab.common.toolbox.NumberFormatter.format(Math.round(a.levelStats[_local2]));
_local2++;
}
a.mcw.mcScore.tf.text = 0;
a.mcPanel.tfTotalScore.text = com.giab.common.toolbox.NumberFormatter.format(a.main.player.levelScores[a.levelData.num]);
if (a.hasPlayerLeveledUp) {
if ((a.status == com.giab.common.const.IngameStatus.GAMEOVER_PANEL_BADGES_LISTING) || (a.status == com.giab.common.const.IngameStatus.GAMEOVER_PANEL_STATS_ROLLING)) {
a.main.sndLevelup.start();
}
a.mcPanel.mcPromoted._visible = true;
} else {
a.mcPanel.mcPromoted._visible = false;
}
_local2 = 0;
while (_local2 < 12) {
a.mcPanel["mcBadge" + _local2]._visible = false;
a.mcPanel["mcBadge" + _local2].tf._visible = false;
_local2++;
}
var _local3 = a.levelBadges.length + a.carreerBadges.length;
_local2 = 0;
while (_local2 < _local3) {
a.mcPanel["mcBadge" + _local2]._visible = true;
_local2++;
}
}
function setScene(pLevelNum) {
a.mcw.btnCastThrow.mcNa._visible = true;
a.mcw.btnCastBuildTower.mcNa._visible = true;
a.mcw.btnCastBuildWaterTrench.mcNa._visible = true;
a.mcw.btnCastCombineGems.mcNa._visible = true;
a.mcw.btnCastCreateGem.mcNa._visible = true;
a.mcw.btnCastRiseMaxMana.mcNa._visible = true;
var _local4;
var _local3;
var _local6;
a.mcw.mcManaBar.glow._visible = false;
a.mcw.mcManaBar.progress._width = 1;
a.levelData = com.giab.games.gemc.armor.entity.LevelData(a.main.levelCollection.levels[pLevelNum]);
a.bmpScene.draw(_root.sceneBasicMap, new flash.geom.Matrix(1, 0, 0, 1, 0, 0));
a.bmpForest.fillRect(new flash.geom.Rectangle(0, 0, 510, 442), 0);
var _local5 = new com.giab.common.toolbox.PseudoRnd();
_local5.setSeed(a.levelData.sceneRndSeed);
var _local11 = 10 + Math.floor(_local5.getRnd() * 44.99);
var _local10 = 0 + Math.floor(_local5.getRnd() * 10.99);
_local4 = 0;
while (_local4 < _local10) {
_local6 = (_local5.getRnd() * Math.PI) * 2;
a.bmpScene.draw(_root.stonePatch, new flash.geom.Matrix(Math.cos(_local6), Math.sin(_local6), -Math.sin(_local6), Math.cos(_local6), _local5.getRnd() * 510, _local5.getRnd() * 442));
_root.stonePatch.gotoAndStop(Math.floor(_local5.getRnd() * 9.99) + 1);
_local4++;
}
_local4 = 0;
while (_local4 < _local11) {
_local6 = (_local5.getRnd() * Math.PI) * 2;
a.bmpScene.draw(_root.grassPatch, new flash.geom.Matrix(Math.cos(_local6), Math.sin(_local6), -Math.sin(_local6), Math.cos(_local6), _local5.getRnd() * 510, _local5.getRnd() * 442));
_root.grassPatch.gotoAndStop(Math.floor(_local5.getRnd() * 9.99) + 1);
_local4++;
}
a.pathXs = new Array();
a.pathYs = new Array();
_local4 = 0;
while (_local4 < 13) {
_local3 = 0;
while (_local3 < 15) {
if (a.levelData.map[_local4].charAt(_local3) == "E") {
a.pathXs[0] = _local3;
a.pathYs[0] = _local4;
}
_local3++;
}
_local4++;
}
var _local9 = 0;
_local4 = 0;
while (_local4 < 13) {
_local3 = 0;
while (_local3 < 15) {
if (a.levelData.map[_local4].charAt(_local3) == "#") {
_local9++;
}
_local3++;
}
_local4++;
}
if (a.levelData.map[a.pathYs[0]].charAt(a.pathXs[0] + 1) == "#") {
a.pathXs.push(a.pathXs[0] + 1);
a.pathYs.push(a.pathYs[0]);
_root.roadTile.gotoAndStop(2);
} else if (a.levelData.map[a.pathYs[0]].charAt(a.pathXs[0] - 1) == "#") {
a.pathXs.push(a.pathXs[0] - 1);
a.pathYs.push(a.pathYs[0]);
_root.roadTile.gotoAndStop(4);
} else if (a.levelData.map[a.pathYs[0] - 1].charAt(a.pathXs[0]) == "#") {
a.pathXs.push(a.pathXs[0]);
a.pathYs.push(a.pathYs[0] - 1);
_root.roadTile.gotoAndStop(1);
} else if (a.levelData.map[a.pathYs[0] + 1].charAt(a.pathXs[0]) == "#") {
a.pathXs.push(a.pathXs[0]);
a.pathYs.push(a.pathYs[0] + 1);
_root.roadTile.gotoAndStop(3);
}
a.bmpScene.draw(_root.roadTile, new flash.geom.Matrix(1, 0, 0, 1, 34 * a.pathXs[0], 34 * a.pathYs[0]));
_local4 = 0;
while (_local4 < _local9) {
if (a.pathXs[a.pathXs.length - 1] == (a.pathXs[a.pathXs.length - 2] + 1)) {
if ((a.levelData.map[a.pathYs[a.pathYs.length - 1]].charAt(a.pathXs[a.pathXs.length - 1] + 1) == "#") || (a.levelData.map[a.pathYs[a.pathYs.length - 1]].charAt(a.pathXs[a.pathXs.length - 1] + 1) == "P")) {
a.pathXs.push(a.pathXs[a.pathXs.length - 1] + 1);
a.pathYs.push(a.pathYs[a.pathYs.length - 1]);
_root.roadTile.gotoAndStop(Math.floor(_local5.getRnd() * 3.99) + 9);
} else if ((a.levelData.map[a.pathYs[a.pathYs.length - 1] - 1].charAt(a.pathXs[a.pathXs.length - 1]) == "#") || (a.levelData.map[a.pathYs[a.pathYs.length - 1] - 1].charAt(a.pathXs[a.pathXs.length - 1]) == "P")) {
a.pathXs.push(a.pathXs[a.pathXs.length - 1]);
a.pathYs.push(a.pathYs[a.pathYs.length - 1] - 1);
_root.roadTile.gotoAndStop(8);
} else if ((a.levelData.map[a.pathYs[a.pathYs.length - 1] + 1].charAt(a.pathXs[a.pathXs.length - 1]) == "#") || (a.levelData.map[a.pathYs[a.pathYs.length - 1] + 1].charAt(a.pathXs[a.pathXs.length - 1]) == "P")) {
a.pathXs.push(a.pathXs[a.pathXs.length - 1]);
a.pathYs.push(a.pathYs[a.pathYs.length - 1] + 1);
_root.roadTile.gotoAndStop(7);
}
} else if (a.pathXs[a.pathXs.length - 1] == (a.pathXs[a.pathXs.length - 2] - 1)) {
if ((a.levelData.map[a.pathYs[a.pathYs.length - 1]].charAt(a.pathXs[a.pathXs.length - 1] - 1) == "#") || (a.levelData.map[a.pathYs[a.pathYs.length - 1]].charAt(a.pathXs[a.pathXs.length - 1] - 1) == "P")) {
a.pathXs.push(a.pathXs[a.pathXs.length - 1] - 1);
a.pathYs.push(a.pathYs[a.pathYs.length - 1]);
_root.roadTile.gotoAndStop(Math.floor(_local5.getRnd() * 3.99) + 9);
} else if ((a.levelData.map[a.pathYs[a.pathYs.length - 1] - 1].charAt(a.pathXs[a.pathXs.length - 1]) == "#") || (a.levelData.map[a.pathYs[a.pathYs.length - 1] - 1].charAt(a.pathXs[a.pathXs.length - 1]) == "P")) {
a.pathXs.push(a.pathXs[a.pathXs.length - 1]);
a.pathYs.push(a.pathYs[a.pathYs.length - 1] - 1);
_root.roadTile.gotoAndStop(5);
} else if ((a.levelData.map[a.pathYs[a.pathYs.length - 1] + 1].charAt(a.pathXs[a.pathXs.length - 1]) == "#") || (a.levelData.map[a.pathYs[a.pathYs.length - 1] + 1].charAt(a.pathXs[a.pathXs.length - 1]) == "P")) {
a.pathXs.push(a.pathXs[a.pathXs.length - 1]);
a.pathYs.push(a.pathYs[a.pathYs.length - 1] + 1);
_root.roadTile.gotoAndStop(6);
}
} else if (a.pathYs[a.pathYs.length - 1] == (a.pathYs[a.pathYs.length - 2] + 1)) {
if ((a.levelData.map[a.pathYs[a.pathYs.length - 1]].charAt(a.pathXs[a.pathXs.length - 1] + 1) == "#") || (a.levelData.map[a.pathYs[a.pathYs.length - 1]].charAt(a.pathXs[a.pathXs.length - 1] + 1) == "P")) {
a.pathXs.push(a.pathXs[a.pathXs.length - 1] + 1);
a.pathYs.push(a.pathYs[a.pathYs.length - 1]);
_root.roadTile.gotoAndStop(5);
} else if ((a.levelData.map[a.pathYs[a.pathYs.length - 1]].charAt(a.pathXs[a.pathXs.length - 1] - 1) == "#") || (a.levelData.map[a.pathYs[a.pathYs.length - 1]].charAt(a.pathXs[a.pathXs.length - 1] - 1) == "P")) {
a.pathXs.push(a.pathXs[a.pathXs.length - 1] - 1);
a.pathYs.push(a.pathYs[a.pathYs.length - 1]);
_root.roadTile.gotoAndStop(8);
} else if ((a.levelData.map[a.pathYs[a.pathYs.length - 1] + 1].charAt(a.pathXs[a.pathXs.length - 1]) == "#") || (a.levelData.map[a.pathYs[a.pathYs.length - 1] + 1].charAt(a.pathXs[a.pathXs.length - 1]) == "P")) {
a.pathXs.push(a.pathXs[a.pathXs.length - 1]);
a.pathYs.push(a.pathYs[a.pathYs.length - 1] + 1);
_root.roadTile.gotoAndStop(Math.floor(_local5.getRnd() * 3.99) + 13);
}
} else if ((a.levelData.map[a.pathYs[a.pathYs.length - 1]].charAt(a.pathXs[a.pathXs.length - 1] + 1) == "#") || (a.levelData.map[a.pathYs[a.pathYs.length - 1]].charAt(a.pathXs[a.pathXs.length - 1] + 1) == "P")) {
a.pathXs.push(a.pathXs[a.pathXs.length - 1] + 1);
a.pathYs.push(a.pathYs[a.pathYs.length - 1]);
_root.roadTile.gotoAndStop(6);
} else if ((a.levelData.map[a.pathYs[a.pathYs.length - 1]].charAt(a.pathXs[a.pathXs.length - 1] - 1) == "#") || (a.levelData.map[a.pathYs[a.pathYs.length - 1]].charAt(a.pathXs[a.pathXs.length - 1] - 1) == "P")) {
a.pathXs.push(a.pathXs[a.pathXs.length - 1] - 1);
a.pathYs.push(a.pathYs[a.pathYs.length - 1]);
_root.roadTile.gotoAndStop(7);
} else if ((a.levelData.map[a.pathYs[a.pathYs.length - 1] - 1].charAt(a.pathXs[a.pathXs.length - 1]) == "#") || (a.levelData.map[a.pathYs[a.pathYs.length - 1] - 1].charAt(a.pathXs[a.pathXs.length - 1]) == "P")) {
a.pathXs.push(a.pathXs[a.pathXs.length - 1]);
a.pathYs.push(a.pathYs[a.pathYs.length - 1] - 1);
_root.roadTile.gotoAndStop(Math.floor(_local5.getRnd() * 3.99) + 13);
}
a.bmpScene.draw(_root.roadTile, new flash.geom.Matrix(1, 0, 0, 1, 34 * a.pathXs[a.pathXs.length - 2], 34 * a.pathYs[a.pathXs.length - 2]));
_local4++;
}
if (a.levelData.map[a.pathYs[a.pathYs.length - 1]].charAt(a.pathXs[a.pathXs.length - 1] + 1) == "#") {
_root.roadTile.gotoAndStop(2);
} else if (a.levelData.map[a.pathYs[a.pathYs.length - 1]].charAt(a.pathXs[a.pathXs.length - 1] - 1) == "#") {
_root.roadTile.gotoAndStop(4);
} else if (a.levelData.map[a.pathYs[a.pathYs.length - 1] - 1].charAt(a.pathXs[a.pathXs.length - 1]) == "#") {
_root.roadTile.gotoAndStop(1);
} else if (a.levelData.map[a.pathYs[a.pathYs.length - 1] + 1].charAt(a.pathXs[a.pathXs.length - 1]) == "#") {
_root.roadTile.gotoAndStop(3);
}
a.bmpScene.draw(_root.roadTile, new flash.geom.Matrix(1, 0, 0, 1, 34 * a.pathXs[a.pathXs.length - 1], 34 * a.pathYs[a.pathYs.length - 1]));
var _local8 = false;
_local4 = 0;
while (_local4 < 13) {
_local3 = 0;
while (_local3 < 15) {
if (((a.levelData.map[_local3].charAt(_local4) == "p") || (a.levelData.map[_local3].charAt(_local4) == "P")) && (_local8 != true)) {
a.pathYs.push(_local3 + 0.5);
a.pathXs.push(_local4 + 0.5);
_local8 = true;
break;
}
_local3++;
}
_local4++;
}
var _local7 = false;
_local4 = 0;
while (_local4 < 13) {
_local3 = 0;
while (_local3 < 15) {
if (((a.levelData.map[_local3].charAt(_local4) == "e") || (a.levelData.map[_local3].charAt(_local4) == "E")) && (_local7 != true)) {
a.pathYs.unshift(_local3 + 1);
a.pathXs.unshift(_local4 + 1);
_local7 = true;
break;
}
_local3++;
}
_local4++;
}
_local4 = 0;
while (_local4 < 13) {
_local3 = 0;
while (_local3 < 15) {
if (a.levelData.map[_local4].charAt(_local3) == "#") {
if (_local5.getRnd() > 0.45) {
_local6 = (_local5.getRnd() * Math.PI) * 2;
_root.roadblock.gotoAndStop(Math.floor(_local5.getRnd() * 9.99) + 1);
a.bmpScene.draw(_root.roadblock, new flash.geom.Matrix(Math.cos(_local6), Math.sin(_local6), -Math.sin(_local6), Math.cos(_local6), ((34 * _local3) + 8) + (_local5.getRnd() * 18), ((34 * _local4) + 8) + (_local5.getRnd() * 16)));
if (_local5.getRnd() > 0.45) {
_root.roadblock.gotoAndStop(Math.floor(_local5.getRnd() * 9.99) + 1);
_local6 = (_local5.getRnd() * Math.PI) * 2;
a.bmpScene.draw(_root.roadblock, new flash.geom.Matrix(Math.cos(_local6), Math.sin(_local6), -Math.sin(_local6), Math.cos(_local6), ((34 * _local3) + 8) + (_local5.getRnd() * 18), ((34 * _local4) + 8) + (_local5.getRnd() * 16)));
}
}
}
_local3++;
}
_local4++;
}
if (a.levelData.specId == com.giab.games.gemc.armor.const.LevelSpecId.EPIC5) {
_root.uniqueScenePics.gotoAndStop(1);
a.bmpScene.draw(_root.uniqueScenePics, new flash.geom.Matrix(1, 0, 0, 1, 401, 0));
_root.uniqueScenePics.gotoAndStop(2);
a.bmpScene.draw(_root.uniqueScenePics, new flash.geom.Matrix(1, 0, 0, 1, 0, 146));
}
_local4 = 0;
while (_local4 < 13) {
_local3 = 0;
while (_local3 < 15) {
if ((((((a.levelData.map[_local4].charAt(_local3) != ".") && (a.levelData.map[_local4].charAt(_local3) != "#")) && (a.levelData.map[_local4].charAt(_local3) != "E")) && (a.levelData.map[_local4].charAt(_local3) != "e")) && (a.levelData.map[_local4].charAt(_local3) != "P")) && (a.levelData.map[_local4].charAt(_local3) != "p")) {
if (_local5.getRnd() > 0.6) {
_local6 = (_local5.getRnd() * Math.PI) * 2;
a.bmpForest.draw(_root.bush, new flash.geom.Matrix(Math.cos(_local6), Math.sin(_local6), -Math.sin(_local6), Math.cos(_local6), ((34 * _local3) + 5) + (_local5.getRnd() * 24), ((34 * _local4) + 5) + (_local5.getRnd() * 24)));
_root.bush.gotoAndStop(Math.floor(_local5.getRnd() * 9.99) + 1);
if (_local5.getRnd() > 0.6) {
_local6 = (_local5.getRnd() * Math.PI) * 2;
a.bmpForest.draw(_root.bush, new flash.geom.Matrix(Math.cos(_local6), Math.sin(_local6), -Math.sin(_local6), Math.cos(_local6), ((34 * _local3) + 5) + (_local5.getRnd() * 24), ((34 * _local4) + 5) + (_local5.getRnd() * 24)));
_root.bush.gotoAndStop(Math.floor(_local5.getRnd() * 9.99) + 1);
}
}
}
_local3++;
}
_local4++;
}
_local4 = 0;
while (_local4 < 13) {
_local3 = 0;
while (_local3 < 15) {
if (a.levelData.map[_local4].charAt(_local3) == "1") {
_root.treeSmall.gotoAndStop(Math.floor(_local5.getRnd() * 9.99) + 1);
a.bmpForest.draw(_root.treeSmall, new flash.geom.Matrix(1, 0, 0, 1, ((34 * _local3) + 5) + (_local5.getRnd() * 24), ((34 * _local4) + 5) + (_local5.getRnd() * 24)));
if (_local5.getRnd() > 0.5) {
_root.treeSmall.gotoAndStop(Math.floor(_local5.getRnd() * 9.99) + 1);
a.bmpForest.draw(_root.treeSmall, new flash.geom.Matrix(1, 0, 0, 1, ((34 * _local3) + 5) + (_local5.getRnd() * 24), ((34 * _local4) + 5) + (_local5.getRnd() * 24)));
}
}
_local3++;
}
_local4++;
}
_local4 = 0;
while (_local4 < 13) {
_local3 = 0;
while (_local3 < 15) {
if (a.levelData.map[_local4].charAt(_local3) == "2") {
_root.treeMedium.gotoAndStop(Math.floor(_local5.getRnd() * 9.99) + 1);
a.bmpForest.draw(_root.treeMedium, new flash.geom.Matrix(1, 0, 0, 1, ((34 * _local3) + 5) + (_local5.getRnd() * 24), ((34 * _local4) + 5) + (_local5.getRnd() * 24)));
}
_local3++;
}
_local4++;
}
_local4 = 0;
while (_local4 < 13) {
_local3 = 0;
while (_local3 < 15) {
if (a.levelData.map[_local4].charAt(_local3) == "3") {
_root.treeLarge.gotoAndStop(Math.floor(_local5.getRnd() * 9.99) + 1);
a.bmpForest.draw(_root.treeLarge, new flash.geom.Matrix(1, 0, 0, 1, ((34 * _local3) + 5) + (_local5.getRnd() * 24), ((34 * _local4) + 5) + (_local5.getRnd() * 24)));
}
_local3++;
}
_local4++;
}
a.waterTrenches = new Array();
a.towers = new Array();
removeAllMovieClips();
resetStatistics();
resetArrays();
resetIngameParameters();
_local4 = 0;
while (_local4 < 13) {
_local3 = 0;
while (_local3 < 15) {
if (a.levelData.map[_local4].charAt(_local3) == "T") {
c.buildTower(_local3, _local4, true);
}
_local3++;
}
_local4++;
}
if (a.levelData.enemyBaseType == com.giab.games.gemc.armor.const.EnemyBase.CRYPT) {
_root.enemyBase.gotoAndStop(1);
} else if (a.levelData.enemyBaseType == com.giab.games.gemc.armor.const.EnemyBase.ABANDONED_HOUSE) {
_root.enemyBase.gotoAndStop(2);
} else if (a.levelData.enemyBaseType == com.giab.games.gemc.armor.const.EnemyBase.DOLMEN) {
_root.enemyBase.gotoAndStop(3);
} else if (a.levelData.enemyBaseType == com.giab.games.gemc.armor.const.EnemyBase.ROUND_TOWER) {
_root.enemyBase.gotoAndStop(4);
} else if (a.levelData.enemyBaseType == com.giab.games.gemc.armor.const.EnemyBase.RUINED_ROUND_TOWER) {
_root.enemyBase.gotoAndStop(5);
} else if (a.levelData.enemyBaseType == com.giab.games.gemc.armor.const.EnemyBase.SQUARE_TOWER) {
_root.enemyBase.gotoAndStop(6);
} else if (a.levelData.enemyBaseType == com.giab.games.gemc.armor.const.EnemyBase.CLIFF) {
_root.enemyBase.gotoAndStop(7);
} else if (a.levelData.enemyBaseType == com.giab.games.gemc.armor.const.EnemyBase.DARK_FOREST) {
_root.enemyBase.gotoAndStop(8);
} else if (a.levelData.enemyBaseType == com.giab.games.gemc.armor.const.EnemyBase.CORRUPTED_WIZTOWER) {
_root.enemyBase.gotoAndStop(9);
}
_local4 = 0;
while (_local4 < 13) {
_local3 = 0;
while (_local3 < 15) {
if ((a.levelData.map[_local4].charAt(_local3) == "E") || (a.levelData.map[_local4].charAt(_local3) == "e")) {
a.bmpBuildings.draw(_root.enemyBase, new flash.geom.Matrix(1, 0, 0, 1, 34 * _local3, 34 * _local4));
_local4 = 13;
_local3 = 15;
}
_local3++;
}
_local4++;
}
_local4 = 0;
while (_local4 < 13) {
_local3 = 0;
while (_local3 < 15) {
if ((a.levelData.map[_local4].charAt(_local3) == "P") || (a.levelData.map[_local4].charAt(_local3) == "p")) {
a.bmpBuildings.draw(_root.playerBase, new flash.geom.Matrix(1, 0, 0, 1, 34 * _local3, 34 * _local4));
_local4 = 13;
_local3 = 15;
}
_local3++;
}
_local4++;
}
drawPlaceAvailMapsInit();
c.redrawBuildings();
d.buildMonsterWaveDescs();
a.currentWave = -1;
a.timeUntilNextWave = 900;
a.renderWaveBricks(true, true);
a.mcw.mcManaBar.deltaMinus._alpha = 0;
a.mcw.mcManaBar.deltaPlus._alpha = 0;
}
function drawPlaceAvailMapsInit() {
var _local3;
var _local4;
a.bmpTowerPlaceAvailMap.fillRect(new flash.geom.Rectangle(0, 0, 510, 442), 0);
a.towerPlaceAvailArray = ["...............", "...............", "...............", "...............", "...............", "...............", "...............", "...............", "...............", "...............", "...............", "...............", "..............."];
a.bmpWaterTrenchPlaceAvailMap.fillRect(new flash.geom.Rectangle(0, 0, 510, 442), 0);
a.waterTrenchPlaceAvailArray = ["...............", "...............", "...............", "...............", "...............", "...............", "...............", "...............", "...............", "...............", "...............", "...............", "..............."];
_local3 = 0;
while (_local3 < 13) {
_local4 = 0;
while (_local4 < 15) {
if ((((((((((a.levelData.map[_local3].charAt(_local4) == ".") || (a.levelData.map[_local3].charAt(_local4) == "T")) || (a.levelData.map[_local3].charAt(_local4) == "#")) || (a.levelData.map[_local3].charAt(_local4) == "1")) || (a.levelData.map[_local3].charAt(_local4) == "2")) || (a.levelData.map[_local3].charAt(_local4) == "3")) || (a.levelData.map[_local3].charAt(_local4) == "E")) || (a.levelData.map[_local3].charAt(_local4) == "e")) || (a.levelData.map[_local3].charAt(_local4) == "P")) || (a.levelData.map[_local3].charAt(_local4) == "p")) {
a.bmpTowerPlaceAvailMap.draw(_root.towerPlaceForbidden, new flash.geom.Matrix(1, 0, 0, 1, _local4 * 34, _local3 * 34));
if (a.levelData.map[_local3].charAt(_local4) == "T") {
a.towerPlaceAvailArray[_local3] = (String(a.towerPlaceAvailArray[_local3]).substring(0, _local4) + "T") + String(a.towerPlaceAvailArray[_local3]).substring(_local4 + 1);
} else {
a.towerPlaceAvailArray[_local3] = (String(a.towerPlaceAvailArray[_local3]).substring(0, _local4) + "x") + String(a.towerPlaceAvailArray[_local3]).substring(_local4 + 1);
}
}
if (a.levelData.map[_local3].charAt(_local4) != "#") {
a.bmpWaterTrenchPlaceAvailMap.draw(_root.towerPlaceForbidden, new flash.geom.Matrix(1, 0, 0, 1, _local4 * 34, _local3 * 34));
a.waterTrenchPlaceAvailArray[_local3] = (String(a.waterTrenchPlaceAvailArray[_local3]).substring(0, _local4) + "x") + String(a.waterTrenchPlaceAvailArray[_local3]).substring(_local4 + 1);
}
_local4++;
}
_local3++;
}
}
function initiate() {
a.mcw.btnCastThrow.mcNa._visible = false;
a.maxMonstersKilledInARow = 0;
a.lastZoneXMin = null;
a.lastZoneXMax = null;
a.lastZoneYMin = null;
a.lastZoneYMax = null;
a.gemCombiningManaCost = com.giab.games.gemc.armor.const.GameSpecs.MANACOST_COMBINEGEMS - (5 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.GEMCREATING_MANA_COST));
a.gemCreatingBaseManaCosts = new Array();
a.gemCreatingBaseManaCosts.push(30 - a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.GEMCREATING_MANA_COST));
a.gemCreatingBaseManaCosts.push(Math.floor((a.gemCreatingBaseManaCosts[0] * 2) + (0.85 * a.gemCombiningManaCost)));
a.gemCreatingBaseManaCosts.push(Math.floor((a.gemCreatingBaseManaCosts[1] * 2) + (0.85 * a.gemCombiningManaCost)));
a.gemCreatingBaseManaCosts.push(Math.floor((a.gemCreatingBaseManaCosts[2] * 2) + (0.85 * a.gemCombiningManaCost)));
a.gemCreatingBaseManaCosts.push(Math.floor((a.gemCreatingBaseManaCosts[3] * 2) + (0.85 * a.gemCombiningManaCost)));
a.gemCreatingBaseManaCosts.push(Math.floor((a.gemCreatingBaseManaCosts[4] * 2) + (0.85 * a.gemCombiningManaCost)));
var vThis = a;
a.screenStatus = com.giab.common.const.ScreenStatus.APPEARING;
a.status = com.giab.common.const.IngameStatus.DISABLED;
a.screenStep = 0;
a.keyListener = _root.createEmptyMovieClip("keyListener", com.giab.games.gemc.armor.const.Z.KEYLISTENER);
a.keyListener.onKeyDown = function () {
if ((Key.getAscii() == 80) || (Key.getAscii() == 112)) {
vThis.main.ctrlOptions.switchOptions();
} else if ((Key.getCode() == com.giab.common.const.KeyCode.NUM_1) || (Key.getCode() == com.giab.common.const.KeyCode.B)) {
vThis.mcw.btnCastThrow.onPress();
} else if ((Key.getCode() == com.giab.common.const.KeyCode.NUM_2) || (Key.getCode() == com.giab.common.const.KeyCode.T)) {
vThis.mcw.btnCastBuildTower.onPress();
} else if ((Key.getCode() == com.giab.common.const.KeyCode.NUM_3) || (Key.getCode() == com.giab.common.const.KeyCode.C)) {
vThis.mcw.btnCastCreateGem.onPress();
} else if ((Key.getCode() == com.giab.common.const.KeyCode.NUM_4) || (Key.getCode() == com.giab.common.const.KeyCode.M)) {
vThis.mcw.btnCastRiseMaxMana.onPress();
} else if ((Key.getCode() == com.giab.common.const.KeyCode.NUM_5) || (Key.getCode() == com.giab.common.const.KeyCode.W)) {
vThis.mcw.btnCastBuildWaterTrench.onPress();
} else if ((Key.getCode() == com.giab.common.const.KeyCode.NUM_6) || (Key.getCode() == com.giab.common.const.KeyCode.G)) {
vThis.mcw.btnCastCombineGems.onPress();
}
};
a.mouseListener = _root.createEmptyMovieClip("mouseListener", com.giab.games.gemc.armor.const.Z.MOUSELISTENER);
a.mouseListener.onMouseDown = function () {
if ((((_root._xmouse > 30) && (_root._xmouse < 540)) && (_root._ymouse > 30)) && (_root._ymouse < 472)) {
var _local4 = Math.floor((_root._xmouse - 30) / 34);
var _local3 = Math.floor((_root._ymouse - 30) / 34);
vThis.clickOnScene(_local4, _local3);
} else if ((((_root._xmouse > 549) && (_root._xmouse < 633)) && (_root._ymouse > 137)) && (_root._ymouse < 473)) {
var _local2 = (3 * Math.floor((_root._ymouse - 137) / 28)) + Math.floor((_root._xmouse - 549) / 28);
vThis.selectSlot(_local2);
} else if (vThis.actionStatus != com.giab.games.gemc.armor.const.ActionStatus.IDLE) {
vThis.deselectEverything(true, true);
}
};
a.mouseListener.onMouseUp = function () {
if ((((((vThis.actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_IDLE) || (vThis.actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_COMBINE)) || (vThis.actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_THROW)) || (vThis.actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_IDLE)) || (vThis.actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_COMBINE)) || (vThis.actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_TOWER_TO_THROW)) {
if ((((_root._xmouse > 30) && (_root._xmouse < 540)) && (_root._ymouse > 30)) && (_root._ymouse < 472)) {
var _local4 = Math.floor((_root._xmouse - 30) / 34);
var _local3 = Math.floor((_root._ymouse - 30) / 34);
vThis.clickOnScene(_local4, _local3);
} else if ((((_root._xmouse > 549) && (_root._xmouse < 633)) && (_root._ymouse > 137)) && (_root._ymouse < 473)) {
var _local2 = (3 * Math.floor((_root._ymouse - 137) / 28)) + Math.floor((_root._xmouse - 549) / 28);
vThis.selectSlot(_local2);
} else {
vThis.deselectEverything(true, true);
}
}
};
Key.addListener(a.keyListener);
a.setScore(0);
a.timer = 0;
a.mcw.mc._visible = true;
a.manaChargePerFrame = (0.5 + (0.1 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.MANA_CHARGE_PER_SECOND))) / 30;
a.currentWaterTrenchBuildingManaCost = (a.currentTowerBuildingManaCost = Math.max(20, 200 - (20 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.INITIAL_TOWER_BUILDING_MANA_COST))));
a.manaChargeIngameMultiplier = 1;
a.maxMana = 720 + (60 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.INITIAL_MANA));
a.setMana(120 + (60 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.INITIAL_MANA)));
a.mcw.mcManaBar.deltaMinus._alpha = 0;
a.mcw.mcManaBar.deltaPlus._alpha = 0;
a.currentManaPoolCost = 240;
a.renderInfoPanel();
var _local5 = 0;
var _local3;
var _local4;
if (a.levelData.num == 0) {
_local3 = 0;
while (_local3 < 3) {
_local4 = d.createGem(0);
placeGemIntoSlot(_local4, _local5);
_local5++;
_local3++;
}
}
_local3 = 0;
while (_local3 < a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.BASIC_STARTER_GEMS)) {
if (_local3 > 4) {
_local4 = d.createGem(1);
} else {
_local4 = d.createGem(0);
}
placeGemIntoSlot(_local4, _local5);
_local5++;
_local3++;
}
_local3 = 0;
while (_local3 < a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.MEDIUM_GRADE_STARTER_GEMS)) {
if (_local3 > 4) {
_local4 = d.createGem(3);
} else {
_local4 = d.createGem(2);
}
placeGemIntoSlot(_local4, _local5);
_local5++;
_local3++;
}
_local3 = 0;
while (_local3 < a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.HIGH_GRADE_STARTER_GEMS)) {
if (_local3 > 4) {
_local4 = d.createGem(5);
} else {
_local4 = d.createGem(4);
}
placeGemIntoSlot(_local4, _local5);
_local5++;
_local3++;
}
a.isRunningOnDoubleSpeed = false;
}
function placeGemIntoSlot(pGem, pSlotNum) {
a.inventorySlots[pSlotNum] = pGem;
pGem.mc._x = (549 + ((pSlotNum % 3) * 28)) + 14;
pGem.mc._y = (137 + (Math.floor(pSlotNum / 3) * 28)) + 14;
a.main.vfxEngine.createTowerShotGlare(pGem.mc._x, pGem.mc._y, com.giab.common.toolbox.ColorToolbox.hsbToRgb([pGem.hueMain, 100, 100]), pGem.grade + 1);
}
function buttonsInit() {
var vThis = a;
a.mcw.btnCastCombineGems.onPress = function () {
if (vThis.status == com.giab.common.const.IngameStatus.PLAYING) {
vThis.initiateCastCombineGems();
}
};
a.mcw.btnCastCreateGem.onPress = function () {
if (vThis.status == com.giab.common.const.IngameStatus.PLAYING) {
vThis.initiateCastCreateGem();
}
};
a.mcw.btnCastRiseMaxMana.onPress = function () {
if (vThis.status == com.giab.common.const.IngameStatus.PLAYING) {
vThis.castRiseMaxMana();
}
};
a.mcw.btnCastBuildWaterTrench.onPress = function () {
if (vThis.status == com.giab.common.const.IngameStatus.PLAYING) {
vThis.initiateCastBuildWaterTrench();
}
};
a.mcw.btnCastThrow.onPress = function () {
if (vThis.status == com.giab.common.const.IngameStatus.PLAYING) {
vThis.initiateCastThrow();
}
};
a.mcw.btnCastBuildTower.onPress = function () {
if (vThis.status == com.giab.common.const.IngameStatus.PLAYING) {
vThis.initiateCastBuildTower();
}
};
a.mcw.btnSpeedUp.onPress = function () {
if (vThis.status == com.giab.common.const.IngameStatus.PLAYING) {
vThis.isRunningOnDoubleSpeed = !vThis.isRunningOnDoubleSpeed;
if (vThis.isRunningOnDoubleSpeed) {
vThis.main.sndSpeedup.start();
MovieClip(this).gotoAndStop(2);
} else {
vThis.main.sndSpeeddown.start();
MovieClip(this).gotoAndStop(1);
}
}
};
a.mcw.mcWaveInfoBrick0.onPress = function () {
if (vThis.currentWave < (vThis.monsterWaves.length - 1)) {
if (vThis.isBrickSpeedUp != true) {
vThis.main.sndWavebrickspeedup.start(0, 99);
}
vThis.isBrickSpeedUp = true;
}
};
}
function castCreateGem(pSlotNum) {
var _local3;
var _local6 = 11 - Math.floor(pSlotNum / 3);
var _local7 = Math.floor(_local6 / 2);
var _local5 = Math.round(a.gemCreatingBaseManaCosts[Math.floor(_local6 / 2)]);
if (a.getMana() < _local5) {
a.deselectEverything(true, true);
return(false);
}
a.setMana(a.getMana() - _local5);
var _local2 = d.createGem(_local7);
a.lastZoneXMin = null;
a.levelStats[com.giab.games.gemc.armor.const.StatId.GEMS_CREATED]++;
if (a.inventorySlots[pSlotNum] == null) {
a.inventorySlots[pSlotNum] = _local2;
_local2.mc._x = (549 + ((pSlotNum % 3) * 28)) + 14;
_local2.mc._y = (137 + (Math.floor(pSlotNum / 3) * 28)) + 14;
a.main.vfxEngine.createTowerShotGlare(_local2.mc._x, _local2.mc._y, com.giab.common.toolbox.ColorToolbox.hsbToRgb([_local2.hueMain, 100, 100]), _local2.grade + 1);
return(true);
}
_local3 = pSlotNum;
while (_local3 < a.inventorySlots.length) {
if (a.inventorySlots[_local3] == null) {
a.inventorySlots[_local3] = _local2;
_local2.mc._x = (549 + ((_local3 % 3) * 28)) + 14;
_local2.mc._y = (137 + (Math.floor(_local3 / 3) * 28)) + 14;
a.main.vfxEngine.createTowerShotGlare(_local2.mc._x, _local2.mc._y, com.giab.common.toolbox.ColorToolbox.hsbToRgb([_local2.hueMain, 100, 100]), _local2.grade + 1);
return(true);
}
_local3++;
}
_local3 = a.inventorySlots.length - 1;
while (_local3 >= 0) {
if (a.inventorySlots[_local3] == null) {
a.inventorySlots[_local3] = _local2;
_local2.mc._x = (549 + ((_local3 % 3) * 28)) + 14;
_local2.mc._y = (137 + (Math.floor(_local3 / 3) * 28)) + 14;
a.main.vfxEngine.createTowerShotGlare(_local2.mc._x, _local2.mc._y, com.giab.common.toolbox.ColorToolbox.hsbToRgb([_local2.hueMain, 100, 100]), _local2.grade + 1);
return(true);
}
_local3--;
}
_local2.mc.removeMovieClip();
a.setMana(a.getMana() + _local5);
return(false);
}
}
Symbol 1299 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlIngameC] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlIngameC
{
var a, b;
function CtrlIngameC () {
}
function returnToLevelSelector() {
a.deselectEverything(true, true);
a.status = com.giab.common.const.IngameStatus.DISABLED;
a.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
a.main.nextScreen = com.giab.common.const.ScreenId.LEVELSELECTOR;
a.renderInfoPanel();
a.isRunningOnDoubleSpeed = false;
a.mcw.btnSpeedUp.gotoAndStop(1);
}
function checkForGameContinuity() {
if (((a.currentWave == (a.monsterWaves.length - 1)) && (a.monstersOnScene.length < 1)) && (a.monstersWaitingInWave.length < 1)) {
b.endGameWithVictory();
} else if ((a.monstersOnScene.length < 1) && (a.monstersWaitingInWave.length > 0)) {
var _local2 = 0;
while (_local2 < a.monstersWaitingInWave.length) {
com.giab.games.gemc.armor.entity.Monster(a.monstersWaitingInWave[_local2]).timeUntilWarpIn = com.giab.games.gemc.armor.entity.Monster(a.monstersWaitingInWave[_local2]).timeUntilWarpIn * 0.8;
_local2++;
}
a.monstersWaitingInWave[0].timeUntilWarpIn = 0;
}
}
function createShot(pTower, pMonster, pRgb) {
a.main.sndShot.start();
a.main.vfxEngine.createTowerShotGlare(pTower.x, pTower.y, pRgb, pTower.insertedObj.mc.colorBodyMain._currentFrame);
var _local4 = _root.attachMovie("shot", "shot" + a.zCurrShot, a.zCurrShot++);
if (a.zCurrShot > (com.giab.games.gemc.armor.const.Z.SHOT_MIN + 1000)) {
a.zCurrShot = com.giab.games.gemc.armor.const.Z.SHOT_MIN;
}
var _local6 = new flash.geom.ColorTransform(0, 0, 0, 1, pRgb[0], pRgb[1], pRgb[2], 0);
var _local7 = new flash.geom.Transform(_local4.mcColor);
_local4.mcColor.blendMode = "add";
_local7.colorTransform = _local6;
var _local8 = new com.giab.games.gemc.armor.entity.Shot(_local4, pTower, pMonster, pRgb, a);
a.shots.push(_local8);
}
function renderInfoPanelGem(pGem) {
var _local3 = pGem;
var _local2 = _local3.shotData;
a.mcInfoPanel._visible = true;
a.mcInfoPanel.tfTitle.text = (a.mcInfoPanel.tfTitleBlur.text = (("Gem - grade: " + (_local3.grade + 1)) + ", hue: ") + Math.round(_local3.hueMain));
a.mcInfoPanel.tfTitle.textColor = 16777215 /* 0xFFFFFF */;
a.mcInfoPanel.tfTitleBlur._visible = true;
a.mcInfoPanel.tfTitleBlur.textColor = com.giab.common.toolbox.ColorToolbox.rgbToHex(com.giab.common.toolbox.ColorToolbox.hsbToRgb([_local3.hueMain, 100, 100]));
a.mcInfoPanel.tfContent.text = "";
var _local4 = ["green", "yellow", "red", "blue", "lime", "orange", "purple", "cyan"];
if (_local2.elderTypes.length == 1) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("Pure " + _local4[_local2.elderTypes[0]]) + newline);
} else if (_local2.elderTypes.length == 2) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(((("Dual " + _local4[_local2.elderTypes[0]]) + "-") + _local4[_local2.elderTypes[1]]) + newline);
} else if (_local2.elderTypes.length == 3) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(((((_local4[_local2.elderTypes[0]] + "-") + _local4[_local2.elderTypes[1]]) + "-") + _local4[_local2.elderTypes[2]]) + newline);
} else {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(_local2.elderTypes.length + " color components\n");
}
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(((("\nDamage: " + Math.round(_local2.getDamageMin())) + "-") + Math.round(_local2.getDamageMax())) + newline);
if (_local2.splashRadius > 0) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("Splash radius: : " + _local2.splashRadius) + newline);
}
if (_local2.rangeModifier != 0) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat((("range " + ((_local2.rangeModifier > 0) ? "+" : "")) + _local2.rangeModifier) + newline);
}
if (_local2.firingSpeedModifier != 0) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat((("firing speed " + ((_local2.firingSpeedModifier > 0) ? "+" : "")) + _local2.firingSpeedModifier) + newline);
}
if (_local2.slowDuration > 0) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(((("Slows by " + Math.round(_local2.slowMultiplier * 100)) + "% for ") + (Math.round((_local2.slowDuration / 30) * 10) / 10)) + " secs\n");
}
if (_local2.poisionDamagePerFrame > 0) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("+" + Math.round(_local2.poisionDamagePerFrame * 150)) + " poison damage over 5 secs\n");
}
if (_local2.chanceOfCriticalHit > 0) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(Math.round(_local2.chanceOfCriticalHit * 100) + "% chance of triple damage\n");
}
if (_local2.chanceOfBouncing > 0) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(Math.round(_local2.chanceOfBouncing * 100) + "% chance of chain hit \n");
}
if (_local2.manaAddPerHit > 0) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(((Math.round(_local2.manaAddPerHit * 10) / 10) + ((a.manaChargeIngameMultiplier > 1) ? (" * " + a.manaChargeIngameMultiplier) : "")) + " mana gain per hit\n");
}
if (_local2.chanceOfReducingArmorLevel > 0) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(Math.round(_local2.chanceOfReducingArmorLevel * 100) + "% chance to reduce armor level\n");
}
if (_local2.chanceOfShock > 0) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(Math.round(_local2.chanceOfShock * 100) + "% chance to shock for 1 sec\n");
}
a.mcInfoPanel.tfContent.textColor = 9803250 /* 0x9595F2 */;
if (_local2.elderTypes.length == 1) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat("\nPure gem modifiers:\n");
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("+" + ((0.1 + (0.01 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.PURE_GEM_MASTERY))) * 100)) + "% to minimum damage\n");
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("+" + ((0.2 + (0.03 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.PURE_GEM_MASTERY))) * 100)) + "% to maximum damage\n");
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("+" + (2 + (2 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.PURE_GEM_MASTERY)))) + " to firing speed\n");
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("+" + (2 + a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.PURE_GEM_MASTERY))) + " to range\n");
} else if (_local2.elderTypes.length == 2) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat("\nDual gem modifiers:\n");
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("+" + ((0.05 + (0.01 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.DUAL_GEM_MASTERY))) * 100)) + "% to minimum damage\n");
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("+" + ((0.1 + (0.02 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.DUAL_GEM_MASTERY))) * 100)) + "% to maximum damage\n");
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("+" + (1 + a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.DUAL_GEM_MASTERY))) + " to firing speed\n");
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("+" + (1 + a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.DUAL_GEM_MASTERY))) + " to range\n");
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat("Specials have 70% power\n");
} else if (_local2.elderTypes.length == 3) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat("\n3 hues:\nSpecials have 60% power\n");
} else {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat("\nMore than 3 hues:\nThree primary specials have 60% power\nAdditional specials are discarded\n");
}
if (a.actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_THROW_INITIATED) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat((("\nGem bomb:\nDamage: " + Math.floor(_local2.getDamageMin() * (((a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.GEMBOMB_DAMAGE) * 0.4) + 3.2) + (_local3.grade * 2.8)))) + "-") + Math.floor(_local2.getDamageMax() * (((a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.GEMBOMB_DAMAGE) * 0.7) + 5.4) + (_local3.grade * 4.2))));
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat("\nSplash radius: " + ((60 + (a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.GEMBOMB_DAMAGE) * 5)) + (15 * _local3.grade)));
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat("\nMax monsters hit: " + Math.min(7, Math.floor((3 + (a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.GEMBOMB_DAMAGE) * 0.3)) + (0.4 * _local3.grade))));
}
a.mcInfoPanel.plate._height = (a.mcInfoPanel.tfContent._height * 1.03) + 35;
}
function summonMonster(pMonster) {
var _local3;
_local3 = 0;
while (_local3 < a.monstersWaitingInWave.length) {
if (pMonster == a.monstersWaitingInWave[_local3]) {
a.monstersWaitingInWave.splice(_local3, 1);
}
_local3++;
}
pMonster.spawn(_root.attachMovie("monster", "monster" + a.zCurrMonster, a.zCurrMonster++), _root.attachMovie("healthmarker", "healthmarker" + a.zCurrMonster, (a.zCurrMonster + com.giab.games.gemc.armor.const.Z.HEALTHMARKER_MIN) - com.giab.games.gemc.armor.const.Z.MONSTER_MIN));
a.monstersOnScene.push(pMonster);
}
function killMonster(pMonster) {
a.main.vfxEngine.createMonsterBlast(pMonster);
a.monsterKillChainCounter++;
a.monsterKillChainCooldownTimer = 50;
var _local2;
var _local4 = Math.round(pMonster.score);
if (a.status == com.giab.common.const.IngameStatus.PLAYING) {
a.setScore(a.getScore() + (Math.round((_local4 * a.manaChargeIngameMultiplier) / 10) * 10));
a.setMana(a.getMana() + ((pMonster.mana + a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.MANA_CHARGE_PER_KILL)) * a.manaChargeIngameMultiplier));
}
pMonster.mc.removeMovieClip();
pMonster.mcHealth.removeMovieClip();
pMonster.isKilled = true;
if (a.selectedMonster == pMonster) {
a.deselectEverything(false, false);
}
_local2 = 0;
while (_local2 < a.monstersOnScene.length) {
if (pMonster == a.monstersOnScene[_local2]) {
a.monstersOnScene.splice(_local2, 1);
break;
}
_local2++;
}
_local2 = 0;
while (_local2 < a.towers.length) {
if (a.towers[_local2].target.isKilled == true) {
a.towers[_local2].acquireNewTarget();
}
_local2++;
}
if (pMonster.isBoss) {
a.main["sndKillboss" + (Math.floor(Math.random() * 2.99) + 1)].start();
a.levelStats[com.giab.games.gemc.armor.const.StatId.BOSSES_KILLED]++;
} else if (pMonster.isEpicBoss) {
a.main.sndKillepicboss.start();
a.levelStats[com.giab.games.gemc.armor.const.StatId.EPIC_BOSSES_KILLED]++;
} else {
a.main["sndKillmonster" + (Math.floor(Math.random() * 13.99) + 1)].start();
a.levelStats[com.giab.games.gemc.armor.const.StatId.MONSTERS_KILLED]++;
}
if (a.status == com.giab.common.const.IngameStatus.PLAYING) {
a.renderHeader();
checkForGameContinuity();
}
}
function buildTower(pFieldX, pFieldY, pIsInitial) {
a.towers.push(new com.giab.games.gemc.armor.entity.Tower(pFieldX, pFieldY, a));
if (pIsInitial != true) {
a.main.vfxEngine.createTowerBuildSmoke(47 + (34 * pFieldX), 47 + (34 * pFieldY));
a.levelStats[com.giab.games.gemc.armor.const.StatId.TOWERS_BUILT]++;
a.main.sndBuildtower.start();
}
}
function buildWaterTrench(pFieldX, pFieldY) {
a.bmpScene.draw(_root.waterTrench, new flash.geom.Matrix(1, 0, 0, 1, 34 * pFieldX, 34 * pFieldY));
a.waterTrenches.push(new com.giab.games.gemc.armor.entity.WaterTrench(pFieldX, pFieldY, a));
a.main.vfxEngine.createWaterTrenchBuildSmoke(47 + (34 * pFieldX), 47 + (34 * pFieldY));
a.main.sndBuildwatertrench.start();
}
function redrawBuildings() {
var _local4;
var _local3;
a.bmpBuildings.fillRect(new flash.geom.Rectangle(0, 0, 510, 442), 0);
var _local6 = false;
var _local5 = false;
_local4 = 0;
while (_local4 < 13) {
_local3 = 0;
while (_local3 < 15) {
if (a.towerPlaceAvailArray[_local4].charAt(_local3) == "T") {
a.bmpBuildings.draw(_root.tower, new flash.geom.Matrix(1, 0, 0, 1, 34 * _local3, 34 * _local4));
} else if (a.waterTrenchPlaceAvailArray[_local4].charAt(_local3) == "W") {
} else if ((_local5 == false) && ((a.levelData.map[_local4].charAt(_local3) == "E") || (a.levelData.map[_local4].charAt(_local3) == "e"))) {
a.bmpBuildings.draw(_root.enemyBase, new flash.geom.Matrix(1, 0, 0, 1, 34 * _local3, 34 * _local4));
_local5 = true;
} else if ((_local6 == false) && ((a.levelData.map[_local4].charAt(_local3) == "P") || (a.levelData.map[_local4].charAt(_local3) == "p"))) {
a.bmpBuildings.draw(_root.playerBase, new flash.geom.Matrix(1, 0, 0, 1, 34 * _local3, 34 * _local4));
_local6 = true;
}
_local3++;
}
_local4++;
}
}
function castGemBomb() {
var _local5;
a.levelStats[com.giab.games.gemc.armor.const.StatId.GEM_BOMBS_THROWN]++;
a.main["sndGembomb" + (Math.floor(Math.random() * 2.99) + 1)].start();
var _local4;
if (a.actionStatus == com.giab.games.gemc.armor.const.ActionStatus.DRAGGING_GEM_FROM_SLOT_TO_THROW) {
_local4 = a.inventorySlots[a.selectedSlotNum];
} else {
_local4 = a.selectedTower.insertedObj;
a.selectedTower.removeObject();
}
a.main.vfxEngine.createTowerShotGlare(_local4.mc._x, _local4.mc._y, com.giab.common.toolbox.ColorToolbox.hsbToRgb([_local4.hueMain, 100, 100]), _local4.grade + 1);
_local4.shotData.splashRadius = (60 + (a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.GEMBOMB_DAMAGE) * 5)) + (15 * _local4.grade);
_local4.shotData.setDamageMin(_local4.shotData.getDamageMin() * ((3.2 + (a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.GEMBOMB_DAMAGE) * 0.4)) + (_local4.grade * 2.8)));
_local4.shotData.setDamageMax(_local4.shotData.getDamageMax() * ((5.4 + (a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.GEMBOMB_DAMAGE) * 0.7)) + (_local4.grade * 4.2)));
_local4.shotData.chanceOfShock = 0;
var _local8 = Math.min(7, Math.floor((3 + (a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.GEMBOMB_DAMAGE) * 0.3)) + (0.4 * _local4.grade)));
var _local6;
var _local7 = 0;
_local5 = 0;
while ((_local5 < a.monstersOnScene.length) && (_local7 < _local8)) {
var _local3 = a.monstersOnScene[_local5];
_local6 = Math.sqrt(Math.pow(_root._xmouse - _local3.x, 2) + Math.pow(_root._ymouse - _local3.y, 2));
if ((_local6 < _local4.shotData.splashRadius) && (_local3.isKilled != true)) {
_local3.sufferSplashDamage(_local4.shotData, _local6, true);
_local7++;
if (_local3.isKilled) {
_local5--;
}
}
_local5++;
}
_local4.mc.removeMovieClip();
a.inventorySlots[a.selectedSlotNum] = null;
a.main.vfxEngine.createGemBlast(_root._xmouse, _root._ymouse, _local4.shotData.splashRadius, com.giab.common.toolbox.ColorToolbox.hsbToRgb([_local4.hueMain, 100, 100]));
a.deselectEverything(true, false);
}
function monsterAttacksPlayerBase(pMonster) {
var _local4 = Math.round((pMonster.isBoss ? (3 * pMonster.manaInit) : ((pMonster.isEpicBoss ? (6 * pMonster.manaInit) : (pMonster.manaInit * 2)))) * (1 - (0.03 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.WIZTOWER_ARMOR))));
a.setMana(Math.max(0, a.getMana() - _local4));
var _local2 = 0;
while (_local2 < a.shots.length) {
if (com.giab.games.gemc.armor.entity.Shot(a.shots[_local2]).target == pMonster) {
a.main.vfxEngine.createShotImpact(a.shots[_local2].mc._x, a.shots[_local2].mc._y, a.shots[_local2].rgb);
a.shots[_local2].mc.removeMovieClip();
a.shots.splice(_local2, 1);
}
_local2++;
}
if (a.status == com.giab.common.const.IngameStatus.PLAYING) {
a.main.sndMonsterattacksplayerbase.start();
if (a.getMana() == 0) {
a.main.vfxEngine.createPlayerBaseDestroyedSmoke(pMonster.mc._x, pMonster.mc._y);
b.endGameWithDefeat();
pMonster.mc.removeMovieClip();
pMonster.mcHealth.removeMovieClip();
} else {
a.main.vfxEngine.createPlayerBaseAttackSmoke(pMonster.mc._x, pMonster.mc._y, com.giab.common.toolbox.ColorToolbox.hsbToRgb((pMonster.isEpicBoss ? ([0, 0, 0]) : ([pMonster.hue, 100, 100]))));
pMonster.spawn(pMonster.mc, pMonster.mcHealth);
}
} else {
pMonster.mc.removeMovieClip();
pMonster.mcHealth.removeMovieClip();
}
}
function forgottenAttacksPlayerBase() {
stopAllSounds();
a.main.sndForgottenboom.start();
a.main.vfxEngine.startScreenShaking(27);
a.main.vfxEngine.createPlayerBaseDestroyedSmoke(a.forgotten.mc._x, a.forgotten.mc._y);
a.bmpBuildings.draw(_root.enemyBase, new flash.geom.Matrix(1, 0, 0, 1, 120, 183));
var _local3 = 0;
while (_local3 < 3) {
a.main.vfxEngine.createPlayerBaseAttackSmoke(a.forgotten.mc._x, a.forgotten.mc._y, [171, 73, 50]);
_local3++;
}
a.forgotten.mc.removeMovieClip();
a.deselectEverything(true, true);
a.mouseListener.onMouseDown = function () {
};
a.timer = 0;
a.status = -3;
}
}
Symbol 1300 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlIngameD] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlIngameD
{
var a;
function CtrlIngameD () {
}
function createGem(pGrade) {
var _local4;
var _local3 = new com.giab.games.gemc.armor.entity.Gem();
_local3.grade = 0;
var _local5 = a.levelData.availableGems[Math.max(0, Math.floor((Math.random() * a.levelData.availableGems.length) - 0.01))];
if (_local5 == 0) {
_local3.hueMain = 120;
_local3.shotData.setDamageMin(5);
_local3.shotData.setDamageMax(10);
_local3.shotData.poisionDamagePerFrame = 0.0333333333333333;
_local3.shotData.rangeModifier = 3;
_local3.shotData.firingSpeedModifier = 2;
} else if (_local5 == 1) {
_local3.hueMain = 60;
_local3.shotData.setDamageMin(4);
_local3.shotData.setDamageMax(11);
_local3.shotData.chanceOfCriticalHit = 0.05;
_local3.shotData.rangeModifier = 4;
_local3.shotData.firingSpeedModifier = 1;
} else if (_local5 == 2) {
_local3.hueMain = 0;
_local3.shotData.setDamageMin(4);
_local3.shotData.setDamageMax(12);
_local3.shotData.splashRadius = 7;
_local3.shotData.rangeModifier = 5;
_local3.shotData.firingSpeedModifier = 1;
} else if (_local5 == 3) {
_local3.hueMain = 240;
_local3.shotData.setDamageMin(5);
_local3.shotData.setDamageMax(12);
_local3.shotData.slowMultiplier = 0.1;
_local3.shotData.slowDuration = 60;
_local3.shotData.rangeModifier = 2;
_local3.shotData.firingSpeedModifier = 3;
} else if (_local5 == 4) {
_local3.hueMain = 90;
_local3.shotData.setDamageMin(6);
_local3.shotData.setDamageMax(9);
_local3.shotData.chanceOfBouncing = 0.16;
_local3.shotData.rangeModifier = 1;
_local3.shotData.firingSpeedModifier = 4;
} else if (_local5 == 5) {
_local3.hueMain = 30;
_local3.shotData.setDamageMin(4);
_local3.shotData.setDamageMax(12);
_local3.shotData.manaAddPerHit = 1;
_local3.shotData.rangeModifier = 3;
_local3.shotData.firingSpeedModifier = 2;
} else if (_local5 == 6) {
_local3.hueMain = 270;
_local3.shotData.setDamageMin(3);
_local3.shotData.setDamageMax(11);
_local3.shotData.chanceOfReducingArmorLevel = 0.1;
_local3.shotData.rangeModifier = 1;
_local3.shotData.firingSpeedModifier = 4;
} else if (_local5 == 7) {
_local3.hueMain = 180;
_local3.shotData.setDamageMin(4);
_local3.shotData.setDamageMax(10);
_local3.shotData.chanceOfShock = 0.07;
_local3.shotData.rangeModifier = 1;
_local3.shotData.firingSpeedModifier = 4;
}
_local3.shotData.elderTypes = [_local5];
_local3.hueMain = (_local3.hueMain + (Math.random() * 16)) - 8;
if (_local3.hueMain >= 360) {
_local3.hueMain = _local3.hueMain - 360;
}
if (_local3.hueMain < 0) {
_local3.hueMain = _local3.hueMain + 360;
}
_local3.shotData.hue = _local3.hueMain;
_local3.hueLeft = (_local3.hueRight = _local3.hueMain);
_local3.satMain = (_local3.satLeft = (_local3.satRight = 100));
a.gems.push(_local3);
_local3.shotDataBase = _local3.shotData;
_local3.shotData = calculateShotData(_local3.shotDataBase);
_local4 = 0;
while (_local4 < pGrade) {
_local3 = combineGems(_local3, _local3);
_local4++;
}
_local3.giveMc(a, _root.attachMovie("gem", "gem" + a.zCurrStone, a.zCurrStone++));
return(_local3);
}
function buildMonsterWaveDescs() {
var _local3;
var _local2;
var _local5 = new com.giab.common.toolbox.PseudoRnd();
_local5.setSeed(a.levelData.wavesRndSeed);
a.monsterWaves = new Array();
var _local10 = 0;
var _local4;
var _local8 = false;
_local3 = 0;
while (_local3 < a.levelData.wavesNum) {
_local2 = new com.giab.games.gemc.armor.entity.MonsterWave();
_local2.content = Math.floor(_local5.getRnd() * ((((_local3 > 7) && (_local10 < (_local3 / 6))) && (!_local8)) ? 5.99 : (((_local3 < 3) ? 0.99 : 2.99))));
if (((_local2.content == com.giab.games.gemc.armor.const.WaveContent.BOSS) || (_local2.content == com.giab.games.gemc.armor.const.WaveContent.BOSS_2)) || (_local2.content == com.giab.games.gemc.armor.const.WaveContent.BOSS_3)) {
_local10++;
_local8 = true;
} else {
_local8 = false;
}
_local2.formation = ((_local3 < 3) ? 0 : (Math.floor(_local5.getRnd() * 9.99)));
if ((_local3 == (a.levelData.wavesNum - 1)) && (a.levelData.epicBossType != null)) {
_local2.content = com.giab.games.gemc.armor.const.WaveContent.EPIC_BOSS;
_local2.formation = com.giab.games.gemc.armor.const.WaveFormation.NORMAL;
}
var _local9 = Math.round(a.levelData.enemyHpFirstWave * Math.pow(a.levelData.enemyHpIncreaseMultiplier, _local3));
var _local7 = Math.max(0, Math.round((a.levelData.enemyArmorIncreaseSpeed * (_local3 - 3)) + ((_local5.getRnd() * (_local3 - 3)) * a.levelData.enemyArmorIncreaseSpeed)));
var _local6 = 3 + (0.1 * Math.round((_local5.getRnd() * 20) - 10));
if (_local3 > 10) {
if ((((_local2.content == com.giab.games.gemc.armor.const.WaveContent.EPIC_BOSS) || (_local2.content == com.giab.games.gemc.armor.const.WaveContent.BOSS)) || (_local2.content == com.giab.games.gemc.armor.const.WaveContent.BOSS_2)) || (_local2.content == com.giab.games.gemc.armor.const.WaveContent.BOSS_3)) {
} else if (_local5.getRnd() > 0.9) {
_local7 = Math.round(_local7 * 3.5);
} else if (_local5.getRnd() > 0.88) {
_local6 = Math.round(_local6 * 3);
}
}
_local4 = new com.giab.games.gemc.armor.entity.Monster(a, Math.round(100 * Math.pow(1.05, _local3)) * 10, 10 + _local3, _local9, _local6, _local7, ((_local3 < 3) ? true : false));
_local4.mana = _local4.mana * ((_local2.content == com.giab.games.gemc.armor.const.WaveContent.NORMAL_6) ? 4 : (((_local2.content == com.giab.games.gemc.armor.const.WaveContent.NORMAL_12) ? 2 : (((_local2.content == com.giab.games.gemc.armor.const.WaveContent.BOSS) ? 8 : (((_local2.content == com.giab.games.gemc.armor.const.WaveContent.BOSS_2) ? 4 : (((_local2.content == com.giab.games.gemc.armor.const.WaveContent.BOSS_3) ? 3 : (((_local2.content == com.giab.games.gemc.armor.const.WaveContent.EPIC_BOSS) ? 20 : 1)))))))))));
if (((_local5.getRnd() > 0.88) && (_local4.isBoss != true)) && (_local3 > 2)) {
_local4.isHealingWhenNotHit = true;
}
_local4.hue = Math.floor(_local5.getRnd() * 359.99);
_local4.bodyType = Math.floor(_local5.getRnd() * 15.99) + 1;
if (((_local2.content == com.giab.games.gemc.armor.const.WaveContent.BOSS) || (_local2.content == com.giab.games.gemc.armor.const.WaveContent.BOSS_2)) || (_local2.content == com.giab.games.gemc.armor.const.WaveContent.BOSS_3)) {
_local4.isBoss = true;
if (_local2.content == com.giab.games.gemc.armor.const.WaveContent.BOSS) {
_local4.hp = (_local4.hpMax = _local4.hp * 20);
} else if (_local2.content == com.giab.games.gemc.armor.const.WaveContent.BOSS_2) {
_local4.hp = (_local4.hpMax = _local4.hp * 10);
} else {
_local4.hp = (_local4.hpMax = _local4.hp * 6);
}
} else if (_local2.content == com.giab.games.gemc.armor.const.WaveContent.EPIC_BOSS) {
_local4.isEpicBoss = true;
_local4.hp = (_local4.hpMax = a.levelData.epicBossHp);
_local4.armorLevel = a.levelData.epicBossArmorLevel;
_local4.bodyType = a.levelData.epicBossType;
}
_local2.monsterTypes.push(_local4);
a.monsterWaves.push(_local2);
_local3++;
}
_local3 = 1;
while (_local3 < a.levelData.wavesNum) {
if ((((a.monsterWaves[_local3].content == com.giab.games.gemc.armor.const.WaveContent.EPIC_BOSS) || (a.monsterWaves[_local3].content == com.giab.games.gemc.armor.const.WaveContent.BOSS)) || (a.monsterWaves[_local3].content == com.giab.games.gemc.armor.const.WaveContent.BOSS_2)) || (a.monsterWaves[_local3].content == com.giab.games.gemc.armor.const.WaveContent.BOSS_3)) {
a.monsterWaves[_local3 - 1].content = com.giab.games.gemc.armor.const.WaveContent.NORMAL_6;
}
_local3++;
}
}
function buildNextMonsterWave() {
a.main.sndWavebrickspeedup.stop("sndLibWavebrickspeedup");
a.main.sndNewwave.start();
var _local9;
if (a.monsterWaves[a.currentWave + 1].monsterTypes[0].isEpicBoss) {
_local9 = [255, 255, 255];
} else {
_local9 = com.giab.common.toolbox.ColorToolbox.hsbToRgb([a.monsterWaves[a.currentWave + 1].monsterTypes[0].hue, 100, 100]);
}
a.main.vfxEngine.createWaveBrickBlast(_local9);
a.currentWave++;
a.timeUntilNextWave = 1000;
var _local2;
var _local7 = a.monsterWaves[a.currentWave];
var _local8 = [6, 12, 24, 1, 2, 3, 1][_local7.content];
var _local3 = new Array();
var _local6;
if (_local7.formation == com.giab.games.gemc.armor.const.WaveFormation.NORMAL) {
_local2 = 0;
while (_local2 < 24) {
_local3.push(5 * _local2);
_local2++;
}
} else if (_local7.formation == com.giab.games.gemc.armor.const.WaveFormation.GROUPS_OF_2) {
_local2 = 0;
while (_local2 < 24) {
_local3.push((6 * (_local2 - (_local2 % 2))) + ((_local2 % 2) * 2));
_local2++;
}
} else if (_local7.formation == com.giab.games.gemc.armor.const.WaveFormation.GROUPS_OF_3) {
_local2 = 0;
while (_local2 < 24) {
_local3.push((9 * (_local2 - (_local2 % 3))) + ((_local2 % 3) * 2));
_local2++;
}
} else if (_local7.formation == com.giab.games.gemc.armor.const.WaveFormation.GROUPS_OF_6) {
_local2 = 0;
while (_local2 < 24) {
_local3.push((18 * (_local2 - (_local2 % 6))) + ((_local2 % 6) * 2));
_local2++;
}
} else if (_local7.formation == com.giab.games.gemc.armor.const.WaveFormation.TIGHT_START_LOOSE_END) {
_local6 = 2;
_local3.push(0);
_local2 = 1;
while (_local2 < 24) {
_local3.push(Math.round(_local3[_local2 - 1] + _local6));
_local6 = _local6 + 0.3;
_local2++;
}
} else if (_local7.formation == com.giab.games.gemc.armor.const.WaveFormation.LOOSE_START_TIGHT_END) {
_local6 = 9.2;
_local3.push(0);
_local2 = 1;
while (_local2 < 24) {
_local3.push(Math.round(_local3[_local2 - 1] + _local6));
_local6 = _local6 - 0.3;
_local2++;
}
} else if (_local7.formation == com.giab.games.gemc.armor.const.WaveFormation.RANDOM_LOOSE) {
_local2 = 0;
while (_local2 < 24) {
_local3.push((8 * _local2) + Math.round((Math.random() * 2) - 4));
_local2++;
}
} else if (_local7.formation == com.giab.games.gemc.armor.const.WaveFormation.RANDOM_TIGHT) {
_local2 = 0;
while (_local2 < 24) {
_local3.push((5 * _local2) + Math.round((Math.random() * 1) - 2));
_local2++;
}
} else if (_local7.formation == com.giab.games.gemc.armor.const.WaveFormation.RANDOM_TOTALLY) {
_local2 = 0;
while (_local2 < 24) {
_local3.push((8 * _local2) + Math.round((Math.random() * 7) - 3.5));
_local2++;
}
} else if (_local7.formation == com.giab.games.gemc.armor.const.WaveFormation.VERY_TIGHT) {
_local2 = 0;
while (_local2 < 24) {
_local3.push(2 * _local2);
_local2++;
}
}
var _local4;
var _local5;
_local2 = 0;
while (_local2 < _local8) {
_local5 = _local7.monsterTypes[Math.max(0, Math.floor(Math.random() * (_local7.monsterTypes.length - 0.01)))];
_local4 = new com.giab.games.gemc.armor.entity.Monster(a, _local5.score, _local5.mana, _local5.hp, _local5.speed, _local5.armorLevel, _local5.isWeak);
_local4.isBoss = _local5.isBoss;
_local4.isEpicBoss = _local5.isEpicBoss;
_local4.timeUntilWarpIn = _local3[_local2];
_local4.hue = (_local5.hue + (Math.random() * 40)) - 20;
_local4.waveNum = a.currentWave;
if (_local4.hue > 360) {
_local4.hue = _local4.hue - 360;
}
if (_local4.hue < 0) {
_local4.hue = _local4.hue + 360;
}
_local4.bodyType = _local5.bodyType;
a.monstersWaitingInWave.push(_local4);
_local2++;
}
a.renderWaveBricks(true);
}
function combineGems(pGemA, pGemB) {
var _local2;
var _local5;
var _local10 = new com.giab.games.gemc.armor.entity.Gem();
var _local6 = new com.giab.games.gemc.armor.entity.ShotData();
var _local3 = pGemA.shotDataBase;
var _local4 = pGemB.shotDataBase;
_local6.elderTypes = new Array();
_local2 = 0;
while (_local2 < _local3.elderTypes.length) {
_local6.elderTypes.push(_local3.elderTypes[_local2]);
_local2++;
}
_local2 = 0;
while (_local2 < _local4.elderTypes.length) {
var _local7 = false;
_local5 = 0;
while (_local5 < _local3.elderTypes.length) {
if (_local3.elderTypes[_local5] == _local4.elderTypes[_local2]) {
_local7 = true;
}
_local5++;
}
if (_local7 != true) {
_local6.elderTypes.push(_local4.elderTypes[_local2]);
}
_local2++;
}
if (Math.abs(pGemA.grade - pGemB.grade) < 2) {
_local6.setDamageMin(Math.round((Math.random() * 1) + Math.ceil((Math.max(_local3.getDamageMin(), _local4.getDamageMin()) * 0.8) + (Math.min(_local3.getDamageMin(), _local4.getDamageMin()) * 0.68))));
_local6.setDamageMax(Math.round((Math.random() * 2) + Math.ceil((Math.max(_local3.getDamageMax(), _local4.getDamageMax()) * 0.84) + (Math.min(_local3.getDamageMax(), _local4.getDamageMax()) * 0.68))));
_local6.splashRadius = Math.min(55, Math.ceil((Math.max(_local3.splashRadius, _local4.splashRadius) * 0.88) + (Math.min(_local3.splashRadius, _local4.splashRadius) * 0.5)));
_local6.slowMultiplier = Math.min(0.55, (Math.max(_local3.slowMultiplier, _local4.slowMultiplier) * 0.88) + (Math.min(_local3.slowMultiplier, _local4.slowMultiplier) * 0.5));
_local6.slowDuration = (Math.max(_local3.slowDuration, _local4.slowDuration) * 0.77) + (Math.min(_local3.slowDuration, _local4.slowDuration) * 0.5);
_local6.poisionDamagePerFrame = (Math.max(_local3.poisionDamagePerFrame, _local4.poisionDamagePerFrame) * 0.88) + (Math.min(_local3.poisionDamagePerFrame, _local4.poisionDamagePerFrame) * 0.5);
if (Math.round(_local6.poisionDamagePerFrame * 150) < 1) {
_local6.poisionDamagePerFrame = 0;
}
_local6.chanceOfCriticalHit = Math.min(0.5, (Math.max(_local3.chanceOfCriticalHit, _local4.chanceOfCriticalHit) * 0.88) + (Math.min(_local3.chanceOfCriticalHit, _local4.chanceOfCriticalHit) * 0.5));
_local6.chanceOfBouncing = Math.min(0.4, (Math.max(_local3.chanceOfBouncing, _local4.chanceOfBouncing) * 0.88) + (Math.min(_local3.chanceOfBouncing, _local4.chanceOfBouncing) * 0.5));
_local6.manaAddPerHit = Math.min(12, (Math.max(_local3.manaAddPerHit, _local4.manaAddPerHit) * 0.88) + (Math.min(_local3.manaAddPerHit, _local4.manaAddPerHit) * 0.5));
_local6.chanceOfReducingArmorLevel = Math.min(0.7, (Math.max(_local3.chanceOfReducingArmorLevel, _local4.chanceOfReducingArmorLevel) * 0.88) + (Math.min(_local3.chanceOfReducingArmorLevel, _local4.chanceOfReducingArmorLevel) * 0.45));
_local6.chanceOfShock = Math.min(0.14, (Math.max(_local3.chanceOfShock, _local4.chanceOfShock) * 0.85) + (Math.min(_local3.chanceOfShock, _local4.chanceOfShock) * 0.5));
_local6.rangeModifier = Math.ceil((_local3.rangeModifier * 0.7) + (_local4.rangeModifier * 0.7));
_local6.firingSpeedModifier = Math.ceil((_local3.firingSpeedModifier * 0.7) + (_local4.firingSpeedModifier * 0.7));
} else {
_local6.setDamageMin(Math.round((Math.random() * 1) + Math.ceil((Math.max(_local3.getDamageMin(), _local4.getDamageMin()) * 1) + (Math.min(_local3.getDamageMin(), _local4.getDamageMin()) * 0.25))));
_local6.setDamageMax(Math.round((Math.random() * 2) + Math.ceil((Math.max(_local3.getDamageMax(), _local4.getDamageMax()) * 1) + (Math.min(_local3.getDamageMax(), _local4.getDamageMax()) * 0.25))));
_local6.splashRadius = Math.min(55, Math.ceil((Math.max(_local3.splashRadius, _local4.splashRadius) * 1) + (Math.min(_local3.splashRadius, _local4.splashRadius) * 0.2)));
_local6.slowMultiplier = Math.min(0.55, (Math.max(_local3.slowMultiplier, _local4.slowMultiplier) * 1) + (Math.min(_local3.slowMultiplier, _local4.slowMultiplier) * 0.2));
_local6.slowDuration = (Math.max(_local3.slowDuration, _local4.slowDuration) * 1) + (Math.min(_local3.slowDuration, _local4.slowDuration) * 0.2);
_local6.poisionDamagePerFrame = (Math.max(_local3.poisionDamagePerFrame, _local4.poisionDamagePerFrame) * 1) + (Math.min(_local3.poisionDamagePerFrame, _local4.poisionDamagePerFrame) * 0.3);
if (Math.round(_local6.poisionDamagePerFrame * 150) < 1) {
_local6.poisionDamagePerFrame = 0;
}
_local6.chanceOfCriticalHit = Math.min(0.5, (Math.max(_local3.chanceOfCriticalHit, _local4.chanceOfCriticalHit) * 1) + (Math.min(_local3.chanceOfCriticalHit, _local4.chanceOfCriticalHit) * 0.2));
_local6.chanceOfBouncing = Math.min(0.4, (Math.max(_local3.chanceOfBouncing, _local4.chanceOfBouncing) * 1) + (Math.min(_local3.chanceOfBouncing, _local4.chanceOfBouncing) * 0.2));
_local6.manaAddPerHit = Math.min(12, (Math.max(_local3.manaAddPerHit, _local4.manaAddPerHit) * 1) + (Math.min(_local3.manaAddPerHit, _local4.manaAddPerHit) * 0.2));
_local6.chanceOfReducingArmorLevel = Math.min(0.7, (Math.max(_local3.chanceOfReducingArmorLevel, _local4.chanceOfReducingArmorLevel) * 1) + (Math.min(_local3.chanceOfReducingArmorLevel, _local4.chanceOfReducingArmorLevel) * 0.2));
_local6.chanceOfShock = Math.min(0.14, (Math.max(_local3.chanceOfShock, _local4.chanceOfShock) * 1) + (Math.min(_local3.chanceOfShock, _local4.chanceOfShock) * 0.2));
_local6.rangeModifier = Math.ceil((Math.max(_local3.rangeModifier, _local4.rangeModifier) * 1) + (Math.min(_local3.rangeModifier, _local4.rangeModifier) * 0.18));
_local6.firingSpeedModifier = Math.ceil((Math.max(_local3.firingSpeedModifier, _local4.firingSpeedModifier) * 1) + (Math.min(_local3.firingSpeedModifier, _local4.firingSpeedModifier) * 0.18));
}
_local10.shotDataBase = _local6;
_local10.shotData = calculateShotData(_local6);
_local10.satMain = ((pGemA.grade == pGemB.grade) ? (Math.min(100, ((pGemA.satMain * 0.5) + (pGemB.satMain * 0.5)) + 10)) : (Math.max(50, ((pGemA.satMain * 0.5) + (pGemB.satMain * 0.5)) - 10)));
_local10.satLeft = pGemA.satMain;
_local10.satRight = pGemB.satMain;
var _local11 = Math.abs(pGemA.hueMain - pGemB.hueMain);
if (_local11 > 180) {
_local11 = 360 - _local11;
_local10.hueMain = Math.max(pGemA.hueMain, pGemB.hueMain) + (_local11 / 2);
if (_local10.hueMain > 360) {
_local10.hueMain = _local10.hueMain - 360;
}
} else {
_local10.hueMain = Math.min(pGemA.hueMain, pGemB.hueMain) + (_local11 / 2);
}
_local10.hueLeft = pGemA.hueMain;
_local10.hueRight = pGemB.hueMain;
_local10.grade = ((pGemA.grade == pGemB.grade) ? (pGemA.grade + 1) : (Math.max(pGemA.grade, pGemB.grade)));
_local10.shotData.hue = _local10.hueMain;
_local2 = 0;
while (_local2 < a.gems.length) {
if ((pGemA == a.gems[_local2]) || (pGemB == a.gems[_local2])) {
a.gems.splice(_local2, 1);
_local2--;
}
_local2++;
}
a.gems.push(_local10);
return(_local10);
}
function renderMonsterInfoPanel() {
var _local2 = a.selectedMonster;
if (_local2.isEpicBoss) {
a.mcInfoPanel.tfTitle.text = (a.mcInfoPanel.tfTitleBlur.text = a.levelData.epicBossName);
a.mcInfoPanel.tfTitle.textColor = 16770560 /* 0xFFE600 */;
a.mcInfoPanel.tfTitleBlur._visible = false;
} else if (_local2.isBoss) {
a.mcInfoPanel.tfTitle.text = (a.mcInfoPanel.tfTitleBlur.text = "Boss level " + (_local2.waveNum + 1));
a.mcInfoPanel.tfTitle.textColor = 15138560 /* 0xE6FF00 */;
a.mcInfoPanel.tfTitleBlur._visible = false;
} else {
a.mcInfoPanel.tfTitle.text = (a.mcInfoPanel.tfTitleBlur.text = "Monster - level " + (_local2.waveNum + 1));
a.mcInfoPanel.tfTitle.textColor = 16777215 /* 0xFFFFFF */;
a.mcInfoPanel.tfTitleBlur._visible = true;
a.mcInfoPanel.tfTitleBlur.textColor = com.giab.common.toolbox.ColorToolbox.rgbToHex(com.giab.common.toolbox.ColorToolbox.hsbToRgb([_local2.hue, 100, 100]));
}
a.mcInfoPanel.tfContent.textColor = 11184810 /* 0xAAAAAA */;
a.mcInfoPanel.tfContent.text = "";
if (!_local2.isEpicBoss) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("Hue: " + Math.floor(_local2.hue)) + "\n\n");
}
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(((("Hit points: " + Math.ceil(_local2.hp)) + " / ") + Math.ceil(_local2.hpMax)) + newline);
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("Armor level: " + _local2.armorLevel) + newline);
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("Speed: " + (Math.round(_local2.speed * 10) / 10)) + newline);
var _local3 = 0.03 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.WIZTOWER_ARMOR);
if (_local2.isEpicBoss) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("\nCosts " + Math.round((_local2.manaInit * 6) * (1 - _local3))) + " mana to banish.\n");
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("(" + Math.round((_local2.manaInit * 6) * _local3)) + " saved by Armor skill)\n");
} else if (_local2.isBoss) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("\nCosts " + Math.round((_local2.manaInit * 3) * (1 - _local3))) + " mana to banish.\n");
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("(" + Math.round((_local2.manaInit * 3) * _local3)) + " saved by Armor skill)\n");
} else {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("\nCosts " + Math.round((_local2.manaInit * 2) * (1 - _local3))) + " mana to banish.\n");
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat(("(" + Math.round((_local2.manaInit * 2) * _local3)) + " saved by Armor skill)\n");
}
if (_local2.isPoisoned) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat("\nPoisoned");
}
if (_local2.isShocked) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat("\nShocked");
}
if (_local2.isSlowed) {
a.mcInfoPanel.tfContent.text = a.mcInfoPanel.tfContent.text.concat("\nSlowed down");
}
a.mcInfoPanel._visible = true;
a.mcInfoPanel.plate._height = (a.mcInfoPanel.tfContent._height * 1.05) + 40;
a.mcInfoPanel._x = 40;
a.mcInfoPanel._y = 40;
}
function renderForgottenInfoPanel() {
a.mcInfoPanel.tfTitle.text = (a.mcInfoPanel.tfTitleBlur.text = "the Forgotten");
a.mcInfoPanel.tfTitle.textColor = 14109224 /* 0xD74A28 */;
a.mcInfoPanel.tfTitleBlur._visible = false;
a.mcInfoPanel.tfContent.textColor = 11184810 /* 0xAAAAAA */;
a.mcInfoPanel.tfContent.text = "Origin: Unknown\nWeaknesses: Unknown";
a.mcInfoPanel._visible = true;
a.mcInfoPanel.plate._height = (a.mcInfoPanel.tfContent._height * 1.05) + 40;
a.mcInfoPanel._x = 40;
a.mcInfoPanel._y = 40;
}
function renderStatusInfoPanel() {
if (a.main.preferences.isStatusInfoEnabled) {
a.mcStatusInfoPanel._visible = true;
if (a.actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_BUILDWATERTRENCH_INITIATED) {
a.mcStatusInfoPanel.tf.text = "Click on an empty field on the path to create a water trench.";
} else if (a.actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_BUILDTOWER_INITIATED) {
a.mcStatusInfoPanel.tf.text = "Click on an empty field to build a tower.";
} else if (a.actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_THROW_INITIATED) {
a.mcStatusInfoPanel.tf.text = "Drag a gem to the target and release it.";
} else if (a.actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_CREATEGEM_INITIATED) {
a.mcStatusInfoPanel.tf.text = "Click on a slot in the inventory. Hold Shift or Ctrl for more.";
} else if (a.actionStatus == com.giab.games.gemc.armor.const.ActionStatus.CAST_COMBINEGEMS_INITIATED) {
a.mcStatusInfoPanel.tf.text = "Drag a gem on another or hold Ctrl to combine all.";
} else {
a.mcStatusInfoPanel._visible = false;
}
a.mcStatusInfoPanel.plate._width = a.mcStatusInfoPanel.tf._width + 20;
} else {
a.mcStatusInfoPanel._visible = false;
}
}
function combineMultipleGems(pSlotNum) {
var _local2;
var _local5 = a.inventorySlots[pSlotNum].grade;
var _local3 = new Array();
_local2 = 0;
while (_local2 < 36) {
if (a.inventorySlots[_local2].grade == _local5) {
_local3.push(_local2);
}
_local2++;
}
if ((_local3.length % 2) == 1) {
_local3.splice(0, 1);
}
var _local4 = 0;
_local2 = 0;
while (_local2 < (_local3.length / 2)) {
if (a.getMana() >= a.gemCombiningManaCost) {
_local4++;
}
castCombineGems(_local3[_local2 * 2], _local3[(_local2 * 2) + 1]);
_local2++;
}
if (_local4 > 0) {
a.main.sndGemcombine.start();
}
}
function castCombineGems(pSlotNumA, pSlotNumB) {
if (a.getMana() >= a.gemCombiningManaCost) {
a.setMana(a.getMana() - a.gemCombiningManaCost);
var _local4 = combineGems(a.inventorySlots[pSlotNumA], a.inventorySlots[pSlotNumB]);
a.main.vfxEngine.createTowerShotGlare(a.inventorySlots[pSlotNumB].mc._x, a.inventorySlots[pSlotNumB].mc._y, com.giab.common.toolbox.ColorToolbox.hsbToRgb([a.inventorySlots[pSlotNumB].hueMain, 100, 30]), a.inventorySlots[pSlotNumB].grade + 1);
a.main.vfxEngine.createTowerShotGlare(a.inventorySlots[pSlotNumA].mc._x, a.inventorySlots[pSlotNumA].mc._y, com.giab.common.toolbox.ColorToolbox.hsbToRgb([a.inventorySlots[pSlotNumA].hueMain, 100, 30]), a.inventorySlots[pSlotNumA].grade + 1);
com.giab.games.gemc.armor.entity.Gem(a.inventorySlots[pSlotNumB]).mc.removeMovieClip();
com.giab.games.gemc.armor.entity.Gem(a.inventorySlots[pSlotNumA]).mc.removeMovieClip();
a.inventorySlots[pSlotNumA] = null;
a.inventorySlots[pSlotNumB] = _local4;
_local4.giveMc(a, _root.attachMovie("gem", "gem" + a.zCurrStone, a.zCurrStone++));
a.inventorySlots[pSlotNumB].mc._x = (549 + ((pSlotNumB % 3) * 28)) + 14;
a.inventorySlots[pSlotNumB].mc._y = (137 + (Math.floor(pSlotNumB / 3) * 28)) + 14;
a.main.vfxEngine.createTowerShotGlare(_local4.mc._x, _local4.mc._y, com.giab.common.toolbox.ColorToolbox.hsbToRgb([_local4.hueMain, 100, 100]), _local4.grade + 1);
a.lastZoneXMin = null;
a.renderInfoPanel();
a.levelStats[com.giab.games.gemc.armor.const.StatId.GEMS_COMBINED]++;
if (_local4.grade > 5) {
a.levelStats[com.giab.games.gemc.armor.const.StatId.GRADE_7_OR_HIGHER_GEMS_CREATED]++;
}
}
a.deselectEverything(true, false);
}
function castCombineGemsFromTower(pTowerNum, pSlotNumB) {
if (a.getMana() >= a.gemCombiningManaCost) {
a.setMana(a.getMana() - a.gemCombiningManaCost);
var _local4 = combineGems(a.towers[pTowerNum].insertedObj, a.inventorySlots[pSlotNumB]);
a.main.vfxEngine.createTowerShotGlare(a.inventorySlots[pSlotNumB].mc._x, a.inventorySlots[pSlotNumB].mc._y, com.giab.common.toolbox.ColorToolbox.hsbToRgb([a.inventorySlots[pSlotNumB].hueMain, 100, 30]), a.inventorySlots[pSlotNumB].grade + 1);
a.main.vfxEngine.createTowerShotGlare(a.towers[pTowerNum].x, a.towers[pTowerNum].y, com.giab.common.toolbox.ColorToolbox.hsbToRgb([a.towers[pTowerNum].insertedObj.hueMain, 100, 30]), a.towers[pTowerNum].insertedObj.grade + 1);
com.giab.games.gemc.armor.entity.Gem(a.inventorySlots[pSlotNumB]).mc.removeMovieClip();
com.giab.games.gemc.armor.entity.Tower(a.towers[pTowerNum]).insertedObj.mc.removeMovieClip();
com.giab.games.gemc.armor.entity.Tower(a.towers[pTowerNum]).removeObject();
a.inventorySlots[pSlotNumB] = _local4;
_local4.giveMc(a, _root.attachMovie("gem", "gem" + a.zCurrStone, a.zCurrStone++));
a.inventorySlots[pSlotNumB].mc._x = (549 + ((pSlotNumB % 3) * 28)) + 14;
a.inventorySlots[pSlotNumB].mc._y = (137 + (Math.floor(pSlotNumB / 3) * 28)) + 14;
a.main.vfxEngine.createTowerShotGlare(_local4.mc._x, _local4.mc._y, com.giab.common.toolbox.ColorToolbox.hsbToRgb([_local4.hueMain, 100, 100]), _local4.grade + 1);
a.lastZoneXMin = null;
a.renderInfoPanel();
a.levelStats[com.giab.games.gemc.armor.const.StatId.GEMS_COMBINED]++;
if (_local4.grade > 5) {
a.levelStats[com.giab.games.gemc.armor.const.StatId.GRADE_7_OR_HIGHER_GEMS_CREATED]++;
}
}
a.deselectEverything(true, false);
}
function calculateShotData(vSdIn) {
var _local3;
var _local2 = new com.giab.games.gemc.armor.entity.ShotData();
_local2.elderTypes = new Array();
_local3 = 0;
while (_local3 < vSdIn.elderTypes.length) {
_local2.elderTypes.push(vSdIn.elderTypes[_local3]);
_local3++;
}
_local2.hue = vSdIn.hue;
_local2.setDamageMin(vSdIn.getDamageMin());
_local2.setDamageMax(vSdIn.getDamageMax());
_local2.splashRadius = vSdIn.splashRadius;
_local2.slowMultiplier = vSdIn.slowMultiplier;
_local2.slowDuration = vSdIn.slowDuration;
_local2.poisionDamagePerFrame = vSdIn.poisionDamagePerFrame;
_local2.chanceOfCriticalHit = vSdIn.chanceOfCriticalHit;
_local2.rangeModifier = vSdIn.rangeModifier;
_local2.firingSpeedModifier = vSdIn.firingSpeedModifier;
_local2.chanceOfBouncing = vSdIn.chanceOfBouncing;
_local2.manaAddPerHit = vSdIn.manaAddPerHit;
_local2.chanceOfReducingArmorLevel = vSdIn.chanceOfReducingArmorLevel;
_local2.chanceOfShock = vSdIn.chanceOfShock;
_local2.hue = vSdIn.hue;
if (_local2.elderTypes.length == 1) {
_local2.setDamageMin(_local2.getDamageMin() * (1.1 + (0.01 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.PURE_GEM_MASTERY))));
_local2.setDamageMax(_local2.getDamageMax() * (1.2 + (0.03 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.PURE_GEM_MASTERY))));
_local2.firingSpeedModifier = _local2.firingSpeedModifier + (2 + (2 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.PURE_GEM_MASTERY)));
_local2.rangeModifier = _local2.rangeModifier + (2 + a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.PURE_GEM_MASTERY));
}
if (_local2.elderTypes.length == 2) {
_local2.setDamageMin(_local2.getDamageMin() * (1.05 + (0.01 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.DUAL_GEM_MASTERY))));
_local2.setDamageMax(_local2.getDamageMax() * (1.1 + (0.02 * a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.DUAL_GEM_MASTERY))));
_local2.firingSpeedModifier = _local2.firingSpeedModifier + (1 + a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.DUAL_GEM_MASTERY));
_local2.rangeModifier = _local2.rangeModifier + (1 + a.main.player.getUpgrade(com.giab.games.gemc.armor.const.UpgradeId.DUAL_GEM_MASTERY));
_local3 = 0;
while (_local3 < _local2.elderTypes.length) {
var _local5 = 0.7;
if (_local2.elderTypes[_local3] == 0) {
_local2.poisionDamagePerFrame = _local2.poisionDamagePerFrame * _local5;
} else if (_local2.elderTypes[_local3] == 1) {
_local2.chanceOfCriticalHit = _local2.chanceOfCriticalHit * _local5;
} else if (_local2.elderTypes[_local3] == 2) {
_local2.splashRadius = _local2.splashRadius * _local5;
} else if (_local2.elderTypes[_local3] == 3) {
_local2.slowDuration = _local2.slowDuration * _local5;
} else if (_local2.elderTypes[_local3] == 4) {
_local2.chanceOfBouncing = _local2.chanceOfBouncing * _local5;
} else if (_local2.elderTypes[_local3] == 5) {
_local2.manaAddPerHit = _local2.manaAddPerHit * _local5;
} else if (_local2.elderTypes[_local3] == 6) {
_local2.chanceOfReducingArmorLevel = _local2.chanceOfReducingArmorLevel * _local5;
} else {
_local2.chanceOfShock = _local2.chanceOfShock * _local5;
}
_local3++;
}
}
if (_local2.elderTypes.length > 2) {
_local3 = 0;
while (_local3 < _local2.elderTypes.length) {
var _local4 = ((_local3 < 3) ? 0.6 : 0);
if (_local2.elderTypes[_local3] == 0) {
_local2.poisionDamagePerFrame = _local2.poisionDamagePerFrame * _local4;
} else if (_local2.elderTypes[_local3] == 1) {
_local2.chanceOfCriticalHit = _local2.chanceOfCriticalHit * _local4;
} else if (_local2.elderTypes[_local3] == 2) {
_local2.splashRadius = _local2.splashRadius * _local4;
} else if (_local2.elderTypes[_local3] == 3) {
_local2.slowDuration = _local2.slowDuration * _local4;
} else if (_local2.elderTypes[_local3] == 4) {
_local2.chanceOfBouncing = _local2.chanceOfBouncing * _local4;
} else if (_local2.elderTypes[_local3] == 5) {
_local2.manaAddPerHit = _local2.manaAddPerHit * _local4;
} else if (_local2.elderTypes[_local3] == 6) {
_local2.chanceOfReducingArmorLevel = _local2.chanceOfReducingArmorLevel * _local4;
} else {
_local2.chanceOfShock = _local2.chanceOfShock * _local4;
}
_local3++;
}
}
return(_local2);
}
}
Symbol 1301 MovieClip [__Packages.com.giab.games.gemc.armor.entity.Gem] Frame 0
class com.giab.games.gemc.armor.entity.Gem
{
var shotData, shotDataBase, mc, ctrl, grade, hueMain, satMain, hueLeft, satLeft, hueRight, satRight;
function Gem () {
shotData = new com.giab.games.gemc.armor.entity.ShotData();
shotDataBase = new com.giab.games.gemc.armor.entity.ShotData();
}
function giveMc(pCtrl, pMc) {
mc = pMc;
ctrl = pCtrl;
mc.glare.gotoAndStop(grade + 1);
mc.colorBodyMain.gotoAndStop(grade + 1);
mc.colorBodyLeft.gotoAndStop(grade + 1);
mc.colorBodyRight.gotoAndStop(grade + 1);
mc.outline.gotoAndStop(grade + 1);
mc.outlineDrag.gotoAndStop(grade + 1);
mc.outlineDrag._visible = false;
var _local2 = com.giab.common.toolbox.ColorToolbox.hsbToRgb(new Array(hueMain, satMain, 100));
var _local7 = new flash.geom.ColorTransform(0, 0, 0, 1, _local2[0], _local2[1], _local2[2], 0);
var _local9 = new flash.geom.Transform(mc.colorBodyMain);
_local9.colorTransform = _local7;
var _local3 = com.giab.common.toolbox.ColorToolbox.hsbToRgb(new Array(hueLeft, satLeft, 100));
var _local8 = new flash.geom.ColorTransform(0, 0, 0, 1, _local3[0], _local3[1], _local3[2], 0);
var _local10 = new flash.geom.Transform(mc.colorBodyLeft);
_local10.colorTransform = _local8;
var _local4 = com.giab.common.toolbox.ColorToolbox.hsbToRgb(new Array(hueRight, satRight, 100));
var _local5 = new flash.geom.ColorTransform(0, 0, 0, 1, _local4[0], _local4[1], _local4[2], 0);
var _local6 = new flash.geom.Transform(mc.colorBodyRight);
_local6.colorTransform = _local5;
var _local11 = new flash.filters.GlowFilter(com.giab.common.toolbox.ColorToolbox.rgbToHex(_local2), 1, 30, 30, 5, 1, false, true);
mc.outlineDrag.filters = [_local11];
}
}
Symbol 1302 MovieClip [__Packages.com.giab.games.gemc.armor.entity.ShotData] Frame 0
class com.giab.games.gemc.armor.entity.ShotData
{
var splashRadius, slowMultiplier, slowDuration, poisionDamagePerFrame, chanceOfCriticalHit, rangeModifier, firingSpeedModifier, chanceOfBouncing, manaAddPerHit, chanceOfReducingArmorLevel, chanceOfShock, damageMinKey, damageMin, damageMaxKey, damageMax;
function ShotData () {
setDamageMin(0);
setDamageMax(0);
splashRadius = 0;
slowMultiplier = 0;
slowDuration = 0;
poisionDamagePerFrame = 0;
chanceOfCriticalHit = 0;
rangeModifier = 0;
firingSpeedModifier = 0;
chanceOfBouncing = 0;
manaAddPerHit = 0;
chanceOfReducingArmorLevel = 0;
chanceOfShock = 0;
}
function setDamageMin(pNum) {
damageMinKey = Math.floor(Math.random() * 1000000) - 500000;
damageMin = pNum + damageMinKey;
}
function getDamageMin() {
return(damageMin - damageMinKey);
}
function setDamageMax(pNum) {
damageMaxKey = Math.floor(Math.random() * 1000000) - 500000;
damageMax = pNum + damageMaxKey;
}
function getDamageMax() {
return(damageMax - damageMaxKey);
}
}
Symbol 1303 MovieClip [__Packages.com.giab.common.toolbox.ColorToolbox] Frame 0
class com.giab.common.toolbox.ColorToolbox
{
function ColorToolbox () {
}
static function rgbToHsb(rgb) {
var _local3 = rgb[0];
var _local4 = rgb[1];
var _local6 = rgb[2];
var _local2;
var _local9;
var _local12;
var _local1 = Math.max(_local3, _local4, _local6);
var _local13 = Math.min(_local3, _local4, _local6);
var _local5 = _local1 - _local13;
_local12 = _local1 / 255;
_local9 = ((_local1 != 0) ? (_local5 / _local1) : 0);
if (_local9 == 0) {
_local2 = 0;
} else {
var _local8 = (_local1 - _local3) / _local5;
var _local7 = (_local1 - _local4) / _local5;
var _local10 = (_local1 - _local6) / _local5;
if (_local3 == _local1) {
_local2 = _local10 - _local7;
} else if (_local4 == _local1) {
_local2 = (2 + _local8) - _local10;
} else {
_local2 = (4 + _local7) - _local8;
}
_local2 = _local2 / 6;
if (_local2 < 0) {
_local2++;
}
}
return([Math.round(_local2 * 360), Math.round(_local9 * 100), Math.round(_local12 * 100)]);
}
static function hsbToRgb(hsb) {
var _local1 = Math.round((hsb[2] / 100) * 255);
if (hsb[1] == 0) {
return([_local1, _local1, _local1]);
}
var _local6 = hsb[0] % 360;
var _local7 = _local6 % 60;
var _local3 = Math.round(((hsb[2] * (100 - hsb[1])) / 10000) * 255);
var _local5 = Math.round(((hsb[2] * (6000 - (hsb[1] * _local7))) / 600000) * 255);
var _local4 = Math.round(((hsb[2] * (6000 - (hsb[1] * (60 - _local7)))) / 600000) * 255);
switch (Math.floor(_local6 / 60)) {
case 0 :
return([_local1, _local4, _local3]);
case 1 :
return([_local5, _local1, _local3]);
case 2 :
return([_local3, _local1, _local4]);
case 3 :
return([_local3, _local5, _local1]);
case 4 :
return([_local4, _local3, _local1]);
case 5 :
return([_local1, _local3, _local5]);
}
}
static function rgbToHex(rgb) {
return(((rgb[0] << 16) ^ (rgb[1] << 8)) ^ rgb[2]);
}
static function hexToRgb(hex) {
var _local1 = new Array();
_local1[0] = hex >> 16;
var _local2 = hex ^ (_local1[0] << 16);
_local1[1] = _local2 >> 8;
_local1[2] = _local2 ^ (_local1[1] << 8);
return(_local1);
}
}
Symbol 1304 MovieClip [__Packages.com.giab.games.gemc.armor.entity.MonsterWave] Frame 0
class com.giab.games.gemc.armor.entity.MonsterWave
{
var monsterTypes;
function MonsterWave () {
monsterTypes = new Array();
}
}
Symbol 1305 MovieClip [__Packages.com.giab.common.toolbox.PseudoRnd] Frame 0
class com.giab.common.toolbox.PseudoRnd
{
var seed, lastWheelStep;
function PseudoRnd () {
setSeed(30000000);
}
function setSeed(pSeed) {
seed = Math.min(99999999, Math.max(10101010, pSeed));
lastWheelStep = 0;
}
function getRnd() {
var _local2;
var _local3 = "0.";
_local2 = 0;
while (_local2 < 11) {
_local3 = _local3 + getDigit().toString();
_local2++;
}
return(_local3 * 1);
}
function getDigit() {
seed++;
if (seed > 99999999) {
seed = 10101010 /* 0x9A2112 */;
}
lastWheelStep++;
if (lastWheelStep > 100) {
lastWheelStep = 0;
}
var _local2 = 0;
_local2 = _local2 + (wheel1.charAt(seed.toString().substr(0, 2) * 1) * 1);
_local2 = _local2 + (wheel2.charAt(seed.toString().substr(2, 2) * 1) * 1);
_local2 = _local2 + (wheel3.charAt(seed.toString().substr(4, 2) * 1) * 1);
_local2 = _local2 + (wheel4.charAt(seed.toString().substr(6, 2) * 1) * 1);
_local2 = _local2 + (lastWheel.charAt(lastWheelStep) * 1);
return(_local2 % 10);
}
var wheel1 = "0812736454326176758354623278460010574897654523487621521607218740631875234872876045087240736213410730";
var wheel2 = "6540343712653415143571635413734574239523638925736231492314621425218724762545237697969053169065191704";
var wheel3 = "5620648924521349794024294123547214869234650994105602674823814905645089049029520842304209491045302894";
var wheel4 = "0239423945287452654871207845902763537652048785905408450952945436547834089376105365124657861531074354";
var lastWheel = "548757821464345637543561613425834582378564309381739821649287234501501730265015012376523487558858701123";
}
Symbol 1306 MovieClip [__Packages.com.giab.games.gemc.armor.const.WaveContent] Frame 0
class com.giab.games.gemc.armor.const.WaveContent
{
function WaveContent () {
}
static var NORMAL_6 = 0;
static var NORMAL_12 = 1;
static var NORMAL_24 = 2;
static var BOSS = 3;
static var BOSS_2 = 4;
static var BOSS_3 = 5;
static var EPIC_BOSS = 6;
static var THE_FORGOTTEN = 7;
}
Symbol 1307 MovieClip [__Packages.com.giab.games.gemc.armor.const.WaveFormation] Frame 0
class com.giab.games.gemc.armor.const.WaveFormation
{
function WaveFormation () {
}
static var NORMAL = 0;
static var GROUPS_OF_2 = 1;
static var GROUPS_OF_3 = 2;
static var GROUPS_OF_6 = 3;
static var TIGHT_START_LOOSE_END = 4;
static var LOOSE_START_TIGHT_END = 5;
static var RANDOM_LOOSE = 6;
static var RANDOM_TIGHT = 7;
static var RANDOM_TOTALLY = 8;
static var VERY_TIGHT = 9;
}
Symbol 1308 MovieClip [__Packages.com.giab.games.gemc.armor.const.UpgradeId] Frame 0
class com.giab.games.gemc.armor.const.UpgradeId
{
function UpgradeId () {
}
static var INITIAL_MANA = 0;
static var WIZTOWER_ARMOR = 1;
static var MANA_CHARGE_PER_SECOND = 2;
static var MANA_CHARGE_PER_KILL = 3;
static var GEMCREATING_MANA_COST = 4;
static var INITIAL_TOWER_BUILDING_MANA_COST = 5;
static var BASIC_STARTER_GEMS = 6;
static var MEDIUM_GRADE_STARTER_GEMS = 7;
static var HIGH_GRADE_STARTER_GEMS = 8;
static var GEMBOMB_DAMAGE = 9;
static var PURE_GEM_MASTERY = 10;
static var DUAL_GEM_MASTERY = 11;
}
Symbol 1309 MovieClip [__Packages.com.giab.games.gemc.armor.const.ActionStatus] Frame 0
class com.giab.games.gemc.armor.const.ActionStatus
{
function ActionStatus () {
}
static var IDLE = 0;
static var MONSTER_SELECTED = 1;
static var FORGOTTEN_SELECTED = 2;
static var CAST_BUILDWATERTRENCH_INITIATED = 3;
static var CAST_BUILDTOWER_INITIATED = 4;
static var CAST_THROW_INITIATED = 5;
static var CAST_CREATEGEM_INITIATED = 6;
static var CAST_COMBINEGEMS_INITIATED = 7;
static var DRAGGING_GEM_FROM_TOWER_IDLE = 8;
static var DRAGGING_GEM_FROM_SLOT_IDLE = 9;
static var DRAGGING_GEM_FROM_SLOT_TO_THROW = 10;
static var DRAGGING_GEM_FROM_TOWER_TO_THROW = 11;
static var DRAGGING_GEM_FROM_SLOT_TO_COMBINE = 12;
static var DRAGGING_GEM_FROM_TOWER_TO_COMBINE = 13;
}
Symbol 1310 MovieClip [__Packages.com.giab.games.gemc.armor.const.StatId] Frame 0
class com.giab.games.gemc.armor.const.StatId
{
function StatId () {
}
static var GEM_BOMBS_THROWN = 0;
static var GEMS_CREATED = 1;
static var GEMS_COMBINED = 2;
static var GRADE_7_OR_HIGHER_GEMS_CREATED = 3;
static var TOWERS_BUILT = 4;
static var MONSTERS_KILLED = 5;
static var BOSSES_KILLED = 6;
static var EPIC_BOSSES_KILLED = 7;
static var BATTLES_WON = 8;
}
Symbol 1311 MovieClip [__Packages.com.giab.games.gemc.armor.entity.Tower] Frame 0
class com.giab.games.gemc.armor.entity.Tower
{
var ctrl, x, y, insertedObj, isCoolingDown, cooldownTimer, timeUntilNextShot, target, range, shotColor;
function Tower (pFieldX, pFieldY, pCtrl) {
ctrl = pCtrl;
x = (30 + (pFieldX * 34)) + 17;
y = (30 + (pFieldY * 34)) + 17;
insertedObj = null;
}
function doEnterFrame() {
if (insertedObj != null) {
if (insertedObj instanceof com.giab.games.gemc.armor.entity.Gem) {
if (isCoolingDown) {
if ((cooldownTimer--) < 1) {
isCoolingDown = false;
timeUntilNextShot = 1;
insertedObj.mc.cooldown.gotoAndStop(1);
} else {
insertedObj.mc.cooldown.gotoAndStop(Math.max(2, 100 - cooldownTimer));
}
} else if ((timeUntilNextShot--) < 1) {
if (((target == null) || (target.isKilled)) || (range < Math.sqrt(Math.pow(target.mc._x - x, 2) + Math.pow(target.mc._y - y, 2)))) {
acquireTarget();
}
if (((target == null) || (target.isKilled)) || (range < Math.sqrt(Math.pow(target.mc._x - x, 2) + Math.pow(target.mc._y - y, 2)))) {
timeUntilNextShot = 16;
} else if ((ctrl.status == com.giab.common.const.IngameStatus.PLAYING) && (ctrl.draggedGem != insertedObj)) {
ctrl.c.createShot(this, target, shotColor);
if (com.giab.games.gemc.armor.entity.Gem(insertedObj).shotData.firingSpeedModifier > 0) {
timeUntilNextShot = ((Math.random() * 4) - 2) + Math.max(8, 45 - Math.pow(com.giab.games.gemc.armor.entity.Gem(insertedObj).shotData.firingSpeedModifier, 0.8));
} else {
timeUntilNextShot = 45 - com.giab.games.gemc.armor.entity.Gem(insertedObj).shotData.firingSpeedModifier;
}
}
}
}
}
}
function acquireTarget() {
var _local2;
target = null;
var _local3 = ctrl.monstersOnScene;
_local2 = 0;
while (_local2 < _local3.length) {
if (range > Math.sqrt(Math.pow(_local3[_local2].mc._x - x, 2) + Math.pow(_local3[_local2].mc._y - y, 2))) {
target = _local3[_local2];
break;
}
_local2++;
}
}
function removeObject() {
insertedObj.mc.cooldown.gotoAndStop(1);
insertedObj = null;
}
function insertObject(pObj) {
insertedObj = pObj;
cooldownTimer = 100;
isCoolingDown = true;
insertedObj.mc.cooldown.gotoAndStop(1);
insertedObj.mc.cooldown.gotoAndStop(2);
pObj.mc._x = x - 1;
pObj.mc._y = y;
range = Math.max(60, Math.min(180, 80 + com.giab.games.gemc.armor.entity.Gem(insertedObj).shotData.rangeModifier));
shotColor = com.giab.common.toolbox.ColorToolbox.hsbToRgb(new Array(com.giab.games.gemc.armor.entity.Gem(pObj).hueMain, 100, 100));
}
function tryToTargetMonster(pMonster) {
}
}
Symbol 1312 MovieClip [__Packages.com.giab.common.const.IngameStatus] Frame 0
class com.giab.common.const.IngameStatus
{
function IngameStatus () {
}
static var DISABLED = 0;
static var INIT_PANEL_APPEARING = 1;
static var INIT_PANEL_SHOWING_IDLE = 2;
static var INIT_PANEL_DISAPPEARING = 3;
static var INITIAL_ADJUSTMENTS = 4;
static var PLAYING = 5;
static var PLAYING_PLAYER_INACTIVE = 6;
static var PAUSED_FOR_ALERT_PANEL = 7;
static var PAUSED_FOR_ADJUSTMENTS = 8;
static var GAMEOVER_PANEL_APPEARING = 9;
static var GAMEOVER_PANEL_STATS_ROLLING = 10;
static var GAMEOVER_PANEL_BADGES_LISTING = 11;
static var GAMEOVER_PANEL_SHOWING_IDLE = 12;
static var GAMEOVER_PANEL_DISAPPEARING = 13;
}
Symbol 1313 MovieClip [__Packages.com.giab.common.const.ScreenStatus] Frame 0
class com.giab.common.const.ScreenStatus
{
function ScreenStatus () {
}
static var APPEARING = 0;
static var DISAPPEARING = 1;
static var CHANGING = 2;
static var IDLE = 3;
static var WAITING = 4;
}
Symbol 1314 MovieClip [__Packages.com.giab.common.const.ScreenId] Frame 0
class com.giab.common.const.ScreenId
{
function ScreenId () {
}
static var MAINMENU = 0;
static var INGAME = 1;
static var UPGRADES = 2;
static var TUTORIAL = 3;
static var CREDITS = 4;
static var MODESELECTOR = 5;
static var LOADSAVE_LOAD = 6;
static var LOADSAVE_SAVE = 7;
static var LEVELSELECTOR = 8;
static var STATISTICS = 9;
static var STARTUP = 10;
static var BADGES = 11;
static var HIGHSCORES = 12;
static var TRANS_INGAME_TO_MAP = 13;
static var TRANS_MAP_TO_INGAME = 14;
static var TRANS_BGR_TO_MAP = 15;
static var TRANS_MAP_TO_BGR = 16;
static var TRANS_STARTUP_TO_MAINMENU = 17;
static var TRANS_MAP_TO_PREPARE = 18;
static var TRANS_PREPARE_TO_MAP = 19;
static var TRANS_PREPARE_TO_INGAME = 20;
static var PREPARE = 21;
}
Symbol 1315 MovieClip [__Packages.com.giab.games.gemc.armor.entity.Shot] Frame 0
class com.giab.games.gemc.armor.entity.Shot
{
var rgb, mc, shotData, ctrl, target, altitude, vX, vY, vZ;
function Shot (pMc, pTower, pMonster, pRgb, pCtrl) {
rgb = pRgb;
mc = pMc;
shotData = pTower.insertedObj.shotData;
ctrl = pCtrl;
target = pMonster;
altitude = 50;
vX = (Math.random() * 50) - 25;
vY = (Math.random() * 50) - 25;
vZ = 0;
mc._x = pTower.x;
mc._y = pTower.y;
}
function doEnterFrame() {
altitude = Math.max(altitude + vZ, 0);
vZ = Math.max(vZ - 0.5, -4);
vX = vX * 0.6;
vY = vY * 0.6;
mc._x = mc._x + vX;
mc._y = mc._y + vY;
mc._x = mc._x + (Math.max(0, (50 - altitude) / 50) * (target.x - mc._x));
mc._y = mc._y + (Math.max(0, (50 - altitude) / 50) * (target.y - mc._y));
mc._xscale = (mc._yscale = 80 + (altitude * 3));
if ((altitude < 20) && (4 > (Math.abs(mc._x - target.x) + Math.abs(mc._y - target.y)))) {
ctrl.shotHitsTarget(this);
}
}
}
Symbol 1316 MovieClip [__Packages.com.giab.games.gemc.armor.entity.WaterTrench] Frame 0
class com.giab.games.gemc.armor.entity.WaterTrench
{
var ctrl, x, y, timeUntilNextShot, shotData;
function WaterTrench (pFieldX, pFieldY, pCtrl) {
ctrl = pCtrl;
x = ((34 * pFieldX) + 17) + 30;
y = ((34 * pFieldY) + 17) + 30;
timeUntilNextShot = 30;
shotData = new com.giab.games.gemc.armor.entity.ShotData();
shotData.slowDuration = 40;
shotData.slowMultiplier = 0.8;
}
function doEnterFrame() {
if ((timeUntilNextShot--) < 1) {
timeUntilNextShot = 30;
var _local2;
var _local3 = ctrl.monstersOnScene;
_local2 = 0;
while (_local2 < _local3.length) {
if (Math.sqrt(Math.pow(x - _local3[_local2].x, 2) + Math.pow(y - _local3[_local2].y, 2)) < 15) {
com.giab.games.gemc.armor.entity.Monster(_local3[_local2]).sufferDamage(shotData);
}
_local2++;
}
}
}
}
Symbol 1317 MovieClip [__Packages.com.giab.games.gemc.armor.const.GameSpecs] Frame 0
class com.giab.games.gemc.armor.const.GameSpecs
{
function GameSpecs () {
}
static var TUTORIAL_PAGES = 16;
static var UPGRADEID_NUM = 13;
static var STATID_NUM = 10;
static var BADGEID_NUM = 46;
static var RATING_MAX = 50;
static var SCORE_REQ_MAXRATING = 120000000;
static var SCR_TRANS_TIME = 18;
static var CONTEXTTUTOR_NUM = 23;
static var MANACOST_COMBINEGEMS = 180;
static var MANACOST_THROW = 0;
static var TOWERBUILDING_COST_INCREMENT = 75;
static var SHAREDOBJECT_MINSIZE = 20000;
}
Symbol 1318 MovieClip [__Packages.com.giab.games.gemc.armor.const.Url] Frame 0
class com.giab.games.gemc.armor.const.Url
{
function Url () {
}
static var STRATEGY_GUIDE = "http://armorgames.com/page/GemCraft-Strategy-Guide";
static var MOREGAMES = "http://armorgames.com/";
static var CREDITS_LINK = "http://gameinabottle.com/";
static var LOCK_LINK = "http://gameinabottle.com/";
static var FGL_CREDITS_LINK = "http://www.flashgamelicense.com/";
}
Symbol 1319 MovieClip [__Packages.com.giab.games.gemc.armor.util.RatingCalculator] Frame 0
class com.giab.games.gemc.armor.util.RatingCalculator
{
function RatingCalculator () {
}
static function calculateRatingReq(pRating) {
if (pRating <= com.giab.games.gemc.armor.const.GameSpecs.RATING_MAX) {
var _local3 = com.giab.common.easing.Strong2.easeIn(pRating, 0, com.giab.games.gemc.armor.const.GameSpecs.SCORE_REQ_MAXRATING, com.giab.games.gemc.armor.const.GameSpecs.RATING_MAX);
var _local2 = com.giab.common.toolbox.MathToolbox.convertCoord(0, com.giab.games.gemc.armor.const.GameSpecs.RATING_MAX, pRating, 0, com.giab.games.gemc.armor.const.GameSpecs.SCORE_REQ_MAXRATING);
return(Math.round((((_local3 * 8.5) + (_local2 * 1.5)) / 10) / 10) * 10);
}
return(com.giab.games.gemc.armor.const.GameSpecs.SCORE_REQ_MAXRATING + (4000000 * (pRating - com.giab.games.gemc.armor.const.GameSpecs.RATING_MAX)));
}
}
Symbol 1320 MovieClip [__Packages.com.giab.common.easing.Strong2] Frame 0
class com.giab.common.easing.Strong2
{
function Strong2 () {
}
static function easeIn(elapsedTime, initialValue, targetMinusInitial, duration) {
if (elapsedTime <= 0) {
return(initialValue);
}
if (elapsedTime >= duration) {
return(initialValue + targetMinusInitial);
}
elapsedTime = elapsedTime / duration;
return((((targetMinusInitial * elapsedTime) * elapsedTime) * elapsedTime) + initialValue);
}
static function easeOut(elapsedTime, initialValue, targetMinusInitial, duration) {
if (elapsedTime <= 0) {
return(initialValue);
}
if (elapsedTime >= duration) {
return(initialValue + targetMinusInitial);
}
elapsedTime = (elapsedTime / duration) - 1;
return((targetMinusInitial * (((elapsedTime * elapsedTime) * elapsedTime) + 1)) + initialValue);
}
static function easeInOut(elapsedTime, initialValue, targetMinusInitial, duration) {
if (elapsedTime <= 0) {
return(initialValue);
}
if (elapsedTime >= duration) {
return(initialValue + targetMinusInitial);
}
elapsedTime = elapsedTime / (duration / 2);
if (elapsedTime < 1) {
return(((((targetMinusInitial / 2) * elapsedTime) * elapsedTime) * elapsedTime) + initialValue);
}
elapsedTime = elapsedTime - 2;
return(((targetMinusInitial / 2) * (((elapsedTime * elapsedTime) * elapsedTime) + 2)) + initialValue);
}
}
Symbol 1321 MovieClip [__Packages.com.giab.common.toolbox.MathToolbox] Frame 0
class com.giab.common.toolbox.MathToolbox
{
function MathToolbox () {
}
static function convertCoord(pFromMin, pFromMax, pFrom, pToMin, pToMax) {
return(pToMin + (((pFrom - pFromMin) / (pFromMax - pFromMin)) * (pToMax - pToMin)));
}
}
Symbol 1322 MovieClip [__Packages.com.giab.common.const.LevelStatus] Frame 0
class com.giab.common.const.LevelStatus
{
function LevelStatus () {
}
static var LOCKED = 0;
static var HIDDEN = 1;
static var AVAILABLE = 2;
static var DONE = 3;
}
Symbol 1323 MovieClip [__Packages.com.giab.common.const.LevelSelectorEvent] Frame 0
class com.giab.common.const.LevelSelectorEvent
{
function LevelSelectorEvent () {
}
static var LEVEL_LOCKED_TO_AVAILABLE = 0;
static var LEVEL_HIDDEN_TO_AVAILABLE = 1;
static var LEVEL_AVAILABLE_TO_DONE = 2;
static var LEVEL_DONE_TO_REDONE = 3;
static var BGR_CHANGE = 4;
}
Symbol 1324 MovieClip [__Packages.com.giab.games.gemc.armor.entity.LevelData] Frame 0
class com.giab.games.gemc.armor.entity.LevelData
{
var epicBossType, epicBossHp;
function LevelData () {
epicBossType = null;
epicBossHp = null;
}
}
Symbol 1325 MovieClip [__Packages.com.giab.common.const.LevelType] Frame 0
class com.giab.common.const.LevelType
{
function LevelType () {
}
static var NORMAL = 0;
static var EPIC = 1;
static var FINAL = 2;
static var BONUS = 3;
}
Symbol 1326 MovieClip [__Packages.com.giab.games.gemc.armor.const.LevelSpecId] Frame 0
class com.giab.games.gemc.armor.const.LevelSpecId
{
function LevelSpecId () {
}
static var EPIC1 = 0;
static var EPIC2 = 1;
static var EPIC3 = 2;
static var EPIC4 = 3;
static var EPIC5 = 4;
static var HIDDEN1 = 5;
static var HIDDEN2 = 6;
static var HIDDEN3 = 7;
static var HIDDEN4 = 8;
static var HIDDEN5 = 9;
static var HIDDEN6 = 10;
static var HIDDEN7 = 11;
static var HIDDEN8 = 12;
}
Symbol 1327 MovieClip [__Packages.com.giab.games.gemc.armor.const.EnemyBase] Frame 0
class com.giab.games.gemc.armor.const.EnemyBase
{
function EnemyBase () {
}
static var CRYPT = 0;
static var ABANDONED_HOUSE = 1;
static var DOLMEN = 2;
static var ROUND_TOWER = 3;
static var RUINED_ROUND_TOWER = 4;
static var SQUARE_TOWER = 5;
static var CLIFF = 6;
static var DARK_FOREST = 7;
static var CORRUPTED_WIZTOWER = 8;
}
Symbol 1328 MovieClip [__Packages.com.giab.common.const.KeyCode] Frame 0
class com.giab.common.const.KeyCode
{
function KeyCode () {
}
static var A = 65;
static var B = 66;
static var C = 67;
static var D = 68;
static var E = 69;
static var F = 70;
static var G = 71;
static var H = 72;
static var I = 73;
static var J = 74;
static var K = 75;
static var L = 76;
static var M = 77;
static var N = 78;
static var O = 79;
static var P = 80;
static var Q = 81;
static var R = 82;
static var S = 83;
static var T = 84;
static var U = 85;
static var V = 86;
static var W = 87;
static var X = 88;
static var Y = 89;
static var Z = 90;
static var NUM_0 = 48;
static var NUM_1 = 49;
static var NUM_2 = 50;
static var NUM_3 = 51;
static var NUM_4 = 52;
static var NUM_5 = 53;
static var NUM_6 = 54;
static var NUM_7 = 55;
static var NUM_8 = 56;
static var NUM_9 = 57;
}
Symbol 1329 MovieClip [__Packages.com.giab.games.gemc.armor.entity.Forgotten] Frame 0
class com.giab.games.gemc.armor.entity.Forgotten
{
var ctrl, pathXs, pathYs, segmentDirections, segmentLengths, speed, currentSegment, currentDistInSegment, mc, targetRota, x, y;
function Forgotten (pCtrl, pMc) {
var _local2;
ctrl = pCtrl;
pathXs = new Array();
pathYs = new Array();
_local2 = 0;
while (_local2 < ctrl.pathXs.length) {
pathXs.push(((ctrl.pathXs[_local2] * 34) + 30) + 17);
pathYs.push(((ctrl.pathYs[_local2] * 34) + 30) + 17);
_local2++;
}
segmentDirections = new Array();
segmentLengths = new Array();
_local2 = 0;
while (_local2 < (pathXs.length - 1)) {
segmentLengths.push(Math.sqrt(Math.pow(pathXs[_local2] - pathXs[_local2 + 1], 2) + Math.pow(pathYs[_local2] - pathYs[_local2 + 1], 2)));
segmentDirections.push((Math.atan2(pathYs[_local2 + 1] - pathYs[_local2], pathXs[_local2 + 1] - pathXs[_local2]) * 180) / Math.PI);
_local2++;
}
speed = 1;
currentSegment = 0;
currentDistInSegment = 0;
mc = pMc;
mc.selectGlare._visible = false;
mc._x = pathXs[0];
mc._y = pathYs[0];
mc._rotation = (targetRota = segmentDirections[0]);
var vThis = this;
mc.onPress = function () {
vThis.ctrl.selectForgotten(vThis);
};
}
function doEnterFrame() {
currentDistInSegment = currentDistInSegment + speed;
if (currentDistInSegment > segmentLengths[currentSegment]) {
currentDistInSegment = currentDistInSegment - segmentLengths[currentSegment];
currentSegment++;
if (currentSegment == 4) {
ctrl.main.sndForgottenboom.start();
currentSegment = 16;
mc._rotation = (targetRota = segmentDirections[16]);
ctrl.mcBlurImage._alpha = 100;
ctrl.main.vfxEngine.startScreenShaking(3);
} else if (currentSegment == 20) {
ctrl.main.sndForgottenboom.start();
currentSegment = 37;
mc._rotation = (targetRota = segmentDirections[37]);
ctrl.mcBlurImage._alpha = 100;
ctrl.main.vfxEngine.startScreenShaking(3);
} else if (currentSegment == 41) {
ctrl.main.sndForgottenboom.start();
currentSegment = 48;
mc._rotation = (targetRota = segmentDirections[48]);
ctrl.mcBlurImage._alpha = 100;
ctrl.main.vfxEngine.startScreenShaking(3);
}
targetRota = segmentDirections[currentSegment];
if (currentSegment > (segmentLengths.length - 1)) {
ctrl.c.forgottenAttacksPlayerBase(this);
}
}
if (mc._rotation != targetRota) {
var _local3 = mc._rotation - targetRota;
if (_local3 < -180) {
_local3 = 360 + _local3;
}
if (_local3 > 180) {
_local3 = _local3 - 360;
}
mc._rotation = mc._rotation - Math.min(6, Math.max(-6, _local3));
if (mc._rotation > 360) {
mc._rotation = mc._rotation - 360;
}
if (mc._rotation < 0) {
mc._rotation = mc._rotation + 360;
}
}
mc._x = com.giab.common.toolbox.MathToolbox.convertCoord(0, segmentLengths[currentSegment], currentDistInSegment, pathXs[currentSegment], pathXs[currentSegment + 1]);
mc._y = com.giab.common.toolbox.MathToolbox.convertCoord(0, segmentLengths[currentSegment], currentDistInSegment, pathYs[currentSegment], pathYs[currentSegment + 1]);
x = mc._x;
y = mc._y;
var _local2;
_local2 = 0;
while (_local2 < 1) {
ctrl.main.vfxEngine.createForgottenAsh(mc._x, mc._y);
_local2++;
}
}
}
Symbol 1330 MovieClip [__Packages.com.giab.games.gemc.armor.const.ContextTutorialId] Frame 0
class com.giab.games.gemc.armor.const.ContextTutorialId
{
function ContextTutorialId () {
}
static var PROLOGUE = 0;
static var EPILOGUE = 1;
static var SCROLL_MAP = 2;
static var REPLAY_LEVEL = 3;
static var CREATING_GEMS = 4;
static var PLACE_GEMS_INTO_TOWERS = 5;
static var SWAP_GEMS_BETWEEN_TOWERS = 6;
static var THROW_GEM_BOMBS = 7;
static var SPEED_THEM_UP = 8;
static var COMBINE_GEMS = 9;
static var MANA_POOL = 10;
static var WATER_TRENCH = 11;
static var SHORTCUT_KEYS = 12;
static var SHIFT_KEY = 13;
static var EPILOGUE2 = 21;
static var LEVEL_UP = 22;
}
Symbol 1331 MovieClip [__Packages.com.giab.common.easing.Back2] Frame 0
class com.giab.common.easing.Back2
{
function Back2 () {
}
static function easeIn(elapsedTime, initialValue, targetMinusInitial, duration, overShoot) {
if (elapsedTime <= 0) {
return(initialValue);
}
if (elapsedTime >= duration) {
return(initialValue + targetMinusInitial);
}
if (overShoot == undefined) {
overShoot = 1.70158;
}
elapsedTime = elapsedTime / duration;
return((((targetMinusInitial * elapsedTime) * elapsedTime) * (((overShoot + 1) * elapsedTime) - overShoot)) + initialValue);
}
static function easeOut(elapsedTime, initialValue, targetMinusInitial, duration, overShoot) {
if (elapsedTime <= 0) {
return(initialValue);
}
if (elapsedTime >= duration) {
return(initialValue + targetMinusInitial);
}
if (overShoot == undefined) {
overShoot = 1.70158;
}
elapsedTime = (elapsedTime / duration) - 1;
return((targetMinusInitial * (((elapsedTime * elapsedTime) * (((overShoot + 1) * elapsedTime) + overShoot)) + 1)) + initialValue);
}
static function easeInOut(elapsedTime, initialValue, targetMinusInitial, duration, overShoot) {
if (elapsedTime <= 0) {
return(initialValue);
}
if (elapsedTime >= duration) {
return(initialValue + targetMinusInitial);
}
if (overShoot == undefined) {
overShoot = 1.70158;
}
elapsedTime = elapsedTime / (duration / 2);
if (elapsedTime < 1) {
overShoot = overShoot * 1.525;
return(((targetMinusInitial / 2) * ((elapsedTime * elapsedTime) * (((overShoot + 1) * elapsedTime) - overShoot))) + initialValue);
}
elapsedTime = elapsedTime - 2;
overShoot = overShoot * 1.525;
return(((targetMinusInitial / 2) * (((elapsedTime * elapsedTime) * (((overShoot + 1) * elapsedTime) + overShoot)) + 2)) + initialValue);
}
}
Symbol 1332 MovieClip [__Packages.com.giab.games.gemc.armor.vfx.VfxSmokeRing] Frame 0
class com.giab.games.gemc.armor.vfx.VfxSmokeRing implements com.giab.common.interfaces.IVfx
{
var mc;
function VfxSmokeRing (pX, pY, pZ, pScale, pRgb) {
mc = _root.attachMovie("vfxSmokeRing", "vfxSmokeRing" + pZ, pZ);
mc._x = pX;
mc._y = pY;
mc._xscale = (mc._yscale = pScale);
mc._rotation = Math.random() * 360;
var _local3 = new flash.geom.ColorTransform(0, 0, 0, 1, pRgb[0], pRgb[1], pRgb[2], 0);
var _local5 = new flash.geom.Transform(mc);
_local5.colorTransform = _local3;
}
function doEnterFrame() {
mc._alpha = mc._alpha - 7;
mc._width = mc._width + 3;
mc._height = mc._height + 3;
if (mc._alpha < 1) {
return(true);
}
return(false);
}
}
Symbol 1333 MovieClip [__Packages.com.giab.games.gemc.armor.vfx.VfxCorpse] Frame 0
class com.giab.games.gemc.armor.vfx.VfxCorpse implements com.giab.common.interfaces.IVfx
{
var mc, engine, isEpic;
function VfxCorpse (pX, pY, pZ, pScale, pRotation, pEngine, pIsEpic) {
mc = _root.attachMovie("vfxCorpse", "vfxCorpse" + pZ, pZ);
mc._x = pX;
mc._y = pY;
mc.blendMode = "multiply";
mc._xscale = (mc._yscale = pScale);
mc._rotation = pRotation;
engine = pEngine;
isEpic = pIsEpic;
}
function doEnterFrame() {
if (isEpic) {
mc._alpha = mc._alpha - 1;
engine.createBlackAsh(mc._x, mc._y);
engine.createBlackAsh(mc._x, mc._y);
if (Math.random() > 0.3) {
engine.createBlackAsh(mc._x, mc._y);
engine.createBlackAsh(mc._x, mc._y);
engine.createShotImpact(mc._x, mc._y, [0, 0, 0]);
if (Math.random() > 0.5) {
engine.createChargedBolt(mc._x, mc._y);
}
}
} else {
mc._alpha = mc._alpha - 4.5;
engine.createBlackAsh(mc._x, mc._y);
engine.createBlackAsh(mc._x, mc._y);
}
if (mc._alpha < 1) {
return(true);
}
return(false);
}
}
Symbol 1334 MovieClip [__Packages.com.giab.games.gemc.armor.vfx.VfxAsh] Frame 0
class com.giab.games.gemc.armor.vfx.VfxAsh implements com.giab.common.interfaces.IVfx
{
var isSlow, mc, vX, vY, vX2;
function VfxAsh (pX, pY, pZ, pRgb, pIsSlow) {
isSlow = pIsSlow == true;
mc = _root.attachMovie("vfxAsh", "vfxAsh" + pZ, pZ);
mc._x = pX;
mc._y = pY;
vX = (Math.random() * 2) - 1;
vY = (Math.random() * 2) - 1;
vX2 = 0;
var _local3 = new flash.geom.ColorTransform(0, 0, 0, 1, pRgb[0], pRgb[1], pRgb[2], 0);
var _local5 = new flash.geom.Transform(mc);
_local5.colorTransform = _local3;
}
function doEnterFrame() {
if (isSlow) {
mc._alpha = mc._alpha - 1;
mc._x = mc._x + (vX + vX2);
mc._y = mc._y + vY;
vX = Math.min(1, Math.max(-0.8, (vX + (Math.random() * 0.18)) - 0.09));
vY = Math.min(0.35, Math.max(-0.27, (vY + (Math.random() * 0.18)) - 0.09));
vX2 = vX2 + 0.012;
} else {
mc._alpha = mc._alpha - 2;
mc._x = mc._x + (vX + vX2);
mc._y = mc._y + vY;
vX = Math.min(2, Math.max(-2, (vX + (Math.random() * 0.5)) - 0.25));
vY = Math.min(0.7, Math.max(-0.7, (vY + (Math.random() * 0.5)) - 0.25));
vX2 = vX2 + 0.05;
}
if (mc._alpha < 1) {
return(true);
}
return(false);
}
}
Symbol 1335 MovieClip [__Packages.com.giab.games.gemc.armor.vfx.VfxSmoke] Frame 0
class com.giab.games.gemc.armor.vfx.VfxSmoke implements com.giab.common.interfaces.IVfx
{
var mc;
function VfxSmoke (pX, pY, pZ, pRgb) {
mc = _root.attachMovie("vfxSmoke", "vfxSmoke" + pZ, pZ);
mc._x = pX;
mc._y = pY;
mc._rotation = Math.random() * 360;
mc.gotoAndStop(Math.floor(Math.round() * 4.99) + 1);
var _local3 = new flash.geom.ColorTransform(0, 0, 0, 1, pRgb[0], pRgb[1], pRgb[2], 0);
var _local5 = new flash.geom.Transform(mc);
_local5.colorTransform = _local3;
}
function doEnterFrame() {
mc._alpha = mc._alpha - ((Math.random() * 2) + 1.5);
mc._width = mc._width + 0.4;
mc._height = mc._height + 0.4;
if (mc._alpha < 1) {
return(true);
}
return(false);
}
}
Symbol 1336 MovieClip [__Packages.com.giab.games.gemc.armor.vfx.VfxWaveBrickFragment] Frame 0
class com.giab.games.gemc.armor.vfx.VfxWaveBrickFragment implements com.giab.common.interfaces.IVfx
{
var mc, vY, vX;
function VfxWaveBrickFragment (pX, pY, pZ) {
mc = _root.attachMovie("vfxWaveBrickFragment", "vfxWaveBrickFragment" + pZ, pZ);
mc._x = pX;
mc._y = pY;
vY = (Math.random() * 4) - 2;
vX = (Math.random() * 2) - 1;
mc._rotation = Math.random() * 360;
mc.gotoAndStop(Math.floor(Math.round() * 7.99) + 1);
}
function doEnterFrame() {
mc._alpha = mc._alpha - ((Math.random() * 2) + 4);
mc._x = mc._x + vX;
mc._y = mc._y + vY;
vY = vY + 0.4;
if (mc._alpha < 1) {
return(true);
}
return(false);
}
}
Symbol 1337 MovieClip [__Packages.com.giab.games.gemc.armor.vfx.VfxChargedBolt] Frame 0
class com.giab.games.gemc.armor.vfx.VfxChargedBolt implements com.giab.common.interfaces.IVfx
{
var mc, vX, vY, rota;
function VfxChargedBolt (pX, pY, pZ) {
mc = _root.attachMovie("vfxGlare", "vfxGlare" + pZ, pZ);
mc._x = pX;
mc._y = pY;
mc._rotation = Math.round() * 360;
vX = (Math.random() * 2) - 1;
vY = (Math.random() * 2) - 1;
rota = (Math.random() * 10) - 5;
}
function doEnterFrame() {
mc._alpha = mc._alpha - ((Math.random() * 0.5) + 1);
mc._x = mc._x + vX;
mc._y = mc._y + vY;
mc._rotation = mc._rotation + rota;
vX = Math.min(2, Math.max(-2, (vX + (Math.random() * 0.5)) - 0.25));
vY = Math.min(2, Math.max(-2, (vY + (Math.random() * 0.5)) - 0.25));
if (mc._alpha < 1) {
return(true);
}
return(false);
}
}
Symbol 1338 MovieClip [__Packages.com.giab.games.gemc.armor.vfx.VfxMapChargedBolt] Frame 0
class com.giab.games.gemc.armor.vfx.VfxMapChargedBolt implements com.giab.common.interfaces.IVfx
{
var mc, vX, vY, rota;
function VfxMapChargedBolt (pX, pY, pZ) {
mc = _root.attachMovie("vfxGlare", "vfxGlare" + pZ, pZ);
mc._x = pX;
mc._y = pY;
mc._rotation = Math.round() * 360;
vX = (Math.random() * 2) - 1;
vY = (Math.random() * 2) - 1;
rota = (Math.random() * 10) - 5;
}
function doEnterFrame() {
mc._alpha = mc._alpha - ((Math.random() * 1.5) + 2);
mc._x = mc._x + vX;
mc._y = mc._y + vY;
mc._rotation = mc._rotation + rota;
vX = Math.min(2, Math.max(-2, (vX + (Math.random() * 0.5)) - 0.25));
vY = Math.min(2, Math.max(-2, (vY + (Math.random() * 0.5)) - 0.25));
if (mc._alpha < 1) {
return(true);
}
return(false);
}
}
Symbol 1339 MovieClip [__Packages.com.giab.games.gemc.armor.entity.Player] Frame 0
class com.giab.games.gemc.armor.entity.Player
{
var isUpgradesHighlighted, lastScoreSent, lastNameGiven, levelScores, levelStatuses, upgrades, upgradeKeys, statistics, badges, contextTutorStatuses, checksum, pointsToSpendKey, pointsToSpend, ratingKey, rating, totalScoreKey, totalScore;
function Player (pLevelCollection) {
var _local2;
isUpgradesHighlighted = false;
setPointsToSpend(0);
setRating(0);
setTotalScore(0);
lastScoreSent = 0;
lastNameGiven = "";
levelScores = new Array();
levelStatuses = new Array();
_local2 = 0;
while (_local2 < pLevelCollection.levels.length) {
levelScores[_local2] = 0;
if (com.giab.games.gemc.armor.entity.LevelData(pLevelCollection.levels[_local2]).type == com.giab.common.const.LevelType.BONUS) {
levelStatuses[_local2] = com.giab.common.const.LevelStatus.HIDDEN;
} else {
levelStatuses[_local2] = com.giab.common.const.LevelStatus.LOCKED;
}
_local2++;
}
levelStatuses[0] = com.giab.common.const.LevelStatus.AVAILABLE;
upgrades = new Array();
upgradeKeys = new Array();
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.UPGRADEID_NUM) {
setUpgrade(_local2, 0);
_local2++;
}
statistics = new Array();
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.STATID_NUM) {
statistics[_local2] = 0;
_local2++;
}
badges = new Array();
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.BADGEID_NUM) {
badges[_local2] = 0;
_local2++;
}
contextTutorStatuses = new Array();
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.CONTEXTTUTOR_NUM) {
contextTutorStatuses[_local2] = 0;
_local2++;
}
}
function populateFromObject(pObj) {
var _local2;
setPointsToSpend(pObj.pointsToSpend);
setRating(pObj.rating);
setTotalScore(pObj.totalScore);
levelScores = new Array();
if (pObj.levelScores.length > 0) {
_local2 = 0;
while (_local2 < pObj.levelScores.length) {
levelScores[_local2] = pObj.levelScores[_local2];
_local2++;
}
}
levelStatuses = new Array();
if (pObj.levelStatuses.length > 0) {
_local2 = 0;
while (_local2 < pObj.levelStatuses.length) {
levelStatuses[_local2] = pObj.levelStatuses[_local2];
_local2++;
}
}
upgrades = new Array();
if (pObj.upgrades.length > 0) {
_local2 = 0;
while (_local2 < pObj.upgrades.length) {
setUpgrade(_local2, pObj.upgrades[_local2]);
_local2++;
}
}
statistics = new Array();
if (pObj.statistics.length > 0) {
_local2 = 0;
while (_local2 < pObj.statistics.length) {
statistics[_local2] = pObj.statistics[_local2];
_local2++;
}
}
badges = new Array();
if (pObj.badges.length > 0) {
_local2 = 0;
while (_local2 < pObj.badges.length) {
badges[_local2] = pObj.badges[_local2];
_local2++;
}
}
checksum = pObj.checksum;
isUpgradesHighlighted = false;
_local2 = 0;
while (_local2 < pObj.contextTutorStatuses.length) {
contextTutorStatuses[_local2] = pObj.contextTutorStatuses[_local2];
_local2++;
}
lastNameGiven = pObj.lastNameGiven;
lastScoreSent = pObj.lastScoreSent;
}
function createCloneObject() {
var _local2;
var _local3 = new Object();
_local3.pointsToSpend = getPointsToSpend();
_local3.rating = getRating();
_local3.totalScore = getTotalScore();
_local3.levelScores = new Array();
_local2 = 0;
while (_local2 < levelScores.length) {
_local3.levelScores[_local2] = levelScores[_local2];
_local2++;
}
_local3.levelStatuses = new Array();
_local2 = 0;
while (_local2 < levelStatuses.length) {
_local3.levelStatuses[_local2] = levelStatuses[_local2];
_local2++;
}
_local3.upgrades = new Array();
_local2 = 0;
while (_local2 < upgrades.length) {
_local3.upgrades[_local2] = getUpgrade(_local2);
_local2++;
}
_local3.statistics = new Array();
_local2 = 0;
while (_local2 < statistics.length) {
_local3.statistics[_local2] = statistics[_local2];
_local2++;
}
_local3.badges = new Array();
_local2 = 0;
while (_local2 < badges.length) {
_local3.badges[_local2] = badges[_local2];
_local2++;
}
_local3.checksum = calculateSaveChecksum();
_local3.contextTutorStatuses = new Array();
_local2 = 0;
while (_local2 < contextTutorStatuses.length) {
_local3.contextTutorStatuses[_local2] = contextTutorStatuses[_local2];
_local2++;
}
_local3.lastNameGiven = lastNameGiven;
_local3.lastScoreSent = lastScoreSent;
return(_local3);
}
function calculateSaveChecksum() {
var _local2;
var _local3 = 37355547 /* 0x23A001B */;
_local3 = ((_local3 * getPointsToSpend()) % 92223123) + 31169;
_local3 = ((_local3 * getRating()) % 92675123) + 33429;
_local3 = ((_local3 * getTotalScore()) % 92675123) + 33429;
_local2 = 0;
while (_local2 < levelScores.length) {
_local3 = ((_local3 * (levelScores[_local2] + 241)) % 92234123) + 62429;
_local2++;
}
_local2 = 0;
while (_local2 < levelStatuses.length) {
_local3 = ((_local3 * (levelStatuses[_local2] + 223)) % 92442128) + 62397;
_local2++;
}
_local2 = 0;
while (_local2 < upgrades.length) {
_local3 = ((_local3 * (getUpgrade(_local2) + 210)) % 99442128) + 55411;
_local2++;
}
_local2 = 0;
while (_local2 < statistics.length) {
_local3 = ((_local3 * (statistics[_local2] + 208)) % 92447128) + 49283;
_local2++;
}
_local2 = 0;
while (_local2 < badges.length) {
_local3 = ((_local3 * (badges[_local2] + 376)) % 92542128) + 29182;
_local2++;
}
return(_local3);
}
function calculateHighScoreChecksum(pName, pScore, pMode) {
var _local1;
var _local2 = 37382647 /* 0x23A69F7 */;
_local1 = 0;
while (_local1 < pName.length) {
_local2 = ((_local2 * pName.charCodeAt(_local1)) % 93837482) + 222;
_local1++;
}
_local2 = ((_local2 * (pScore + 11212)) % 92133214) + 921;
_local2 = ((_local2 * (pMode + 513)) % 92135554) + 817;
return(_local2);
}
function setPointsToSpend(pNum) {
pointsToSpendKey = Math.floor(Math.random() * 1000000) - 500000;
pointsToSpend = pNum + pointsToSpendKey;
}
function getPointsToSpend() {
return(pointsToSpend - pointsToSpendKey);
}
function setRating(pNum) {
ratingKey = Math.floor(Math.random() * 1000000) - 500000;
rating = pNum + ratingKey;
}
function getRating() {
return(rating - ratingKey);
}
function setTotalScore(pNum) {
totalScoreKey = Math.floor(Math.random() * 1000000) - 500000;
totalScore = pNum + totalScoreKey;
}
function getTotalScore() {
return(totalScore - totalScoreKey);
}
function setUpgrade(pUpgradeNum, pValue) {
upgradeKeys[pUpgradeNum] = Math.floor(Math.random() * 1000000) - 500000;
upgrades[pUpgradeNum] = pValue + upgradeKeys[pUpgradeNum];
}
function getUpgrade(pUpgradeNum) {
return(upgrades[pUpgradeNum] - upgradeKeys[pUpgradeNum]);
}
}
Symbol 1340 MovieClip [__Packages.com.giab.games.gemc.armor.LevelCollection] Frame 0
class com.giab.games.gemc.armor.LevelCollection
{
var levels;
function LevelCollection () {
levels = new Array();
var _local2;
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 0;
_local2.mapX = 45;
_local2.mapY = 142;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [0];
_local2.wavesRndSeed = 38247912 /* 0x2479DE8 */;
_local2.sceneRndSeed = 59922891 /* 0x39259CB */;
_local2.map = [" 22 11 ", "1eee 1####2 1", " eeE### T### 2 ", " eee 221 ### ", " 2 11321 T# ", "1 2 221 # ", " ### 11# ", " 212 #T# ### ", " 131 ### # #12 ", " 212 #1 ### ", " pp1 # 1 1 1 ", " pP### 2211 22", " 12 32 "];
_local2.highestGradeScore = 790000 /* 0x0C0DF0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.CRYPT;
_local2.wavesNum = 8;
_local2.enemyHpFirstWave = 4;
_local2.enemyHpIncreaseMultiplier = 1.1;
_local2.enemyArmorIncreaseSpeed = 0.1;
_local2.availableGems = [2, 5, 6];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 1;
_local2.mapX = 94;
_local2.mapY = 257;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [0];
_local2.wavesRndSeed = 38347912 /* 0x2492488 */;
_local2.sceneRndSeed = 58022891 /* 0x3755BEB */;
_local2.map = [" 3 1 22 ", "1231 eee 1 ", " 21 eee2 3 ", " 1 2 eEe 212 ", " 1311# 2 ", " 212T# 1", " ####### 1 ", " # T T 132 2 ", " ## #### 21 ", " ###21# 1 3", " 31 Pp 1 ", " 221 pp 11 2", " 1 2 "];
_local2.highestGradeScore = 1150000 /* 0x118C30 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.ABANDONED_HOUSE;
_local2.wavesNum = 12;
_local2.enemyHpFirstWave = 6;
_local2.enemyHpIncreaseMultiplier = 1.15;
_local2.enemyArmorIncreaseSpeed = 0.11;
_local2.availableGems = [0, 1, 4];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 2;
_local2.mapX = 172;
_local2.mapY = 122;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [0];
_local2.wavesRndSeed = 38447912 /* 0x24AAB28 */;
_local2.sceneRndSeed = 57922891 /* 0x373D54B */;
_local2.map = ["112 ", "2eee1 12### ", " eeE#######T# ", "1eee #11", " T #13", "1 ######11", "1 1 #21 T ", " 121#1 1 ", "21 # 121 ", " 11# 212 ", "111 1Pp131 ", "13211 pp111 ", " 221 1 11"];
_local2.highestGradeScore = 1300000 /* 0x13D620 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.ROUND_TOWER;
_local2.wavesNum = 15;
_local2.enemyHpFirstWave = 8;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.12;
_local2.availableGems = [3, 4, 7];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 3;
_local2.mapX = 231;
_local2.mapY = 246;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [1];
_local2.wavesRndSeed = 38547912 /* 0x24C31C8 */;
_local2.sceneRndSeed = 56922891 /* 0x364930B */;
_local2.map = [" 212 1 11 ", " pp111 2 ", "1pP131 121 1", " 1#111 2 1 ", " # 2 ####2 11 ", " ### #12# eee ", "1 T# # 1# eee ", " #### #T # eEe1", "1#21 # 2# #21", " #1 1# # # ", " # 12# #T # 2", " ###### #### ", " 11 "];
_local2.highestGradeScore = 1600000 /* 0x186A00 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.SQUARE_TOWER;
_local2.wavesNum = 18;
_local2.enemyHpFirstWave = 8;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.13;
_local2.availableGems = [5, 6];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 4;
_local2.mapX = 306;
_local2.mapY = 119;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [1];
_local2.wavesRndSeed = 38647912 /* 0x24DB868 */;
_local2.sceneRndSeed = 55922891 /* 0x35550CB */;
_local2.map = [" 212 11 ", "12 1 2 1 ", " 1#### ", " # T# ####1 ", " # #21 # 2# ", " #1 # T#1 # 2", " # # ### # ", "2 # #T#2 #1 ", " # ### # ", " eEe 211 # ", "1eee1 132 Pp ", " eee 111 pp ", " 21 11 "];
_local2.highestGradeScore = 2020000 /* 0x1ED2A0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.RUINED_ROUND_TOWER;
_local2.wavesNum = 20;
_local2.enemyHpFirstWave = 10;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.14;
_local2.availableGems = [1, 2, 3, 5];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 5;
_local2.mapX = 345;
_local2.mapY = 329;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [3];
_local2.wavesRndSeed = 38747912 /* 0x24F3F08 */;
_local2.sceneRndSeed = 54922891 /* 0x3460E8B */;
_local2.map = [" 1 11", " 22 eee 121 ", " eee 231 ", " eEe 122 ", " #1 ", "121 T# 1 2 1", "131 ### ", "212##T 212 ", " # 131 ", "1 #### 121 ", " 121#T 1pp ", " 132######Pp1", " 211 11 1"];
_local2.highestGradeScore = 2450000 /* 0x256250 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.CLIFF;
_local2.wavesNum = 24;
_local2.enemyHpFirstWave = 12;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.15;
_local2.availableGems = [0, 2, 5];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 6;
_local2.mapX = 473;
_local2.mapY = 232;
_local2.type = com.giab.common.const.LevelType.BONUS;
_local2.levelCompletionReqs = [0, 1, 2, 3, 4, 5];
_local2.wavesRndSeed = 38847912 /* 0x250C5A8 */;
_local2.sceneRndSeed = 53922891 /* 0x336CC4B */;
_local2.specId = com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN1;
_local2.map = ["12 22 1 ", " 221pP###### ", " 131pp # ", "1 212 #### ", " #2 ", " 11 1 #### ", "11 21 # ", "21 ### 12T# ", "12 #T# #### ", " eee # #T# ", " eeE### ### 11", " eee112 1 ", " 232 "];
_local2.highestGradeScore = 4800000 /* 0x493E00 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.DARK_FOREST;
_local2.wavesNum = 40;
_local2.enemyHpFirstWave = 80;
_local2.enemyHpIncreaseMultiplier = 1.076;
_local2.enemyArmorIncreaseSpeed = 0.16;
_local2.availableGems = [0];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 7;
_local2.mapX = 500;
_local2.mapY = 130;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [4];
_local2.wavesRndSeed = 38947912 /* 0x2524C48 */;
_local2.sceneRndSeed = 52922891 /* 0x3278A0B */;
_local2.map = [" 1 21 1 ", " 2#####T1 ", " #####2 ####1", " #121 2# ", " #232 ###T# ", " #121 #1###1", " ####1### 2 ", " T# #12 ", " eee # ###### ", " eeE## 121 # ", "1eee 2 131 Pp ", " 12 121 pp ", " 1 1 1"];
_local2.highestGradeScore = 2820000 /* 0x2B07A0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.DOLMEN;
_local2.wavesNum = 28;
_local2.enemyHpFirstWave = 16;
_local2.enemyHpIncreaseMultiplier = 1.09;
_local2.enemyArmorIncreaseSpeed = 0.17;
_local2.availableGems = [1, 2, 3, 5, 7];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 8;
_local2.mapX = 532;
_local2.mapY = 359;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [5];
_local2.wavesRndSeed = 39047912 /* 0x253D2E8 */;
_local2.sceneRndSeed = 51922891 /* 0x31847CB */;
_local2.map = ["12 233", "2######## 11", " #T T# 11 2", " # 1# 1 ", " # eee1# ", " ###Eee1# ", " eee1# 21 ", "2 12# pp2 ", " 12 1# pP## ", " 11 ## # ", " 1 # 2T2 # ", "121 2 ####### ", "313111 1 "];
_local2.highestGradeScore = 2650000 /* 0x286F90 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.CRYPT;
_local2.wavesNum = 26;
_local2.enemyHpFirstWave = 18;
_local2.enemyHpIncreaseMultiplier = 1.09;
_local2.enemyArmorIncreaseSpeed = 0.18;
_local2.availableGems = [1, 4, 6];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 9;
_local2.mapX = 574;
_local2.mapY = 162;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [7];
_local2.wavesRndSeed = 31247912 /* 0x1DCCE28 */;
_local2.sceneRndSeed = 50922891 /* 0x309058B */;
_local2.map = [" 22 222 ", " 1 pp 132 ", " pP 122 ", " # ", " 12 # 1 1", " ####### ", " #T21 1 ", " ####### #### ", "1 ### T# ", "2eee T# ", "1eeE##### ### ", "1eee 11#### 12", "121 2 21 "];
_local2.highestGradeScore = 4030000 /* 0x3D7E30 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.RUINED_ROUND_TOWER;
_local2.wavesNum = 32;
_local2.enemyHpFirstWave = 20;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.18;
_local2.availableGems = [2, 3];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 10;
_local2.mapX = 680;
_local2.mapY = 195;
_local2.type = com.giab.common.const.LevelType.EPIC;
_local2.levelCompletionReqs = [8, 9];
_local2.wavesRndSeed = 32247912 /* 0x1EC1068 */;
_local2.sceneRndSeed = 49922891 /* 0x2F9C34B */;
_local2.specId = com.giab.games.gemc.armor.const.LevelSpecId.EPIC1;
_local2.epicBossType = 4;
_local2.epicBossHp = 10000;
_local2.epicBossArmorLevel = 28;
_local2.epicBossName = "the Distorted";
_local2.map = ["1 11 111 ", " 2eee2 ### ", " eeE## #T#### ", " eee # # T#1", " ### ##1", " 111 1 # 1", " 131 1 # ", " 111 111## ", " 2 231 # ", " 11 21 T# ", " pP### ## ", " pp #### ", " 22 212 "];
_local2.highestGradeScore = 4000000 /* 0x3D0900 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.CRYPT;
_local2.wavesNum = 32;
_local2.enemyHpFirstWave = 21;
_local2.enemyHpIncreaseMultiplier = 1.07;
_local2.enemyArmorIncreaseSpeed = 0.18;
_local2.availableGems = [0, 1, 2, 3, 4, 5, 6, 7];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 11;
_local2.mapX = 714;
_local2.mapY = 368;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [10];
_local2.wavesRndSeed = 33247912 /* 0x1FB52A8 */;
_local2.sceneRndSeed = 48922891 /* 0x2EA810B */;
_local2.map = ["2321 11 ", "3122 ######### ", "11 # # ", " #T2 pp # ", " ### pP # ", " 1### #12#2 # ", " 2#T# T#11#2 # ", "1 #2#### # # ", " # #22# ", " eEe212 #### ", " eee132 11 1", " eee212 11 13", " 1 211233"];
_local2.highestGradeScore = 3960000 /* 0x3C6CC0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.ABANDONED_HOUSE;
_local2.wavesNum = 32;
_local2.enemyHpFirstWave = 22;
_local2.enemyHpIncreaseMultiplier = 1.07;
_local2.enemyArmorIncreaseSpeed = 0.18;
_local2.availableGems = [1, 4, 5, 6];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 12;
_local2.mapX = 835;
_local2.mapY = 118;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [10];
_local2.wavesRndSeed = 34247912 /* 0x20A94E8 */;
_local2.sceneRndSeed = 47922891 /* 0x2DB3ECB */;
_local2.map = ["21112 ", "31#### ###### ", "11# # T# # ", "1 # #### T# ", " #1 122 ### ", " #11 131 # ", " # 221 # 1", " ### eee T# 12", " 22 # eeE### ", " 1 # eee1 ", " pP## 1112 1", " pp 22 111", " 1231"];
_local2.highestGradeScore = 2585000 /* 0x2771A8 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.DOLMEN;
_local2.wavesNum = 26;
_local2.enemyHpFirstWave = 24;
_local2.enemyHpIncreaseMultiplier = 1.07;
_local2.enemyArmorIncreaseSpeed = 0.18;
_local2.availableGems = [2, 3, 7];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 13;
_local2.mapX = 840;
_local2.mapY = 210;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [10];
_local2.wavesRndSeed = 35247912 /* 0x219D728 */;
_local2.sceneRndSeed = 46922891 /* 0x2CBFC8B */;
_local2.map = [" 11 ", " 2pP### 2##### ", " pp #1T# #2", " #### 1#1", " 1# ", " 211 #### ", " 2321 #T1 ", " 2231 #### ", "1 212 121# ", " eee 11T# ", " eeE######### ", "2 eee 221 ", "1 111 3 "];
_local2.highestGradeScore = 2750000 /* 0x29F630 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.ROUND_TOWER;
_local2.wavesNum = 28;
_local2.enemyHpFirstWave = 28;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 2, 6];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 14;
_local2.mapX = 886;
_local2.mapY = 300;
_local2.type = com.giab.common.const.LevelType.BONUS;
_local2.levelCompletionReqs = [11, 12, 13, 15];
_local2.wavesRndSeed = 36511212 /* 0x22D1DEC */;
_local2.sceneRndSeed = 45922891 /* 0x2BCBA4B */;
_local2.specId = com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN2;
_local2.map = [" 22 2 1", " 2321 1eee ", " 121 #### eee ", " # T# eEe ", " # # # ", " # #T # 1", " # ### #2 ", " pp #111 #T# ", " Pp #131 ### 1", " # #211 221 ", " #21 # 132 1", " ##### 1 221 ", " 111 "];
_local2.highestGradeScore = 4900000 /* 0x4AC4A0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.DARK_FOREST;
_local2.wavesNum = 40;
_local2.enemyHpFirstWave = 80;
_local2.enemyHpIncreaseMultiplier = 1.076;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [1];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 15;
_local2.mapX = 964;
_local2.mapY = 134;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [12];
_local2.wavesRndSeed = 32347912 /* 0x1ED9708 */;
_local2.sceneRndSeed = 44922891 /* 0x2AD780B */;
_local2.map = ["312 1 22 ", "11########## 2 ", " # T222 #1 1", " #### ### ", " pp #11 2 # ", " pP### ### #1", " #T#T# ", " 112 # ### ", " 1231 1# 2 ", " eee112 T# 1 ", " eeE###### 22 ", " eee 111 1 1", " 11 12 23"];
_local2.highestGradeScore = 3800000 /* 0x39FBC0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.ABANDONED_HOUSE;
_local2.wavesNum = 36;
_local2.enemyHpFirstWave = 32;
_local2.enemyHpIncreaseMultiplier = 1.06;
_local2.enemyArmorIncreaseSpeed = 0.15;
_local2.availableGems = [2, 5];
levels.push(_local2);
var _local3;
var _local5 = new com.giab.games.gemc.armor.LevelCollection2();
_local3 = 0;
while (_local3 < _local5.levels.length) {
levels.push(_local5.levels[_local3]);
_local3++;
}
var _local4 = new com.giab.games.gemc.armor.LevelCollection3();
_local3 = 0;
while (_local3 < _local4.levels.length) {
levels.push(_local4.levels[_local3]);
_local3++;
}
}
}
Symbol 1341 MovieClip [__Packages.com.giab.games.gemc.armor.LevelCollection2] Frame 0
class com.giab.games.gemc.armor.LevelCollection2
{
var levels;
function LevelCollection2 () {
levels = new Array();
var _local2;
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 16;
_local2.mapX = 1097;
_local2.mapY = 176;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [13, 15];
_local2.wavesRndSeed = 38217912 /* 0x24728B8 */;
_local2.sceneRndSeed = 28922891 /* 0x1B9540B */;
_local2.map = ["221 11 1 ", "131 #### 21 2", " 1 # T# 131 2", "1 # ###12 ", "132 #13 T# ", "121T# 121# 331 ", " ### 1# 212 ", " #21 #### 1 ", " # 31# #### ", " eEe 2# # 1# ", " eee # # pP ", "2eee1 ##### pp2", " 1 12 1 "];
_local2.highestGradeScore = 2680000 /* 0x28E4C0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.RUINED_ROUND_TOWER;
_local2.wavesNum = 28;
_local2.enemyHpFirstWave = 32;
_local2.enemyHpIncreaseMultiplier = 1.07;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 1, 2, 4, 6];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 17;
_local2.mapX = 1182;
_local2.mapY = 128;
_local2.type = com.giab.common.const.LevelType.BONUS;
_local2.levelCompletionReqs = [16, 20, 21, 24];
_local2.wavesRndSeed = 38457912 /* 0x24AD238 */;
_local2.sceneRndSeed = 29922891 /* 0x1C8964B */;
_local2.specId = com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN3;
_local2.map = [" 321 21 ", " ### 1eee ", "3 ### #####Eee ", " 1#T 21 eee1", "2 # 2123 ", " # 13121 ", " #T 2### 1 ", " ##### ##### 3", " 221 1 T# ", "1 13 21 #2 ", " pp 221 # 1", " pP########## ", " 21 1 "];
_local2.highestGradeScore = 4860000 /* 0x4A2860 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.DARK_FOREST;
_local2.wavesNum = 40;
_local2.enemyHpFirstWave = 80;
_local2.enemyHpIncreaseMultiplier = 1.076;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [2];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 18;
_local2.mapX = 1190;
_local2.mapY = 404;
_local2.type = com.giab.common.const.LevelType.BONUS;
_local2.levelCompletionReqs = [19, 22, 23];
_local2.wavesRndSeed = 38237912 /* 0x24776D8 */;
_local2.sceneRndSeed = 30922891 /* 0x1D7D88B */;
_local2.specId = com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN4;
_local2.map = [" 1 1 21 ", "11##########Pp ", "31# T pp ", "11##########111", " 22 1 1 #231", "1######## 2#111", " # eee # # ", " ###Eee # T# 1", "1 eee #1 # 1 ", " ####### 1# ", " 1#22 T 12#111", " ##########131", " 1 1 1 211"];
_local2.highestGradeScore = 4780000 /* 0x48EFE0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.DARK_FOREST;
_local2.wavesNum = 40;
_local2.enemyHpFirstWave = 80;
_local2.enemyHpIncreaseMultiplier = 1.076;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [3];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 19;
_local2.mapX = 1203;
_local2.mapY = 315;
_local2.type = com.giab.common.const.LevelType.EPIC;
_local2.levelCompletionReqs = [16];
_local2.wavesRndSeed = 38257912 /* 0x247C4F8 */;
_local2.sceneRndSeed = 31922891 /* 0x1E71ACB */;
_local2.specId = com.giab.games.gemc.armor.const.LevelSpecId.EPIC2;
_local2.epicBossType = 8;
_local2.epicBossHp = 16000;
_local2.epicBossArmorLevel = 30;
_local2.epicBossName = "the Reborn";
_local2.map = [" 1 2 1 ", "1112#########1 ", " 231#T 12T# 2", "3122### 231# ", " 1 T#111### 1", " pp ## 2 #TT ", " 1Pp # ### ", "21## #21 TT# ", "132###122####1 ", " 132#Teee ", " 21 T##Eee ", " 23 12 eee1", " 1 12 1 "];
_local2.highestGradeScore = 4100000 /* 0x3E8FA0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.CRYPT;
_local2.wavesNum = 42;
_local2.enemyHpFirstWave = 32;
_local2.enemyHpIncreaseMultiplier = 1.061;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 1, 2, 3, 4, 5, 6, 7];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 20;
_local2.mapX = 1226;
_local2.mapY = 200;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [19];
_local2.wavesRndSeed = 38267912 /* 0x247EC08 */;
_local2.sceneRndSeed = 32922891 /* 0x1F65D0B */;
_local2.map = [" 1 21 1", " 1121 eee ", " #### eee 112 ", "1# T# eEe2132 ", " # #T # 212 ", "2# #### 1 ", "2# 11 1", " # 122 ####Pp ", "1#21321 # pp ", " #T1222 # ", " ######## 22 ", "1 121 3 ", " 23 2 "];
_local2.highestGradeScore = 4150000 /* 0x3F52F0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.ABANDONED_HOUSE;
_local2.wavesNum = 32;
_local2.enemyHpFirstWave = 42;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 2, 3, 4, 5];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 21;
_local2.mapX = 1339;
_local2.mapY = 211;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [19];
_local2.wavesRndSeed = 38277912 /* 0x2481318 */;
_local2.sceneRndSeed = 33922891 /* 0x2059F4B */;
_local2.map = [" 22 22 ", " 1eee 1 ", " eeE####1 ", " eee121#T 2", "221 1232###231", "1321 121 # 2 ", "221 ####1 ### ", "1pp # # T# ", " pP## # 2 # ", " # #### ", " 1 # T#121 ", " 2311 #### 231", " 211 12 "];
_local2.highestGradeScore = 2870000 /* 0x2BCAF0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.SQUARE_TOWER;
_local2.wavesNum = 28;
_local2.enemyHpFirstWave = 40;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [2, 4];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 22;
_local2.mapX = 1382;
_local2.mapY = 388;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [19];
_local2.wavesRndSeed = 38887912 /* 0x25161E8 */;
_local2.sceneRndSeed = 34922891 /* 0x214E18B */;
_local2.map = ["2311111 323 ", "1eee 1 2 2 ", "2eee1 11 pp ", "1eEe pP ", "1 # 3 # ", " # #### # ", " #1# T# 1 # ", " ### # #1 ", " T # #1 ", " ####### 131# ", " # 21 T 11 # ", " ############ ", "1 1 1 "];
_local2.highestGradeScore = 3600000 /* 0x36EE80 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.DOLMEN;
_local2.wavesNum = 32;
_local2.enemyHpFirstWave = 42;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 3, 5];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 23;
_local2.mapX = 1446;
_local2.mapY = 312;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [22];
_local2.wavesRndSeed = 38287912 /* 0x2483A28 */;
_local2.sceneRndSeed = 35922891 /* 0x22423CB */;
_local2.map = ["22 1 11", "1pP####22##### ", " pp12 #1T# 21# ", " 1 #### 2 # ", "1 211 1 # ", " 2 132 #### ", " 1121 #T ", " #### ", " 1232 T1 # ", " eee1211#### # ", " eeE#####T #T# ", " eee1 2 1 ### ", "11 11 2 "];
_local2.highestGradeScore = 3950000 /* 0x3C45B0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.RUINED_ROUND_TOWER;
_local2.wavesNum = 32;
_local2.enemyHpFirstWave = 40;
_local2.enemyHpIncreaseMultiplier = 1.075;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 3, 4, 6];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 24;
_local2.mapX = 1448;
_local2.mapY = 118;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [21];
_local2.wavesRndSeed = 38297912 /* 0x2486138 */;
_local2.sceneRndSeed = 36922891 /* 0x233660B */;
_local2.map = [" 11 211 2 ", "1eee 1321 1 ", " eee 1212 ", " eEe ", " # 212 ", " 1# ### 2131 ", "2 #T# # 2121 ", " ### #1 11 ", "1 2 T# ####Pp ", " ###### # pp ", " #T 1 2# 211 1", " ########1132 ", " 11 112 "];
_local2.highestGradeScore = 3100000 /* 0x2F4D60 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.CLIFF;
_local2.wavesNum = 28;
_local2.enemyHpFirstWave = 40;
_local2.enemyHpIncreaseMultiplier = 1.076;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 1, 2, 3, 4, 5, 6];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 25;
_local2.mapX = 1519;
_local2.mapY = 211;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [23];
_local2.wavesRndSeed = 38241944 /* 0x2478698 */;
_local2.sceneRndSeed = 37922891 /* 0x242A84B */;
_local2.map = [" 22 221 1", " 1eee ##### ", " ####Eee2#221# ", " #T11eee #131# ", " #231 1#212# ", " #122 2 # #2", "1# #######1 #2", "1# #T2121 T# ", " # ## 1321####1", " #TT# 221 #1 ", " #TT# pp #121 ", "1#### pP###2311", " 2 11 112 "];
_local2.highestGradeScore = 3800000 /* 0x39FBC0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.ABANDONED_HOUSE;
_local2.wavesNum = 32;
_local2.enemyHpFirstWave = 38;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [4, 5];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 26;
_local2.mapX = 1588;
_local2.mapY = 390;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [23];
_local2.wavesRndSeed = 38242912 /* 0x2478A60 */;
_local2.sceneRndSeed = 38922891 /* 0x251EA8B */;
_local2.map = [" 111 1 ", " #######T2 eee ", "1#T122T####Eee ", " # 132 eee ", "1# 2122###1 2 ", " # #T# 1 ", " #####T# # 121 ", " 21 ### # 131 ", " 122 #2112 ", " 22321 # ", " 1221 # pp ", " 1 1 ###Pp ", " "];
_local2.highestGradeScore = 3720000 /* 0x38C340 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.CRYPT;
_local2.wavesNum = 32;
_local2.enemyHpFirstWave = 42;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 2, 3, 7];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 27;
_local2.mapX = 1618;
_local2.mapY = 128;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [25];
_local2.wavesRndSeed = 38243912 /* 0x2478E48 */;
_local2.sceneRndSeed = 39922891 /* 0x2612CCB */;
_local2.map = [" 1 32 212 ", " eee1 pp 1312", "1eee 221pP 221 ", " eEe 131 ### ", "11# 212 # 12", " # ### 11", "21#T### #1 ", " ###T#11#2 ", " #1 # ", " 121 # #### ", " 2321 # T#2 ", " 112 #######1 ", " 1 2 "];
_local2.highestGradeScore = 3920000 /* 0x3BD080 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.ABANDONED_HOUSE;
_local2.wavesNum = 36;
_local2.enemyHpFirstWave = 26;
_local2.enemyHpIncreaseMultiplier = 1.09;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [1, 4, 7];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 28;
_local2.mapX = 1704;
_local2.mapY = 323;
_local2.type = com.giab.common.const.LevelType.BONUS;
_local2.levelCompletionReqs = [25, 26, 27, 29];
_local2.wavesRndSeed = 38244912 /* 0x2479230 */;
_local2.sceneRndSeed = 40922891 /* 0x2706F0B */;
_local2.specId = com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN5;
_local2.map = [" 1 2 ", " pP######1#### ", " pp 211 # # #2", " 1 1132 #T# # ", " 121 ### # ", " 1 2# ", "1##########11# ", "1# 22 # #1", " #T1 eee1 # # ", " ####Eee2 # # ", " eee #T2#1", " 1 1221 1#### ", " 32 1 1 "];
_local2.highestGradeScore = 4500000 /* 0x44AA20 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.DARK_FOREST;
_local2.wavesNum = 40;
_local2.enemyHpFirstWave = 80;
_local2.enemyHpIncreaseMultiplier = 1.076;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [4];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 29;
_local2.mapX = 1737;
_local2.mapY = 184;
_local2.type = com.giab.common.const.LevelType.EPIC;
_local2.levelCompletionReqs = [27];
_local2.wavesRndSeed = 38245912 /* 0x2479618 */;
_local2.sceneRndSeed = 41922891 /* 0x27FB14B */;
_local2.specId = com.giab.games.gemc.armor.const.LevelSpecId.EPIC3;
_local2.epicBossType = 12;
_local2.epicBossHp = 22000;
_local2.epicBossArmorLevel = 40;
_local2.epicBossName = "the Fallen";
_local2.map = [" 12 2 1 ", " eeeTT 21 22 ", " eeE### ### 1 ", " eeeTT# # # pp ", " 211T # # ##Pp ", "1131###T#12212 ", " 211#211# 1312", " ####131#T1112 ", " # 112##### ", " # # 1", " # ###T### ## ", " ###T### ### 1", " 1 12 "];
_local2.highestGradeScore = 5300000 /* 0x50DF20 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.ROUND_TOWER;
_local2.wavesNum = 48;
_local2.enemyHpFirstWave = 30;
_local2.enemyHpIncreaseMultiplier = 1.073;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 1, 2, 3, 4, 5, 6, 7];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 30;
_local2.mapX = 1822;
_local2.mapY = 132;
_local2.type = com.giab.common.const.LevelType.BONUS;
_local2.levelCompletionReqs = [31, 32, 33, 34];
_local2.wavesRndSeed = 38246912 /* 0x2479A00 */;
_local2.sceneRndSeed = 42922891 /* 0x28EF38B */;
_local2.specId = com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN6;
_local2.map = [" 122 1 22 ", " 2312 eee 32 ", " 122 eee ", " eEe ###12", " 1 21 # #T#2 ", "12 ### #### # 1", "1 #T# 22 # ", " 2 # ######T#1 ", " #11 2 ### 2", " #1#### 1 ", "211### ####Pp ", "1311 2111 pp ", "221 132 "];
_local2.highestGradeScore = 5030000 /* 0x4CC070 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.DARK_FOREST;
_local2.wavesNum = 40;
_local2.enemyHpFirstWave = 80;
_local2.enemyHpIncreaseMultiplier = 1.076;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [5];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 31;
_local2.mapX = 1872;
_local2.mapY = 375;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [32];
_local2.wavesRndSeed = 38248912 /* 0x247A1D0 */;
_local2.sceneRndSeed = 43922891 /* 0x29E35CB */;
_local2.map = [" 1 ", " 1221 11eee1", " 13131####Eee ", " 12112#T eee ", " # 12 ", " #### # 21 ", " # # ##1 ", " # # T###### ", " # # 222 # ", " # ###121 T# ", " pP ####### ", "1pp21 11 21 ", " 11 "];
_local2.highestGradeScore = 4200000 /* 0x401640 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.RUINED_ROUND_TOWER;
_local2.wavesNum = 36;
_local2.enemyHpFirstWave = 40;
_local2.enemyHpIncreaseMultiplier = 1.076;
_local2.enemyArmorIncreaseSpeed = 0.18;
_local2.availableGems = [1, 2, 3, 7];
levels.push(_local2);
}
}
Symbol 1342 MovieClip [__Packages.com.giab.games.gemc.armor.LevelCollection3] Frame 0
class com.giab.games.gemc.armor.LevelCollection3
{
var levels;
function LevelCollection3 () {
levels = new Array();
var _local2;
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 32;
_local2.mapX = 1941;
_local2.mapY = 249;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [29];
_local2.wavesRndSeed = 38247912 /* 0x2479DE8 */;
_local2.sceneRndSeed = 27922891 /* 0x1AA11CB */;
_local2.map = [" 121 1 ", " pP###131 1eee ", " pp #222##Eee ", " 212 # T# eee ", " ##### ##11 ", " #211 #122 ", " #132 12### ", " #212 T# 211", " ######T### 131", " 2###1 212", " 1 ", " 221 22 ", " 31 211 "];
_local2.highestGradeScore = 4300000 /* 0x419CE0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.CRYPT;
_local2.wavesNum = 36;
_local2.enemyHpFirstWave = 45;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 2, 3, 4, 5, 6, 7];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 33;
_local2.mapX = 2000;
_local2.mapY = 118;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [32];
_local2.wavesRndSeed = 11247912 /* 0xABA128 */;
_local2.sceneRndSeed = 26922891 /* 0x19ACF8B */;
_local2.map = [" 12 12 ", " pp ####### ", " pP # 211 #2 ", " # 1 # 132 ## ", " # ### 121 T# ", " ### 1 # ", " 1 22 #1", "1 #### # ", " 21 # 2#T#1", " eee 11T#1 ### ", " eeE##### 1 ", " eee1 22 1", " 1 1 1 "];
_local2.highestGradeScore = 3900000 /* 0x3B8260 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.ABANDONED_HOUSE;
_local2.wavesNum = 32;
_local2.enemyHpFirstWave = 48;
_local2.enemyHpIncreaseMultiplier = 1.085;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 2];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 34;
_local2.mapX = 2034;
_local2.mapY = 182;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [32];
_local2.wavesRndSeed = 12247912 /* 0xBAE368 */;
_local2.sceneRndSeed = 25922891 /* 0x18B8D4B */;
_local2.map = [" 211 ", "121########### ", "132# pp 1# ", "122####Pp1 ###1", " 21 T### ", " ####### 22 ", " 2# 121 ", " # eee 21 1", "1 # 2eeE#### ", " # 2eee11T# ", "1 #T 11 # 2", "21 ########## 1", "332 2 11 122"];
_local2.highestGradeScore = 4250000 /* 0x40D990 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.DOLMEN;
_local2.wavesNum = 36;
_local2.enemyHpFirstWave = 52;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 1, 4, 5];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 35;
_local2.mapX = 2040;
_local2.mapY = 354;
_local2.type = com.giab.common.const.LevelType.BONUS;
_local2.levelCompletionReqs = [36, 37, 38, 39];
_local2.wavesRndSeed = 13247912 /* 0xCA25A8 */;
_local2.sceneRndSeed = 24922891 /* 0x17C4B0B */;
_local2.specId = com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN7;
_local2.map = [" 21 112 ", " ############ ", " # 22 1 # ", "2#121 ####2T# ", "1#131 #T #### ", " #T12 # 21 ", "1### #11 ", " 12# # 1 ", " # # 2 22 1", "1 1# eEe ", " 2pP eee 11 ", "11pp eee 1 1", " 1 121 21 "];
_local2.highestGradeScore = 4850000 /* 0x4A0150 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.DARK_FOREST;
_local2.wavesNum = 40;
_local2.enemyHpFirstWave = 80;
_local2.enemyHpIncreaseMultiplier = 1.076;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [6];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 36;
_local2.mapX = 2078;
_local2.mapY = 264;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [32];
_local2.wavesRndSeed = 14247912 /* 0xD967E8 */;
_local2.sceneRndSeed = 23922891 /* 0x16D08CB */;
_local2.map = [" 11 122 1 ", " ############ ", " #T 12 T#12", "1#1 ####### ", " #2 #21 1 ", " # 2##### ", "1### 12 T# 2 ", " 2# ### 1", " 1 # #121 ", " 12# 21eEe1 ", " Pp21eee 221 ", " pp eee2132 ", " 21 1 221 "];
_local2.highestGradeScore = 4760000 /* 0x48A1C0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.ROUND_TOWER;
_local2.wavesNum = 36;
_local2.enemyHpFirstWave = 56;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 1, 3, 6, 7];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 37;
_local2.mapX = 2178;
_local2.mapY = 393;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [38];
_local2.wavesRndSeed = 15247912 /* 0xE8AA28 */;
_local2.sceneRndSeed = 22922891 /* 0x15DC68B */;
_local2.map = [" 21 2112", "1pp1 11131", " Pp 222", "1# 11 ", " # ### 212 ", "2# #T# 13112 ", " # # # 121 eee ", " #1# # ####Eee ", " #1#2#T# 1eee ", " # #2### 212 ", " #T# 1 2 132 ", " ### 1 121 ", " 1 "];
_local2.highestGradeScore = 4980000 /* 0x4BFD20 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.RUINED_ROUND_TOWER;
_local2.wavesNum = 40;
_local2.enemyHpFirstWave = 60;
_local2.enemyHpIncreaseMultiplier = 1.086;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 2, 3, 4, 5, 6];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 38;
_local2.mapX = 2194;
_local2.mapY = 241;
_local2.type = com.giab.common.const.LevelType.EPIC;
_local2.levelCompletionReqs = [36];
_local2.wavesRndSeed = 16247912 /* 0xF7EC68 */;
_local2.sceneRndSeed = 21922891 /* 0x14E844B */;
_local2.specId = com.giab.games.gemc.armor.const.LevelSpecId.EPIC4;
_local2.epicBossType = 11;
_local2.epicBossHp = 42000;
_local2.epicBossArmorLevel = 70;
_local2.epicBossName = "the Lurker";
_local2.map = [" 122 T eee ", " ##########Eee ", "1#T22 T T eee ", "2# 122 ", "1# ######## ", " # # 2 # ", " # # pp111# 21", "1# # pP231# 22", " # #2 #111# 2 ", " # #### # ", "1#T 22 T#1 1", " ########### ", " 11 "];
_local2.highestGradeScore = 5540000 /* 0x5488A0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.SQUARE_TOWER;
_local2.wavesNum = 48;
_local2.enemyHpFirstWave = 64;
_local2.enemyHpIncreaseMultiplier = 1.065;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 1, 2, 3, 4, 5, 6, 7];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 39;
_local2.mapX = 2204;
_local2.mapY = 120;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [38];
_local2.wavesRndSeed = 17247912 /* 0x1072EA8 */;
_local2.sceneRndSeed = 20922891 /* 0x13F420B */;
_local2.map = [" 1 111 ", " pp21 131 eee ", " pP## 111##Eee ", " # # eee ", " 1# # ", "1 ##1 ## ", " 2 T# #T 1 ", " # 2# 22 ", " 112 #12# 1221", " 231 # # 232", " 112 # T# 121", " 1 #### ", " 2 11 "];
_local2.highestGradeScore = 4830000 /* 0x49B330 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.CLIFF;
_local2.wavesNum = 40;
_local2.enemyHpFirstWave = 68;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [2, 4, 6, 7];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 40;
_local2.mapX = 2294;
_local2.mapY = 325;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [38];
_local2.wavesRndSeed = 18247912 /* 0x11670E8 */;
_local2.sceneRndSeed = 19922891 /* 0x12FFFCB */;
_local2.map = [" 222 ", " eee 132 121 ", " eee 222 1231 ", " eEe 122 ", "11# ", " # ### 22 ", " # #T# 1 #### ", "2 # # ### #12# ", " 2# # 1T# # ## ", " # # 1 # # # ", " #T# #1# Pp ", " 1###12 ### pp ", " 31 21 11 "];
_local2.highestGradeScore = 5100000 /* 0x4DD1E0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.ABANDONED_HOUSE;
_local2.wavesNum = 44;
_local2.enemyHpFirstWave = 72;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [1, 6];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 41;
_local2.mapX = 2378;
_local2.mapY = 256;
_local2.type = com.giab.common.const.LevelType.BONUS;
_local2.levelCompletionReqs = [40, 42, 43, 44, 45];
_local2.wavesRndSeed = 19247912 /* 0x125B328 */;
_local2.sceneRndSeed = 18922891 /* 0x120BD8B */;
_local2.specId = com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN8;
_local2.map = [" 131 32 1", " 2 ##### ", " pP### # T#11 ", " pp # ### #1 3", " # 1T# # ", " ##### # ### ", " # 1 1 #12T#1", " # 1 #232# ", " #########112# ", " 1 211eee # ", "121 131eeE##2", " 3 1 222eee1 ", " 12 22 "];
_local2.highestGradeScore = 5050000 /* 0x4D0E90 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.DARK_FOREST;
_local2.wavesNum = 40;
_local2.enemyHpFirstWave = 80;
_local2.enemyHpIncreaseMultiplier = 1.076;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [7];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 42;
_local2.mapX = 2407;
_local2.mapY = 122;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [38];
_local2.wavesRndSeed = 20247912 /* 0x134F568 */;
_local2.sceneRndSeed = 17922891 /* 0x1117B4B */;
_local2.map = [" 211 3", " 11322 ###### ", "1 221 # 11T# ", " pp ### ## ", " pP 22T# # ", " # #####1## ", " 2# #1 22 T#1", "11## ### ## ", " # # # ", " 2### # eEe ", " # # eee ", " 1211#### 1eee1", " 232 222"];
_local2.highestGradeScore = 5100000 /* 0x4DD1E0 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.RUINED_ROUND_TOWER;
_local2.wavesNum = 44;
_local2.enemyHpFirstWave = 76;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [4, 1];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 43;
_local2.mapX = 2451;
_local2.mapY = 379;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [40];
_local2.wavesRndSeed = 21247912 /* 0x14437A8 */;
_local2.sceneRndSeed = 16922891 /* 0x102390B */;
_local2.map = [" 22 112 ", " eee ### ##### ", " eee #T# #1 1#1", " eEe1# #1#12 # ", " #1 # # # # ", " ## # # #211# ", " # 2T#1#1#232# ", " ##### # #121# ", "1 #2# # ", "1#######2# #2", " #T1 221# 1pP ", " ######### pp1", " 11 "];
_local2.highestGradeScore = 4800000 /* 0x493E00 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.CRYPT;
_local2.wavesNum = 40;
_local2.enemyHpFirstWave = 80;
_local2.enemyHpIncreaseMultiplier = 1.08;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 1, 3];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 44;
_local2.mapX = 2489;
_local2.mapY = 218;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [42, 43];
_local2.wavesRndSeed = 22247912 /* 0x15379E8 */;
_local2.sceneRndSeed = 15922891 /* 0xF2F6CB */;
_local2.map = [" 3 1 23 ", "1 21#### 12 1", " pp # ##### ", " pP## # 2 ", " ####T#1 ", " # ### ", " 1# 121 1", " 2##### 231 ", "1 #T 122eee ", " ###### ##Eee ", "22 2 #T#2eee ", "321 11###2111 ", " 2 2 131 "];
_local2.highestGradeScore = 5300000 /* 0x50DF20 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.ROUND_TOWER;
_local2.wavesNum = 46;
_local2.enemyHpFirstWave = 80;
_local2.enemyHpIncreaseMultiplier = 1.07;
_local2.enemyArmorIncreaseSpeed = 0.18;
_local2.availableGems = [0, 2, 6];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 45;
_local2.mapX = 2531;
_local2.mapY = 134;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [42];
_local2.wavesRndSeed = 23247912 /* 0x162BC28 */;
_local2.sceneRndSeed = 141922891 /* 0x875924B */;
_local2.map = [" 2 ", " pp 221 ### 11 ", " pP1132 #T#.12 ", " # 211## # 1", " # # ## ", " ###T## ## ", " 12 ### T# 1", "211 # 1", "132 112 # ", "221 1311eEe ", " 211 eee ", " 21 1eee ", " 1 22 22 "];
_local2.highestGradeScore = 5500000 /* 0x53EC60 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.RUINED_ROUND_TOWER;
_local2.wavesNum = 48;
_local2.enemyHpFirstWave = 80;
_local2.enemyHpIncreaseMultiplier = 1.07;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [5, 6, 7];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 46;
_local2.mapX = 2666;
_local2.mapY = 339;
_local2.type = com.giab.common.const.LevelType.NORMAL;
_local2.levelCompletionReqs = [44];
_local2.wavesRndSeed = 24247912 /* 0x171FE68 */;
_local2.sceneRndSeed = 13922891 /* 0xD4724B */;
_local2.map = [" 1 21 22 ", " eee 222###### ", "1eee 231#T 22# ", " eEe 112# # ", " # #121 #1", " #####T#132 #1", " ###121 #1", " T# ", " ##Pp 221 ####1", "1#1pp 132 # ", "1# 211 # 121", " ########## 132", " 11 2211"];
_local2.highestGradeScore = 5600000 /* 0x557300 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.CRYPT;
_local2.wavesNum = 48;
_local2.enemyHpFirstWave = 80;
_local2.enemyHpIncreaseMultiplier = 1.06;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 1, 2, 4, 6];
levels.push(_local2);
_local2 = new com.giab.games.gemc.armor.entity.LevelData();
_local2.num = 47;
_local2.mapX = 2684;
_local2.mapY = 129;
_local2.type = com.giab.common.const.LevelType.FINAL;
_local2.levelCompletionReqs = [46];
_local2.wavesRndSeed = 25247912 /* 0x18140A8 */;
_local2.sceneRndSeed = 12922891 /* 0xC5300B */;
_local2.specId = com.giab.games.gemc.armor.const.LevelSpecId.EPIC5;
_local2.epicBossType = 14;
_local2.epicBossHp = 146000 /* 0x023A50 */;
_local2.epicBossArmorLevel = 120;
_local2.epicBossName = "the Guardian";
_local2.map = [" 11 32 2 ", " eee211 1 ", "1eeE#########..", " eee211 T# ", " 121232###2 # 1", " 121#T#2 # 1", "....pp # # 2# ", " pP## # #22", " 21 1 #1 # ", " ######### # ", " #T 1 1 22 # ", " ############1 ", " 111 "];
_local2.highestGradeScore = 6000000 /* 0x5B8D80 */;
_local2.enemyBaseType = com.giab.games.gemc.armor.const.EnemyBase.CORRUPTED_WIZTOWER;
_local2.wavesNum = 50;
_local2.enemyHpFirstWave = 80;
_local2.enemyHpIncreaseMultiplier = 1.062;
_local2.enemyArmorIncreaseSpeed = 0.2;
_local2.availableGems = [0, 1, 2, 3, 4, 5, 6, 7];
levels.push(_local2);
}
}
Symbol 1343 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlUpgrades] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlUpgrades
{
var mcw, main, upgradeTitles, upgradeDescriptions, costsPerLevel, playerRankReqs, screenStatus, screenStep, upgradesInitial, pointsToSpendInitial, isChangeMade, btnUndoStep;
function CtrlUpgrades (pMcw, pMain) {
mcw = pMcw;
main = pMain;
upgradeTitles = new Array();
upgradeDescriptions = new Array();
costsPerLevel = new Array();
playerRankReqs = new Array();
upgradeTitles[com.giab.games.gemc.armor.const.UpgradeId.INITIAL_MANA] = "More initial and maximum mana";
costsPerLevel[com.giab.games.gemc.armor.const.UpgradeId.INITIAL_MANA] = [1, 1, 1, 1, 1, 2, 2, 3, 3];
playerRankReqs[com.giab.games.gemc.armor.const.UpgradeId.INITIAL_MANA] = 0;
upgradeTitles[com.giab.games.gemc.armor.const.UpgradeId.MANA_CHARGE_PER_KILL] = "More mana gain per kill";
costsPerLevel[com.giab.games.gemc.armor.const.UpgradeId.MANA_CHARGE_PER_KILL] = [1, 2, 2, 2, 3, 3, 4, 5, 5];
playerRankReqs[com.giab.games.gemc.armor.const.UpgradeId.MANA_CHARGE_PER_KILL] = 3;
upgradeTitles[com.giab.games.gemc.armor.const.UpgradeId.WIZTOWER_ARMOR] = "Armor - saves mana when monsters reach the tower";
costsPerLevel[com.giab.games.gemc.armor.const.UpgradeId.WIZTOWER_ARMOR] = [1, 1, 2, 2, 3, 3, 4, 4, 5];
playerRankReqs[com.giab.games.gemc.armor.const.UpgradeId.WIZTOWER_ARMOR] = 6;
upgradeTitles[com.giab.games.gemc.armor.const.UpgradeId.MANA_CHARGE_PER_SECOND] = "More mana replenish per second";
costsPerLevel[com.giab.games.gemc.armor.const.UpgradeId.MANA_CHARGE_PER_SECOND] = [1, 1, 1, 2, 2, 3, 3, 3, 4];
playerRankReqs[com.giab.games.gemc.armor.const.UpgradeId.MANA_CHARGE_PER_SECOND] = 9;
upgradeTitles[com.giab.games.gemc.armor.const.UpgradeId.BASIC_STARTER_GEMS] = "Number of basic starter gems";
costsPerLevel[com.giab.games.gemc.armor.const.UpgradeId.BASIC_STARTER_GEMS] = [1, 2, 2, 2, 3, 3, 3, 4, 4];
playerRankReqs[com.giab.games.gemc.armor.const.UpgradeId.BASIC_STARTER_GEMS] = 13;
upgradeTitles[com.giab.games.gemc.armor.const.UpgradeId.GEMCREATING_MANA_COST] = "Lower mana cost for gem creating and combining";
costsPerLevel[com.giab.games.gemc.armor.const.UpgradeId.GEMCREATING_MANA_COST] = [1, 1, 2, 2, 2, 3, 3, 3, 3];
playerRankReqs[com.giab.games.gemc.armor.const.UpgradeId.GEMCREATING_MANA_COST] = 18;
upgradeTitles[com.giab.games.gemc.armor.const.UpgradeId.GEMBOMB_DAMAGE] = "Powerful gem bombs";
costsPerLevel[com.giab.games.gemc.armor.const.UpgradeId.GEMBOMB_DAMAGE] = [1, 1, 2, 2, 2, 3, 4, 4, 4];
playerRankReqs[com.giab.games.gemc.armor.const.UpgradeId.GEMBOMB_DAMAGE] = 22;
upgradeTitles[com.giab.games.gemc.armor.const.UpgradeId.DUAL_GEM_MASTERY] = "Dual gem mastery";
costsPerLevel[com.giab.games.gemc.armor.const.UpgradeId.DUAL_GEM_MASTERY] = [2, 3, 3, 4, 4, 5, 5, 6, 6];
playerRankReqs[com.giab.games.gemc.armor.const.UpgradeId.DUAL_GEM_MASTERY] = 26;
upgradeTitles[com.giab.games.gemc.armor.const.UpgradeId.INITIAL_TOWER_BUILDING_MANA_COST] = "Lower initial and incremental cost for buildings";
costsPerLevel[com.giab.games.gemc.armor.const.UpgradeId.INITIAL_TOWER_BUILDING_MANA_COST] = [1, 2, 2, 2, 3, 3, 3, 4, 4];
playerRankReqs[com.giab.games.gemc.armor.const.UpgradeId.INITIAL_TOWER_BUILDING_MANA_COST] = 29;
upgradeTitles[com.giab.games.gemc.armor.const.UpgradeId.MEDIUM_GRADE_STARTER_GEMS] = "Number of medium grade starter gems";
costsPerLevel[com.giab.games.gemc.armor.const.UpgradeId.MEDIUM_GRADE_STARTER_GEMS] = [2, 3, 3, 4, 4, 5, 5, 6, 6];
playerRankReqs[com.giab.games.gemc.armor.const.UpgradeId.MEDIUM_GRADE_STARTER_GEMS] = 33;
upgradeTitles[com.giab.games.gemc.armor.const.UpgradeId.PURE_GEM_MASTERY] = "Pure gem mastery";
costsPerLevel[com.giab.games.gemc.armor.const.UpgradeId.PURE_GEM_MASTERY] = [2, 3, 3, 4, 4, 5, 5, 6, 7];
playerRankReqs[com.giab.games.gemc.armor.const.UpgradeId.PURE_GEM_MASTERY] = 36;
upgradeTitles[com.giab.games.gemc.armor.const.UpgradeId.HIGH_GRADE_STARTER_GEMS] = "Number of high grade starter gems";
costsPerLevel[com.giab.games.gemc.armor.const.UpgradeId.HIGH_GRADE_STARTER_GEMS] = [6, 7, 7, 8, 8, 9, 9, 10, 10];
playerRankReqs[com.giab.games.gemc.armor.const.UpgradeId.HIGH_GRADE_STARTER_GEMS] = 39;
buttonsInit();
}
function buttonsInit() {
var vThis = this;
var _local3;
_local3 = 0;
while (_local3 < com.giab.games.gemc.armor.const.GameSpecs.UPGRADEID_NUM) {
mcw["btnUpgrade" + _local3].inX = mcw["btnUpgrade" + _local3]._x;
mcw["btnUpgrade" + _local3].inY = mcw["btnUpgrade" + _local3]._y;
mcw["btnUpgrade" + _local3].id = _local3;
mcw["btnUpgrade" + _local3].icon.gotoAndStop(_local3 + 1);
mcw["btnUpgrade" + _local3].onRollOver = function () {
vThis.main.sndTickOver.start();
vThis.mcw.mcInfo.tfTitle.text = vThis.upgradeTitles[MovieClip(this).id];
vThis.mcw.mcInfo.tfDesc.text = vThis.upgradeDescriptions[MovieClip(this).id];
vThis.mcw.mcInfo.tfDesc.textColor = 16777215 /* 0xFFFFFF */;
if (vThis.main.player.getRating() < vThis.playerRankReqs[MovieClip(this).id]) {
vThis.mcw.mcInfo.tfDesc.text = ("Wizard level " + (vThis.playerRankReqs[MovieClip(this).id] + 1)) + " required.";
vThis.mcw.mcInfo.tfDesc.textColor = 16716049 /* 0xFF1111 */;
} else if (vThis.main.player.getUpgrade(MovieClip(this).id) > (vThis.costsPerLevel[MovieClip(this).id].length - 1)) {
vThis.mcw.mcInfo.tfDesc.text = "maximum upgrade level reached";
vThis.mcw.mcInfo.tfDesc.textColor = 1179647 /* 0x11FFFF */;
} else if (vThis.main.player.getPointsToSpend() >= vThis.costsPerLevel[MovieClip(this).id][vThis.main.player.getUpgrade(MovieClip(this).id)]) {
if (vThis.costsPerLevel[MovieClip(this).id][vThis.main.player.getUpgrade(MovieClip(this).id)] == 1) {
vThis.mcw.mcInfo.tfDesc.text = vThis.costsPerLevel[MovieClip(this).id][vThis.main.player.getUpgrade(MovieClip(this).id)] + " point to upgrade";
} else {
vThis.mcw.mcInfo.tfDesc.text = vThis.costsPerLevel[MovieClip(this).id][vThis.main.player.getUpgrade(MovieClip(this).id)] + " points to upgrade";
}
} else {
vThis.mcw.mcInfo.tfDesc.text = ("Not enough points (" + vThis.costsPerLevel[MovieClip(this).id][vThis.main.player.getUpgrade(MovieClip(this).id)]) + " needed to upgrade)";
vThis.mcw.mcInfo.tfDesc.textColor = 16745481 /* 0xFF8409 */;
}
};
mcw["btnUpgrade" + _local3].onRollOut = (mcw["btnUpgrade" + _local3].onDragOut = function () {
vThis.mcw.mcInfo.tfTitle.text = "";
vThis.mcw.mcInfo.tfDesc.text = com.giab.games.gemc.armor.const.Text.UPGRADE_INFO;
vThis.mcw.mcInfo.tfDesc.textColor = 11184810 /* 0xAAAAAA */;
});
mcw["btnUpgrade" + _local3].onPress = function () {
if ((MovieClip(this).id == 1) && (_root._url.indexOf("armorgames.com/") == -1)) {
return(undefined);
}
if (vThis.main.player.getRating() < vThis.playerRankReqs[MovieClip(this).id]) {
} else if (vThis.main.player.getUpgrade(MovieClip(this).id) > (vThis.costsPerLevel[MovieClip(this).id].length - 1)) {
} else if (vThis.main.player.getPointsToSpend() >= vThis.costsPerLevel[MovieClip(this).id][vThis.main.player.getUpgrade(MovieClip(this).id)]) {
vThis.buyUpgrade(MovieClip(this));
}
};
_local3++;
}
mcw.mcArmorNag.onRelease = function () {
vThis.main.mcRoot.getURL(com.giab.games.gemc.armor.const.Url.MOREGAMES + "?gemCraft=upgradesScreen", "_blank");
};
mcw.btnUndo.onPress = function () {
vThis.undoChanges();
};
mcw.btnUndo.onRollOver = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
}
};
mcw.btnUndo.onRollOut = (mcw.btnDone.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
mcw.btnDone.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
vThis.main.nextScreen = com.giab.common.const.ScreenId.LEVELSELECTOR;
vThis.main.sndTickPress.start();
vThis.isChangeMade = false;
}
};
mcw.btnDone.onRollOver = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
}
};
mcw.btnDone.onRollOut = (mcw.btnDone.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
mcw.btnRedist.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.giveBackAllPoints();
vThis.main.sndTickPress.start();
vThis.isChangeMade = false;
}
};
mcw.btnRedist.onRollOver = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
}
};
mcw.btnRedist.onRollOut = (mcw.btnRedist.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
}
function initiate() {
var _local3;
main.player.isUpgradesHighlighted = false;
screenStatus = com.giab.common.const.ScreenStatus.APPEARING;
screenStep = 0;
mcw.mc._visible = true;
upgradesInitial = new Array();
_local3 = 0;
while (_local3 < com.giab.games.gemc.armor.const.GameSpecs.UPGRADEID_NUM) {
upgradesInitial[_local3] = main.player.getUpgrade(_local3);
_local3++;
}
pointsToSpendInitial = main.player.getPointsToSpend();
isChangeMade = false;
renderUpgrades();
btnUndoStep = 0;
mcw.btnUndo._x = -50;
mcw.btnDone._y = 600;
mcw.btnRedist._y = 600;
mcw.mcPointsLeft._y = 600;
mcw.mcInfo._y = 500;
mcw.mcTitle._x = -500;
mcw.mcInfo.tfTitle.text = "";
mcw.mcInfo.tfDesc.text = com.giab.games.gemc.armor.const.Text.UPGRADE_INFO;
mcw.mcInfo.tfDesc._alpha = 60;
_local3 = 0;
while (_local3 < com.giab.games.gemc.armor.const.GameSpecs.UPGRADEID_NUM) {
if (main.player.getRating() < playerRankReqs[_local3]) {
mcw["btnUpgrade" + _local3].tfReq.text = ("Level " + (playerRankReqs[_local3] + 1)) + " required";
} else {
mcw["btnUpgrade" + _local3].tfReq.text = "";
}
mcw["btnUpgrade" + _local3]._visible = true;
mcw["btnUpgrade" + _local3]._y = -200;
_local3++;
}
renderUpgrades();
if (_root._url.indexOf("armorgames.com/") == -1) {
mcw.mcArmorNag._visible = true;
} else {
mcw.mcArmorNag._visible = false;
}
}
function renderUpgrades() {
var _local2;
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.UPGRADEID_NUM) {
if ((costsPerLevel[_local2].length - 1) < main.player.getUpgrade(_local2)) {
mcw["btnUpgrade" + _local2].levelMarker.gotoAndStop(main.player.getUpgrade(_local2) + 31);
} else {
mcw["btnUpgrade" + _local2].levelMarker.gotoAndStop(main.player.getUpgrade(_local2) + 1);
}
_local2++;
}
mcw.mcPointsLeft.tf.text = main.player.getPointsToSpend();
}
function buyUpgrade(pUpgradeMc) {
main.sndTickPress.start();
main.player.setPointsToSpend(main.player.getPointsToSpend() - costsPerLevel[pUpgradeMc.id][main.player.getUpgrade(pUpgradeMc.id * 1)]);
main.player.setUpgrade(pUpgradeMc.id, main.player.getUpgrade(pUpgradeMc.id) + 1);
isChangeMade = true;
renderUpgrades();
pUpgradeMc.onRollOver();
}
function undoChanges() {
var _local2;
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.UPGRADEID_NUM) {
main.player.setUpgrade(_local2, upgradesInitial[_local2]);
_local2++;
}
main.player.setPointsToSpend(pointsToSpendInitial);
isChangeMade = false;
renderUpgrades();
}
function doEnterFrame() {
var _local2;
if (screenStatus == com.giab.common.const.ScreenStatus.APPEARING) {
screenStep++;
if (screenStep < 60) {
mcw.mcInfo._y = com.giab.common.easing.Strong2.easeOut(screenStep, 495, -220, 20);
mcw.mcPointsLeft._y = com.giab.common.easing.Back2.easeOut(screenStep - 10, 525, -100, 20);
mcw.btnDone._y = com.giab.common.easing.Back2.easeOut(screenStep - 20, 508, -100, 20);
mcw.btnRedist._y = com.giab.common.easing.Back2.easeOut(screenStep - 17, 508, -100, 20);
mcw.mcTitle._x = com.giab.common.easing.Strong2.easeOut(screenStep, -500, 518, 40);
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.UPGRADEID_NUM) {
mcw["btnUpgrade" + _local2]._y = com.giab.common.easing.Back2.easeOut(screenStep - _local2, mcw["btnUpgrade" + _local2].inY - 300, 300, 20);
_local2++;
}
mcw.mcArmorNag._y = com.giab.common.easing.Back2.easeOut(screenStep - 1, -224, 300, 20);
} else {
screenStep = 0;
mcw.btnUndo._y = 404;
screenStatus = com.giab.common.const.ScreenStatus.IDLE;
}
} else if (screenStatus == com.giab.common.const.ScreenStatus.DISAPPEARING) {
screenStep++;
if (screenStep < 60) {
mcw.mcInfo._y = com.giab.common.easing.Strong2.easeOut(screenStep - 20, 275, 220, 20);
mcw.mcPointsLeft._y = com.giab.common.easing.Back2.easeIn(screenStep, 425, 100, 20);
mcw.btnDone._y = com.giab.common.easing.Back2.easeIn(screenStep - 10, 408, 100, 20);
mcw.btnRedist._y = com.giab.common.easing.Back2.easeIn(screenStep - 13, 408, 100, 20);
mcw.mcTitle._x = com.giab.common.easing.Strong2.easeOut(screenStep, 1, -518, 15);
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.UPGRADEID_NUM) {
mcw["btnUpgrade" + _local2]._y = com.giab.common.easing.Back2.easeIn(screenStep - _local2, mcw["btnUpgrade" + _local2].inY, -300, 20);
_local2++;
}
mcw.mcArmorNag._y = com.giab.common.easing.Back2.easeIn(screenStep - 1, 76, -300, 20);
} else {
screenStep = 0;
main.switchScreenVisibility();
}
}
if (isChangeMade) {
btnUndoStep = Math.min(15, btnUndoStep + 1);
} else {
btnUndoStep = Math.max(0, btnUndoStep - 1);
}
mcw.btnUndo._x = com.giab.common.easing.Back2.easeOut(btnUndoStep, -50, 96, 15);
}
function giveBackAllPoints() {
main.sndUpgraderedist.start();
main.player.setPointsToSpend(0);
var _local2 = 0;
while (_local2 < main.player.getRating()) {
main.player.setPointsToSpend(main.player.getPointsToSpend() + 4);
_local2++;
}
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.UPGRADEID_NUM) {
main.player.setUpgrade(_local2, 0);
_local2++;
}
renderUpgrades();
}
}
Symbol 1344 MovieClip [__Packages.com.giab.games.gemc.armor.const.Text] Frame 0
class com.giab.games.gemc.armor.const.Text
{
function Text () {
}
static var UPGRADE_INFO = "You can buy upgrades with your skill points. Roll over the icons for info.";
static var BADGES_INFO = "Roll over an amulet to see its description.";
}
Symbol 1345 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlLoadSave] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlLoadSave
{
var mcw, main, playerSlotDatas, so, screenStatus, screenStep, btnBackStep, selectedSlotNum;
function CtrlLoadSave (pMcw, pMain) {
mcw = pMcw;
main = pMain;
playerSlotDatas = new Array();
buttonsInit();
so = SharedObject.getLocal("giabGemCraftSaveData", "/");
if (so.data.slotContents == undefined) {
so.data.slotContents = new Array();
so.data.slotContents[0] = new Object();
so.data.slotContents[1] = new Object();
so.data.slotContents[2] = new Object();
so.data.slotContents[3] = new Object();
so.data.slotContents[4] = new Object();
so.data.slotContents[5] = new Object();
so.data.slotContents[6] = new Object();
so.data.slotContents[7] = new Object();
so.data.slotContents[8] = new Object();
}
}
function buttonsInit() {
var vThis = this;
var _local2;
_local2 = 0;
while (_local2 < 9) {
mcw["mcSlot" + _local2].id = _local2;
mcw["mcSlot" + _local2].yIn = mcw["mcSlot" + _local2]._y;
mcw["mcSlot" + _local2].content.mcModeIcon.lock._visible = false;
mcw["mcSlot" + _local2].selectGlare2._visible = false;
mcw["mcSlot" + _local2].onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickPress.start();
vThis.selectSlot(MovieClip(this).id);
}
};
mcw["mcSlot" + _local2].onRollOver = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickOver.start();
MovieClip(this).selectGlare2._visible = true;
}
};
mcw["mcSlot" + _local2].onRollOut = (mcw[".mcSlot" + _local2].onDragOut = function () {
MovieClip(this).selectGlare2._visible = false;
});
_local2++;
}
mcw.btnBack.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickPress.start();
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
if (vThis.main.currentScreen == com.giab.common.const.ScreenId.LOADSAVE_LOAD) {
vThis.main.nextScreen = com.giab.common.const.ScreenId.MAINMENU;
} else {
vThis.main.nextScreen = com.giab.common.const.ScreenId.LEVELSELECTOR;
}
}
};
mcw.btnBack.onRollOver = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
}
};
mcw.btnBack.onRollOut = (mcw.btnBack.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
mcw.btnLoad.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickPress.start();
vThis.loadFromSlot();
}
};
mcw.btnLoad.onRollOver = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
}
};
mcw.btnLoad.onRollOut = (mcw.btnLoad.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
mcw.btnSave.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickPress.start();
vThis.saveToSlot();
}
};
mcw.btnSave.onRollOver = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
}
};
mcw.btnSave.onRollOut = (mcw.btnSave.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
}
function initiate() {
screenStatus = com.giab.common.const.ScreenStatus.APPEARING;
screenStep = 0;
mcw.mc._visible = true;
renderInit();
}
function renderInit() {
var _local2;
mcw.btnBack._x = 279;
mcw.btnLoad._x = 800;
mcw.btnSave._x = 800;
mcw.btnBack._y = 600;
mcw.btnLoad._y = 600;
mcw.btnSave._y = 600;
btnBackStep = 0;
mcw.btnLoad._visible = false;
mcw.btnSave._visible = false;
_local2 = 0;
while (_local2 < 9) {
mcw["mcSlot" + _local2].content._visible = false;
mcw["mcSlot" + _local2].selectGlare._visible = false;
mcw["mcSlot" + _local2]._y = -100;
var _local3 = new com.giab.games.gemc.armor.entity.Player(main.levelCollection);
_local3.populateFromObject(so.data.slotContents[_local2]);
trace((("stored checksum for slot " + _local2) + ": ") + (_local3.checksum * 1));
if (_local3.calculateSaveChecksum() == _local3.checksum) {
playerSlotDatas[_local2] = _local3;
mcw["mcSlot" + _local2].content._visible = true;
mcw["mcSlot" + _local2].content.tfTotalScore.text = com.giab.common.toolbox.NumberFormatter.format(_local3.getTotalScore());
mcw["mcSlot" + _local2].content.tfPlayerLevel.text = (_local3.getRating() + 1).toString();
}
_local2++;
}
mcw.mcInfo._y = 600;
mcw.mcAutoSave._x = 800;
mcw.mcTitle._y = -200;
if (main.currentScreen == com.giab.common.const.ScreenId.LOADSAVE_LOAD) {
mcw.mcAutoSave._visible = true;
mcw.mcSlot8._visible = true;
mcw.mcTitle.gotoAndStop(1);
mcw.mcInfo.tf.text = "Select a slot to load the saved game from";
} else {
mcw.mcAutoSave._visible = false;
mcw.mcSlot8._visible = false;
mcw.mcTitle.gotoAndStop(2);
mcw.mcInfo.tf.text = "Select a slot to save the game into";
}
}
function selectSlot(pSlotNum) {
var _local2;
if (((main.currentScreen == com.giab.common.const.ScreenId.LOADSAVE_LOAD) && (MovieClip(mcw["mcSlot" + pSlotNum]).content._visible == true)) || (main.currentScreen == com.giab.common.const.ScreenId.LOADSAVE_SAVE)) {
_local2 = 0;
while (_local2 < 9) {
MovieClip(mcw["mcSlot" + _local2].selectGlare)._visible = false;
_local2++;
}
MovieClip(mcw["mcSlot" + pSlotNum]).selectGlare._visible = true;
mcw.mcInfo.tf.text = "";
if ((main.currentScreen == com.giab.common.const.ScreenId.LOADSAVE_SAVE) && (MovieClip(mcw["mcSlot" + pSlotNum]).content._visible == true)) {
mcw.mcInfo.tf.text = "(The game previously saved in the slot will be overwritten)";
}
selectedSlotNum = pSlotNum;
if (main.currentScreen == com.giab.common.const.ScreenId.LOADSAVE_LOAD) {
mcw.btnLoad._visible = true;
} else {
mcw.btnSave._visible = true;
}
}
}
function saveToSlot() {
playerSlotDatas[selectedSlotNum] = main.player;
com.giab.games.gemc.armor.entity.Player(playerSlotDatas[selectedSlotNum]).checksum = com.giab.games.gemc.armor.entity.Player(playerSlotDatas[selectedSlotNum]).calculateSaveChecksum();
so.data.slotContents[selectedSlotNum] = com.giab.games.gemc.armor.entity.Player(playerSlotDatas[selectedSlotNum]).createCloneObject();
flush(true);
}
function makeAutoSave() {
playerSlotDatas[8] = main.player;
com.giab.games.gemc.armor.entity.Player(playerSlotDatas[8]).checksum = com.giab.games.gemc.armor.entity.Player(playerSlotDatas[8]).calculateSaveChecksum();
so.data.slotContents[8] = com.giab.games.gemc.armor.entity.Player(playerSlotDatas[8]).createCloneObject();
flush(false);
}
function loadFromSlot() {
main.player = playerSlotDatas[selectedSlotNum];
screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
main.nextScreen = com.giab.common.const.ScreenId.LEVELSELECTOR;
}
function doEnterFrame() {
var _local2;
if (screenStatus == com.giab.common.const.ScreenStatus.APPEARING) {
screenStep++;
mcw.btnBack._y = com.giab.common.easing.Back2.easeOut(screenStep, 617, -200, 20);
mcw.btnLoad._y = com.giab.common.easing.Back2.easeOut(screenStep - 10, 617, -200, 20);
mcw.btnSave._y = com.giab.common.easing.Back2.easeOut(screenStep - 10, 617, -200, 20);
mcw.mcInfo._y = com.giab.common.easing.Back2.easeOut(screenStep, 544, -200, 15);
mcw.mcAutoSave._x = com.giab.common.easing.Strong2.easeOut(screenStep - 30, 704, -100, 10);
mcw.mcTitle._y = com.giab.common.easing.Strong2.easeOut(screenStep - 25, -95, 100, 15);
_local2 = 0;
while (_local2 < 9) {
mcw["mcSlot" + _local2]._y = com.giab.common.easing.Back2.easeOut((screenStep - 9) + _local2, mcw["mcSlot" + _local2].yIn - 400, 400, 30);
_local2++;
}
if (screenStep > 40) {
screenStep = 0;
screenStatus = com.giab.common.const.ScreenStatus.IDLE;
}
} else if (screenStatus == com.giab.common.const.ScreenStatus.DISAPPEARING) {
screenStep++;
mcw.btnBack._y = com.giab.common.easing.Back2.easeIn(screenStep - 10, 417, 200, 20);
mcw.btnLoad._y = com.giab.common.easing.Back2.easeIn(screenStep, 417, 200, 20);
mcw.btnSave._y = com.giab.common.easing.Back2.easeIn(screenStep, 417, 200, 20);
mcw.mcInfo._y = com.giab.common.easing.Back2.easeIn(screenStep - 15, 344, 200, 15);
mcw.mcAutoSave._x = com.giab.common.easing.Strong2.easeIn(screenStep - 30, 604, 100, 10);
mcw.mcTitle._y = com.giab.common.easing.Strong2.easeIn(screenStep, 5, -100, 15);
_local2 = 0;
while (_local2 < 9) {
mcw["mcSlot" + _local2]._y = com.giab.common.easing.Back2.easeIn(screenStep - _local2, mcw["mcSlot" + _local2].yIn, -400, 30);
_local2++;
}
if (screenStep > 40) {
screenStep = 0;
main.switchScreenVisibility();
}
}
if (mcw.btnLoad._visible || (mcw.btnSave._visible)) {
btnBackStep = Math.min(20, btnBackStep + 1);
mcw.btnBack._x = com.giab.common.easing.Strong2.easeOut(btnBackStep, 279, -81, 20);
mcw.btnLoad._x = com.giab.common.easing.Strong2.easeOut(btnBackStep, 700, -350, 20);
mcw.btnSave._x = com.giab.common.easing.Strong2.easeOut(btnBackStep, 700, -350, 20);
}
}
function flush(pReturnToLevelSelectorIfSuccess) {
var _local2 = so.flush(com.giab.games.gemc.armor.const.GameSpecs.SHAREDOBJECT_MINSIZE);
switch (_local2) {
case "pending" :
trace("save flush pending");
System.showSettings(1);
main.mcSaveError._visible = true;
main.mcSaveError._y = 0;
break;
case true :
trace("save flush successful");
if (pReturnToLevelSelectorIfSuccess) {
screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
main.nextScreen = com.giab.common.const.ScreenId.LEVELSELECTOR;
}
break;
case false :
trace("save flush failed, trying to open dialog box");
System.showSettings(1);
main.mcSaveError._visible = true;
main.mcSaveError._y = 0;
}
}
}
Symbol 1346 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlLevelSelector] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlLevelSelector
{
var mcw, main, mcInfoPanelSimple, levelIconMcs, viewX, isInfoPanelComingUp, screenStatus, screenStep, eventTypeQueue, eventTargetQueue, eventArgumentsPerQueueMember;
function CtrlLevelSelector (pMcw, pMain) {
var _local3;
var vThis = this;
mcw = pMcw;
main = pMain;
mcw.mcInfoPanel = _root.attachMovie("levelSelectorInfoPanel", "levelSelectorInfoPanel1", com.giab.games.gemc.armor.const.Z.LEVELSELECTOR_INFOPANEL);
mcw.mcInfoPanel._y = -600;
mcw.mcInfoPanel._visible = false;
mcInfoPanelSimple = _root.attachMovie("infoPanelSimple", "infoPanelSimple", com.giab.games.gemc.armor.const.Z.LEVELSELECTOR_INFOPANEL + 10);
mcInfoPanelSimple._y = -600;
mcInfoPanelSimple._visible = false;
levelIconMcs = new Array();
_local3 = 0;
while (_local3 < main.levelCollection.levels.length) {
levelIconMcs.push(_root.attachMovie("levelBtn", "levelIcon" + _local3, com.giab.games.gemc.armor.const.Z.MAP_LEVELICON_MIN + _local3));
levelIconMcs[_local3]._y = -200;
levelIconMcs[_local3].x = com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[_local3]).mapX;
levelIconMcs[_local3].y = com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[_local3]).mapY;
levelIconMcs[_local3].id = _local3;
MovieClip(levelIconMcs[_local3]).onRollOver = function () {
if (MovieClip(this).icon._visible && (MovieClip(this).icon._alpha > 90)) {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickOver.start();
MovieClip(this).rolloverFrame._visible = true;
vThis.renderInfoPanel(MovieClip(this).id);
}
}
};
MovieClip(levelIconMcs[_local3]).onRollOut = function () {
if (MovieClip(this).icon._visible && (MovieClip(this).icon._alpha > 90)) {
MovieClip(this).rolloverFrame._visible = false;
vThis.renderInfoPanel(null);
}
};
MovieClip(levelIconMcs[_local3]).onPress = function () {
if (MovieClip(this).icon._visible && (MovieClip(this).icon._alpha > 90)) {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickPress.start();
vThis.main.selectedLevel = MovieClip(this).id;
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
vThis.main.nextScreen = com.giab.common.const.ScreenId.INGAME;
vThis.main.sndTickPress.start();
}
}
};
_local3++;
}
viewX = 0;
buttonsInit();
}
function buttonsInit() {
var vThis = this;
var _local3;
for (_local3 in mcw) {
if (_local3.indexOf("btn") == 0) {
mcw[_local3].onRollOver = function () {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
};
mcw[_local3].onRollOut = (mcw[_local3].onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
}
}
mcw.btnMainMenu.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
vThis.main.nextScreen = com.giab.common.const.ScreenId.MAINMENU;
vThis.main.sndTickPress.start();
}
};
mcw.btnSave.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
vThis.main.nextScreen = com.giab.common.const.ScreenId.LOADSAVE_SAVE;
vThis.main.sndTickPress.start();
}
};
mcw.btnStatistics.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
vThis.main.nextScreen = com.giab.common.const.ScreenId.STATISTICS;
vThis.main.sndTickPress.start();
}
};
mcw.btnBadges.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
vThis.main.nextScreen = com.giab.common.const.ScreenId.BADGES;
vThis.main.sndTickPress.start();
}
};
mcw.btnUpgrades.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
vThis.main.nextScreen = com.giab.common.const.ScreenId.UPGRADES;
vThis.main.sndTickPress.start();
}
};
mcw.btnMoreGames.onRelease = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
_root.getURL(com.giab.games.gemc.armor.const.Url.MOREGAMES + "?gemCraft=mapScreenMoreGames", "_blank");
}
};
mcw.btnSave._visible = false;
mcw.btnMainMenu._visible = false;
mcw.btnUpgrades._visible = false;
mcw.btnStatistics._visible = false;
mcw.btnBadges._visible = false;
mcw.btnMoreGames._visible = false;
}
function initiate() {
isInfoPanelComingUp = false;
var _local2;
if (main.player.isUpgradesHighlighted) {
mcw.btnUpgrades.highlight._visible = true;
} else {
mcw.btnUpgrades.highlight._visible = false;
}
main.selectedLevel = null;
screenStatus = com.giab.common.const.ScreenStatus.APPEARING;
screenStep = 0;
if (eventTypeQueue.length > 0) {
} else {
adjustLevelIcons();
}
mcw.btnSave._visible = true;
mcw.btnSave._y = -200;
mcw.btnMainMenu._visible = true;
mcw.btnMainMenu._y = -200;
mcw.btnUpgrades._visible = true;
mcw.btnUpgrades._y = -200;
mcw.btnStatistics._visible = true;
mcw.btnStatistics._y = -200;
mcw.btnBadges._visible = true;
mcw.btnBadges._y = -200;
mcw.btnMoreGames._visible = true;
mcw.btnMoreGames._y = -200;
main.ctrlIngame.b.removeAllMovieClips();
_local2 = 0;
while (_local2 < levelIconMcs.length) {
MovieClip(levelIconMcs[_local2])._x = levelIconMcs[_local2].x - viewX;
MovieClip(levelIconMcs[_local2]).rolloverFrame._visible = false;
_local2++;
}
mcw.mcMap._x = -viewX;
mcw.mcInfoPanel._visible = true;
mcw.mcInfoPanel._y = 500;
mcw.mcInfoPanel.tfLevel.text = com.giab.common.toolbox.NumberFormatter.format(main.player.getRating() + 1);
mcw.mcInfoPanel.tfTotalScore.text = com.giab.common.toolbox.NumberFormatter.format(main.player.getTotalScore());
mcw.mcInfoPanel.tfNextLevelAt.text = com.giab.common.toolbox.NumberFormatter.format(com.giab.games.gemc.armor.util.RatingCalculator.calculateRatingReq(main.player.getRating() + 1));
mcw.mcInfoPanel.tfPointsToSpend.text = com.giab.common.toolbox.NumberFormatter.format(main.player.getPointsToSpend());
}
function deactivate() {
var _local2;
_local2 = 0;
while (_local2 < levelIconMcs.length) {
MovieClip(levelIconMcs[_local2])._visible = false;
_local2++;
}
}
function doEnterFrame() {
main.vfxEngine.doEnterFrame();
var _local5 = viewX;
var _local3;
if (screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
if (_root._xmouse < 120) {
viewX = Math.max(0, viewX - Math.min((120 - _root._xmouse) * 0.4, 40));
} else if ((_root._xmouse > 520) && (_root._ymouse > 60)) {
viewX = Math.min(mcw.mcMap._width - 640, viewX + Math.min((_root._xmouse - 520) * 0.4, 40));
}
if (((_root._xmouse > mcw.btnBadges._x) && (_root._xmouse < (mcw.btnBadges._x + mcw.btnBadges._width))) && (_root._ymouse < 60)) {
mcw.btnBadges._y = Math.min(-4, mcw.btnBadges._y + 14);
} else {
mcw.btnBadges._y = Math.max(-45, mcw.btnBadges._y - 10);
}
if (((_root._xmouse > mcw.btnStatistics._x) && (_root._xmouse < (mcw.btnStatistics._x + mcw.btnStatistics._width))) && (_root._ymouse < 60)) {
mcw.btnStatistics._y = Math.min(-4, mcw.btnStatistics._y + 14);
} else {
mcw.btnStatistics._y = Math.max(-45, mcw.btnStatistics._y - 10);
}
if (((_root._xmouse > mcw.btnMainMenu._x) && (_root._xmouse < (mcw.btnMainMenu._x + mcw.btnMainMenu._width))) && (_root._ymouse < 60)) {
mcw.btnMainMenu._y = Math.min(-4, mcw.btnMainMenu._y + 14);
} else {
mcw.btnMainMenu._y = Math.max(-45, mcw.btnMainMenu._y - 10);
}
if (((_root._xmouse > mcw.btnMoreGames._x) && (_root._xmouse < (mcw.btnMoreGames._x + mcw.btnMoreGames._width))) && (_root._ymouse < 60)) {
mcw.btnMoreGames._y = Math.min(-4, mcw.btnMoreGames._y + 14);
} else {
mcw.btnMoreGames._y = Math.max(-45, mcw.btnMoreGames._y - 10);
}
if (((_root._xmouse > mcw.btnSave._x) && (_root._xmouse < (mcw.btnSave._x + mcw.btnSave._width))) && (_root._ymouse < 60)) {
mcw.btnSave._y = Math.min(-4, mcw.btnSave._y + 14);
} else {
mcw.btnSave._y = Math.max(-45, mcw.btnSave._y - 10);
}
if (((_root._xmouse > mcw.btnUpgrades._x) && (_root._xmouse < (mcw.btnUpgrades._x + mcw.btnUpgrades._width))) && (_root._ymouse < 60)) {
mcw.btnUpgrades._y = Math.min(-4, mcw.btnUpgrades._y + 14);
} else if (main.player.isUpgradesHighlighted) {
mcw.btnUpgrades._y = Math.max(-20, mcw.btnUpgrades._y - 12);
} else {
mcw.btnUpgrades._y = Math.max(-45, mcw.btnUpgrades._y - 10);
}
if (((_root._xmouse > mcw.mcInfoPanel._x) && (_root._xmouse < (mcw.mcInfoPanel._x + mcw.mcInfoPanel._width))) && (_root._ymouse > 440)) {
if (isInfoPanelComingUp != true) {
isInfoPanelComingUp = true;
main.sndLevelselectorinfopanel.start();
}
mcw.mcInfoPanel._y = Math.max(373, mcw.mcInfoPanel._y - 28);
} else {
isInfoPanelComingUp = false;
mcw.mcInfoPanel._y = Math.min(467, mcw.mcInfoPanel._y + 20);
}
if (viewX != _local5) {
if (main.preferences.isScrollingMapDegraded) {
_root._quality = "LOW";
}
} else {
_root._quality = ((main.preferences.quality == 0) ? "LOW" : (((main.preferences.quality == 1) ? "MEDIUM" : "HIGH")));
}
_local3 = 0;
while (_local3 < levelIconMcs.length) {
MovieClip(levelIconMcs[_local3])._x = levelIconMcs[_local3].x - viewX;
_local3++;
}
mcw.mcMap._x = -viewX;
} else if (screenStatus == com.giab.common.const.ScreenStatus.APPEARING) {
screenStep++;
if (screenStep < 50) {
_local3 = 0;
while (_local3 < levelIconMcs.length) {
MovieClip(levelIconMcs[_local3])._y = com.giab.common.easing.Strong2.easeOut(screenStep - MovieClip(levelIconMcs[_local3]).appearDelay, -200, 200 + MovieClip(levelIconMcs[_local3]).y, 30);
_local3++;
}
if (main.player.isUpgradesHighlighted) {
mcw.btnUpgrades._y = com.giab.common.easing.Strong2.easeOut(screenStep - 6, -70, 50, 20);
} else {
mcw.btnUpgrades._y = com.giab.common.easing.Strong2.easeOut(screenStep - 6, -70, 16, 20);
}
mcw.btnStatistics._y = com.giab.common.easing.Strong2.easeOut(screenStep, -70, 16, 20);
mcw.btnBadges._y = com.giab.common.easing.Strong2.easeOut(screenStep - 3, -70, 16, 20);
mcw.btnSave._y = com.giab.common.easing.Strong2.easeOut(screenStep - 9, -70, 16, 20);
mcw.btnMainMenu._y = com.giab.common.easing.Strong2.easeOut(screenStep - 12, -70, 16, 20);
mcw.btnMoreGames._y = com.giab.common.easing.Strong2.easeOut(screenStep - 15, -70, 16, 20);
mcw.mcInfoPanel._y = com.giab.common.easing.Strong2.easeOut(screenStep, 497, -30, 10);
} else {
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.PROLOGUE);
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.SCROLL_MAP);
if (main.player.getRating() > 5) {
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.REPLAY_LEVEL);
}
if (main.player.getRating() > 0) {
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.LEVEL_UP);
}
screenStep = 0;
if (eventTypeQueue.length > 0) {
screenStatus = com.giab.common.const.ScreenStatus.CHANGING;
} else {
screenStatus = com.giab.common.const.ScreenStatus.IDLE;
}
}
} else if (screenStatus == com.giab.common.const.ScreenStatus.DISAPPEARING) {
screenStep++;
if (screenStep < ((main.selectedLevel == null) ? 36 : 60)) {
_local3 = 0;
while (_local3 < levelIconMcs.length) {
if (_local3 == main.selectedLevel) {
MovieClip(levelIconMcs[_local3])._y = com.giab.common.easing.Strong2.easeOut(screenStep - 30, MovieClip(levelIconMcs[_local3]).y, -(200 + MovieClip(levelIconMcs[_local3]).y), 30);
} else {
MovieClip(levelIconMcs[_local3])._y = com.giab.common.easing.Strong2.easeOut(screenStep - Math.round(MovieClip(levelIconMcs[_local3]).appearDelay / 4), MovieClip(levelIconMcs[_local3]).y, -(200 + MovieClip(levelIconMcs[_local3]).y), 30);
}
_local3++;
}
mcw.btnStatistics._y = mcw.btnStatistics._y - 9.4;
mcw.btnBadges._y = mcw.btnBadges._y - 9;
mcw.btnUpgrades._y = mcw.btnUpgrades._y - 8.6;
mcw.btnSave._y = mcw.btnSave._y - 8.2;
mcw.btnMainMenu._y = mcw.btnMainMenu._y - 7.8;
mcw.btnMoreGames._y = mcw.btnMoreGames._y - 7.4;
mcw.mcInfoPanel._y = mcw.mcInfoPanel._y + 4;
} else {
screenStep = 0;
mcw.btnSave._visible = false;
mcw.btnMainMenu._visible = false;
mcw.btnUpgrades._visible = false;
mcw.btnStatistics._visible = false;
mcw.btnBadges._visible = false;
mcw.btnMoreGames._visible = false;
mcw.mcInfoPanel._visible = false;
_root._quality = ((main.preferences.quality == 0) ? "LOW" : (((main.preferences.quality == 1) ? "MEDIUM" : "HIGH")));
main.switchScreenVisibility();
}
} else if (screenStatus == com.giab.common.const.ScreenStatus.CHANGING) {
screenStep++;
var _local4;
if (eventTypeQueue[0] == com.giab.common.const.LevelSelectorEvent.LEVEL_DONE_TO_REDONE) {
_local4 = 40;
if (screenStep == 1) {
main.sndLevelavailabletdoe.start();
}
if (Math.random() > 0.5) {
main.vfxEngine.createMapChargedBolt((levelIconMcs[eventTargetQueue[0]]._x + (Math.random() * 80)) - 40, levelIconMcs[eventTargetQueue[0]]._y - (Math.random() * 40), true);
}
if (((screenStep == 3) || (screenStep == 9)) || (screenStep == 22)) {
_local3 = 0;
while (_local3 < 10) {
main.vfxEngine.createBlackAsh((levelIconMcs[eventTargetQueue[0]]._x + (Math.random() * 60)) - 30, levelIconMcs[eventTargetQueue[0]]._y - (Math.random() * 30), true);
_local3++;
}
}
levelIconMcs[eventTargetQueue[0]].fullness._y = Math.max(-60, com.giab.common.toolbox.MathToolbox.convertCoord(0, com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[eventTargetQueue[0]]).highestGradeScore, com.giab.common.easing.Strong2.easeOut(screenStep, eventArgumentsPerQueueMember[0][0], eventArgumentsPerQueueMember[0][1] - eventArgumentsPerQueueMember[0][0], 40), 0, -60));
if (levelIconMcs[eventTargetQueue[0]].fullness._y == -60) {
MovieClip(levelIconMcs[eventTargetQueue[0]]).fullnessGlow._visible = true;
}
} else if (eventTypeQueue[0] == com.giab.common.const.LevelSelectorEvent.LEVEL_AVAILABLE_TO_DONE) {
_local4 = 40;
if (screenStep == 1) {
main.sndLevelavailabletdoe.start();
levelIconMcs[eventTargetQueue[0]].frame2._visible = true;
levelIconMcs[eventTargetQueue[0]].frame2._alpha = 0;
levelIconMcs[eventTargetQueue[0]].fullness._visible = true;
levelIconMcs[eventTargetQueue[0]].fullness._y = 0;
}
if (Math.random() > 0.5) {
main.vfxEngine.createMapChargedBolt((levelIconMcs[eventTargetQueue[0]]._x + (Math.random() * 80)) - 40, levelIconMcs[eventTargetQueue[0]]._y - (Math.random() * 40), true);
}
if (((screenStep == 3) || (screenStep == 9)) || (screenStep == 22)) {
_local3 = 0;
while (_local3 < 10) {
main.vfxEngine.createBlackAsh((levelIconMcs[eventTargetQueue[0]]._x + (Math.random() * 60)) - 30, levelIconMcs[eventTargetQueue[0]]._y - (Math.random() * 30), true);
_local3++;
}
}
levelIconMcs[eventTargetQueue[0]].fullness._y = Math.max(-60, com.giab.common.toolbox.MathToolbox.convertCoord(0, com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[eventTargetQueue[0]]).highestGradeScore, com.giab.common.easing.Strong2.easeOut(screenStep, eventArgumentsPerQueueMember[0][0], eventArgumentsPerQueueMember[0][1] - eventArgumentsPerQueueMember[0][0], 40), 0, -60));
if (levelIconMcs[eventTargetQueue[0]].fullness._y == -60) {
MovieClip(levelIconMcs[eventTargetQueue[0]]).fullnessGlow._visible = true;
}
levelIconMcs[eventTargetQueue[0]].frame2._alpha = Math.min(100, levelIconMcs[eventTargetQueue[0]].frame2._alpha + 3.55);
if (screenStep == 39) {
main.player.levelStatuses[eventTargetQueue[0]] = com.giab.common.const.LevelStatus.DONE;
if (main.player.levelStatuses[47] == com.giab.common.const.LevelStatus.DONE) {
main.ctrlContextTutor.requestTutor(com.giab.games.gemc.armor.const.ContextTutorialId.EPILOGUE2);
}
}
} else if (eventTypeQueue[0] == com.giab.common.const.LevelSelectorEvent.LEVEL_LOCKED_TO_AVAILABLE) {
_local4 = 40;
if (screenStep == 1) {
main.sndLevellockedtoavailable.start();
levelIconMcs[eventTargetQueue[0]].icon._visible = true;
levelIconMcs[eventTargetQueue[0]].icon._alpha = 0;
}
if (Math.random() > 0.5) {
main.vfxEngine.createMapChargedBolt((levelIconMcs[eventTargetQueue[0]]._x + (Math.random() * 80)) - 40, levelIconMcs[eventTargetQueue[0]]._y - (Math.random() * 40), true);
}
levelIconMcs[eventTargetQueue[0]].icon._alpha = Math.min(100, levelIconMcs[eventTargetQueue[0]].icon._alpha + 2.55);
levelIconMcs[eventTargetQueue[0]].frame1._alpha = Math.min(100, levelIconMcs[eventTargetQueue[0]].frame1._alpha + 3.55);
MovieClip(levelIconMcs[eventTargetQueue[0]]).epicFrame._alpha = Math.min(100, levelIconMcs[eventTargetQueue[0]].icon._alpha + 2.55);
MovieClip(levelIconMcs[eventTargetQueue[0]]).hiddenFrame._alpha = Math.min(100, levelIconMcs[eventTargetQueue[0]].icon._alpha + 2.55);
MovieClip(levelIconMcs[eventTargetQueue[0]]).finalFrame._alpha = Math.min(100, levelIconMcs[eventTargetQueue[0]].icon._alpha + 2.55);
if (screenStep == 39) {
levelIconMcs[eventTargetQueue[0]].useHandCursor = true;
main.player.levelStatuses[eventTargetQueue[0]] = com.giab.common.const.LevelStatus.AVAILABLE;
}
} else if (eventTypeQueue[0] == com.giab.common.const.LevelSelectorEvent.LEVEL_HIDDEN_TO_AVAILABLE) {
_local4 = 40;
if (screenStep == 1) {
main.sndLevelhiddentoavailable.start();
_local3 = 0;
while (_local3 < 3) {
main.vfxEngine.createChargedBolt((levelIconMcs[eventTargetQueue[0]]._x + (Math.random() * 80)) - 40, levelIconMcs[eventTargetQueue[0]]._y - (Math.random() * 40), true);
_local3++;
}
levelIconMcs[eventTargetQueue[0]]._visible = true;
levelIconMcs[eventTargetQueue[0]]._alpha = 0;
levelIconMcs[eventTargetQueue[0]].icon._visible = true;
levelIconMcs[eventTargetQueue[0]].icon._alpha = 0;
levelIconMcs[eventTargetQueue[0]].hiddenFrame._visible = true;
levelIconMcs[eventTargetQueue[0]].hiddenFrame._alpha = 0;
levelIconMcs[eventTargetQueue[0]].fullness._visible = true;
levelIconMcs[eventTargetQueue[0]].frame1._visible = true;
}
MovieClip(levelIconMcs[eventTargetQueue[0]]).icon._alpha = Math.min(100, levelIconMcs[eventTargetQueue[0]].icon._alpha + 3.55);
MovieClip(levelIconMcs[eventTargetQueue[0]]).hiddenFrame._alpha = Math.min(100, levelIconMcs[eventTargetQueue[0]].hiddenFrame._alpha + 2.55);
levelIconMcs[eventTargetQueue[0]]._alpha = Math.min(100, levelIconMcs[eventTargetQueue[0]]._alpha + 2.55);
main.vfxEngine.createMapChargedBolt((levelIconMcs[eventTargetQueue[0]]._x + (Math.random() * 80)) - 40, levelIconMcs[eventTargetQueue[0]]._y - (Math.random() * 40), true);
if (screenStep == 39) {
levelIconMcs[eventTargetQueue[0]].useHandCursor = true;
main.player.levelStatuses[eventTargetQueue[0]] = com.giab.common.const.LevelStatus.AVAILABLE;
}
}
if (screenStep >= _local4) {
main.ctrlLoadSave.makeAutoSave();
}
}
if (screenStep > _local4) {
screenStep = 0;
eventArgumentsPerQueueMember.splice(0, 1);
eventTargetQueue.splice(0, 1);
eventTypeQueue.splice(0, 1);
if (eventTypeQueue.length < 1) {
screenStatus = com.giab.common.const.ScreenStatus.IDLE;
}
}
}
function adjustLevelIcons() {
var _local2;
_local2 = 0;
while (_local2 < levelIconMcs.length) {
MovieClip(levelIconMcs[_local2]).appearDelay = Math.round(Math.random() * 18);
MovieClip(levelIconMcs[_local2]).icon.gotoAndStop(com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[_local2]).enemyBaseType + 1);
MovieClip(levelIconMcs[_local2])._visible = true;
MovieClip(levelIconMcs[_local2])._y = -200;
if (com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[_local2]).type == com.giab.common.const.LevelType.EPIC) {
MovieClip(levelIconMcs[_local2]).epicFrame._visible = true;
} else {
MovieClip(levelIconMcs[_local2]).epicFrame._visible = false;
}
if (com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[_local2]).type == com.giab.common.const.LevelType.BONUS) {
MovieClip(levelIconMcs[_local2]).hiddenFrame._visible = true;
} else {
MovieClip(levelIconMcs[_local2]).hiddenFrame._visible = false;
}
if (com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[_local2]).type == com.giab.common.const.LevelType.FINAL) {
MovieClip(levelIconMcs[_local2]).finalFrame._visible = true;
} else {
MovieClip(levelIconMcs[_local2]).finalFrame._visible = false;
}
MovieClip(levelIconMcs[_local2]).fullness._y = Math.max(-60, Math.min(0, com.giab.common.toolbox.MathToolbox.convertCoord(0, com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[_local2]).highestGradeScore, main.player.levelScores[_local2], 0, -60)));
if (main.player.levelStatuses[_local2] == com.giab.common.const.LevelStatus.HIDDEN) {
MovieClip(levelIconMcs[_local2])._visible = false;
MovieClip(levelIconMcs[_local2]).epicFrame._alpha = 0;
MovieClip(levelIconMcs[_local2]).hiddenFrame._alpha = 0;
MovieClip(levelIconMcs[_local2]).finalFrame._alpha = 0;
MovieClip(levelIconMcs[_local2]).fullnessGlow._visible = false;
MovieClip(levelIconMcs[_local2]).fullness._visible = false;
MovieClip(levelIconMcs[_local2]).frame2._visible = false;
} else if (main.player.levelStatuses[_local2] == com.giab.common.const.LevelStatus.LOCKED) {
MovieClip(levelIconMcs[_local2]).useHandCursor = false;
MovieClip(levelIconMcs[_local2]).fullnessGlow._visible = false;
MovieClip(levelIconMcs[_local2]).frame1._visible = true;
MovieClip(levelIconMcs[_local2]).frame1._alpha = 40;
MovieClip(levelIconMcs[_local2]).icon._visible = false;
MovieClip(levelIconMcs[_local2]).epicFrame._alpha = 0;
MovieClip(levelIconMcs[_local2]).hiddenFrame._alpha = 0;
MovieClip(levelIconMcs[_local2]).finalFrame._alpha = 0;
MovieClip(levelIconMcs[_local2]).frame2._visible = false;
} else if (main.player.levelStatuses[_local2] == com.giab.common.const.LevelStatus.AVAILABLE) {
MovieClip(levelIconMcs[_local2]).useHandCursor = true;
MovieClip(levelIconMcs[_local2]).frame1._visible = true;
MovieClip(levelIconMcs[_local2]).frame1._alpha = 100;
MovieClip(levelIconMcs[_local2]).icon._visible = true;
MovieClip(levelIconMcs[_local2]).fullnessGlow._visible = false;
MovieClip(levelIconMcs[_local2]).fullness._visible = false;
MovieClip(levelIconMcs[_local2]).frame2._visible = false;
MovieClip(levelIconMcs[_local2]).epicFrame._alpha = 100;
MovieClip(levelIconMcs[_local2]).hiddenFrame._alpha = 100;
MovieClip(levelIconMcs[_local2]).finalFrame._alpha = 100;
} else {
MovieClip(levelIconMcs[_local2]).frame1._visible = true;
MovieClip(levelIconMcs[_local2]).frame1._alpha = 100;
MovieClip(levelIconMcs[_local2]).icon._visible = true;
if (main.player.levelScores[_local2] >= com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[_local2]).highestGradeScore) {
MovieClip(levelIconMcs[_local2]).fullnessGlow._visible = true;
} else {
MovieClip(levelIconMcs[_local2]).fullnessGlow._visible = false;
}
MovieClip(levelIconMcs[_local2]).fullness._visible = true;
MovieClip(levelIconMcs[_local2]).frame2._visible = true;
MovieClip(levelIconMcs[_local2]).useHandCursor = true;
MovieClip(levelIconMcs[_local2]).epicFrame._alpha = 100;
MovieClip(levelIconMcs[_local2]).hiddenFrame._alpha = 100;
MovieClip(levelIconMcs[_local2]).finalFrame._alpha = 100;
}
_local2++;
}
}
function renderInfoPanel(pLevelNum) {
if (pLevelNum == null) {
mcInfoPanelSimple._visible = false;
mcInfoPanelSimple._y = 600;
return(undefined);
}
if (screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
mcInfoPanelSimple.tf.autoSize = "center";
mcInfoPanelSimple.tf.text = main.levelCollection.levels[pLevelNum].wavesNum + " waves\n\n";
if (main.levelCollection.levels[pLevelNum].type == com.giab.common.const.LevelType.EPIC) {
mcInfoPanelSimple.tf.textColor = 16776960 /* 0xFFFF00 */;
mcInfoPanelSimple.tf.text = mcInfoPanelSimple.tf.text.concat("Epic level\n");
} else if (main.levelCollection.levels[pLevelNum].type == com.giab.common.const.LevelType.FINAL) {
mcInfoPanelSimple.tf.textColor = 16755217 /* 0xFFAA11 */;
mcInfoPanelSimple.tf.text = mcInfoPanelSimple.tf.text.concat("The tower of the corrupted wizard\n");
} else if (main.levelCollection.levels[pLevelNum].type == com.giab.common.const.LevelType.BONUS) {
mcInfoPanelSimple.tf.textColor = 65535;
mcInfoPanelSimple.tf.text = mcInfoPanelSimple.tf.text.concat("Revealed hidden level\n");
} else {
mcInfoPanelSimple.tf.textColor = 16777215 /* 0xFFFFFF */;
}
if (main.player.levelStatuses[pLevelNum] == com.giab.common.const.LevelStatus.DONE) {
mcInfoPanelSimple.tf.text = mcInfoPanelSimple.tf.text.concat(("Your best score: " + com.giab.common.toolbox.NumberFormatter.format(main.player.levelScores[pLevelNum])) + newline);
}
if (main.player.levelScores[pLevelNum] < com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[pLevelNum]).highestGradeScore) {
mcInfoPanelSimple.tf.text = mcInfoPanelSimple.tf.text.concat(("Glowing frame score: " + com.giab.common.toolbox.NumberFormatter.format(com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[pLevelNum]).highestGradeScore)) + newline);
}
mcInfoPanelSimple.tf.text = mcInfoPanelSimple.tf.text.concat("\nAvailable gems:\n\n");
var _local3;
_local3 = 0;
while (_local3 < 8) {
mcInfoPanelSimple["gem" + _local3].removeMovieClip();
_local3++;
}
var _local6 = ["poison", "triple damage", "splash", "slow", "chain hit", "steal mana", "reduce armor", "shock"];
_local3 = 0;
while (_local3 < com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[pLevelNum]).availableGems.length) {
if (_local3 > 0) {
mcInfoPanelSimple.tf.text = mcInfoPanelSimple.tf.text.concat(", ");
}
mcInfoPanelSimple.tf.text = mcInfoPanelSimple.tf.text.concat(_local6[com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[pLevelNum]).availableGems[_local3]]);
_local3++;
}
mcInfoPanelSimple.tf.text = mcInfoPanelSimple.tf.text.concat(newline);
_local3 = 0;
while (_local3 < com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[pLevelNum]).availableGems.length) {
var _local4 = new com.giab.games.gemc.armor.entity.Gem();
_local4.satLeft = (_local4.satRight = (_local4.satMain = 100));
_local4.hueLeft = (_local4.hueRight = (_local4.hueMain = [120, 60, 0, 240, 90, 30, 270, 180][com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[pLevelNum]).availableGems[_local3]]));
mcInfoPanelSimple.attachMovie("gem", "gem" + _local3, (com.giab.games.gemc.armor.const.Z.LEVELSELECTOR_INFOPANEL + 11) + _local3);
mcInfoPanelSimple["gem" + _local3]._x = _local3 * 30;
mcInfoPanelSimple["gem" + _local3]._y = mcInfoPanelSimple.tf._height + 25;
_local4.giveMc(null, mcInfoPanelSimple["gem" + _local3]);
_local3++;
}
_local3 = 0;
while (_local3 < com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[pLevelNum]).availableGems.length) {
mcInfoPanelSimple["gem" + _local3]._x = mcInfoPanelSimple["gem" + _local3]._x + ((((260 - ((com.giab.games.gemc.armor.entity.LevelData(main.levelCollection.levels[pLevelNum]).availableGems.length - 1) * 30)) - 27) / 2) + 14.5);
_local3++;
}
mcInfoPanelSimple._visible = true;
mcInfoPanelSimple._x = ((_root._xmouse > 320) ? ((_root._xmouse - 40) - mcInfoPanelSimple._width) : (_root._xmouse + 40));
mcInfoPanelSimple._y = 100;
mcInfoPanelSimple.plate._height = (mcInfoPanelSimple.tf._height * 1.04) + 50;
}
}
}
Symbol 1347 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlStatistics] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlStatistics
{
var mcw, main, screenStatus, screenStep, isCounting, countingStep;
function CtrlStatistics (pMcw, pMain) {
mcw = pMcw;
main = pMain;
buttonsInit();
mcw.btnDone.inY = mcw.btnDone._y;
mcw.mcLevel.inX = mcw.mcLevel._x;
mcw.mcList.inY = mcw.mcList._y;
mcw.mcTitle.inY = mcw.mcTitle._y;
}
function buttonsInit() {
var vThis = this;
mcw.btnDone.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.countingStep = 121;
vThis.doEnterFrame();
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
vThis.main.nextScreen = com.giab.common.const.ScreenId.LEVELSELECTOR;
vThis.main.sndTickPress.start();
}
};
mcw.btnDone.onRollOver = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
}
};
mcw.btnDone.onRollOut = (mcw.btnDone.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
}
function initiate() {
var _local2;
mcw.mc._visible = true;
screenStatus = com.giab.common.const.ScreenStatus.APPEARING;
screenStep = 0;
mcw.btnDone._y = 600;
mcw.mcLevel._x = -360;
mcw.mcList._y = -400;
mcw.mcTitle._y = -100;
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.STATID_NUM) {
mcw.mcList["tfStat" + _local2].text = 0;
_local2++;
}
mcw.mcLevel.tfCurrentLevel.text = 1;
mcw.mcLevel.tfTotalScore.text = 0;
mcw.mcLevel.tfNextLevelAt.text = com.giab.games.gemc.armor.util.RatingCalculator.calculateRatingReq(1);
}
function updatePlayerStatistics(pCtrlIngame, pPlayer) {
pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.GEM_BOMBS_THROWN] = pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.GEM_BOMBS_THROWN] + pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GEM_BOMBS_THROWN];
pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.GEMS_CREATED] = pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.GEMS_CREATED] + pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GEMS_CREATED];
pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.GEMS_COMBINED] = pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.GEMS_COMBINED] + pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GEMS_COMBINED];
pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.GRADE_7_OR_HIGHER_GEMS_CREATED] = pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.GRADE_7_OR_HIGHER_GEMS_CREATED] + pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GRADE_7_OR_HIGHER_GEMS_CREATED];
pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.BATTLES_WON] = pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.BATTLES_WON] + 1;
pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.TOWERS_BUILT] = pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.TOWERS_BUILT] + pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.TOWERS_BUILT];
pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.MONSTERS_KILLED] = pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.MONSTERS_KILLED] + pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.MONSTERS_KILLED];
pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.BOSSES_KILLED] = pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.BOSSES_KILLED] + pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.BOSSES_KILLED];
pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.EPIC_BOSSES_KILLED] = pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.EPIC_BOSSES_KILLED] + pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.EPIC_BOSSES_KILLED];
}
function doEnterFrame() {
var _local2;
if (screenStatus == com.giab.common.const.ScreenStatus.APPEARING) {
screenStep++;
if (screenStep < 40) {
mcw.btnDone._y = com.giab.common.easing.Back2.easeOut(screenStep - 25, 600, mcw.btnDone.inY - 600, 15);
mcw.mcLevel._x = com.giab.common.easing.Strong2.easeOut(screenStep - 10, -360, mcw.mcLevel.inX + 360, 20);
mcw.mcList._y = com.giab.common.easing.Strong2.easeOut(screenStep, -400, mcw.mcList.inY + 400, 20);
mcw.mcTitle._y = com.giab.common.easing.Strong2.easeOut(screenStep - 25, -100, mcw.mcTitle.inY + 100, 15);
} else {
screenStep = 0;
screenStatus = com.giab.common.const.ScreenStatus.IDLE;
isCounting = false;
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.STATID_NUM) {
if (main.player.statistics[_local2] > 0) {
isCounting = true;
countingStep = 0;
main.sndCounterRoll.start(0, 999);
}
_local2++;
}
}
} else if (screenStatus == com.giab.common.const.ScreenStatus.DISAPPEARING) {
screenStep++;
if (screenStep < 35) {
mcw.btnDone._y = com.giab.common.easing.Back2.easeIn(screenStep, mcw.btnDone.inY, 600 - mcw.btnDone.inY, 20);
mcw.mcList._y = com.giab.common.easing.Strong2.easeIn(screenStep, mcw.mcList.inY, (-mcw.mcList.inY) - 400, 20);
mcw.mcTitle._y = com.giab.common.easing.Strong2.easeIn(screenStep, mcw.mcTitle.inY, (-mcw.mcTitle.inY) - 100, 20);
mcw.mcLevel._x = com.giab.common.easing.Strong2.easeIn(screenStep - 10, mcw.mcLevel.inX, -360, 20);
} else {
screenStep = 0;
main.switchScreenVisibility();
}
} else if (screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
if (isCounting) {
countingStep++;
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.STATID_NUM) {
mcw.mcList["tfStat" + _local2].text = com.giab.common.toolbox.NumberFormatter.format(Math.round(com.giab.common.easing.Strong2.easeOut(countingStep, 0, main.player.statistics[_local2], 120)));
_local2++;
}
mcw.mcLevel.tfCurrentLevel.text = com.giab.common.toolbox.NumberFormatter.format(Math.round(com.giab.common.easing.Strong2.easeOut(countingStep, 0, main.player.getRating(), 120)) + 1);
mcw.mcLevel.tfTotalScore.text = com.giab.common.toolbox.NumberFormatter.format(Math.round(com.giab.common.easing.Strong2.easeOut(countingStep, 0, main.player.getTotalScore(), 120)));
mcw.mcLevel.tfNextLevelAt.text = com.giab.common.toolbox.NumberFormatter.format(com.giab.games.gemc.armor.util.RatingCalculator.calculateRatingReq(Math.round(com.giab.common.easing.Strong2.easeOut(countingStep, 0, main.player.getRating(), 120)) + 1));
if (countingStep > 120) {
isCounting = false;
main.sndCounterRoll.stop();
}
}
}
}
}
Symbol 1348 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlMainMenu] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlMainMenu
{
var main, mcw, screenStatus, screenStep, mcWall;
function CtrlMainMenu (pMcw, pMain) {
main = pMain;
mcw = pMcw;
buttonsInit();
}
function buttonsInit() {
var vThis = this;
var _local2;
for (_local2 in mcw) {
if (_local2.indexOf("btn") == 0) {
mcw[_local2].onRollOver = function () {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
};
mcw[_local2].onRollOut = (mcw[_local2].onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
}
}
mcw.btnTutorial.onRelease = function () {
vThis.main.mcRoot.getURL(com.giab.games.gemc.armor.const.Url.STRATEGY_GUIDE + "?gemCraft=mainMenuStrategyGuide", "_blank");
};
mcw.btnNewGame.onRelease = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
vThis.main.nextScreen = com.giab.common.const.ScreenId.LEVELSELECTOR;
vThis.main.sndTickPress.start();
vThis.main.player = new com.giab.games.gemc.armor.entity.Player(vThis.main.levelCollection);
}
};
mcw.btnLoad.onRelease = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
vThis.main.nextScreen = com.giab.common.const.ScreenId.LOADSAVE_LOAD;
vThis.main.sndTickPress.start();
}
};
mcw.btnCredits.onRelease = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
vThis.main.nextScreen = com.giab.common.const.ScreenId.CREDITS;
vThis.main.sndTickPress.start();
}
};
mcw.btnMoreGames.onRelease = function () {
vThis.main.mcRoot.getURL(com.giab.games.gemc.armor.const.Url.MOREGAMES + "?gemCraft=mainMenuMoreGames", "_blank");
};
mcw.btnGiabLink.onRelease = function () {
vThis.main.mcRoot.getURL(com.giab.games.gemc.armor.const.Url.CREDITS_LINK, "_blank");
};
}
function initiate() {
screenStatus = com.giab.common.const.ScreenStatus.APPEARING;
screenStep = 0;
mcw.mc._visible = true;
mcw.mcTitle._y = -400;
mcw.mcTitle.gotoAndPlay(1);
mcw.btnLoad._y = 630;
mcw.btnNewGame._y = 630;
mcw.btnTutorial._y = 630;
mcw.btnMoreGames._y = 690;
mcw.btnCredits._y = 690;
mcw.mcBottomTexts._y = 760;
mcWall._y = -80;
mcw.btnTutorial.highlight._visible = false;
}
function doEnterFrame() {
if (screenStatus == com.giab.common.const.ScreenStatus.APPEARING) {
screenStep++;
mcw.mcTitle._y = com.giab.common.easing.Strong2.easeOut(screenStep, -400, 460, 25);
mcw.btnNewGame._y = com.giab.common.easing.Strong2.easeOut(screenStep - 0, 685, -300, 20);
mcw.btnLoad._y = com.giab.common.easing.Strong2.easeOut(screenStep - 2, 685, -300, 20);
mcw.btnMoreGames._y = com.giab.common.easing.Strong2.easeOut(screenStep - 6, 685, -300, 20);
mcw.btnCredits._y = com.giab.common.easing.Strong2.easeOut(screenStep - 8, 685, -300, 20);
mcw.btnTutorial._y = com.giab.common.easing.Strong2.easeOut(screenStep - 10, 685, -300, 20);
mcw.mcBottomTexts._y = com.giab.common.easing.Strong2.easeOut(screenStep - 12, 760, -300, 20);
if (screenStep > 33) {
screenStep = 0;
screenStatus = com.giab.common.const.ScreenStatus.IDLE;
}
}
if (screenStatus == com.giab.common.const.ScreenStatus.DISAPPEARING) {
screenStep++;
mcw.mcTitle._y = com.giab.common.easing.Back2.easeIn(screenStep - 6, 60, -400, 26);
mcw.btnNewGame._y = com.giab.common.easing.Strong2.easeIn(screenStep - 0, 385, 300, 20);
mcw.btnLoad._y = com.giab.common.easing.Strong2.easeIn(screenStep - 2, 385, 300, 20);
mcw.btnMoreGames._y = com.giab.common.easing.Strong2.easeIn(screenStep - 6, 385, 300, 20);
mcw.btnCredits._y = com.giab.common.easing.Strong2.easeIn(screenStep - 8, 385, 300, 20);
mcw.btnTutorial._y = com.giab.common.easing.Strong2.easeIn(screenStep - 10, 385, 300, 20);
mcw.mcBottomTexts._y = com.giab.common.easing.Strong2.easeIn(screenStep, 460, 300, 20);
if (screenStep > 33) {
screenStep = 0;
screenStatus == com.giab.common.const.ScreenStatus.IDLE;
main.switchScreenVisibility();
}
}
}
}
Symbol 1349 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlCredits] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlCredits
{
var main, mcw, screenStatus, screenStep;
function CtrlCredits (pMcw, pMain) {
main = pMain;
mcw = pMcw;
buttonsInit();
}
function buttonsInit() {
var vThis = this;
mcw.btnBack.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
vThis.main.nextScreen = com.giab.common.const.ScreenId.MAINMENU;
vThis.main.sndTickPress.start();
}
};
mcw.btnBack.onRollOver = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
}
};
mcw.btnBack.onRollOut = (mcw.btnBack.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
mcw.btnLink.onRelease = function () {
_root.getURL(com.giab.games.gemc.armor.const.Url.CREDITS_LINK, "_blank");
};
mcw.btnLink.onRollOver = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickOver.start();
}
};
mcw.mcCreditsPlate.mcFglLogo.onRelease = function () {
_root.getURL(com.giab.games.gemc.armor.const.Url.FGL_CREDITS_LINK, "_blank");
};
}
function initiate() {
mcw.btnBack._y = 572;
mcw.btnLink._y = -400;
mcw.mcLogoBottle._y = -400;
mcw.mcLogoPlate._y = -400;
mcw.mcCreditsPlate._y = -400;
mcw.mc._visible = true;
screenStatus = com.giab.common.const.ScreenStatus.APPEARING;
screenStep = 0;
mcw.mc._visible = true;
}
function doEnterFrame() {
if (screenStatus == com.giab.common.const.ScreenStatus.APPEARING) {
screenStep++;
mcw.mcCreditsPlate._y = com.giab.common.easing.Back2.easeOut(screenStep, -423, 460, 20);
mcw.btnLink._y = com.giab.common.easing.Back2.easeOut(screenStep, -358, 460, 20);
mcw.mcLogoPlate._y = com.giab.common.easing.Back2.easeOut(screenStep - 16, -336, 460, 20, 1.2);
mcw.mcLogoBottle._y = com.giab.common.easing.Back2.easeOut(screenStep - 20, -333, 460, 30, 1.04);
mcw.btnBack._y = com.giab.common.easing.Strong2.easeOut(screenStep - 12, 560, -160, 20);
mcw.mcCreditsPlate.mcFglLogo.gotoAndStop(screenStep - 15);
if (screenStep > 54) {
screenStep = 0;
screenStatus = com.giab.common.const.ScreenStatus.IDLE;
}
} else if (screenStatus == com.giab.common.const.ScreenStatus.DISAPPEARING) {
screenStep++;
mcw.mcCreditsPlate._y = com.giab.common.easing.Back2.easeIn(screenStep, 37, -460, 20);
mcw.btnLink._y = com.giab.common.easing.Back2.easeIn(screenStep, 102, -460, 20);
mcw.mcLogoPlate._y = com.giab.common.easing.Back2.easeIn(screenStep - 6, 124, -460, 20, 1.1);
mcw.mcLogoBottle._y = com.giab.common.easing.Strong2.easeIn(screenStep - 20, 127, -460, 20);
mcw.btnBack._y = com.giab.common.easing.Back2.easeIn(screenStep - 12, 560, 160, 20);
if (screenStep > 40) {
screenStep = 0;
main.switchScreenVisibility();
}
}
}
}
Symbol 1350 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlTutorial] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlTutorial
{
var main, mcw, screenStatus, screenStep, currentPage, turnPageDirection, turnPageStep, btnBackOutStep, btnNextOutStep, panelIn, panelOut;
function CtrlTutorial (pMcw, pMain) {
main = pMain;
mcw = pMcw;
buttonsInit();
}
function buttonsInit() {
var vThis = this;
var _local2;
for (_local2 in mcw) {
if (_local2.indexOf("btn") == 0) {
mcw[_local2].onRollOver = function () {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
};
mcw[_local2].onRollOut = (mcw[_local2].onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
}
}
mcw.btnDone.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
vThis.main.nextScreen = com.giab.common.const.ScreenId.MAINMENU;
vThis.main.sndTickPress.start();
}
};
mcw.btnNext.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
if ((vThis.turnPageDirection == 0) && (vThis.currentPage < com.giab.games.gemc.armor.const.GameSpecs.TUTORIAL_PAGES)) {
vThis.turnPage(1);
vThis.main.sndTickPress.start();
}
}
};
mcw.btnBack.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
if ((vThis.turnPageDirection == 0) && (vThis.currentPage > 1)) {
vThis.turnPage(-1);
vThis.main.sndTickPress.start();
}
}
};
}
function initiate() {
screenStatus = com.giab.common.const.ScreenStatus.APPEARING;
screenStep = 0;
mcw.mcPanelA._y = -480;
mcw.mcPanelB._y = -480;
mcw.btnBack._y = 600;
mcw.btnDone._y = 600;
mcw.btnNext._y = 600;
mcw.btnDone._y = 500;
mcw.mc._visible = true;
mcw.mcPanelA._x = 40;
mcw.mcPanelB._x = 760;
mcw.mcPanelA.gotoAndStop(1);
mcw.mcPanelB.gotoAndStop(1);
currentPage = 1;
turnPageDirection = 0;
turnPageStep = 0;
btnBackOutStep = 15;
btnNextOutStep = 0;
panelIn = mcw.mcPanelA;
main.preferences.isTutorialPressed = true;
}
function doEnterFrame() {
if (screenStatus == com.giab.common.const.ScreenStatus.APPEARING) {
screenStep++;
mcw.mcPanelA._y = com.giab.common.easing.Back2.easeOut(screenStep, -480, 500, 20);
mcw.mcPanelB._y = com.giab.common.easing.Back2.easeOut(screenStep, -480, 500, 20);
mcw.btnDone._y = com.giab.common.easing.Strong2.easeOut(screenStep, 602, -200, 20);
mcw.btnBack._y = com.giab.common.easing.Strong2.easeOut(screenStep, 602, -200, 20);
mcw.btnNext._y = com.giab.common.easing.Strong2.easeOut(screenStep, 602, -200, 20);
if (screenStep > 19) {
screenStep = 0;
screenStatus = com.giab.common.const.ScreenStatus.IDLE;
}
} else if (screenStatus == com.giab.common.const.ScreenStatus.DISAPPEARING) {
screenStep++;
mcw.mcPanelA._y = com.giab.common.easing.Back2.easeIn(screenStep, 20, -500, 20);
mcw.mcPanelB._y = com.giab.common.easing.Back2.easeIn(screenStep, 20, -500, 20);
mcw.btnDone._y = com.giab.common.easing.Strong2.easeIn(screenStep, 402, 200, 20);
mcw.btnBack._y = com.giab.common.easing.Strong2.easeIn(screenStep, 402, 200, 20);
mcw.btnNext._y = com.giab.common.easing.Strong2.easeIn(screenStep, 402, 200, 20);
if (screenStep > 19) {
screenStep = 0;
main.switchScreenVisibility();
}
} else if (Key.isDown(27)) {
if (screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
mcw.btnDone.onPress();
}
}
if (turnPageDirection != 0) {
turnPageStep++;
if (turnPageDirection == 1) {
panelIn._x = com.giab.common.easing.Back2.easeInOut(turnPageStep, 760, -720, 20);
panelOut._x = com.giab.common.easing.Back2.easeInOut(turnPageStep, 40, -720, 15);
} else if (turnPageDirection == -1) {
panelIn._x = com.giab.common.easing.Back2.easeInOut(turnPageStep, -680, 720, 20);
panelOut._x = com.giab.common.easing.Back2.easeInOut(turnPageStep, 40, 720, 15);
}
if (turnPageStep > 19) {
turnPageDirection = 0;
turnPageStep = 0;
}
}
if (currentPage < 2) {
btnBackOutStep = Math.min(15, btnBackOutStep + 1);
} else {
btnBackOutStep = Math.max(0, btnBackOutStep - 1);
}
mcw.btnBack._x = com.giab.common.easing.Strong2.easeOut(btnBackOutStep, 30, -150, 15);
if (currentPage > (com.giab.games.gemc.armor.const.GameSpecs.TUTORIAL_PAGES - 1)) {
btnNextOutStep = Math.min(15, btnNextOutStep + 1);
} else {
btnNextOutStep = Math.max(0, btnNextOutStep - 1);
}
mcw.btnNext._x = com.giab.common.easing.Strong2.easeOut(btnNextOutStep, (640 - mcw.btnNext._width) - 30, 150, 15);
if ((Key.isDown(32) || (Key.isDown(13))) || (Key.isDown(17))) {
mcw.btnNext.onPress();
}
}
function turnPage(pDirection) {
turnPageDirection = pDirection;
currentPage = currentPage + pDirection;
if (panelIn == mcw.mcPanelA) {
panelOut = mcw.mcPanelA;
panelIn = mcw.mcPanelB;
} else {
panelOut = mcw.mcPanelB;
panelIn = mcw.mcPanelA;
}
panelIn.gotoAndStop(currentPage);
}
}
Symbol 1351 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlStartup] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlStartup
{
var main, mcw, timer;
function CtrlStartup (pMcw, pMain) {
main = pMain;
mcw = pMcw;
buttonsInit();
}
function buttonsInit() {
mcw.mcGiabBgr.onRelease = (mcw.mcBlackWall.onRelease = function () {
_root.getURL(com.giab.games.gemc.armor.const.Url.CREDITS_LINK, "_blank");
});
mcw.mcAgSplash.onRelease = function () {
_root.getURL(com.giab.games.gemc.armor.const.Url.MOREGAMES + "?gemCraft=splashScreen", "_blank");
};
}
function initiate() {
timer = 0;
mcw.mc._visible = true;
}
function doEnterFrame() {
timer++;
var _local2;
if (timer == 5) {
mcw.mcAgSplash.gotoAndPlay(2);
}
if (timer == 225) {
mcw.mcAgSplash._visible = false;
}
if ((timer > 233) && (timer < 263)) {
for (_local2 in mcw.mcBlackWall) {
mcw.mcBlackWall[_local2].gotoAndStop((timer - 230) - 3);
}
} else if (timer == 263) {
mcw.mcBlackWall._visible = false;
} else if (timer == 363) {
mcw.mcBlackWall._visible = true;
} else if ((timer > 363) && (timer < 393)) {
for (_local2 in mcw.mcBlackWall) {
mcw.mcBlackWall[_local2].gotoAndStop(393 - timer);
}
} else if (timer == 393) {
main.isIntroOver = true;
main.nextScreen = com.giab.common.const.ScreenId.TRANS_STARTUP_TO_MAINMENU;
main.switchScreenVisibility();
}
}
}
Symbol 1352 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlBgr] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlBgr
{
var main, mcw, ashes;
function CtrlBgr (pMcw, pMain) {
main = pMain;
mcw = pMcw;
ashes = new Array();
var _local2;
_local2 = 0;
while (_local2 < 14) {
ashes[_local2] = new com.giab.games.gemc.armor.vfx.MainMenuAsh(mcw["mcAsh" + _local2]);
_local2++;
}
}
function initiate() {
mcw.mc._y = -480;
mcw.mc._visible = true;
}
function doEnterFrame() {
var _local2;
_local2 = 0;
while (_local2 < 14) {
com.giab.games.gemc.armor.vfx.MainMenuAsh(ashes[_local2]).doEnterFrame();
_local2++;
}
}
}
Symbol 1353 MovieClip [__Packages.com.giab.games.gemc.armor.vfx.MainMenuAsh] Frame 0
class com.giab.games.gemc.armor.vfx.MainMenuAsh
{
var mc, vX2RotaAngle, vX1RotaAngle, vXC, vY2RotaAngle, vY1RotaAngle, vRota, vX1RotaSpeed, vX2RotaSpeed, vY1RotaSpeed, vY2RotaSpeed;
function MainMenuAsh (pMc) {
mc = pMc;
reset();
}
function doEnterFrame() {
mc._x = mc._x + ((vXC + Math.sin(vX1RotaAngle)) + Math.sin(vX2RotaAngle));
mc._y = mc._y + (Math.sin(vY1RotaAngle) + Math.sin(vY2RotaAngle));
mc._rotation = mc._rotation + vRota;
vX1RotaAngle = vX1RotaAngle + vX1RotaSpeed;
vX2RotaAngle = vX2RotaAngle + vX2RotaSpeed;
vY1RotaAngle = vY1RotaAngle + vY1RotaSpeed;
vY2RotaAngle = vY2RotaAngle + vY2RotaSpeed;
if (mc._x > 650) {
reset();
}
}
function reset() {
mc._x = -500 + (Math.random() * 480);
mc._y = 160 + (Math.random() * 50);
vXC = (Math.random() * 4) + 3;
vX1RotaSpeed = ((Math.random() * 5) * Math.PI) / 180;
vX2RotaSpeed = ((Math.random() * 5) * Math.PI) / 180;
vY1RotaSpeed = ((Math.random() * 5) * Math.PI) / 180;
vY2RotaSpeed = ((Math.random() * 5) * Math.PI) / 180;
vX1RotaAngle = (Math.random() * Math.PI) * 2;
vX2RotaAngle = (Math.random() * Math.PI) * 2;
vY1RotaAngle = (Math.random() * Math.PI) * 2;
vY2RotaAngle = (Math.random() * Math.PI) * 2;
vRota = (Math.random() * 8) - 4;
}
}
Symbol 1354 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlBadges] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlBadges
{
var mcw, main, badgeDescriptions, badgeDescriptionsDoNotHave, badgeScores, screenStatus, screenStep;
function CtrlBadges (pMcw, pMain) {
mcw = pMcw;
main = pMain;
buttonsInit();
populateBadgeDescriptions();
populateBadgeScores();
}
function populateBadgeDescriptions() {
badgeDescriptions = new Array();
badgeDescriptionsDoNotHave = new Array();
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.GEM_BOMBS_THROWN_BRONZE] = "You have thrown at least 15 gem bombs on monsters in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.GEM_BOMBS_THROWN_SILVER] = "You have thrown at least 30 gem bombs on monsters in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.GEM_BOMBS_THROWN_GOLD] = "You have thrown at least 75 gem bombs on monsters in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.GEMS_CREATED_BRONZE] = "You have created at least 25 gems in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.GEMS_CREATED_SILVER] = "You have created at least 50 gems in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.GEMS_CREATED_GOLD] = "You have created at least 125 gems in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.GEMS_COMBINED_BRONZE] = "You have made at least 15 combined gems in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.GEMS_COMBINED_SILVER] = "You have made at least 30 combined gems in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.GEMS_COMBINED_GOLD] = "You have made at least 75 combined gems in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.GRADE_7_OR_HIGHER_GEMS_CREATED_BRONZE] = "You have created at least 2 gems of grade 7 or higher in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.GRADE_7_OR_HIGHER_GEMS_CREATED_SILVER] = "You have created at least 4 gems of grade 7 or higher in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.GRADE_7_OR_HIGHER_GEMS_CREATED_GOLD] = "You have created at least 7 gems of grade 7 or higher in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOWERS_BUILT_BRONZE] = "You have built at least 3 towers in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOWERS_BUILT_SILVER] = "You have built at least 6 towers in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOWERS_BUILT_GOLD] = "You have built at least 9 towers in one battle.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.MONSTERS_KILLED_IN_A_ROW_BRONZE] = "You have killed at least 30 monsters in a row.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.MONSTERS_KILLED_IN_A_ROW_SILVER] = "You have killed at least 60 monsters in a row.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.MONSTERS_KILLED_IN_A_ROW_GOLD] = "You have killed at least 150 monsters in a row.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.EPIC1] = "You have won the first epic battle!";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.EPIC2] = "You have won the second epic battle!";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.EPIC3] = "You have won the third epic battle!";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.EPIC4] = "You have won the fourth epic battle!";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.EPIC5] = "You have won the final battle, eventually having your soul taken over by the Forgotten...";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_BRONZE] = "You have killed at least 10.000 monsters throughout your journey.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_SILVER] = "You have killed at least 25.000 monsters throughout your journey.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_GOLD] = "You have killed at least 50.000 monsters throughout your journey.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_BRONZE] = "You have won at least 40 battles throughout your journey.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_SILVER] = "You have won at least 80 battles throughout your journey.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_GOLD] = "You have won at least 120 battles throughout your journey.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_BRONZE] = "You have created at least 2.500 gems throughout your journey.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_SILVER] = "You have created at least 5.000 gems throughout your journey.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_GOLD] = "You have created at least 10.000 gems throughout your journey.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_BRONZE] = "You have built at least 80 towers throughout your journey.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_SILVER] = "You have built at least 120 towers throughout your journey.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_GOLD] = "You have built at least 160 towers throughout your journey.";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.HIDDEN1] = "You have cleaned the hidden green gem level!";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.HIDDEN2] = "You have cleaned the hidden yellow gem level!";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.HIDDEN3] = "You have cleaned the hidden red gem level!";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.HIDDEN4] = "You have cleaned the hidden blue gem level!";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.HIDDEN5] = "You have cleaned the hidden lime gem level!";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.HIDDEN6] = "You have cleaned the hidden orange gem level!";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.HIDDEN7] = "You have cleaned the hidden purple gem level!";
badgeDescriptions[com.giab.games.gemc.armor.const.BadgeId.HIDDEN8] = "You have cleaned the hidden cyan gem level!";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.GEM_BOMBS_THROWN_BRONZE] = "Throw at least 15 gem bombs on monsters in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.GEM_BOMBS_THROWN_SILVER] = "Throw at least 30 gem bombs on monsters in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.GEM_BOMBS_THROWN_GOLD] = "Throw at least 75 gem bombs on monsters in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.GEMS_CREATED_BRONZE] = "Create at least 25 gems in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.GEMS_CREATED_SILVER] = "Create at least 50 gems in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.GEMS_CREATED_GOLD] = "Create at least 125 gems in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.GEMS_COMBINED_BRONZE] = "Create at least 15 combined gems in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.GEMS_COMBINED_SILVER] = "Create at least 30 combined gems in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.GEMS_COMBINED_GOLD] = "Create at least 75 combined gems in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.GRADE_7_OR_HIGHER_GEMS_CREATED_BRONZE] = "Create at least 2 gems of grade 7 or higher in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.GRADE_7_OR_HIGHER_GEMS_CREATED_SILVER] = "Create at least 4 gems of grade 7 or higher in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.GRADE_7_OR_HIGHER_GEMS_CREATED_GOLD] = "Create more than 7 gems of grade 7 or higher in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOWERS_BUILT_BRONZE] = "Build at least 3 towers in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOWERS_BUILT_SILVER] = "Build at least 6 towers in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOWERS_BUILT_GOLD] = "Build at least 9 towers in one battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.MONSTERS_KILLED_IN_A_ROW_BRONZE] = "Kill at least 30 monsters in a row.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.MONSTERS_KILLED_IN_A_ROW_SILVER] = "Kill at least 60 monsters in a row.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.MONSTERS_KILLED_IN_A_ROW_GOLD] = "Kill at least 150 monsters in a row.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.EPIC1] = "Win the first epic battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.EPIC2] = "Win the second epic battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.EPIC3] = "Win the third epic battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.EPIC4] = "Win the fourth epic battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.EPIC5] = "Win the final battle.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_BRONZE] = "Kill at least 10.000 monsters throughout your journey.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_SILVER] = "Kill at least 25.000 monsters throughout your journey.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_GOLD] = "Kill at least 50.000 monsters throughout your journey.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_BRONZE] = "Win at least 40 battles throughout your journey.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_SILVER] = "Win at least 80 battles throughout your journey.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_GOLD] = "Win at least 120 battles throughout your journey.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_BRONZE] = "Create at least 2.500 gems throughout your journey.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_SILVER] = "Create at least 5.000 gems throughout your journey.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_GOLD] = "Create at least 10.000 gems throughout your journey.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_BRONZE] = "Build at least 80 towers throughout your journey.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_SILVER] = "Build at least 120 towers throughout your journey.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_GOLD] = "Build at least 160 towers throughout your journey.";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.HIDDEN1] = "Secret level amulet";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.HIDDEN2] = "Secret level amulet";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.HIDDEN3] = "Secret level amulet";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.HIDDEN4] = "Secret level amulet";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.HIDDEN5] = "Secret level amulet";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.HIDDEN6] = "Secret level amulet";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.HIDDEN7] = "Secret level amulet";
badgeDescriptionsDoNotHave[com.giab.games.gemc.armor.const.BadgeId.HIDDEN8] = "Secret level amulet";
}
function populateBadgeScores() {
badgeScores = new Array();
badgeScores[com.giab.games.gemc.armor.const.BadgeId.GEM_BOMBS_THROWN_BRONZE] = 10000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.GEM_BOMBS_THROWN_SILVER] = 15000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.GEM_BOMBS_THROWN_GOLD] = 20000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.GEMS_CREATED_BRONZE] = 15000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.GEMS_CREATED_SILVER] = 22500;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.GEMS_CREATED_GOLD] = 30000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.GEMS_COMBINED_BRONZE] = 20000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.GEMS_COMBINED_SILVER] = 30000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.GEMS_COMBINED_GOLD] = 40000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.GRADE_7_OR_HIGHER_GEMS_CREATED_BRONZE] = 40000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.GRADE_7_OR_HIGHER_GEMS_CREATED_SILVER] = 60000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.GRADE_7_OR_HIGHER_GEMS_CREATED_GOLD] = 80000 /* 0x013880 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOWERS_BUILT_BRONZE] = 20000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOWERS_BUILT_SILVER] = 30000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOWERS_BUILT_GOLD] = 40000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.MONSTERS_KILLED_IN_A_ROW_BRONZE] = 15000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.MONSTERS_KILLED_IN_A_ROW_SILVER] = 22500;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.MONSTERS_KILLED_IN_A_ROW_GOLD] = 30000;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.EPIC1] = 100000 /* 0x0186A0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.EPIC2] = 150000 /* 0x0249F0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.EPIC3] = 200000 /* 0x030D40 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.EPIC4] = 250000 /* 0x03D090 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.EPIC5] = 300000 /* 0x0493E0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_BRONZE] = 100000 /* 0x0186A0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_SILVER] = 200000 /* 0x030D40 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_GOLD] = 300000 /* 0x0493E0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_BRONZE] = 100000 /* 0x0186A0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_SILVER] = 200000 /* 0x030D40 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_GOLD] = 300000 /* 0x0493E0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_BRONZE] = 100000 /* 0x0186A0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_SILVER] = 200000 /* 0x030D40 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_GOLD] = 300000 /* 0x0493E0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_BRONZE] = 100000 /* 0x0186A0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_SILVER] = 200000 /* 0x030D40 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_GOLD] = 300000 /* 0x0493E0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.HIDDEN1] = 150000 /* 0x0249F0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.HIDDEN2] = 150000 /* 0x0249F0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.HIDDEN3] = 150000 /* 0x0249F0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.HIDDEN4] = 150000 /* 0x0249F0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.HIDDEN5] = 150000 /* 0x0249F0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.HIDDEN6] = 150000 /* 0x0249F0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.HIDDEN7] = 150000 /* 0x0249F0 */;
badgeScores[com.giab.games.gemc.armor.const.BadgeId.HIDDEN8] = 150000 /* 0x0249F0 */;
}
function buttonsInit() {
var vThis = this;
var _local2;
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.BADGEID_NUM) {
mcw["mcBadge" + _local2].inX = mcw["mcBadge" + _local2]._x;
mcw["mcBadge" + _local2].inY = mcw["mcBadge" + _local2]._y;
mcw["mcBadge" + _local2].id = _local2;
mcw["mcBadge" + _local2].icon.useHandCursor = false;
mcw["mcBadge" + _local2].icon.onRollOver = function () {
if (MovieClip(this)._currentframe > 1) {
vThis.main.sndTickOver.start();
vThis.mcw.mcInfo.tfDesc.text = ((vThis.badgeDescriptions[MovieClip(this)._parent.id] + "\n--- ") + com.giab.common.toolbox.NumberFormatter.format(vThis.badgeScores[MovieClip(this)._parent.id])) + " points ---";
TextField(vThis.mcw.mcInfo.tfDesc)._alpha = 100;
} else {
vThis.mcw.mcInfo.tfDesc.text = vThis.badgeDescriptionsDoNotHave[MovieClip(this)._parent.id];
TextField(vThis.mcw.mcInfo.tfDesc)._alpha = 60;
}
};
mcw["mcBadge" + _local2].icon.onRollOut = (mcw["mcBadge" + _local2].icon.onDragOut = function () {
vThis.mcw.mcInfo.tfDesc.text = com.giab.games.gemc.armor.const.Text.BADGES_INFO;
TextField(vThis.mcw.mcInfo.tfDesc)._alpha = 60;
});
_local2++;
}
mcw.btnDone.onPress = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.screenStatus = com.giab.common.const.ScreenStatus.DISAPPEARING;
vThis.main.nextScreen = com.giab.common.const.ScreenId.LEVELSELECTOR;
vThis.main.sndTickPress.start();
}
};
mcw.btnDone.onRollOver = function () {
if (vThis.screenStatus == com.giab.common.const.ScreenStatus.IDLE) {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
}
};
mcw.btnDone.onRollOut = (mcw.btnDone.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
mcw.mcArmorNag.onRelease = function () {
vThis.main.mcRoot.getURL(com.giab.games.gemc.armor.const.Url.MOREGAMES + "?gemCraft=amuletsScreen", "_blank");
};
}
function initiate() {
screenStatus = com.giab.common.const.ScreenStatus.APPEARING;
screenStep = 0;
mcw.mc._visible = true;
mcw.mcInfo._y = 600;
mcw.btnDone._y = 600;
mcw.mcTfBattleBadges._x = -300;
mcw.mcTfCarreerBadges._x = -300;
var _local3;
mcw.mcInfo.tfDesc.text = com.giab.games.gemc.armor.const.Text.BADGES_INFO;
TextField(mcw.mcInfo.tfDesc)._alpha = 60;
_local3 = 0;
while (_local3 < com.giab.games.gemc.armor.const.GameSpecs.BADGEID_NUM) {
mcw["mcBadge" + _local3]._y = -300;
mcw["mcBadge" + _local3].tf.text = "";
if (main.player.badges[_local3] > 0) {
mcw["mcBadge" + _local3].icon.gotoAndStop(_local3 + 2);
} else {
mcw["mcBadge" + _local3].icon.gotoAndStop(1);
}
if (main.player.badges[_local3] > 1) {
mcw["mcBadge" + _local3].tf.text = main.player.badges[_local3];
}
_local3++;
}
if (_root._url.indexOf("armorgames.com/") == -1) {
mcw.mcArmorNag._visible = true;
mcw.mcArmorNag._y = -1000;
} else {
mcw.mcArmorNag._visible = false;
}
}
function doEnterFrame() {
var _local2;
if (screenStatus == com.giab.common.const.ScreenStatus.APPEARING) {
screenStep++;
if (screenStep < 70) {
mcw.mcInfo._y = com.giab.common.easing.Strong2.easeOut(screenStep, 577, -220, 20);
mcw.btnDone._y = com.giab.common.easing.Back2.easeOut(screenStep - 20, 520, -100, 20);
mcw.mcTfBattleBadges._x = com.giab.common.easing.Strong2.easeOut(screenStep - 40, -400, 407, 20);
mcw.mcTfCarreerBadges._x = com.giab.common.easing.Strong2.easeOut(screenStep - 40, -400, 642, 20);
_local2 = com.giab.games.gemc.armor.const.GameSpecs.BADGEID_NUM - 1;
while (_local2 >= 0) {
mcw["mcBadge" + _local2]._y = com.giab.common.easing.Back2.easeOut(screenStep - _local2, mcw["mcBadge" + _local2].inY - 480, 480, 15);
_local2--;
}
mcw.mcArmorNag._y = com.giab.common.easing.Back2.easeOut(screenStep - 20, -260, 300, 20);
} else {
screenStep = 0;
screenStatus = com.giab.common.const.ScreenStatus.IDLE;
}
} else if (screenStatus == com.giab.common.const.ScreenStatus.DISAPPEARING) {
screenStep++;
if (screenStep < 70) {
mcw.mcInfo._y = com.giab.common.easing.Strong2.easeOut(screenStep - 20, 357, 220, 20);
mcw.btnDone._y = com.giab.common.easing.Back2.easeIn(screenStep - 10, 420, 100, 20);
mcw.mcTfBattleBadges._x = com.giab.common.easing.Strong2.easeOut(screenStep, 7, -407, 15);
mcw.mcTfCarreerBadges._x = com.giab.common.easing.Strong2.easeOut(screenStep, 242, -642, 15);
_local2 = 0;
while (_local2 < com.giab.games.gemc.armor.const.GameSpecs.BADGEID_NUM) {
mcw["mcBadge" + _local2]._y = com.giab.common.easing.Back2.easeIn(screenStep - _local2, mcw["mcBadge" + _local2].inY, -480, 20);
_local2++;
}
mcw.mcArmorNag._y = com.giab.common.easing.Back2.easeIn(screenStep - 20, 40, -300, 20);
} else {
screenStep = 0;
main.switchScreenVisibility();
}
}
}
function giveLevelBadges(pCtrlIngame) {
var _local1 = new Array();
if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GEM_BOMBS_THROWN] >= 75) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.GEM_BOMBS_THROWN_GOLD);
} else if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GEM_BOMBS_THROWN] >= 30) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.GEM_BOMBS_THROWN_SILVER);
} else if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GEM_BOMBS_THROWN] >= 15) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.GEM_BOMBS_THROWN_BRONZE);
}
if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.TOWERS_BUILT] >= 9) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.TOWERS_BUILT_GOLD);
} else if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.TOWERS_BUILT] >= 6) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.TOWERS_BUILT_SILVER);
} else if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.TOWERS_BUILT] >= 3) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.TOWERS_BUILT_BRONZE);
}
if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GEMS_CREATED] >= 125) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.GEMS_CREATED_GOLD);
} else if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GEMS_CREATED] >= 50) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.GEMS_CREATED_SILVER);
} else if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GEMS_CREATED] >= 25) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.GEMS_CREATED_BRONZE);
}
if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GEMS_COMBINED] >= 75) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.GEMS_COMBINED_GOLD);
} else if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GEMS_COMBINED] >= 30) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.GEMS_COMBINED_SILVER);
} else if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GEMS_COMBINED] >= 15) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.GEMS_COMBINED_BRONZE);
}
if (pCtrlIngame.maxMonstersKilledInARow >= 150) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.MONSTERS_KILLED_IN_A_ROW_GOLD);
} else if (pCtrlIngame.maxMonstersKilledInARow >= 60) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.MONSTERS_KILLED_IN_A_ROW_SILVER);
} else if (pCtrlIngame.maxMonstersKilledInARow >= 30) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.MONSTERS_KILLED_IN_A_ROW_BRONZE);
}
if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GRADE_7_OR_HIGHER_GEMS_CREATED] >= 7) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.GRADE_7_OR_HIGHER_GEMS_CREATED_GOLD);
} else if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GRADE_7_OR_HIGHER_GEMS_CREATED] >= 4) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.GRADE_7_OR_HIGHER_GEMS_CREATED_SILVER);
} else if (pCtrlIngame.levelStats[com.giab.games.gemc.armor.const.StatId.GRADE_7_OR_HIGHER_GEMS_CREATED] >= 2) {
_local1.push(com.giab.games.gemc.armor.const.BadgeId.GRADE_7_OR_HIGHER_GEMS_CREATED_BRONZE);
}
return(_local1);
}
function giveCarreerBadges(pCtrlIngame, pPlayer) {
var _local3 = new Array();
if ((pCtrlIngame.levelData.specId == com.giab.games.gemc.armor.const.LevelSpecId.EPIC1) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.EPIC1] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.EPIC1);
} else if ((pCtrlIngame.levelData.specId == com.giab.games.gemc.armor.const.LevelSpecId.EPIC2) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.EPIC2] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.EPIC2);
} else if ((pCtrlIngame.levelData.specId == com.giab.games.gemc.armor.const.LevelSpecId.EPIC3) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.EPIC3] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.EPIC3);
} else if ((pCtrlIngame.levelData.specId == com.giab.games.gemc.armor.const.LevelSpecId.EPIC4) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.EPIC4] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.EPIC4);
} else if ((pCtrlIngame.levelData.specId == com.giab.games.gemc.armor.const.LevelSpecId.EPIC5) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.EPIC5] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.EPIC5);
} else if ((pCtrlIngame.levelData.specId == com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN1) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.HIDDEN1] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.HIDDEN1);
} else if ((pCtrlIngame.levelData.specId == com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN2) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.HIDDEN2] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.HIDDEN2);
} else if ((pCtrlIngame.levelData.specId == com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN3) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.HIDDEN3] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.HIDDEN3);
} else if ((pCtrlIngame.levelData.specId == com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN4) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.HIDDEN4] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.HIDDEN4);
} else if ((pCtrlIngame.levelData.specId == com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN5) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.HIDDEN5] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.HIDDEN5);
} else if ((pCtrlIngame.levelData.specId == com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN6) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.HIDDEN6] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.HIDDEN6);
} else if ((pCtrlIngame.levelData.specId == com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN7) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.HIDDEN7] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.HIDDEN7);
} else if ((pCtrlIngame.levelData.specId == com.giab.games.gemc.armor.const.LevelSpecId.HIDDEN8) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.HIDDEN8] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.HIDDEN8);
}
if (_root._url.indexOf("armorgames.com/") != -1) {
if ((pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.BATTLES_WON] >= 40) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_BRONZE] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_BRONZE);
} else if ((pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.BATTLES_WON] >= 80) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_SILVER] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_SILVER);
} else if ((pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.BATTLES_WON] >= 120) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_GOLD] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_LEVELS_WON_GOLD);
}
if ((pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.MONSTERS_KILLED] >= 10000) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_BRONZE] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_BRONZE);
} else if ((pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.MONSTERS_KILLED] >= 25000) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_SILVER] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_SILVER);
} else if ((pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.MONSTERS_KILLED] >= 50000) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_GOLD] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_MONSTERS_KILLED_GOLD);
}
if ((pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.GEMS_CREATED] >= 2500) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_BRONZE] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_BRONZE);
} else if ((pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.GEMS_CREATED] >= 5000) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_SILVER] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_SILVER);
} else if ((pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.GEMS_CREATED] >= 10000) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_GOLD] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_GEMS_CREATED_GOLD);
}
if ((pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.TOWERS_BUILT] >= 80) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_BRONZE] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_BRONZE);
} else if ((pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.TOWERS_BUILT] >= 120) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_SILVER] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_SILVER);
} else if ((pPlayer.statistics[com.giab.games.gemc.armor.const.StatId.TOWERS_BUILT] >= 160) && (pPlayer.badges[com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_GOLD] != 1)) {
_local3.push(com.giab.games.gemc.armor.const.BadgeId.TOTAL_NUMBER_OF_TOWERS_BUILT_GOLD);
}
}
return(_local3);
}
function giveBadgeScores(pArray) {
var _local4 = new Array();
var _local2;
_local2 = 0;
while (_local2 < pArray.length) {
_local4.push(badgeScores[pArray[_local2]]);
_local2++;
}
return(_local4);
}
}
Symbol 1355 MovieClip [__Packages.com.giab.games.gemc.armor.const.BadgeId] Frame 0
class com.giab.games.gemc.armor.const.BadgeId
{
function BadgeId () {
}
static var GEM_BOMBS_THROWN_BRONZE = 0;
static var GEM_BOMBS_THROWN_SILVER = 1;
static var GEM_BOMBS_THROWN_GOLD = 2;
static var GEMS_CREATED_BRONZE = 3;
static var GEMS_CREATED_SILVER = 4;
static var GEMS_CREATED_GOLD = 5;
static var GEMS_COMBINED_BRONZE = 6;
static var GEMS_COMBINED_SILVER = 7;
static var GEMS_COMBINED_GOLD = 8;
static var GRADE_7_OR_HIGHER_GEMS_CREATED_BRONZE = 9;
static var GRADE_7_OR_HIGHER_GEMS_CREATED_SILVER = 10;
static var GRADE_7_OR_HIGHER_GEMS_CREATED_GOLD = 11;
static var TOWERS_BUILT_BRONZE = 12;
static var TOWERS_BUILT_SILVER = 13;
static var TOWERS_BUILT_GOLD = 14;
static var MONSTERS_KILLED_IN_A_ROW_BRONZE = 15;
static var MONSTERS_KILLED_IN_A_ROW_SILVER = 16;
static var MONSTERS_KILLED_IN_A_ROW_GOLD = 17;
static var TOTAL_NUMBER_OF_MONSTERS_KILLED_BRONZE = 21;
static var TOTAL_NUMBER_OF_MONSTERS_KILLED_SILVER = 22;
static var TOTAL_NUMBER_OF_MONSTERS_KILLED_GOLD = 23;
static var TOTAL_NUMBER_OF_LEVELS_WON_BRONZE = 24;
static var TOTAL_NUMBER_OF_LEVELS_WON_SILVER = 25;
static var TOTAL_NUMBER_OF_LEVELS_WON_GOLD = 26;
static var TOTAL_NUMBER_OF_GEMS_CREATED_BRONZE = 27;
static var TOTAL_NUMBER_OF_GEMS_CREATED_SILVER = 28;
static var TOTAL_NUMBER_OF_GEMS_CREATED_GOLD = 29;
static var TOTAL_NUMBER_OF_TOWERS_BUILT_BRONZE = 30;
static var TOTAL_NUMBER_OF_TOWERS_BUILT_SILVER = 31;
static var TOTAL_NUMBER_OF_TOWERS_BUILT_GOLD = 32;
static var EPIC1 = 33;
static var EPIC2 = 34;
static var EPIC3 = 35;
static var EPIC4 = 36;
static var EPIC5 = 37;
static var HIDDEN1 = 38;
static var HIDDEN2 = 39;
static var HIDDEN3 = 40;
static var HIDDEN4 = 41;
static var HIDDEN5 = 42;
static var HIDDEN6 = 43;
static var HIDDEN7 = 44;
static var HIDDEN8 = 45;
}
Symbol 1356 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlOptions] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlOptions
{
var main;
function CtrlOptions (pMain) {
main = pMain;
}
function switchOptions() {
if (main.isPaused) {
if (!main.isOptionsDragging) {
main.preferences.flush();
main.isPaused = false;
main.mcOptions._visible = false;
main.mcOptions._y = -500;
main.btnOptions._x = 630;
main.btnOptions._y = -52;
}
} else {
if (main.currentScreen == com.giab.common.const.ScreenId.INGAME) {
main.mcOptions.mcTfPaused.gotoAndStop(1);
main.mcOptions.btnContinue._visible = true;
main.mcOptions.btnReturn._visible = true;
main.mcOptions.btnRetry._visible = true;
main.mcOptions.btnDone._visible = false;
} else {
main.mcOptions.mcTfPaused.gotoAndStop(2);
main.mcOptions.btnContinue._visible = false;
main.mcOptions.btnReturn._visible = false;
main.mcOptions.btnRetry._visible = false;
main.mcOptions.btnDone._visible = true;
}
main.isPaused = true;
renderOptions();
main.mcOptions._visible = true;
main.mcOptions._y = 0;
}
main.setAllSoundsVolume();
}
function initiateOptionsPanel() {
var vMain = main;
var vThis = this;
main.btnOptions.onPress = function () {
vMain.sndTickPress.start();
vThis.switchOptions();
};
main.mcOptions.btnDone.onPress = function () {
vMain.sndTickPress.start();
vThis.switchOptions();
};
main.mcOptions.btnDone.onRollOver = function () {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
};
main.mcOptions.btnDone.onRollOut = (main.mcOptions.btnDone.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
main.mcOptions.btnContinue.onPress = function () {
vMain.sndTickPress.start();
vThis.switchOptions();
};
main.mcOptions.btnContinue.onRollOver = function () {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
};
main.mcOptions.btnContinue.onRollOut = (main.mcOptions.btnContinue.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
main.mcOptions.btnMoreGames.onRelease = function () {
_root.getURL(com.giab.games.gemc.armor.const.Url.MOREGAMES + "?gemCraft=optionsScreenMoreGames", "_blank");
};
main.mcOptions.btnMoreGames.onRollOver = function () {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
};
main.mcOptions.btnMoreGames.onRollOut = (main.mcOptions.btnMoreGames.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
main.mcOptions.btnReturn.onPress = function () {
vMain.ctrlIngame.c.returnToLevelSelector();
vMain.sndTickPress.start();
vThis.switchOptions();
};
main.mcOptions.btnReturn.onRollOver = function () {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
};
main.mcOptions.btnReturn.onRollOut = (main.mcOptions.btnReturn.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
main.mcOptions.btnRetry.onPress = function () {
vMain.ctrlIngame.b.removeAllMovieClips();
vMain.mcwRoot.mcwIngame.btnSpeedUp.gotoAndStop(1);
vMain.vfxEngine.removeAllVfx();
vMain.ctrlIngame.mcPanel.removeMovieClip();
vMain.ctrlIngame.b.setScene(vMain.ctrlIngame.levelData.num);
vMain.ctrlIngame.b.initiate();
vMain.sndTickPress.start();
vThis.switchOptions();
};
main.mcOptions.btnRetry.onRollOver = function () {
vThis.main.sndTickOver.start();
MovieClip(this).plate.gotoAndStop(2);
};
main.mcOptions.btnRetry.onRollOut = (main.mcOptions.btnRetry.onDragOut = function () {
MovieClip(this).plate.gotoAndStop(1);
});
main.mcOptions.btnSoundVolume.onPress = function () {
MovieClip(this).startDrag(false, 53, MovieClip(this)._y, 583, MovieClip(this)._y);
vMain.isOptionsDragging = true;
};
main.mcOptions.btnSoundVolume.onRelease = function () {
MovieClip(this).stopDrag();
vMain.isOptionsDragging = false;
};
main.mcOptions.btnSoundVolume.onReleaseOutside = function () {
MovieClip(this).stopDrag();
vMain.isOptionsDragging = false;
};
main.mcOptions.btnQuality.onPress = function () {
MovieClip(this).startDrag(false, 53, MovieClip(this)._y, 583, MovieClip(this)._y);
vMain.isOptionsDragging = true;
};
main.mcOptions.btnQuality.onRelease = function () {
MovieClip(this).stopDrag();
vMain.isOptionsDragging = false;
};
main.mcOptions.btnQuality.onReleaseOutside = function () {
MovieClip(this).stopDrag();
vMain.isOptionsDragging = false;
};
main.mcOptions.btnParticlesNum.onPress = function () {
MovieClip(this).startDrag(false, 53, MovieClip(this)._y, 583, MovieClip(this)._y);
vMain.isOptionsDragging = true;
};
main.mcOptions.btnParticlesNum.onRelease = function () {
MovieClip(this).stopDrag();
vMain.isOptionsDragging = false;
};
main.mcOptions.btnParticlesNum.onReleaseOutside = function () {
MovieClip(this).stopDrag();
vMain.isOptionsDragging = false;
};
main.mcOptions.btnSpellTutor.onRelease = function () {
if (MovieClip(this)._currentframe == 1) {
vMain.preferences.isStatusInfoEnabled = true;
MovieClip(this).gotoAndStop(2);
} else {
vMain.preferences.isStatusInfoEnabled = false;
MovieClip(this).gotoAndStop(1);
}
};
main.mcOptions.btnDegradeScrollingMap.onRelease = function () {
if (MovieClip(this)._currentframe == 1) {
vMain.preferences.isScrollingMapDegraded = true;
MovieClip(this).gotoAndStop(2);
} else {
vMain.preferences.isScrollingMapDegraded = false;
MovieClip(this).gotoAndStop(1);
}
};
renderOptions();
}
function renderOptions() {
if (main.isOptionsDragging) {
main.preferences.soundVolumeBase = com.giab.common.toolbox.MathToolbox.convertCoord(53, 583, main.mcOptions.btnSoundVolume._x, 0, 100);
main.preferences.qualityBase = com.giab.common.toolbox.MathToolbox.convertCoord(53, 583, main.mcOptions.btnQuality._x, 0, 100);
main.preferences.particlesNumBase = com.giab.common.toolbox.MathToolbox.convertCoord(53, 583, main.mcOptions.btnParticlesNum._x, 0, 100);
} else {
main.mcOptions.btnSoundVolume._x = com.giab.common.toolbox.MathToolbox.convertCoord(0, 100, main.preferences.soundVolumeBase, 53, 583);
main.mcOptions.btnQuality._x = com.giab.common.toolbox.MathToolbox.convertCoord(0, 100, main.preferences.qualityBase, 53, 583);
main.mcOptions.btnParticlesNum._x = com.giab.common.toolbox.MathToolbox.convertCoord(0, 100, main.preferences.particlesNumBase, 53, 583);
}
if (main.preferences.isStatusInfoEnabled) {
main.mcOptions.btnSpellTutor.gotoAndStop(2);
} else {
main.mcOptions.btnSpellTutor.gotoAndStop(1);
}
if (main.preferences.isScrollingMapDegraded) {
main.mcOptions.btnDegradeScrollingMap.gotoAndStop(2);
} else {
main.mcOptions.btnDegradeScrollingMap.gotoAndStop(1);
}
main.preferences.soundVolume = Math.round(main.preferences.soundVolumeBase);
main.preferences.quality = ((main.preferences.qualityBase < 33) ? 0 : (((main.preferences.qualityBase < 66) ? 1 : (((main.preferences.qualityBase < 95) ? 2 : 3)))));
main.preferences.particlesNum = ((main.preferences.particlesNumBase < 5) ? 0 : (((main.preferences.particlesNumBase < 24) ? 1 : (((main.preferences.particlesNumBase < 48) ? 2 : (((main.preferences.particlesNumBase < 72) ? 3 : (((main.preferences.particlesNumBase < 95) ? 4 : 5)))))))));
main.mcOptions.tfSoundVolume.text = main.preferences.soundVolume.toString();
main.mcOptions.tfQuality.text = ((main.preferences.quality == 0) ? "low" : (((main.preferences.quality == 1) ? "medium" : "high")));
_root._quality = ((main.preferences.quality == 0) ? "LOW" : (((main.preferences.quality == 1) ? "MEDIUM" : "HIGH")));
main.mcOptions.tfParticlesNum.text = ((main.preferences.particlesNum == 0) ? "none" : (((main.preferences.particlesNum == 1) ? "very low" : (((main.preferences.particlesNum == 2) ? "low" : (((main.preferences.particlesNum == 3) ? "medium" : (((main.preferences.particlesNum == 4) ? "high" : "very high")))))))));
}
}
Symbol 1357 MovieClip [__Packages.com.giab.games.gemc.armor.ctrl.CtrlContextTutor] Frame 0
class com.giab.games.gemc.armor.ctrl.CtrlContextTutor
{
var main, tutorsWaiting, activeTutor, isFadingOutFast, panelX, panelY, panelCoords, lastIngameStatus, showStatus, panelShakeEnergy;
function CtrlContextTutor (pMain) {
var vThis = this;
main = pMain;
tutorsWaiting = new Array();
activeTutor = null;
isFadingOutFast = false;
panelX = 1000;
panelY = 1000;
panelCoords = [[64, 75], [5, 40], [35, 75], [71, 75], [108, 80], [108, 80], [120, 80], [50, 60], [61, 80], [61, 80], [61, 80], [61, 80], [93, 80], [54, 70], [226, 46], [226, 218], [33, 130], [22, 18], [122, 218], [167, 54], [248, 216], [81, 90], [81, 90]];
main.mcContextTutor.onPress = function () {
if (vThis.showStatus == com.giab.common.const.TutorShowStatus.SHOWING) {
vThis.showStatus = com.giab.common.const.TutorShowStatus.DISAPPEARING;
}
};
}
function requestTutor(pId) {
if (main.player.contextTutorStatuses[pId] != 1) {
tutorsWaiting.push(pId);
main.player.contextTutorStatuses[pId] = 1;
}
if (tutorsWaiting.length > 0) {
if (activeTutor == null) {
showNextTutor();
}
}
}
function dismissAllTutorsInQueue() {
tutorsWaiting = new Array();
activeTutor = null;
isFadingOutFast = true;
}
function showNextTutor() {
main.sndContexttutor.start();
if (main.currentScreen == com.giab.common.const.ScreenId.INGAME) {
if (main.ctrlIngame.status != com.giab.common.const.IngameStatus.PAUSED_FOR_ALERT_PANEL) {
lastIngameStatus = main.ctrlIngame.status;
main.ctrlIngame.status = com.giab.common.const.IngameStatus.PAUSED_FOR_ALERT_PANEL;
}
}
main.mcContextTutor._alpha = 0;
main.mcContextTutor._visible = true;
activeTutor = tutorsWaiting[0];
tutorsWaiting.splice(0, 1);
showStatus = com.giab.common.const.TutorShowStatus.APPEARING;
panelShakeEnergy = 12;
main.mcContextTutor.gotoAndStop(activeTutor + 1);
main.mcContextTutor._x = panelCoords[activeTutor][0];
main.mcContextTutor._y = panelCoords[activeTutor][1];
panelX = main.mcContextTutor._x;
panelY = main.mcContextTutor._y;
}
function doEnterFrame() {
if (panelShakeEnergy > 0) {
panelShakeEnergy--;
main.mcContextTutor._x = panelX + Math.max(-5, Math.min(5, (Math.random() * panelShakeEnergy) - (panelShakeEnergy / 2)));
main.mcContextTutor._y = panelY + Math.max(-5, Math.min(5, (Math.random() * panelShakeEnergy) - (panelShakeEnergy / 2)));
}
if (isFadingOutFast) {
main.mcContextTutor._alpha = main.mcContextTutor._alpha - 15;
if (main.mcContextTutor._alpha < 1) {
isFadingOutFast = false;
main.mcContextTutor._visible = false;
main.mcContextTutor._y = 1000;
panelX = 1000;
panelY = 1000;
}
return(undefined);
}
if (activeTutor != null) {
if (showStatus == com.giab.common.const.TutorShowStatus.APPEARING) {
main.mcContextTutor._alpha = main.mcContextTutor._alpha + 10;
if (main.mcContextTutor._alpha > 99) {
showStatus = com.giab.common.const.TutorShowStatus.SHOWING;
}
} else if (showStatus == com.giab.common.const.TutorShowStatus.SHOWING) {
if (Key.isDown(32) || (Key.isDown(13))) {
showStatus = com.giab.common.const.TutorShowStatus.DISAPPEARING;
}
} else {
main.mcContextTutor._alpha = main.mcContextTutor._alpha - 10;
if (main.mcContextTutor._alpha < 1) {
activeTutor = null;
panelX = 1000;
panelY = 1000;
main.mcContextTutor._y = 1000;
if (tutorsWaiting.length > 0) {
showNextTutor();
} else if (main.currentScreen == com.giab.common.const.ScreenId.INGAME) {
main.ctrlIngame.status = lastIngameStatus;
}
}
}
}
}
}
Symbol 1358 MovieClip [__Packages.com.giab.common.const.TutorShowStatus] Frame 0
class com.giab.common.const.TutorShowStatus
{
function TutorShowStatus () {
}
static var APPEARING = 0;
static var SHOWING = 1;
static var DISAPPEARING = 2;
}
Symbol 84 MovieClip Frame 1
stop();
Symbol 91 MovieClip Frame 1
stop();
Symbol 98 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 2
play();
Symbol 122 MovieClip Frame 100
stop();
Symbol 160 MovieClip Frame 1
stop();
Symbol 236 MovieClip Frame 1
stop();
Symbol 254 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 1
stop();
Symbol 305 MovieClip Frame 1
stop();
Symbol 403 MovieClip Frame 1
stop();
Symbol 434 MovieClip Frame 25
stop();
Symbol 460 MovieClip Frame 1
stop();
Symbol 483 MovieClip Frame 1
stop();
Symbol 488 MovieClip Frame 1
stop();
Symbol 492 MovieClip Frame 1
stop();
Symbol 509 MovieClip Frame 1
this.onPress = function () {
if (_root.giabSplashUrlCalled != true) {
getURL ("http://gameinabottle.com", "_blank");
_root.giabSplashUrlCalled = true;
}
};
Symbol 517 MovieClip Frame 1
stop();
Symbol 519 MovieClip Frame 1
stop();
Symbol 521 MovieClip Frame 1
stop();
Symbol 523 MovieClip Frame 1
stop();
Symbol 525 MovieClip Frame 1
stop();
Symbol 526 MovieClip Frame 1
stop();
Symbol 538 Button
on (press) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 542 MovieClip Frame 1
stop();
Symbol 542 MovieClip Frame 218
stop();
Symbol 564 MovieClip [grassPatch] Frame 1
stop();
Symbol 585 MovieClip [vegetationLarge] Frame 1
stop();
Symbol 606 MovieClip [vegetationSmall] Frame 1
stop();
Symbol 627 MovieClip [stonePatch] Frame 1
stop();
Symbol 660 MovieClip [roadTile] Frame 1
stop();
Symbol 681 MovieClip Frame 1
stop();
Symbol 702 MovieClip Frame 1
stop();
Symbol 730 MovieClip [enemyBase] Frame 1
stop();
Symbol 756 MovieClip Frame 1
stop();
Symbol 761 MovieClip Frame 1
stop();
Symbol 842 MovieClip Frame 1
stop();
Symbol 856 MovieClip Frame 1
stop();
Symbol 895 MovieClip Frame 1
stop();
Symbol 911 MovieClip Frame 1
stop();
Symbol 928 MovieClip [vfxGlare] Frame 1
stop();
Symbol 979 MovieClip Frame 1
stop();
Symbol 1012 MovieClip Frame 1
stop();
Symbol 1045 MovieClip Frame 1
stop();
Symbol 1058 MovieClip [mcBuildingSelectGlare] Frame 1
stop();
Symbol 1086 MovieClip [vfxSmoke] Frame 1
stop();
Symbol 1103 MovieClip [vfxWaveBrickFragment] Frame 1
stop();
Symbol 1114 MovieClip [healthmarker] Frame 1
stop();
Symbol 1137 MovieClip Frame 1
stop();
Symbol 1170 MovieClip Frame 198
gotoAndPlay (1);
Symbol 1227 MovieClip Frame 59
gotoAndPlay (1);
Symbol 1230 MovieClip Frame 59
gotoAndPlay (1);
Symbol 1243 MovieClip Frame 104
gotoAndPlay (1);
Symbol 1264 MovieClip [contextTutor] Frame 1
stop();
Symbol 1270 MovieClip Frame 1
this.onPress = function () {
this._parent._visible = false;
this._parent._y = 500;
};