/*
Copyright 2012 Greenheart Games Pty. Ltd.
Reverse engineering or code re-use prohibited. Please support us by buying our games.

Modding only allowed in compliance with the Modding Agreement available under ./mods

www.greenheartgames.com
support@greenheartgames.com

All Rights Reserved.*/var GameFlags={ghg6:!0,TUTORIAL_DISABLED:!1,CONFERENCE_DISABLED:!1,GAME_OVER_DISABLED:!1,BUBBLE_SOUND_AT_SPAWN_TIME:!0,BUBBLE_SOUND_AT_END_OF_ANIMATION:!0,SMALL_GAME_DURATION_FACTOR:1,MEDIUM_GAME_DURATION_FACTOR:2,LARGE_GAME_DURATION_FACTOR:3,AAA_GAME_DURATION_FACTOR:6,MULTIPLATFORM_DURATION_FACTOR:1.45,MULTIPLATFORM_WEIGHTING:0.7,SMALL_GAME_POINTS_FACTOR:1,MEDIUM_GAME_POINTS_FACTOR:1.2,LARGE_GAME_POINTS_FACTOR:1.4,AAA_GAME_POINTS_FACTOR:1.8,CONSOLE_SALES_LENGTH:144,TEXT_CACHING:!1,MAIN_MISSIONS_PER_GAME:9,
RANDOMIZE_TOPICS:!0,SHOW_FPS:!0,GROUP_POINTS:!0,SKIP_FRAME:!1,ESC_MENU:!1,RCLICK_MENU:!1,ARM_VERSION:!1,LIMIT_SPAWN_SOUNDS:!1,LIMIT_SOUND_INSTANCE:!1,IS_LOW_RES:!1,ghg7:!1,SLOWDOWN_BASEIMAGE:!1,IS_STEAM:!1,G782:!1,ghg6:!1,TUTORIAL_DISABLED:!1,CONFERENCE_DISABLED:!1,GAME_OVER_DISABLED:!1,SHOW_FPS:!1,ESC_MENU:!0,IS_STEAM:!0},GameFlags=Object.freeze(GameFlags);
(function(){(function(){var a=(0.12).toLocaleString().charAt(1),d="."===a?",":".";"1,000.00"!==(1E3).toLocaleString()&&(Number.prototype.toLocaleString=function(){var c=Math.abs(this),b=c.toFixed(2).slice(-2),c=c.toFixed(2).slice(0,-3).replace(/(?=(?!^)(?:\d{3})+(?!\d))/g,d)+a+b;return 0>this?"-"+c:c})})(Number.prototype.toLocaleString);String.prototype.format=function(){var a=arguments;return this.replace(/{(\d+)}/g,function(d,c){return"undefined"!=typeof a[c]?a[c]:d})};String.prototype.log=function(){GameFlags.ghg6&&
console.log(this)};String.prototype.replaceAll=function(a,d){return this.split(a).join(d)};"function"!=typeof String.prototype.startsWith&&(String.prototype.startsWith=function(a){return this.slice(0,a.length)==a});Number.prototype.clamp=function(a,d){return Math.min(Math.max(this,a),d)};Array.prototype.weakIndexOf=function(a){for(var d=0;d<this.length;d++)if(this[d]==a)return d;return-1};Array.prototype.pickRandom=function(a){a=!a&&GameManager.company?GameManager.company.getRandom():a?a.random():
Math.random();return this[Math.min(this.length-1,Math.floor(a*this.length))]};Array.prototype.shuffle=function(a){if(this.length<=1)return this.slice();for(var d=[],c=0;c<this.length;c++)d.push(c);for(var b=[],c=0;c<this.length;c++){var g=d.pickRandom(a);d.remove(g);b.push(this[g])}return b};Array.prototype.insertAt=function(a,d){this.splice(a,0,d)};Array.prototype.getPrevious=function(a){a=a-1;return a<0||a>=this.length?null:this[a]};Array.prototype.first=function(a){if(!a)return this.length>0?this[0]:
null;for(var d=0;d<this.length;d++){var c=this[d];if(a(c))return c}return null};Array.prototype.last=function(a){if(!a)return this.length>0?this[this.length-1]:null;for(var d=this.length-1;d>=0;d--){var c=this[d];if(a(c))return c}return null};Array.prototype.count=function(a){return!a?this.length:this.filter(a).length};Array.prototype.average=function(a){return this.length<=0?0:this.sum(a)/this.length};Array.prototype.max=function(a){for(var d=NaN,c=0;c<this.length;c++){var b=a?a(this[c]):this[c];
if(isNaN(d)||b>d)d=b}return d};Array.prototype.min=function(a){for(var d=NaN,c=0;c<this.length;c++){var b=a?a(this[c]):this[c];if(isNaN(d)||b<d)d=b}return d};Array.prototype.sum=function(a){for(var d=0,c=0;c<this.length;c++)var b=a?a(this[c]):this[c],d=d+b;return d};Array.prototype.except=function(a){return this.filter(function(d){return a.indexOf(d)===-1})};Array.prototype.skip=function(a){return this.length<a?[]:this.slice(a,this.length-a+1)};Array.prototype.addRange=function(a){this.addRangeAt(this.length,
a)};Array.prototype.addRangeAt=function(a,d){if(d&&d.length!=0){if(a===void 0)a=this.length;for(var c=d.length-1;c>=0;c--)this.splice(a,0,d[c])}};Array.prototype.remove=function(a){a=this.indexOf(a);if(a<0)throw"Can't find child in array!";this.splice(a,1)};Array.prototype.groupBy=function(a){if(!a)return this;for(var d=[],c={},b=0;b<this.length;b++){var g=this[b],e=a(g);if(d.indexOf(e)===-1){d.push(e);c[d.indexOf(e)]=[]}c[d.indexOf(e)].push(g)}a=[];for(b=0;b<d.length;b++)a.addRange(c[b]);return a};
Math.randomSign=function(){return GameManager.company?Math.floor(GameManager.company.getRandom()*2)===0?-1:1:Math.floor(Math.random()*2)===0?-1:1};MersenneTwister.prototype.randomSign=function(){return Math.floor(this.random()*2)===0?-1:1};Math.roundToDecimals=function(a,d){return Math.round(a*Math.pow(10,d))/Math.pow(10,d)};String.prototype.replaceAt=function(a,d){return this.substr(0,a)+d+this.substr(a+d.length)};jQuery.fn.extend({clickExcl:function(a){return $(this).unbind("click").click(a)}});
jQuery.fn.extend({clickExclOnce:function(a){return $(this).unbind("click").one("click",a)}});Date.prototype.toISOString||(Date.prototype.toISOString=function(){function a(a){return a<10?"0"+a:a}return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z"})})();var Logger={};
(function(){var a=void 0;Logger.load=function(){DataStore.loadSlotAsync("errorLogs",function(b){if(b)try{a=JSON.parse(b)}catch(c){a=[]}else a=[]},function(){a=[]})};var d=!1,c=!1;Logger.save=function(){if(d)c=!0;else{var b=JSON.stringify(a);d=!0;DataStore.saveToSlotAsync("errorLogs",b,function(){d=!1;c&&(c=!1,Logger.save())},function(){d=!1})}};var b=function(b,c,d){try{a&&(d||(d={}),a.push({date:(new Date).toISOString(),level:b,msg:c,stacktrace:d.stack,number:d.number}),100<a.length&&a.splice(0,
a.length-100),Logger.save())}catch(f){}};Logger.LogModError=function(a,c,d){b("MODERROR",a,c);a=d?d:a;c?PlatformShim.alert(a+": "+c,"Error".localize()):PlatformShim.alert(a,"Error".localize())};Logger.LogError=function(a,c,d){b("ERROR",a,c);a=d?d:a;c?PlatformShim.alert(a+": "+c+"\n"+"If the issue persists please report this error to {0}".localize().format("support@greenheartgames.com"),"Error".localize()):PlatformShim.alert(a+"\n"+"If the issue persists please report this error to {0}".localize().format("support@greenheartgames.com"),
"Error".localize())};Logger.LogWarning=function(a,c,d){b("WARNING",a,c);a=d?d:a;$("#gameErrorOverlay").css("top",CanvasManager.backgroundCanvas.height-60);$("#gameErrorOverlay")[0].innerText=a;$("#gameErrorOverlay").css("opacity",0).show().transit({opacity:1},1E3,function(){$("#gameErrorOverlay").transit({opacity:1},3E3,function(){$("#gameErrorOverlay").transit({opacity:0},1E3,function(){$("#gameErrorOverlay").hide()})})})};Logger.LogInfo=function(a,c){b("INFO",a,c)}})();var GDT={};
(function(){GDT.eventKeys={gameplay:{afterGameReview:"gameplay.afterGameReview",beforeGameReview:"gameplay.beforeGameReview",afterReleaseGame:"gameplay.afterReleaseGame",beforeReleaseGame:"gameplay.beforeReleaseGame",contractFinished:"gameplay.contractFinished",contractStarted:"gameplay.contractStarted",engineFinished:"gameplay.engineFinished",engineStarted:"gameplay.engineStarted",featureFinished:"gameplay.featureFinished",gameDefinitionCanceled:"gameplay.gameDefinitionCanceled",researchCompleted:"gameplay.researchCompleted",
researchStarted:"gameplay.researchStarted",salesCalculated:"gameplay.salesCalculated",trainingFinished:"gameplay.trainingFinished",weekProceeded:"gameplay.weekProceeded"},ui:{dialogOpen:"ui.dialogOpen",dialogClose:"ui.dialogClose",contextMenuShowing:"ui.contextMenuShowing",beforeShowingNotification:"ui.beforeShowingNotification"},saves:{saving:"saves.saving",loading:"saves.loading"},mod:{loaded:"mod.loaded",loadError:"mod.loadError"}};var a={},d=function(b){a.hasOwnProperty(b)||(a[b]=[]);return a[b]};
GDT.on=function(a,c){d(a).push(c)};GDT.off=function(a,c){d(a).remove(c)};GDT.fire=function(a,c,e){for(var c=d(c),h=0;h<c.length;h++)if(null!=c[h])try{c[h].call(a,e)}catch(f){Logger.LogWarning("GDT event handler error",f)}};var c=0;GDT.loadJs=function(a,d,e){c++;requireLoad(a,function(){c--;0==c&&GDT.fire(this,GDT.eventKeys.mod.loaded);d&&d()},function(){c--;0==c&&GDT.fire(this,GDT.eventKeys.mod.loadError);e&&e()})}})();var PlatformShim={};
(function(){var a={};(function(){a.execUnsafeLocalFunction=function(a){a()};a.toStaticHtml=function(a){return a};a.getUserName=function(){return"Player"};a.goToReviewPage=function(){};a.xhr=function(a,b){b()};a.alert=function(a,b){b&&(a=b+"\n"+a);alert(a)}})();var d={};(function(){d.execUnsafeLocalFunction=function(a){MSApp.execUnsafeLocalFunction(a)};d.toStaticHtml=function(a){return toStaticHTML(a)};d.getUserName=function(){return WindowsIntegration.getUserName()};d.goToReviewPage=function(){WindowsIntegration.goToReviewPage()};
d.xhr=function(a,b,c){WinJS.xhr(a).done(b,c)};d.alert=function(a,b){(new Windows.UI.Popups.MessageDialog(a,b)).showAsync()};d.ISWIN8=!0;d.ISLOWRES=GameFlags.IS_LOW_RES;d.getVersion=function(){var a=Windows.ApplicationModel.Package.current.id.version;return[a.major,a.minor,a.build,a.revision].join(".")}})();var c=!1;try{c=void 0!=MSApp}catch(b){Logger.LogInfo("hasMSapp check failed",b)}c?PlatformShim=d:(PlatformShim=a,window.ondragover=function(a){a.preventDefault();return!1},window.ondrop=function(a){a.preventDefault();
return!1},window.onerror=function(a,b,c){PlatformShim.alert("Uncaught error. Please report this to {0}: \n{1}\n({2}:{3})\n\nPlease restart the game.".localize().format("support@greenheartgames.com",a,b,c),"Error".localize())},PlatformShim.openUrlExternal=function(a){require("nw.gui").Shell.openExternal(a)},PlatformShim.toggleFullscreen=function(){var a=require("nw.gui").Window.get();a.toggleFullscreen();return a.isFullscreen},PlatformShim.getVersion=function(){return UpdateChecker.VERSION})})();
var Localization={};
(function(){var a=Localization;a.dict={};a.keys=[];String.prototype.localize=function(c){return a.localize(this.toString(),c)};a.localize=function(c,b){if(d){var g=c;b&&(g+=b);var e=a.keys.weakIndexOf(g);if(-1!=e||b&&(g=c,e=a.keys.weakIndexOf(g),-1!=e))return a.dict[e];g=a.keys.first(function(a){return a.startsWith(g)&&!a.startsWith(g+" ")});if(void 0!=g&&(e=a.keys.weakIndexOf(g),-1!=e))return a.dict[e]}return c};a.processHtml=function(a){for(var b=$(a),d=b.html(),a=0;-1!=(a=d.indexOf("ll:{",a));){var e=
d.indexOf("}",a+1),h=d.slice(a,e+1),f=h.slice(4,h.length-1),j=null,l=d.indexOf(",lc:{",e);l==e+1&&(j=d.slice(l+5,d.indexOf("}",l)),h+=",lc:{"+j+"}");d=d.replaceAll(h,PlatformShim.toStaticHtml(f.localize(j)));a++}PlatformShim.execUnsafeLocalFunction(function(){b.html(d)})};var d;a.invalidateLanguage=function(c){try{if(c&&"en"!=c){d=!0;var b=Languages[c];a.keys=[];a.dict={};if(b.values)for(c=0;c<b.values.length;c++){var g=b.values[c],e=g.value;g.comment&&(e+=g.comment);a.keys.push(e);a.dict[a.keys.length-
1]=g.translation}}else d=!1}catch(h){b=h?h.number:null,d=!1,ghg4&&ghg4.ghg5("invalidateLanguage failed",{"error-nr":b}),Logger.LogInfo("invalidateLanguage failed",h)}};a.setLanguage=function(c){a.invalidateLanguage(c)}})();var GameManager={VERSION:7},State={GameStarting:"GameStarting",Idle:"Idle",CreateGame:"CreateGame",GameDefinition:"GameDefinition",PickWorkItems:"PickWorkItems",ExecuteWorkItems:"ExecuteWorkItems",ReleaseGame:"ReleaseGame"};
(function(){var a=GameManager;a.gameId=Math.random();a.company=void 0;a.init=function(){a._initKeyboardShortcuts()};a.ghg3=function(){return GameFlags.ghg6?Windows.ApplicationModel.Store.CurrentAppSimulator:Windows.ApplicationModel.Store.CurrentApp};a.ghg0=function(){return GameFlags.ghg7};a.ghg1=function(){if(!a.ghg0())return!1;PlatformShim.ISWIN8?WinJS.xhr({url:"http://www.greenheartgames.com/utils/gamedevtycoonappuri"}).done(function(a){if(a&&a.responseText){a=a.responseText;try{new Windows.Foundation.Uri(a)}catch(b){Logger.LogInfo("Could not check latest game version",
b)}var f=!1;DataStore.getValue("full-game-uri")||(f=!0);DataStore.setValue("full-game-uri",a);f&&UpdateNotifications.showFullGameIsAvailable()}},function(){}):$.get("http://www.greenheartgames.com/utils/gamedevtycoonwinnativeeappuri",function(a){if(a&&a.startsWith("http")){var b=!1;DataStore.getValue("full-game-uri")||(b=!0);DataStore.setValue("full-game-uri",a);b&&UpdateNotifications.showFullGameIsAvailable()}})};a.isSupporter=function(){return!a.ghg2()};a.ghg2=function(){if(!PlatformShim.ISWIN8)return a.ghg0();
if(!0===GameFlags.ghg6)return!1;try{if(a.ghg0())return!0;var b=a.ghg3();return!b||!b.licenseInformation.isActive?!0:b.licenseInformation.isTrial}catch(f){return ghg4.ghg5("isTrial error"),Logger.LogInfo("isTrial failed",f),!0}};a._initKeyboardShortcuts=function(){window.onkeyup=function(b){if(!(b.srcElement&&"INPUT"===b.srcElement.nodeName)){if(!UI.isModalContentOpen())switch(b.which){case 37:VisualsManager.scrollToNextZone(-1);break;case 39:VisualsManager.scrollToNextZone(1)}var f=GameFlags.ghg6,
c=f||GameManager.company&&GameManager.company.flags.ghg141;switch(b.which){case 192:c&&GameManager.togglePause(!0);break;case 49:c&&GameManager.setGameSpeed("slow");break;case 50:c&&GameManager.setGameSpeed("normal");break;case 51:c&&GameManager.setGameSpeed("fast");break;case 52:f&&GameManager.setGameSpeed("super-fast");break;case 53:f&&GameManager.setGameSpeed("extra-fast");break;case 82:f&&GameManager.testSaveLoad();break;case 83:f&&a.save("auto");break;case 76:f&&a.reload("auto")}}}};a.testSaveLoad=
function(){a.save("auto");a.reload("auto")};a.reload=function(b,f,c,d){d||UI.fadeInTransitionOverlay();UI.closeAllDialogs();a.company=void 0;a.pause(!0,!1);var e=function(){a.load(b,function(){var b=a.company.currentLevel,c=ResourceKeys.getLevelResources.apply(ResourceKeys,[1,2,3,4].except([b]));FlippingCounter.init();GameDev.ResourceManager.removeResources(c);GameDev.ResourceManager.ensureResources(ResourceKeys.getLevelResources(b),function(){SplashScreen.removeSplashScreen()&&Sound.playBackgroundMusic();
VisualsManager.reset();if(a.state===State.ExecuteWorkItems||a.state===State.PickWorkItems||a.state===State.ReleaseGame||0<a.spawnedPoints)a.state!=State.ReleaseGame&&(VisualsManager.gameStatusBar.startDevelopment(),a.updateCurrentHypePoints()),a.currentFeature&&("preparation"===a.currentFeature.missionType?VisualsManager.gameStatusBar.updateStatusMessage("Starting ...".localize()):"BugFixing"===a.currentFeature.missionType?VisualsManager.gameStatusBar.updateStatusMessage("Finishing ...".localize()):
VisualsManager.gameStatusBar.updateStatusMessage(a.currentFeature.id));if(0<a.currentResearches.length)for(var b=0;b<a.company.staff.length;b++)a.company.staff[b].state===CharacterState.Researching&&VisualsManager.getCharacterOverlay(a.company.staff[b]).startResearching();a.currentEngineDev&&VisualsManager.startCreateEngine();a.currentContract&&"gameContract"!=a.currentContract.type&&VisualsManager.startContract();var c=function(){a.systemPause?a.pause(!0):a.resume(!0);a.playerPause?a.pause(!1):a.resume(!1);
a.state==State.ReleaseGame&&(a.company&&0==a.company.notifications.count(function(a){return"{ReleaseGame}"===a.header}))&&a.notifyIdleState();a.state==State.ReleaseGame||a.state==State.PickWorkItems&&a.company&&a.company.activeNotifications&&a.company.activeNotifications.first(function(a){return"{FeatureList}"===a.header})?a.showPendingNotifications():a.transitionToState(a.state);f&&f();a.loadInProgress=!1};UI.isTransitionVisible?UI.fadeOutTransitionOverlay(function(){c()}):c()})},c)};d?e():setTimeout(e,
800)};a.getGameToContinue=function(){for(var a=GameManager.getSaveGames(),b=null,f=0;f<a.length;f++)if(!b||b.saveTime<a[f].saveTime)b=a[f];return b};a.continueGame=function(){var a=GameManager.getGameToContinue();a&&UI.fadeInTransitionOverlay(function(){SplashScreen.removeSplashScreen();GameManager.reload(a.slot,function(){Sound.playBackgroundMusic();GameManager.resume(!0)},function(){GameManager.startNewGame()},!0)})};a.startNewGame=function(){GameDev.ResourceManager.removeResources(ResourceKeys.getLevelResources(2,
3,4));GameDev.ResourceManager.ensureResources(ResourceKeys.getLevelResources(1),function(){SplashScreen.removeSplashScreen();Sound.playBackgroundMusic();d()})};var d=function(){UI.closeAllDialogs();a.useKnowledgeAnswered=void 0;$("#mainBackground").fadeOut();$("foregroundCanvas").hide();a._setupNewGame();Media.createWelcomeNotifications();Tutorial.canSkipStartTutorial()&&a.company.activeNotifications.insertAt(0,DecisionNotifications.skipStartTutorials.getNotification(a.company));a.showPendingNotifications(function(){Tutorial.AppbarAndHelp();
a.showPendingNotifications(function(){Tutorial.createdCompany();a.showPendingNotifications(function(){"Greenheart Games"==a.company.name?Achievements.activate(Achievements.admirer):!Achievements.hasAchieved(Achievements.fanBoy)&&-1!=RealCompanyNames.indexOf(a.company.name)&&Achievements.activate(Achievements.fanBoy)})})})};a._setupNewGame=function(){var b=new Company(a.companyName);b.uid=a.getGUID();b.seed=Math.floor(65535*Math.random());b._mersenneTwister=new MersenneTwister(b.seed);b.slot=a.slot;
b.cash=7E4;b.topics=General.getTopicOrder(b).slice(0,4);for(var f=Research.getAllItems(),c=0;c<f.length;c++)f[c].duration||b.features.push(f[c]);a.currentEngineDev=null;a.currentHwProject=null;a.currentRnDProject=null;a.currentContract=null;a.currentFeature=null;a.currentResearches=[];a.plannedFeatures=null;a.company=b;a.gameTime=0;a.playerPause=!1;a.systemPause=!1;a._timeModifier=1;a.uiSettings=UI.createDefaultUISettings();a.flags={gameLengthModifier:1.16667};Missions.getAllMissions().forEach(function(a){a.experience=
0});Research.getAllItems().forEach(function(a){a.experience=0});a.spawnedPoints=0;General.proceedOneWeek(a.company);a.gameId=a.company.getRandom();VisualsManager.reset();GameManager.state=State.GameStarting};a.decreaseSpawnedPoints=function(){0<a.spawnedPoints&&a.spawnedPoints--};a.increaseSpawnedPoints=function(){a.spawnedPoints++};a.notifyIdleState=function(){switch(a.state){case State.CreateGame:case State.GameDefinition:a.transitionToState(State.PickWorkItems);break;case State.PickWorkItems:a.transitionToState(State.ExecuteWorkItems);
break;case State.ExecuteWorkItems:a.transitionToState(State.PickWorkItems);break;case State.ReleaseGame:a.transitionToState(State.Idle);break;case State.Idle:break;default:throw"unexpected state: "+a.state;}};a.state=void 0;a.isIdle=function(){return a.state===State.Idle};a.transitionToState=function(b){if(GameManager.state!=State.ReleaseGame&&(a.company.calculateCurrentNofitications(),0<a.company.activeNotifications.length)){a.showPendingNotifications(function(){a.transitionToState(b)});return}b===
State.CreateGame&&(a.state=b,a.flags.sequel?Tutorial.createSequel():Tutorial.createGame(),-1!=a.company.researchCompleted.indexOf(Research.TargetAudience)&&Tutorial.targetAudience(),a.company.createNewGame(),a.currentContract&&a._setContractRequirements(a.company.currentGame),a.state=State.GameDefinition,a.transitionToState(State.GameDefinition));if(b===State.GameDefinition)a.company.activeNotifications.push(new Notification("{GameDefinition}","","",0)),a.showPendingNotifications();else{if(b===State.PickWorkItems){if(a.state===
State.GameDefinition){var f=a.company.currentGame.costs;a.company.cash-=f;a.company.cashLog.push({amount:-f,label:a.company.currentGame.title});for(var f=a.company.staff.filter(function(a){return a.state===CharacterState.Idle}),c=0;c<f.length;c++)f[c].startWorking()}a.state=b;f=a.getDevFeatureLogCount();0==f?(VisualsManager.gameStatusBar.updateStatusMessage(""),VisualsManager.gameStatusBar.startDevelopment(),VisualsManager.putConsoleToPedestal(),a.executeFeatures([],Missions.PreparationMission)):
9>=f?a.showFeatureList():11>f?(a.executeFeatures([],Missions.BugFixingMission),a.company.currentGame.flags.releaseReady=!0,Tutorial.finishingPhase(0.2),VisualsManager.updateReleaseReadyButton()):(a.company.currentGame.flags.devCompleted=!0,a.transitionToState(State.ReleaseGame))}b===State.ExecuteWorkItems&&(a.state=b,a.executeWorkItems());if(b===State.ReleaseGame){f=a.company.staff.filter(function(a){return a.state===CharacterState.Idle||a.state===CharacterState.Working});for(c=0;c<f.length;c++)f[c].endWorking();
a.state=State.ReleaseGame}b===State.Idle&&(a.state=b)}};a.gameDefinitionCancelled=function(){GDT.fire(a,GDT.eventKeys.gameplay.gameDefinitionCanceled,{company:a.company});a.company.currentGame=null;a.currentContract&&a.contractCancelled();a.transitionToState(State.Idle)};a.workEnded=function(b){if(0===a.company.staff.filter(function(a){return!0===a.working&&!a.currentResearch}).length)if(a.state===State.ReleaseGame){if(a.company.currentGame&&0===a.company.notifications.count(function(a){return"{ReleaseGame}"===
a.header})&&(a.releaseGame(),a.company.calculateCurrentNofitications(),0<a.company.activeNotifications.length)){a.showPendingNotifications(function(){a.transitionToState(State.ReleaseGame)});return}}else a.currentEngineDev&&a.finishEngine();b.currentResearch&&(b.currentResearch=null,a.finishResearch(b))};a.executeWorkItems=function(){if(a.plannedFeatures&&0<a.plannedFeatures.length){a.plannedFeatures.forEach(function(b){b.progress=0;b.duration=General.getDuration(a.company.currentGame,b)});var b=
a.company.currentGame;b.featureLog||(b.featureLog=[]);a.currentFeature&&1>a.currentFeature.progress||(a.currentFeature=a.plannedFeatures.shift(),a.currentFeature.startTime=a.gameTime)}else a.currentFeature||a.notifyIdleState(State.PickWorkItems)};a.currentFeature=null;a.plannedFeatures=null;a.getCurrentDevStage=function(){var b=a.getDevFeatureLogCount();if(3>b)return 1;if(6>b)return 2;if(9>b)return 3};a.executeFeatures=function(b,f){for(var c=a.company.staff.filter(function(a){return a.state===CharacterState.Working}),
d=0;d<c.length;d++)c[d].state=CharacterState.Idle,c[d].currentFeature=null;c=[];a.plannedFeatures=[];a.company.currentGame.featureLog&&(d=a.getCurrentDevStage(),1==d?c=Missions.Stage1Missions:2==d?c=Missions.Stage2Missions:3==d&&(c=Missions.Stage3Missions));if(0!=b.length)for(d=0;d<c.length;d++)c[d].percentage=b[d].percentage,a.plannedFeatures.push({type:"focus",id:c[d].id,missionType:"mission"});f&&a.plannedFeatures.push({type:"focus",id:f.id,missionType:f.missionType});a.transitionToState(State.ExecuteWorkItems)};
a.codingContest=function(b,f){var c={id:b.id,type:f,progress:0,duration:b.duration,isTraining:b.isTraining};a.currentResearches.push(c);a.startResearch(c)};a.research=function(b,f){g(b);var c={id:b.id,type:f,progress:0,duration:Research.getDuration(b),isTraining:b.isTraining,progressColor:b.progressColor};a.currentResearches.push(c);a.startResearch(c);GDT.fire(a,GDT.eventKeys.gameplay.researchStarted,{company:a.company,researchItem:c})};var c;a.getPreferredLanguage=function(){void 0==c&&(c=DataStore.getValue("language"),
void 0==c&&a.setPreferredLanguage("en"));return c};a.setPreferredLanguage=function(a){DataStore.setValue("language",a);c=a};var b;a.areHintsEnabled=function(){void 0==b&&(b=DataStore.getValue("hintsEnabled"),void 0==b?(a.setHintsEnabled(!0),b=!0):b=!0==b||"true"==b);return b};a.setHintsEnabled=function(a){DataStore.setValue("hintsEnabled",a);b=a};a.researchTopic=function(b){var f=Research.ResearchTopicItem;g(f);b={id:f.id,type:"research",topicId:b.id,progress:0,duration:Research.ResearchTopicItem.duration};
a.currentResearches.push(b);a.startResearch(b);GDT.fire(a,GDT.eventKeys.gameplay.researchStarted,{company:a.company,researchItem:b})};var g=function(b){a.company.researchPoints-=Research.getPointsCost(b);VisualsManager.updatePoints();var f=Research.getResearchCost(b);f&&a.company.adjustCash(-f,b.name)};a.startResearch=function(b){var f=a.company.staff.first(function(a){return a.id===GameManager.uiSettings.selectedChar});if(!f)throw"no worker selected for research";f.startWorking();f.state=CharacterState.Researching;
b.staffId=f.id;f.currentResearch=b;f.currentFeature=null;f.resetLeftOverPoints();VisualsManager.getCharacterOverlay(f).startResearching()};a.decreaseBugs=function(b){a.company.currentGame&&(a.company.currentGame.bugs-=b,VisualsManager.gameStatusBar.updatePoints())};a.increaseResearchProgress=function(b,f){var c=GameManager.currentResearches.first(function(a){return a.staffId===b.id});c.progress=(c.progress+f).clamp(0,1);1===c.progress&&(a.currentFeature||a.currentEngineDev?a.finishResearch(b,c):b.endWorking())};
a.finishResearch=function(b){VisualsManager.levelOverlay.startWaterCooler();var f=a.currentResearches.first(function(a){return a.staffId===b.id});VisualsManager.getCharacterOverlay(b).finishResearching();b.state=CharacterState.Idle;a.currentResearches.remove(f);b.currentResearch=null;if("training"===f.type||"specialTraining"===f.type)e(b,f);else{if("New Topic"===f.id){var c=Topics.topics.first(function(a){return a.id===f.topicId});if(1<a.company.currentLevel)VisualsManager.getCharacterOverlay(b).saySomething("Completed: ".localize("research is completed, research name is added")+
c.name),1==GameManager.company.flags.currentZone&&Sound.playSoundOnce("research",0.3);else{var d=new Notification("Research complete".localize("heading"),"You have successfully researched a new topic: '{0}'.".localize().format(c.name));d.sound="research";d.volume=0.3;a.company.notifications.push(d)}a.company.topics.push(c)}else c=a.company.availableResearch.first(function(a){return a.id===f.id}),a.company.availableResearch.remove(c),a.company.researchCompleted.push(c),1==a.company.researchCompleted.length&&
ghg4.ghg5("first research",{id:c.id}),1<a.company.currentLevel?(VisualsManager.getCharacterOverlay(b).saySomething("Completed: ".localize("research is completed, research name is added")+c.name),1==GameManager.company.flags.currentZone&&Sound.playSoundOnce("research",0.3)):(d=new Notification("Research complete".localize("heading"),"You have successfully researched '{0}'.".localize().format(c.name)),d.sound="research",d.volume=0.3,a.company.notifications.push(d)),c===Research.CustomEngine?Tutorial.researchedCustomEngine():
0!=Research.getEnginePoints(c)&&Tutorial.researchedEnginePart(),c.complete&&c.complete();GDT.fire(a,GDT.eventKeys.gameplay.researchCompleted,{company:a.company});Research.checkForNewResearch();a.autoSave()}};var e=function(b,f){var c=Training.getAllTrainings().first(function(a){return a.id===f.id});b.finishTraining(c);c&&c.complete&&c.complete(b);c.isSkillTraining&&Knowledge.setTrainingKnowledge(c);GDT.fire(a,GDT.eventKeys.gameplay.trainingFinished,{staff:b,training:c});Research.checkForNewResearch();
a.autoSave();a.showPendingNotifications()};a.currentEngineDev=null;a.createEngine=function(b,f){if(!a.currentEngineDev){var c=f.sum(function(a){return Research.getEngineCost(a)}),d=f.sum(function(a){return Research.getEnginePoints(a)});Tutorial.creatingEngine();a.company.adjustCash(-c,b);a.currentEngineDev={name:b,progress:0,cost:c,technologyPoints:d,remainingPoints:d,remainingPointsDisplay:d,parts:f,currentPart:f[0]};VisualsManager.startCreateEngine();c=a.company.staff.filter(function(a){return a.state===
CharacterState.Idle});for(d=0;d<c.length;d++)c[d].startWorking();GDT.fire(a,GDT.eventKeys.gameplay.engineStarted,{company:a.company})}};a.increaseEnginePoints=function(){a.currentEngineDev&&a.currentEngineDev.remainingPoints--};a.increaseDisplayEnginePoints=function(b,f){if(a.currentEngineDev){a.currentEngineDev.remainingPointsDisplay-=f;0>a.currentEngineDev.remainingPointsDisplay&&(a.currentEngineDev.remainingPointsDisplay=0);var c=a.currentEngineDev.technologyPoints,d=Math.abs(a.currentEngineDev.remainingPointsDisplay-
a.currentEngineDev.technologyPoints);a.currentEngineDev.progress=d/c;for(var e=0,c=null,j=0;j<a.currentEngineDev.parts.length&&!(c=a.currentEngineDev.parts[j],e+=Research.getEnginePoints(c),d<=e);j++);c.techLevel&&b&&(c.efficiencyPoints||(c.efficiencyPoints=[]),d=b.getLevelF()/c.techLevel,d*=(b.efficiency+0.2).clamp(0.5,1),b.onFire&&(d+=0.1+0.2*a.company.getRandom()),c.efficiencyPoints.push(d));a.currentEngineDev.currentPart=c;VisualsManager.updateEngineStatus();if(0>=a.currentEngineDev.remainingPointsDisplay)if(a.currentFeature)a.finishEngine();
else{d=GameManager.company.staff.filter(function(a){return a.state===CharacterState.CreateEngine});for(j=0;j<d.length;j++)d[j].endWorking()}}};a.finishEngine=function(){var b=a.currentEngineDev;if(!(1>b.progress)){for(var f=0;f<b.parts.length;f++){var c=b.parts[f];c.efficiencyPoints&&(c.efficiency=c.efficiencyPoints.average(),c.efficiencyPoints=void 0)}b={id:a.company.engines.length+1,name:b.name,parts:b.parts,techLevel:b.parts.filter(function(a){return void 0!=a.techLevel}).average(function(a){return a.techLevel}),
costs:a.currentEngineDev.cost,releaseWeek:a.company.currentWeek};a.currentEngineDev=null;c=a.company.staff.filter(function(a){return a.state===CharacterState.CreateEngine});for(f=0;f<c.length;f++)c[f].state=CharacterState.Idle;a.company.engines.push(b);for(f=0;f<b.parts.length;f++){for(c=0;c<a.company.engineParts.length&&b.parts[f].id!==a.company.engineParts[c].id;c++);c===a.company.engineParts.length&&(c=b.parts[f],c.experience||(c.experience=0),a.company.engineParts.push(c))}a.company.notifications.push(new Notification("Engine complete!".localize("heading"),
"Your new game engine '{0}' is now complete!".localize().format(b.name)));Tutorial.firstEngine();VisualsManager.finishEngine();GDT.fire(a,GDT.eventKeys.gameplay.engineFinished,{company:a.company,engine:b});a.autoSave()}};a.getAvailableGameFeatures=function(a){var b=[];b.addRange(Research.StartEngineParts);a&&b.addRange(a.parts.map(function(a){return General.getFeature(a.id)}).except(b));a=Research.getAllItems().filter(function(a){return 0===a.enginePoints&&-1!=GameManager.company.researchCompleted.indexOf(a)});
b.addRange(a);b.addRange(GameManager.company.specialItems);return b};a.finishCurrentMission=function(){var b=a.company.currentGame,f=a.currentFeature;if((1===f.progress||a.company.currentGame.flags.finished)&&!f.finished&&("BugFixing"===f.missionType||0===a.spawnedPoints||0<a.plannedFeatures.length)){for(var c=0;c<a.company.staff.length;c++)a.company.staff[c].currentFeature&&a.currentFeature.id===a.company.staff[c].currentFeature.id&&(a.company.staff[c].currentFeature=null,a.company.staff[c].state=
CharacterState.Idle);f.finished=!0;b.featureLog.push(a.currentFeature);"feature"!==f.type&&(c=General.getMission(f.id),b.missionLog.push(c));0<a.plannedFeatures.length?a.currentFeature=a.plannedFeatures.shift():(a.currentFeature=null,a.notifyIdleState())}GDT.fire(a,GDT.eventKeys.gameplay.featureFinished,{company:a.company,feature:f})};a.showPendingNotifications=function(b){var f=a.company;if(f){var c=a.gameId,d=b,b=function(){c==a.gameId&&d&&d()};f.calculateCurrentNofitications();0===f.activeNotifications.length?
b&&b():UI.showNotifications(b)}};a.showBoothList=function(a,b){UI.showConferenceBoothList(a,b)};a.releaseGame=function(){if(0===a.company.notifications.count(function(a){return"{ReleaseGame}"===a.header})){var b=(0.5+0.3*GameManager.company.getRandom())/GameManager.SECONDS_PER_WEEK;Tutorial.gameDevCompleted(b);a.company.notifications.push(new Notification("{ReleaseGame}","","",b))}};a.showFeatureList=function(){a.company.currentGame.state=GameState.development;if(0===a.company.notifications.count(function(a){return"{FeatureList}"===
a.header})){var b=(0.5+0.3*GameManager.company.getRandom())/GameManager.SECONDS_PER_WEEK;Tutorial.devPhases(b);a.company.currentGame.isStaffResponsibilityEnabled()&&Tutorial.staffResponsibility(b);var f;3>a.getDevFeatureLogCount()?f=Missions.Stage1Missions:6>a.getDevFeatureLogCount()?f=Missions.Stage2Missions:(f=Missions.Stage3Missions,Tutorial.additionalFeatures(b));!a.company.flags.missionHintsShown&&f.some(function(b){return Knowledge.getMissionWeightingHint(Missions.getMissionWithId(b.id),a.company.currentGame)})&&
(a.company.flags.missionHintsShown=!0,Tutorial.missionHints(b));b=new Notification("{FeatureList}","","",b);b.features=f;a.company.notifications.push(b);a.showPendingNotifications()}};a.getDevFeatureLogCount=function(){return a.company.currentGame.featureLog?a.company.currentGame.featureLog.count(function(a){return"mission"===a.missionType||"preparation"===a.missionType||"BugFixing"===a.missionType}):0};a.isPaused=function(b){return b?a.systemPause:a.playerPause};a.isGamePaused=function(){return 0===
a._timeModifier};a.togglePause=function(b){if(!UI.isModalContentOpen()||!b)a.isPaused(b)?a.resume(b):a.pause(b)};a.setGameSpeed=function(b){var f;if("slow"===b)f=0.5;else if("normal"===b)f=1;else if("fast"===b)f=2.5;else if("super-fast"===b){if(!GameFlags.ghg6)return;f=10}else if("extra-fast"===b){if(!GameFlags.ghg6)return;f=100}if(a.isPaused(!0)){if(UI.isModalContentOpen()){a._oldTimeModifier=f;return}a.resume(!0)}a._timeModifier=f};a.pause=function(b,f){b&&f&&($(document).find("#gamePausedOverlay").css("top",
CanvasManager.backgroundCanvas.height/2-150),$(document).find("#gamePausedOverlay").css("opacity",0).show().transit({opacity:1}));b?a.systemPause=!0:a.playerPause=!0;0<a._timeModifier&&(a._oldTimeModifier=a._timeModifier,a._timeModifier=0);if(!b&&PlatformShim.ISWIN8)WindowsIntegration.onPause()};a.resume=function(b,f){var c=UI.isPanelOpen();!a.playerPause&&(b&&f&&!c)&&$(document).find("#gamePausedOverlay").transit({opacity:0},function(){$("#gamePausedOverlay").hide()});b&&!c?a.systemPause=!1:a.playerPause=
!1;!UI.isModalContentOpen()&&(!a.systemPause&&!a.playerPause)&&(a._timeModifier=a._oldTimeModifier);if(!a.playerPause&&!b&&PlatformShim.ISWIN8)WindowsIntegration.onResume()};a.saveActualGame=function(){a.company&&($("#gameSavedOverlay").css("top",CanvasManager.backgroundCanvas.height/2-50),$("#gameSavedOverlay").css("opacity",0).show().transit({opacity:1}),a.save(a.company.slot,function(){$("#gameSavedOverlay").transit({opacity:0},600,function(){$("#gameSavedOverlay").hide()})}))};a.save=function(b,
f,c){var d=GameManager.company;if(!d||$("#splashScreen").is(":visible"))f&&f();else{var e={};e.version=a.VERSION;e.slot=d.slot;e.gameTime=a.gameTime;e.playerPause=a.playerPause;e.systemPause=a.systemPause;e.timeModifier=a._timeModifier;e.oldTimeModifier=a._oldTimeModifier;e.state=a.state;e.currentMission=a.currentMission;e.currentResearches=a.currentResearches;e.currentEngineDev=a.currentEngineDev;e.currentHwProject=a.currentHwProject;e.currentRnDProject=a.currentRnDProject;e.currentContract=a.currentContract;
e.uiSettings=a.uiSettings;e.flags=a.flags;e.spawnedPoints=a.spawnedPoints;e.company=d.save();for(var j=[],g=Missions.getAllMissions(),h=0;h<g.length;h++){var l=g[h];j.push({id:l.id,xp:l.experience,percentage:l.percentage})}e.missionXP=j;j=Research.getAllItems().filter(function(a){return 0<a.experience}).map(function(a){return FeatureSerializer.save(a)});e.featureXP=j;a.currentFeature&&(e.currentFeature=a.currentFeature);a.plannedFeatures&&(e.plannedFeatures=a.plannedFeatures.map(function(a){return CompanyFeatureSerializer.save(a)}));
Knowledge.savePlayerKnowledge();GDT.fire(a,GDT.eventKeys.saves.saving,{company:a.company,data:e});e=JSON.stringify(e);DataStore.saveToSlotAsync(b,e,function(){var a={};a.name=d.name;a.cash=d.cash;a.fans=d.fans;a.currentWeek=d.currentWeek;a.date=new Date;DataStore.setValue(b,JSON.stringify(a));DataStore.commit&&DataStore.commit();if(PlatformShim.ISWIN8)try{WindowsIntegration.updateImageTile()}catch(c){Logger.LogInfo("game tile update failed",c)}f&&f()},function(a){if(c)c();else{Logger.LogError("Could not save game",
a,"Could not save game".localize());f&&f()}})}};a.load=function(b,f,c){DataStore.loadSlotAsync(b,function(b){try{var d=JSON.parse(b);GDT.fire(a,GDT.eventKeys.saves.loading,{data:d});Missions.getAllMissions().forEach(function(a){a.experience=0});Research.getAllItems().forEach(function(a){a.experience=0});d.version!=a.VERSION&&(d=SavegameMigrator.migrate(d));a.loadInProgress=!0;a.gameTime=d.gameTime;a.playerPause=d.playerPause;a.systemPause=!1;a._timeModifier=d.timeModifier;a._oldTimeModifier=d.oldTimeModifier;
a.company=Company.load(d.company);a.company.slot?$("#mainBackground").fadeIn():$("#mainBackground").fadeOut();a.state=d.state;a.currentMission=d.currentMission;a.currentResearches=d.currentResearches;a.currentResearches||(a.currentResearches=[]);for(b=0;b<a.currentResearches.length;b++){var e=a.currentResearches[b];a.company.staff.filter(function(a){return a.id===e.staffId}).forEach(function(a){a.currentResearch=e})}a.currentEngineDev=d.currentEngineDev;a.currentHwProject=d.currentHwProject;a.currentRnDProject=
d.currentRnDProject;a.currentContract=d.currentContract;a.uiSettings=d.uiSettings;a.flags=d.flags;a.flags||(a.flags={});a.spawnedPoints=d.spawnedPoints;var j=d.missionXP;if(j)for(var g=Missions.getAllMissions(),b=0;b<j.length;b++){var h=j[b],l=g.first(function(a){return a.id===h.id});l&&(l.experience=h.xp,l.percentage=h.percentage)}var m=d.featureXP;m&&m.forEach(function(a){FeatureSerializer.load(a)});a.currentFeature=d.currentFeature;a.plannedFeatures=null;d.plannedFeatures&&(a.plannedFeatures=d.plannedFeatures.map(function(a){return CompanyFeatureSerializer.load(a)}));
a.gameId=Math.random();GameFlags.IS_STEAM&&Achievements.checkForAchievmentsNotCompletedOnSteam();f&&f()}catch(k){Logger.LogError("Could not initialize loaded game! ",k,"Could not initialize loaded game".localize()),c&&c(k)}},function(a){Logger.LogError("Could not load game",a,"Could not load game".localize());c&&c(a)})};a.staffCountWorkingOnFeature=function(b){for(var f=0,c=0;c<a.company.staff.length;c++)a.company.staff[c].currentFeature&&a.company.staff[c].currentFeature.id===b.id&&(f+=1);return f};
a.IsAnimationSwitchAllowed=function(b){if(a.company){var f=[];a.currentEngineDev&&f.push(a.currentEngineDev.progress);b.currentResearch&&f.push(b.currentResearch.progress);a.currentFeature&&f.push(a.getCurrentGameProgress());b=f.length;if(0===b)return!0;for(var c=0,d=0;d<b;d++)c+=f[d];if(0.8<c/b)return!1}return!0};a.autoSave=function(b){GameFlags.G782&&11<=(void 0==a.company?0:a.company.getCurrentDate().year)?b&&b():a.save("auto",b,function(){ghg4.ghg5("auto-save failed")})};a.getSaveGames=function(){var a=
[],b=DataStore.getValue("auto");if(b){if("string"==typeof b||b instanceof String)b=JSON.parse(b);a.push(new SaveGameData("auto",b.name,b.cash,b.fans,b.currentWeek,b.date))}for(b=1;3>=b;b++){var f=DataStore.getValue(b.toString());if(f){if("string"==typeof f||f instanceof String)f=JSON.parse(f);a.push(new SaveGameData(b.toString(),f.name,f.cash,f.fans,f.currentWeek,f.date))}}return a};a.openSaveView=function(){a.pause(!0);UI.showSaveView(a.getSaveGames())};a.openLoadView=function(){a.pause(!0);UI.showLoadView(a.getSaveGames())};
a.checkGameOver=function(){if(!(-5E3<a.company.cash)){var b="Your bank account is in the red.\nThankfully your bank has enabled you to overdraw your account up to {0} but be careful, if your account balance is below -{0} you will go bankrupt.".localize();1===a.company.currentLevel&&-5E3>=a.company.cash?void 0===a.company.flags.lvl1BankruptWarning?(a.company.notifications.push(new Notification("Warning".localize("heading"),b.format("50K"))),a.company.flags.lvl1BankruptWarning=1):-5E4>a.company.cash&&
h():3>=a.company.currentLevel&&4E4>=a.company.cash?void 0===a.company.flags.lvl2BankruptWarning?(a.company.notifications.push(new Notification("Warning".localize("heading"),b.format("200K"))),a.company.flags.lvl2BankruptWarning=1):-2E5>a.company.cash&&h():15E4>=a.company.cash&&(void 0===a.company.flags.lvl3BankruptWarning?(a.company.notifications.push(new Notification("Warning".localize("heading"),b.format("2M"))),a.company.flags.lvl3BankruptWarning=1):-2E6>a.company.cash&&h())}};var h=function(){if(!GameFlags.GAME_OVER_DISABLED){var b=
a.company;if(!b.flags.ghgnogfc){if(0<b.gameLog.length&&b.gameLog.last().releaseWeek>b.currentWeek-2&&DecisionNotifications.miniBailout.canUse(b)){var f=DecisionNotifications.miniBailout.getNotification(b);b.notifications.push(f)}else if(DecisionNotifications.bailout.canUse(b))f=DecisionNotifications.bailout.getNotification(b),b.notifications.push(f);else{if(b.currentGame&&0.6<a.getCurrentGameProgress()&&DecisionNotifications.inDevBailout.canUse(b)){f=DecisionNotifications.inDevBailout.getNotification(b);
b.notifications.push(f);a.showPendingNotifications();return}b=a.company.getCurrentDate();ghg4.ghg5("game over (bankrupt)",{year:b.year});a.company.notifications.push(new Notification("Game Over".localize("heading"),"Unfortunately you are bankrupt.".localize(),":-("));b=15>b.year?"Electronic Mass Productions":"Stynga";f="We have just got confirmation that {0}, which has been in financial trouble lately, has gone bankrupt.\nIt appears that {1}, a behemoth in the gaming industry, has purchased the remains of the company.".localize().format(a.company.name,
b);0<a.company.gameLog.length&&(f+="{n}"+"A spokesperson of {0} said, 'We are very excited to have acquired the rights to all of {1} previously released titles.'\n\nHearing this news, many fans of {1} have expressed their disappointment.".localize().format(b,a.company.name));a.company.notifications.push(new Notification("Breaking News".localize("heading"),f));a.company.notifications.push(DecisionNotifications.gameOver.getNotification(a.company))}a.showPendingNotifications()}}};window.requestAnimFrame||
(window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}());createjs.Ticker.setPaused(!0);a._timeModifier=1;a.gameTime=0;a.SECONDS_PER_WEEK=4;a.getCurrentWeekFractional=function(){return a.gameTime/(a.SECONDS_PER_WEEK*1E3)};a.updateFeatures=function(){if(a.currentFeature){if(!a.currentFeature.lastUpdate)a.currentFeature.lastUpdate=
a.gameTime;if(!a.company.currentGame.flags.staffContribution)a.company.currentGame.flags.staffContribution={};var b=a.company.currentGame.flags.staffContribution;if(!a.company.currentGame.flags.devTime)a.company.currentGame.flags.devTime=0;var f=a.gameTime-a.currentFeature.lastUpdate;a.currentFeature.lastUpdate=a.gameTime;if(!(f<=0)){for(var c=0,d=0,e=false,j=0;j<a.company.staff.length;j++){var g=a.company.staff[j];g.isWorking()&&(e=true);if(g.currentFeature&&a.currentFeature.id===g.currentFeature.id){d=
d+1;b[g.id]||(b[g.id]=0);b[g.id]=b[g.id]+f*g.efficiency;c=c+g.currentFeature.progress}}if(e){a.company.currentGame.flags.devTime=a.company.currentGame.flags.devTime+f;d>0&&(c=c/d);if(a.currentFeature.progress===0)if(a.currentFeature.type==="focus"){b=General.getMission(a.currentFeature.id);b.missionType==="preparation"?VisualsManager.gameStatusBar.updateStatusMessage("Starting ...".localize()):b.missionType==="BugFixing"?a.company.currentGame.bugs>0&&VisualsManager.gameStatusBar.updateStatusMessage("Finishing ...".localize()):
VisualsManager.gameStatusBar.updateStatusMessage(b.name)}else VisualsManager.gameStatusBar.updateStatusMessage(a.currentFeature.name);a.currentFeature.id=="Graphic"&&a.company.currentLevel===1&&a.company.currentGame.title.toLocaleLowerCase()=="pong".toLocaleLowerCase()&&VisualsManager.getCharacterOverlay(a.company.staff.first()).playPong();a.currentFeature.progress=c;a.currentFeature.progress==1&&(a.currentFeature.id=="Bugfixing"?a.spawnedPoints<=0&&a.finishCurrentMission():a.finishCurrentMission());
a.currentFeature&&a.updateGameProgress()}}}};a.updateGameProgress=function(){var b=a.company.currentGame.missionLog.length;if(b<1||b/3>GameFlags.MAIN_MISSIONS_PER_GAME)VisualsManager.gameStatusBar.updateProgress(false);else{VisualsManager.gameStatusBar.updateProgress(a.getCurrentGameProgress());a.updateCurrentHypePoints()}};a.getCurrentGameProgress=function(){var b=0,f=a.company.currentGame;if(f.featureLog){for(var b=Missions.BASE_DURATION*GameFlags.MAIN_MISSIONS_PER_GAME*General.getGameSizeDurationFactor(f.gameSize)*
General.getMultiPlatformDurationFactor(f),c=0,d=1;d<f.featureLog.length;d++)f.featureLog[d].duration&&(c=c+f.featureLog[d].duration*f.featureLog[d].progress);a.currentFeature&&(c=c+a.currentFeature.duration*a.currentFeature.progress);b=c/b}return b};a.updateCurrentHypePoints=function(){if(!a.company.currentGame||!a.company.currentGame.hypePoints)return 0;var b=Math.floor(a.company.currentGame.hypePoints*a.getCurrentGameProgress());if(b>=1){Tutorial.hypePoints();VisualsManager.gameStatusBar.updateHypePoints(b)}};
a.updateCharacters=function(){if(a.company&&a.company.staff){for(var b=0;b<a.company.staff.length;b++)a.company.staff[b].tick();if(a.company.hwCrew)for(var b=0,f=a.company.hwCrew.length;b<f;b++)a.company.hwCrew[b].tick();if(a.company.rndCrew){b=0;for(f=a.company.rndCrew.length;b<f;b++)a.company.rndCrew[b].tick()}}};a.buyPlatform=function(b){a.company.adjustCash(-b.licencePrize,b.name+" "+"dev. license".localize(" used as {platformname} dev. license"));a.company.licencedPlatforms.push(b);a.company.availablePlatforms.remove(b);
UI.updateStatusBar(a.company)};a.getNewBody=function(b,f){var c=[1,2,3,4,5,6,7,8].pickRandom();b==="female"&&(c=[9,10,11,12].pickRandom());for(var d=0;d<a.company.staff.length;d++)if(a.company.staff[d].flags.body===c&&a.company.staff[d].getOrientation()===f)return a.getNewBody(b,f);return c};a.getNewHead=function(b,f){var c=[1,2,3,4,5,6,7,8].pickRandom();b==="female"&&(c=[9,10,11,12].pickRandom());for(var d=0;d<a.company.staff.length;d++)if(a.company.staff[d].flags.head===c&&a.company.staff[d].getOrientation()===
f)return a.getNewHead(b,f);return c};a.setBodyAndHead=function(b){b.flags.body=a.getNewBody(b.sex,b.getOrientation());b.flags.head=a.getNewHead(b.sex,b.getOrientation())};a.getUniqueSalesRank=function(b,f){if(b>100)return b;var c=a.company.gameLog.filter(function(a){return a.currentSalesCash!=a.totalSalesCash}),d=null;do(d=c.first(function(a){return a.nextSalesRank==b&&a.id!=f.id}))&&b++;while(d);return b};a.getMaxRndBudget=function(){var b=a.company.staff.filter(function(a){return a.flags.designSpecialist}).count();
return Math.max(5E5,a.MAX_RND_COST-(b-1).clamp(0,7)*a.RND_DECREASE_PER_SPECIALIST)};a.getMaxHwBudget=function(){var b=a.company.staff.filter(function(a){return a.flags.technologySpecialist}).count();return Math.max(5E5,a.MAX_HW_COST-(b-1).clamp(0,7)*a.HW_DECREASE_PER_SPECIALIST)};a.checkAchievements=function(){var b=Achievements.checkForNew(a.company);b.length>0&&UI.showAchievements(b)};a.pauseAppBarShown=function(b){(typeof b=="string"||b instanceof String)&&ghg4.ghg5("fragment activated",{area:b});
a.pause(true,true)};a.resumeAppBarShown=function(){if(GameManager.loadScreenOpened){GameManager.loadScreenOpened=false;a.resume(false,true)}else a.resume(true,true)};var f=[];a.addTickListener=function(a,b){f.push({f:a,isGameTime:b})};a.addTickListener(function(b){if(a.company&&a.loadInProgress!=true){a.gameTime=a.gameTime+b;var b=a.getCurrentWeekFractional(),f=a.company.currentWeek;a.company.currentWeek=b;if(Math.floor(b)>Math.floor(f)){for(var c=Math.floor(b)-Math.floor(f),d=1;d<=c;d++)General.proceedOneWeek(a.company,
f+d);a.company.cash<0&&a.checkGameOver()}if(Math.floor(b*10)>Math.floor(f*10)){UI.updateStatusBar(a.company);Research.checkForNewResearch();a.checkAchievements();if(a._timeModifier!=0){General.updateNotifications(a.company);a.showPendingNotifications()}}a.updateFeatures();a.updateCharacters();a.currentContract&&a.updateContractProgress()}},!0);var j;a.update=function(){if(j){var b=Date.now(),c=(b-j).clamp(0,500);j=b;UI&&UI._achievementsActiveTimeModifier!=1&&(c=c*UI._achievementsActiveTimeModifier);
if((!UI||!UI.isTransitionVisible)&&c!==0){if(a.company)a.company.timePlayed=a.company.timePlayed+c;for(var b=c*a._timeModifier,d=0;d<f.length;d++){var e=f[d];e.isGameTime?b!=0&&e.f(b):e.f(c)}}}else j=Date.now()};var l=0,m=1*new Date-1;a._skipFrameCount=0;var k,n=function(){if(k){var b=Date.now(),f=(b-k).clamp(0,500);k=b;if(!(f<=0)){f=f*a._timeModifier;createjs.Tween.tick(f,false);a._skipFrameCount++;(a._timeModifier==0||!GameFlags.SKIP_FRAME||a._skipFrameCount==1)&&a.update();a._timeModifier!==0&&
CanvasManager?CanvasManager.update():GameFlags.IS_STEAM&&Steam&&CanvasManager&&(CanvasManager.backgroundStage&&Steam.isAvailable()&&a._skipFrameCount==2)&&CanvasManager.backgroundStage.update();if(a._skipFrameCount==2)a._skipFrameCount=0;if(GameFlags.SHOW_FPS){f=1E3/((b=new Date)-m);isNaN(l)&&(l=0);l=l+(f-l)/1;m=b}if(a._skipFrameCount==2)a._skipFrameCount=0}}else k=Date.now();requestAnimFrame(n)};if(GameFlags.SHOW_FPS){var p=null;setInterval(function(){if(p)p.innerHTML=l.toFixed(1)+"fps";else if(p=
document.getElementById("fps"))p.style.display=""},1E3)}a.startDrawLoop=function(){n()};a.getGUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=Math.random()*16|0;return(a=="x"?b:b&3|8).toString(16)})}})();var DataStore={};
(function(){var a={};(function(){a.setValue=function(){};a.getValue=function(){return null};a.saveToSlotAsync=function(a,b,f){f()};a.loadSlotAsync=function(){};a.saveCanvasToFile=function(){}})();if(PlatformShim.ISWIN8){var d={};(function(){var a=Windows.Storage.ApplicationData.current.roamingSettings,b=Windows.Storage.ApplicationData.current.roamingFolder;d.setValue=function(b,f){a.values[b]=f};d.getValue=function(b){return a.values[b]};d.saveToSlotAsync=function(a,c,d,e){b.createFileAsync(a,Windows.Storage.CreationCollisionOption.replaceExisting).then(function(b){Windows.Storage.FileIO.writeTextAsync(b,
c).then(function(){try{var b=f(c);DataStore.setValue("hash"+a,b)}catch(e){Logger.LogInfo("hash save failed",e)}DataStore.saveSettings();d&&d()},function(a){ghg4.ghg5("save-error",{method:"writeTextAsync","error-nr":a?a.number:null});e&&e(a)})},function(a){ghg4.ghg5("save-error",{method:"createFileAsync","error-nr":a?a.number:null});e&&e(a)})};var f=function(a){var b=Windows.Security.Cryptography.Core.HashAlgorithmProvider.openAlgorithm("SHA256"),a=Windows.Security.Cryptography.CryptographicBuffer.convertStringToBinary(a,
Windows.Security.Cryptography.BinaryStringEncoding.utf8),b=b.hashData(a);return Windows.Security.Cryptography.CryptographicBuffer.encodeToHexString(b)};d.loadSlotAsync=function(a,c,d){b.getFileAsync(a).then(function(b){b||d();Windows.Storage.FileIO.readTextAsync(b).then(function(b){var e,j;try{(e=DataStore.getValue("hash"+a))&&(j=f(b))}catch(g){Logger.LogInfo("hash load failed",g)}e!=j&&!DataStore.remoteSettings.ignoreHashMismatch?(ghg4.ghg5("load game error",{reason:"hash mismatch"}),d("save file corrupt")):
c(b)},d)},d)};d.saveCanvasToFile=function(a,b,f,d){Windows.Storage.ApplicationData.current.localFolder.createFileAsync(b,Windows.Storage.CreationCollisionOption.replaceExisting).then(function(b){c(a,b,f,d)})};var c=function(a,b,f,c){var d=a.msToBlob(),e=d.msDetachStream().getInputStreamAt(0);b.openAsync(Windows.Storage.FileAccessMode.readWrite).then(function(a){return Windows.Storage.Streams.RandomAccessStream.copyAsync(e,a).then(function(){a.flushAsync().then(function(){a.close();e.close();d.msClose();
f&&f()},c)},c)},c)}})();DataStore=d}else{var c;try{c="localStorage"in window&&null!==window.localStorage}catch(b){Logger.LogInfo("local storage check failed",b),c=!1}if(c){var g={};(function(){g.setValue=function(a,b){window.localStorage.setItem(a,b)};g.getValue=function(a){return window.localStorage.getItem(a)};g.saveToSlotAsync=function(a,b,f,c){try{g.setValue("slot_"+a,b)}catch(d){Logger.LogWarning("Save failed",d,"Save failed".localize());c(d);return}f&&f()};g.loadSlotAsync=function(a,b,f){try{b(g.getValue("slot_"+
a))}catch(c){Logger.LogWarning("Load failed",c,"Load failed".localize()),f(c)}};g.saveCanvasToFile=function(a,b,f,c){c()}})();DataStore=g;if(Steam&&Steam.isAvailable&&Steam.isAvailable()){var e={};(function(){var a=g.getValue("general");a?a=JSON.parse(a):(a={version:1},g.setValue("general",JSON.stringify(a)));var b=!1;e.setValue=function(f,c){a[f]=c;a.version++;b=true};e.getValue=function(b){return a[b]};e.init=function(f){Steam.readTextFromFile("general",function(c){try{var d=JSON.parse(c);if(d&&
d.version>a.version){a=d;b=false}}catch(e){Logger.LogWarning("Could not load settings from steam cloud",e,"Could not load settings from steam cloud".localize())}f&&f()},function(a){f&&f();Logger.LogWarning("Could not load settings from steam cloud",a,"Could not load settings from steam cloud".localize())})};e.commit=function(f,c){if(b)try{var d=JSON.stringify(a);g.setValue("general",d);Steam.saveTextToFile("general",d,function(){b=false;f&&f()},function(a){Logger.LogWarning("Could not save settings to steam cloud",
a,"Could not save settings to steam cloud".localize())})}catch(e){Logger.LogWarning("Could not save settings to steam cloud",e,"Could not save settings to steam cloud".localize());c&&c(e)}else f&&f()};e.saveToSlotAsync=function(a,b,f){var c="slot_"+a;g.saveToSlotAsync(a,b);Steam.saveTextToFile(c,b,f,function(a){Logger.LogWarning("Could not save to steam cloud",a,"Could not save to steam cloud".localize());f&&f()})};e.loadSlotAsync=function(a,b,f){Steam.readTextFromFile("slot_"+a,b,function(c){Logger.LogWarning("Could not load from steam cloud",
c,"Could not load from steam cloud".localize());g.loadSlotAsync(a,b,f)})};e.saveCanvasToFile=function(a,b,f,c){c()}})();DataStore=e}}else DataStore=a}var h=DataStore.getValue("settings"),h=h?JSON.parse(h):{};DataStore.settings=h;DataStore.saveSettings=function(){try{DataStore.setValue("settings",JSON.stringify(DataStore.settings))}catch(a){Logger.LogWarning("Could not save settings",a,"Could not save settings".localize())}};var f=DataStore.getValue("remote-settings");if(f)try{f=JSON.parse(f)}catch(j){Logger.LogWarning("Could not load remote settings",
j,"Could not load remote settings".localize()),f=null}f||(f={id:3,supporterPacksEnabled:!1,ignoreHashMismatch:!0,enableSteamKey:!0});void 0===f.enableSteamKey&&(f.enableSteamKey=!0);DataStore.remoteSettings=f;(function(){try{PlatformShim.xhr({url:"http://www.greenheartgames.com/utils/remoteSettingsId"},function(a){if(a&&a.responseText){a=a.responseText;try{parseInt(a)>f.id&&PlatformShim.xhr({url:"http://www.greenheartgames.com/utils/remoteSettings"},function(a){if(a&&a.responseText){a=a.responseText;
try{var b=JSON.parse(a);DataStore.setValue("remote-settings",a);DataStore.remoteSettings=b}catch(f){Logger.LogWarning("Could not load remote settings",f,"Could not load remote settings".localize())}}})}catch(b){Logger.LogWarning("Could not load remote settings",b,"Could not load remote settings".localize())}}})}catch(a){Logger.LogWarning("Could not load remote settings",a,"Could not load remote settings".localize())}})();DataStore.setScore=function(a,b,f){if(!h.highScore)h.highScore={};if(!(h.highScore.hasOwnProperty(a)&&
h.highScore[a].score>f)){h.highScore[a]={name:b,score:f};DataStore.saveSettings();try{GameManager.save(a,null)}catch(c){Logger.LogWarning("Could not save game",c,"Could not save game".localize())}}};DataStore.getHighScoreList=function(){var a=[],b;for(b in h.highScore)h.highScore.hasOwnProperty(b)&&a.push(h.highScore[b]);return a};Localization.setLanguage(GameManager.getPreferredLanguage())})();var ResourceKeys={};
(function(){var a=ResourceKeys,d={},c="./images/";PlatformShim.ISLOWRES&&(c="./images1366/");d.Level1=c+"level1.png";d.PreviewChair="./images/player/chair.png";d.PreviewPants1="./images/player/pants.png";d.PreviewPants9="./images/player/pants9.png";d.PreviewHands1="./images/player/hands1.png";d.PreviewHands4="./images/player/hands4.png";d.PreviewHands5="./images/player/hands5.png";d.PreviewHands9="./images/player/hands9.png";d.PreviewHands10="./images/player/hands10.png";d.PreviewHands12="./images/player/hands12.png";
d.PreviewBody1="./images/player/body1.png";d.PreviewBody2="./images/player/body2.png";d.PreviewBody3="./images/player/body3.png";d.PreviewBody4="./images/player/body4.png";d.PreviewBody5="./images/player/body5.png";d.PreviewBody6="./images/player/body6.png";d.PreviewBody7="./images/player/body7.png";d.PreviewBody8="./images/player/body8.png";d.PreviewBody9="./images/player/body9.png";d.PreviewBody10="./images/player/body10.png";d.PreviewBody11="./images/player/body11.png";d.PreviewBody12="./images/player/body12.png";
d.PreviewHead1="./images/player/head1.png";d.PreviewHead2="./images/player/head2.png";d.PreviewHead3="./images/player/head3.png";d.PreviewHead4="./images/player/head4.png";d.PreviewHead5="./images/player/head5.png";d.PreviewHead6="./images/player/head6.png";d.PreviewHead7="./images/player/head7.png";d.PreviewHead8="./images/player/head8.png";d.PreviewHead9="./images/player/head9.png";d.PreviewHead10="./images/player/head10.png";d.PreviewHead11="./images/player/head11.png";d.PreviewHead12="./images/player/head12.png";
d.PreviewDesk="./images/player/desk.png";$.extend(a,d);a.getLevelResources=function(){for(var a=[d,g,e,h],c=[],l=0;l<arguments.length;l++){var m=arguments[l];if(a.length<m)throw new "invalid level: "+m;c.addRange(b(a[m-1]))}return c};var b=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(a[c]);return b},g={},e={},h={};g.Level2=c+"superb/level2.png";g.Level2Desk=c+"superb/level2Desk.png";g.Level2C1=c+"superb/level2C1.png";g.Level2C2=c+"superb/level2C2.png";g.Level2C2Keyboard=c+"superb/level2C2Keyboard.png";
g.Level2C3=c+"superb/level2C3.png";g.Level2C4=c+"superb/level2C4.png";$.extend(a,g);e.Level3=c+"superb/level3.png";e.Level3Desk=c+"superb/level3Desk.png";e.Level3C1=c+"superb/level3C1.png";e.Level3C2=c+"superb/level3C2.png";e.Level3C2Keyboard=c+"superb/level3C2Keyboard.png";e.Level3C3=c+"superb/level3C3.png";e.Level3C4=c+"superb/level3C4.png";$.extend(a,e);h.Level4=c+"superb/level4.png";h.Level4LockedLeft=c+"superb/level4LockedLeft.png";h.Level4LockedRight=c+"superb/level4LockedRight.png";h.Level4Desk=
c+"superb/level4Desk.png";h.Level4C1=c+"superb/level4C1.png";h.Level4C2=c+"superb/level4C2.png";h.Level4C2Keyboard=c+"superb/level4C2Keyboard.png";h.hwDesk1=c+"superb/hwDesk1.png";h.hwDesk2=c+"superb/hwDesk2.png";h.rndDesk1=c+"superb/rndDesk1.png";h.rndDesk2=c+"superb/rndDesk2.png";$.extend(a,h)})();var SplashScreen={},Startup={};
(function(){function a(a){if(PlatformShim.ISWIN8)a();else try{var b=require("fs");if(b){var f=b.readFileSync("./eula.txt","utf8");if(f)if(DataStore.getValue("eula-accepted"))a();else{var c=$("#eulaWindow");c.find(".deleteButton").clickExclOnce(function(){window.close()});c.find(".okButton").clickExclOnce(function(){c.dialog("close");DataStore.setValue("eula-accepted",!0);a()});var d;d=f.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/\n/g,"<br>");c.find(".eulaContainer").html(PlatformShim.toStaticHtml(d));
c.gdDialog({popout:!0,close:!1,zIndex:2E4,onClose:function(){c.find(".eulaContainer").empty()}})}}}catch(e){a&&a()}}function d(){try{var a=require("nw.gui").Window.get(),b=DataStore.getValue("windowed");try{(!0==b||"true"==b)&&PlatformShim.toggleFullscreen()}catch(f){}a.focus()}catch(c){}$("#commandsAppBar")[0].disabled=!1;var d=$("#splashScreen");$("#splashProgress").fadeOut(400);var e=$("#gameReadyLabel"),j,g=function(a){e.text(a);e.delay(400).effect("pulsate",{times:50},2E3)},h=function(){j="Tap to start game ...".localize();
WindowsIntegration.isTouchCapable||(j="Click to start game ...".localize());d.clickExcl(function(){if(UI.isPanelOpen())return UI.closePanels(),!1;UI.hideAboutBadge();d.off("click");g("Starting game...".localize());GameManager.startNewGame()});g(j)};if(0===GameManager.getSaveGames().length)h();else{j="Tap to continue ...";WindowsIntegration.isTouchCapable||(j="Click to continue ...".localize());var r=GameManager.getGameToContinue();r&&r.companyName&&$("#isAGameTycoonLabel").text("{0}".format(r.companyName)).fadeIn(600).arctext({radius:350});
GameManager.pause(!0);d.clickExcl(function(){if(UI.isPanelOpen())return UI.closePanels(),!1;d.off("click");UI.hideAboutBadge();UI.fadeInTransitionOverlay(function(){SplashScreen.removeSplashScreen();GameManager.reload(r.slot,function(){Sound.playBackgroundMusic();GameManager.resume(!0)},function(){h()},!0)})});g(j)}GameManager.startDrawLoop()}var c,b=function(){var b=$("#splashProgress");b.hide();$("#gameReadyLabel").hide();b.fadeIn("fast");$("#splashScreen");c=function(){var a=(window.innerWidth-
2990)/2-10,b=(window.innerHeight-2990)/2-70;$("#splashPositionStyle").html(".splashDynamicClass:before { top:{0}px; left:{1}px; }".format(b,a))};Localization.processHtml(document.body);CanvasManager.init(document.getElementById("canvasContainer"));CanvasManager.initLeftScreen(document.getElementById("canvasContainerLeft"));CanvasManager.initRightScreen(document.getElementById("canvasContainerRight"));c();GameManager.ghg0()?($("#gamePreviewLabel").text(">> Lite Version <<".localize()),GameManager.ghg1()):
$("#gamePreviewLabel").hide();$("#gameSavedOverlay").css({opacity:0});$("#gamePausedOverlay").css({opacity:0});$("#gameErrorOverlay").css({opacity:0});f();Logger.load();Knowledge.loadPlayerKnowledge();Sound.init();GameManager.init();$("<img/>").attr("src","./images/sunrays.png").load(function(){$("#splashStaticBackdrop").transition({opacity:0},2E3);a(function(){DataStore.init?DataStore.init(d):d()})});g=$(window).width();e=$(window).height();ghg4.init()};SplashScreen.removeSplashScreen=function(){var a=
$("#splashScreen");return a.is(":visible")?(a.fadeOut("slow"),UI.hideAboutBadge(),setTimeout(function(){a.remove();UpdateNotifications.checkAndShowNotifications()},1E3),!0):!1};SplashScreen.isVisible=function(){return $("#splashScreen").is(":visible")};var g,e,h=function(){var a=$(window).width(),b=$(window).height();a==g&&b==e||(g=a,e=b,$("#splashScreen").is(":visible")?c&&c():(GameManager.pause(!0),GameManager.autoSave(function(){GameManager.reload("auto",void 0,void 0,!0)})))},f=function(){var a=
$(window).width(),b=$(window).height();$(document.body).width(a).height(b);CanvasManager.updateCanvasSizes(a,b);CanvasManager.update()},j;$(window).resize(function(){f();clearTimeout(j);j=setTimeout(h,100)});PlatformShim.ISWIN8||$(document).ready(function(){b()})})();var Sound={},SOUND_DISABLED=!1;
(function(){Sound.init=function(){if(!SOUND_DISABLED){void 0==DataStore.getValue("masterVolume")&&DataStore.setValue("masterVolume",50);void 0==DataStore.getValue("muted")&&DataStore.setValue("muted",!1);void 0==DataStore.getValue("allowBackgroundMusic")&&DataStore.setValue("allowBackgroundMusic",!0);void 0==DataStore.getValue("fxAllowed")&&DataStore.setValue("fxAllowed",!0);createjs.Sound.registerPlugins([createjs.HTMLAudioPlugin]);preload=new createjs.LoadQueue;preload.installPlugin(createjs.Sound);
preload.onComplete=this.playJingle;var a=".mp3",b="./audio";GameFlags.ARM_VERSION&&(b="./audio/arm");PlatformShim.ISWIN8||(b="./audio/ogg",a=".ogg");preload.loadManifest([{id:"doing-my-best",src:b+"/doing-my-best"+a,type:"sound"},{id:"miss-management",src:b+"/miss-management"+a,type:"sound"},{id:"new-adventure",src:b+"/new-adventure"+a,type:"sound"},{id:"the-winning-strategy",src:b+"/the-winning-strategy"+a,type:"sound"},{id:"getting-to-success",src:b+"/getting-to-success"+a,type:"sound"},{id:"fly-like-a-butterfly",
src:b+"/fly-like-a-butterfly"+a,type:"sound"},{id:"startup",src:b+"/startup"+a,type:"sound"},{id:"GameDevTycoonTitle",src:b+"/GameDevTycoonTitle"+a,type:"sound"},{id:"clickSound",src:b+"/button-50"+a,type:"sound"},{id:"designSpawn",src:b+"/designSpawn"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"researchSpawn",src:b+"/researchSpawn"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"techSpawn",src:b+"/techSpawn"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"bugSpawn",
src:b+"/bugSpawn"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"designSpawnEnd",src:b+"/designSpawnEnd"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"researchSpawnEnd",src:b+"/researchSpawnEnd"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"techSpawnEnd",src:b+"/techSpawnEnd"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"bugSpawnEnd",src:b+"/bugSpawnEnd"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"popupOpen",src:b+"/popupOpen"+
a,type:"sound"},{id:"levelUp",src:b+"/levelUp"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?1:3},{id:"newRecord",src:b+"/newRecord"+a,type:"sound"},{id:"research",src:b+"/research"+a,type:"sound"},{id:"notificationTyping",src:b+"/notificationTyping"+a,type:"sound"},{id:"pointCount",src:b+"/pointCount"+a,type:"sound"},{id:"tack",src:b+"/tack"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:3},{id:"cash",src:b+"/cash"+a,type:"sound",data:1},{id:"ping",src:b+"/ping"+a,type:"sound",data:1},
{id:"pong",src:b+"/pong"+a,type:"sound",data:1},{id:"bugDecrease",src:b+"/bugDecrease"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?1:8},{id:"trainingProgress",src:b+"/trainingProgress"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?1:6},{id:"flipflap",src:b+"/flipflap"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?4:20},{id:"gameReady",src:b+"/game-ready"+a,type:"sound"},{id:"achievement1",src:b+"/achievement-1"+a,type:"sound"},{id:"reviewTack",src:b+"/reviewTack"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?
3:15},{id:"boost",src:b+"/boost"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?1:7}]);Sound._backgroundMusic=["doing-my-best","miss-management","new-adventure","the-winning-strategy"];Sound._backgroundMusic2=["getting-to-success"];Sound._backgroundMusic3=["startup"];Sound._backgroundMusic4=["fly-like-a-butterfly"];Sound._fxTracks="clickSound designSpawn researchSpawn techSpawn bugSpawn designSpawnEnd researchSpawnEnd techSpawnEnd bugSpawnEnd popupOpen levelUp newRecord research notificationTyping pointCount tack cash ping pong bugDecrease trainingProgress flipflap reviewTack boost".split(" ")}};
Sound.playSoundLoop=function(a,b){if(!SOUND_DISABLED){var c=b;c||(c=1);Sound.getFxAllowed()&&(Sound[a]&&Sound[a].stop(),Sound[a]=createjs.Sound.play(a,createjs.Sound.INTERRUPT_LATE,0,0,100,c,0))}};Sound.pauseAllLoopingFx=function(){SOUND_DISABLED||(Sound.notificationTyping&&Sound.notificationTyping.pause(),Sound.pointCount&&Sound.pointCount.pause())};Sound.resumeAllLoopingFx=function(){SOUND_DISABLED||(Sound.notificationTyping&&Sound.notificationTyping.resume(),Sound.pointCount&&Sound.pointCount.resume())};
Sound.stopSound=function(a){SOUND_DISABLED||Sound[a]&&Sound[a].stop()};Sound.playSoundOnce=function(a,b,c){SOUND_DISABLED||(b||(b=1),Sound.getFxAllowed()&&(Sound[a]=c?createjs.Sound.play(a,createjs.Sound.INTERRUPT_LATE,c,0,!1,b,0):createjs.Sound.play(a,createjs.Sound.INTERRUPT_LATE,0,0,!1,b,0)))};var a;Sound.playSpawnSound=function(b,c){if(!SOUND_DISABLED){if(GameFlags.LIMIT_SPAWN_SOUNDS){if(a&&30>Date.now()-a)return;a=Date.now()}if(c||GameFlags.BUBBLE_SOUND_AT_SPAWN_TIME)if(!c||GameFlags.BUBBLE_SOUND_AT_END_OF_ANIMATION)"t"===
b?c?Sound.playSoundOnce("techSpawnEnd",0.5):Sound.playSoundOnce("techSpawn",0.2):"d"===b?c?Sound.playSoundOnce("designSpawnEnd",0.5):Sound.playSoundOnce("designSpawn",0.2):"r"===b?c?Sound.playSoundOnce("researchSpawnEnd",0.5):Sound.playSoundOnce("researchSpawn",0.2):"e"===b?c?Sound.playSoundOnce("techSpawnEnd",0.5):Sound.playSoundOnce("techSpawn",0.2):"b"===b&&(c?Sound.playSoundOnce("bugSpawnEnd",0.12):Sound.playSoundOnce("bugSpawn",0.6))}};Sound.click=function(){SOUND_DISABLED||Sound.getFxAllowed()&&
(Sound.clickSound=createjs.Sound.play("clickSound",createjs.Sound.INTERRUPT_LATE,0,0,!1,0.5,0))};var d=!1;Sound.playJingle=function(){d=!0;!SOUND_DISABLED&&!Sound._backgroundMusicIsPlaying&&(Sound.setMasterVolume(Sound.getMasterVolume()),$("#splashScreen").is(":visible")?(Sound.GameDevTycoonTitle=createjs.Sound.play("GameDevTycoonTitle",null,0,0,!1,0.5,0),Sound.getMusicAllowed()||Sound.GameDevTycoonTitle.setMute(!0)):Sound.playBackgroundMusic())};Sound.playBackgroundMusic=function(){!SOUND_DISABLED&&
d&&(Sound._backgroundMusicIsPlaying=!0,Sound.setMasterVolume(Sound.getMasterVolume()),Sound.playBackgroundMusicIsCalled||(Sound.GameDevTycoonTitle&&Sound.GameDevTycoonTitle.stop(),Sound.changeBackgroundMusic(!0)),Sound.playBackgroundMusicIsCalled=!0)};Sound.startBackgroundMusic=function(a,b){SOUND_DISABLED||(Sound[Sound._currentBackgroundMusic]&&Sound[Sound._currentBackgroundMusic].stop(),Sound._currentBackgroundMusic=a,Sound[Sound._currentBackgroundMusic]=createjs.Sound.play(a,null,b,0,!1,0.15,0),
Sound[Sound._currentBackgroundMusic].onComplete=function(){Sound.changeBackgroundMusic()},Sound[Sound._currentBackgroundMusic].onPlayInterrupted=function(){Sound.changeBackgroundMusic()},Sound.getMusicAllowed()||Sound[Sound._currentBackgroundMusic].setMute(!0))};Sound.changeBackgroundMusic=function(a){if(!SOUND_DISABLED){for(var b=null;!b;){var c;GameManager.company?(c=GameManager.company.currentLevel,c=1==c?Sound._backgroundMusic.pickRandom():2==c?Sound._backgroundMusic.concat(Sound._backgroundMusic2).pickRandom():
3==c?Sound._backgroundMusic.concat(Sound._backgroundMusic2.concat(Sound._backgroundMusic3)).pickRandom():Sound._backgroundMusic.concat(Sound._backgroundMusic2.concat(Sound._backgroundMusic3.concat(Sound._backgroundMusic4))).pickRandom()):c=Sound._backgroundMusic.pickRandom();c!=Sound._currentBackgroundMusic&&(b=c)}a?Sound.startBackgroundMusic(b):Sound.startBackgroundMusic(b,9E3*Math.random())}};Sound.setMasterVolume=function(a,b){SOUND_DISABLED||(createjs.Sound.setVolume(a/100),b||DataStore.setValue("masterVolume",
a))};Sound.getMasterVolume=function(){return DataStore.getValue("masterVolume")};var c;Sound.getFxAllowed=function(){if(void 0===c){var a=DataStore.getValue("fxAllowed");return!0==a||"true"==a}return c};var b;Sound.getMusicAllowed=function(){if(void 0===b){var a=DataStore.getValue("allowBackgroundMusic");return!0==a||"true"==a}return b};Sound.allowFx=function(a){if(!SOUND_DISABLED){DataStore.setValue("fxAllowed",a);c=a;for(var b=0;b<Sound._fxTracks.length;b++)Sound[Sound._fxTracks[b]]&&Sound[Sound._fxTracks[b]].setMute(!a);
ghg4.ghg5("change soundfx settings",{setting:a?"on":"off"})}};Sound.allowMusic=function(a){SOUND_DISABLED||(DataStore.setValue("allowBackgroundMusic",a),b=a,Sound._currentBackgroundMusic?Sound[Sound._currentBackgroundMusic]&&Sound[Sound._currentBackgroundMusic].setMute(!a):Sound.GameDevTycoonTitle.setMute(!a),ghg4.ghg5("change music settings",{setting:a?"on":"off"}))}})();var CanvasManager={};
(function(){var a=CanvasManager;a.init=function(b){d(a,b)};var d=function(b,c){b.backgroundCanvas=document.createElement("canvas");b.backgroundCanvas.id="backgroundCanvas";b.backgroundCanvas.width=c.clientWidth;b.backgroundCanvas.height=c.clientHeight;b.backgroundCanvas.style.position="absolute";b.backgroundContext=b.backgroundCanvas.getContext("2d");b.backgroundStage=new createjs.Stage(b.backgroundCanvas);b.backgroundOverlayCanvas=document.createElement("canvas");b.backgroundOverlayCanvas.id="backgroundOverlayCanvas";
b.backgroundOverlayCanvas.width=c.clientWidth;b.backgroundOverlayCanvas.height=c.clientHeight;b.backgroundOverlayCanvas.style.position="absolute";b.backgroundOverlayContext=b.backgroundOverlayCanvas.getContext("2d");b.backgroundOverlayStage=new createjs.Stage(b.backgroundOverlayCanvas);b.characterCanvas=document.createElement("canvas");b.characterCanvas.id="characterCanvas";b.characterCanvas.width=c.clientWidth;b.characterCanvas.height=c.clientHeight;b.characterCanvas.style.position="absolute";b.characterContext=
b.characterCanvas.getContext("2d");b.characterStage=new createjs.Stage(b.characterCanvas);a.leftScreen!=b&&a.rightScreen!=b&&(b.foregroundCanvas=document.createElement("canvas"),b.foregroundCanvas.id="foregroundCanvas",b.foregroundCanvas.width=c.clientWidth,b.foregroundCanvas.height=c.clientHeight,b.foregroundCanvas.style.position="absolute",b.foregroundContext=b.foregroundCanvas.getContext("2d"),b.foregroundStage=new createjs.Stage(b.foregroundCanvas));b.backgroundInvalid=!1;b.invalidateBackground=
function(){b.backgroundInvalid=true};b.updateCanvasSizes=function(d,h){maxW=2560;maxH=1440;if(PlatformShim.ISLOWRES){maxW=1366;maxH=768}d=maxW*(h/maxH);$(c).width(d+"px").height(h+"px");b.backgroundCanvas.width=d;b.backgroundCanvas.height=h;b.invalidateBackground();b.backgroundOverlayCanvas.width=d;b.backgroundOverlayCanvas.height=h;b.characterCanvas.width=d;b.characterCanvas.height=h;if(b.foregroundCanvas){b.foregroundCanvas.width=d;b.foregroundCanvas.height=h}b.globalScale=h/maxH;b.globalScaleIgnoringLowResBackground=
h/1440;if(b===a){a.leftScreen&&a.leftScreen.updateCanvasSizes(d,h);a.rightScreen&&a.rightScreen.updateCanvasSizes(d,h);$(c).css("left",d+"px")}else b==a.rightScreen&&$(c).css("left",d*2+"px");b.isSmallScreen=d<=1024};c.appendChild(b.backgroundCanvas);c.appendChild(b.backgroundOverlayCanvas);c.appendChild(b.characterCanvas);b.foregroundCanvas&&c.appendChild(b.foregroundCanvas)};a.initLeftScreen=function(b){a.leftScreen={};d(a.leftScreen,b)};a.initRightScreen=function(b){a.rightScreen={};d(a.rightScreen,
b)};var c=function(a){a.backgroundStage&&(a.backgroundInvalid&&(a.backgroundStage.update(),a.backgroundInvalid=!1),a.backgroundOverlayStage.update(),a.characterStage.update(),a.foregroundStage&&a.foregroundStage.update())};a.update=function(b){a.backgroundStage&&(a.backgroundInvalid&&(a.backgroundStage.update(),a.backgroundInvalid=!1),!1!=CanvasManager.zone1Activ&&((!GameFlags.SKIP_FRAME||b||1==GameManager._skipFrameCount)&&a.backgroundOverlayStage.update(),a.foregroundStage.update(),(!GameFlags.SKIP_FRAME||
b||2==GameManager._skipFrameCount)&&a.characterStage.update()),!1!=CanvasManager.zone0Activ&&a.leftScreen&&c(a.leftScreen),!1!=CanvasManager.zone2Activ&&a.rightScreen&&c(a.rightScreen))}})();
(function(){var a=GameManager;a.MAX_RND_COST=3E6;a.RND_DECREASE_PER_SPECIALIST=1E5;a.MAX_HW_COST=3E6;a.HW_DECREASE_PER_SPECIALIST=1E5;a.startProject=function(c){var b=c.targetZone,d={};"custom console"===c.id&&$.extend(d,c);$.extend(d,{id:c.id,name:c.name,progress:0,startPoints:c.pointsCost,remainingPoints:c.pointsCost,iconUri:c.iconUri,targetZone:b,startTime:GameManager.gameTime});0==b?(a.currentHwProject=d,VisualsManager.putConsoleToPedestal()):2==b&&(a.currentRnDProject=d,Tutorial.rndProjectStarted())};
a.finishProject=function(c){a.currentHwProject==c?a.currentHwProject=null:a.currentRnDProject==c&&(a.currentRnDProject=null);"custom console"===c.id?(a.finishCustomConsole(c),VisualsManager.putConsoleToPedestal()):(Research.bigProjects.first(function(a){return a.id==c.id}).complete(GameManager.company),ghg4.ghg5("project complete",{id:c.id}))};a.cancelProject=function(a){GameManager.currentHwProject==a&&(GameManager.currentHwProject=null,VisualsManager.putConsoleToPedestal());GameManager.currentRnDProject==
a&&(GameManager.currentRnDProject=null);VisualsManager.updateProjectStatusCards();var b=Research.bigProjects.first(function(b){return b.id==a.id});b&&b.cancel&&b.cancel(GameManager.company)};a.canDevelopConsole=function(){if(a.currentHwProject)return!1;var c=a.company;return!c?!1:c.flags.hwLabUnlocked};a.finishCustomConsole=function(c){var b=GameManager.company;if(b){b.flags["console"+c.variation+"Used"]=!0;var d=b.getDate(b.currentWeek/GameManager.flags.gameLengthModifier),e=1.1,h=b.availablePlatforms.concat(b.licencedPlatforms).max(function(a){return a.techLevel}),
f=c.techLevel>=h,j=c.techLevel-h,e=e+j/5,h=c.qF,j=10*h-c.techLevel,e=e+(j/20).clamp(-0.2,0.2),j=c.features.map(function(a){return Research.getAllItems().first(function(b){return b.id===a})}).filter(function(a){return a.category!="Graphic".localize()}).sum(function(a){return a.v})/22,e=0.7*e+0.3*j;1<e&&(e=1+0.3*(e-1));for(var l=Platforms.allPlatforms.filter(function(a){return a.techLevel<=c.techLevel}).max(function(a){return a.startAmount}),l=l*e,m=Platforms.allPlatforms.filter(function(a){return a.techLevel<=
c.techLevel}).max(function(a){return Platforms.getMarketSizeForWeek(a,b.currentWeek+144,b)}),m=m/5E6*e,d={id:a.getGUID(),isCustom:!0,iconUri:c.iconUri,name:c.name,company:b.name,published:"{0}/{1}/{2}".format(d.year,d.month,d.week),developmentCosts:0,genreWeightings:GameManager.getCalculatedPlatformGenreWeightings(),audienceWeightings:GameManager.getCalculatedPlatformAudienceWeightings(),techLevel:c.techLevel,isGoodTech:f,featureFactor:j,startAmount:l,unitsSold:m,qF:h,successFactor:e,version:c.version},
e=b.licencedPlatforms.filter(function(a){return a.isCustom&&!a.saleCancelled}),f=0;f<e.length;f++)e[f].saleCancelled=!0;b.licencedPlatforms.push(d);Media.createConsoleStartStory(d);Tutorial.consoleReleased(1.4)}};var d=function(a,b,d){b===GameGenre.Action&&(a[0]+=d);b===GameGenre.Adventure&&(a[1]+=d);b===GameGenre.RPG&&(a[2]+=d);b===GameGenre.Simulation&&(a[3]+=d);b===GameGenre.Strategy&&(a[4]+=d);b===GameGenre.Casual&&(a[5]+=d)};a.getCalculatedPlatformGenreWeightings=function(){for(var c=[0.8,0.8,
0.8,0.8,0.8,0.8],b=[0,0,0,0,0,0],g=a.company.gameLog,e=0;e<g.length;e++)d(b,g[e].genre,1),g[e].secondGenre&&d(b,g[e].secondGenre,0.5);for(var g=b.slice().sort(function(a,b){return b-a}),h=[1,1,0.9,0.8,0.8,0.7],e=g.length-1;0<=e;e--)for(var f=0;f<b.length;f++)b[f]==g[e]&&(c[f]=h[e]);return c};a.getCalculatedPlatformAudienceWeightings=function(){for(var c=[0.8,0.8,0.8],b=[0,0,0],d=a.company.gameLog,e=0;e<d.length;e++)b["young"===d[e].targetAudience?0:"mature"===d[e].targetAudience?2:1]++;for(var d=
b.max(function(a){return a}),h=b.min(function(a){return a}),e=0;e<c.length;e++)c[e]=b[e]===d?1:b[e]===h?0.8:0.9;return c};a.getLabCostPerMonth=function(c){if(!GameManager.company)return 0;var b=0,d=1;0===c&&GameManager.company.flags.hwLabUnlocked?(b=GameManager.company.flags.hwBudget,d=a.getMaxHwBudget()):2==c&&GameManager.company.flags.rndLabUnlocked&&(b=GameManager.company.flags.rndBudget,d=a.getMaxRndBudget());return c=1E4*Math.floor(d*b/1E4)};a.calculateFractionalLabCosts=function(c){if(GameManager.company&&
0!==c){if(GameManager.company.flags.hwLabUnlocked){var b=a.getLabCostPerMonth(0);0!=b&&(b/=4*GameManager.SECONDS_PER_WEEK,GameManager.company.flags.fractionalHwLabCosts+=b/1E3*c)}GameManager.company.flags.rndLabUnlocked&&(b=a.getLabCostPerMonth(2),0!=b&&(b/=4*GameManager.SECONDS_PER_WEEK,GameManager.company.flags.fractionalRndLabCosts+=b/1E3*c))}};a.addTickListener(function(c){if(GameManager.company&&4===GameManager.company.currentLevel&&(GameManager.company.flags.hwLabUnlocked||GameManager.company.flags.rndLabUnlocked))a.calculateFractionalLabCosts(c),
VisualsManager.updateProjectStatusCards();a.currentHwProject&&(0.75<=a.currentHwProject.progress&&!a.currentHwProject.announceQ&&"custom console"===a.currentHwProject.id)&&(a.currentHwProject.announceQ=!0,(c=DecisionNotifications.announceConsole.getNotification(a.company))&&a.company.notifications.push(c))},!0)})();
(function(){var a=GameManager;a.enableContracts=function(){var a=GameManager.company,c=2+2*a.getRandom(),b=a.gameLog.last(),g=8<=b.score?"I love your work".localize("contractDescrFragment"):5<=b.score?"I am impressed by your talent".localize("contractDescrFragment"):"I think you have potential".localize("contractDescrFragment"),b=new Notification("Contract Work".localize("heading"),"Hi there,\nI've just finished {0} and {1}.\nI'm in the contracting business and we could use skills like yours. If you are ever short on cash just let me know and I will see if I have some work for you.\nJason".localize("{1} is contractDescrFragment").format(b.title,
g));b.weeksUntilFired=c;b.setFlag("contractsEnabled",!0);a.notifications.push(b);Tutorial.contractsUnlocked(c)};a.enableMediumContracts=function(){var a=GameManager.company;if(!a.flags.mediumContractsScheduled){a.flags.mediumContractsScheduled=!0;var c=4+3*a.getRandom(),b=new Notification("Contract Work".localize("heading"),"Hi again,\nI heard that you've been very successful in the gaming business and are starting to grow your team.\nI've updated our client list, so if you are looking for some contract work let me know.\nJason{n}Medium sized contracts have been unlocked.".localize());
b.weeksUntilFired=c;b.setFlag("mediumContractsEnabled",!0);a.notifications.push(b)}};a.enableLargeContracts=function(a){var c=GameManager.company;if(!c.flags.largeContractsScheduled){c.flags.largeContractsScheduled=!0;var b=new Notification("Contract Work".localize("heading"),"Wow, I have seen some pictures of your new office! Cutting edge stuff!\nI'm sure you are doing very well but if you need to top up your budget I've a couple of big jobs that need to be taken care of.\nJason{n}Large contracts have been unlocked.".localize());
b.weeksUntilFired=a;b.setFlag("largeContractsEnabled",!0);c.notifications.push(b)}};a.contractFinished=function(a){var c=GameManager.company;c.flags.contractFinishedShown||(c.flags.contractFinishedShown=!0,a=a?"Jason here.\nI just got word from the client that the contract was completed successfully. Excellent work!".localize()+"\n":"Jason here.\nI see that the contract was not completed in time. Be careful what contracts you accept otherwise those penalties quickly add up.{n}Don't worry too much though, I don't hold grudges. If you want to try again let me know.".localize()+
"\n",c.notifications.push(new Notification("Contract Work".localize("heading"),a+"Usually I have new contracts every six months so check back some time.".localize(),"OK".localize(),0.3)))};a.startContract=function(d){var c=ProjectContracts.getAllContracts().first(function(a){return a.id===d.id});c.accept&&c.accept(a.company);c={};$.extend(c,d);if(d.requiredD||d.requiredT)c.isGenericContract=!0,c.remainingD=d.requiredD,c.remainingT=d.requiredT,c.visualDRemaining=d.requiredD,c.visualTRemaining=d.requiredT,
c.startTime=a.gameTime;a.currentContract=c;"gameContract"===c.type?(a.company.adjustCash(c.payment,"Up-front payment".localize("heading")),UI.updateStatusBar(a.company),a.transitionToState(State.CreateGame)):VisualsManager.startContract();GDT.fire(a,GDT.eventKeys.gameplay.contractStarted,{company:a.company,contract:a.currentContract})};a.contractCancelled=function(){var d=a.currentContract;a.currentContract=null;"gameContract"===d.type&&a.company.adjustCash(-d.payment,"Contract Refund".localize("heading"))};
a._setContractRequirements=function(d){var c=a.currentContract;d.flags.lockedSettings={};c.topic&&(d.topic=Topics.topics.first(function(a){return a.id==c.topic}),d.flags.lockedSettings.topic=!0);c.genre&&(d.genre=GameGenre.getAll().first(function(a){return a.id==c.genre}),d.flags.lockedSettings.genre=!0);c.secondGenre&&(d.secondGenre=GameGenre.getAll().first(function(a){return a.id==c.secondGenre}),d.flags.lockedSettings.secondGenre=!0);c.platform&&(d.platforms=[],d.platforms.push(GameManager.company.licencedPlatforms.first(function(a){return a.id==
c.platform})),d.flags.lockedSettings.platform=!0);c.gameAudience&&(d.targetAudience=c.gameAudience,d.flags.lockedSettings.targetAudience=!0);c.gameSize&&(d.gameSize=c.gameSize,d.flags.lockedSettings.gameSize=!0);d.flags.contractId=c.refNumber;d.flags.royaltyRate=c.royaltyRate};a.finishContract=function(d){var c=a.currentContract;a.currentContract=null;c.isGenericContract&&VisualsManager.gameStatusBar.finishContract();var b=ProjectContracts.getAllContracts().first(function(a){return a.id===c.id});
b&&b.complete&&b.complete(a.company,!d,c);GDT.fire(a,GDT.eventKeys.gameplay.contractFinished,{company:a.company,contract:c})};a.updateContractProgress=function(){var d=a.currentContract;d.weeksToFinish&&!a.company.currentGame&&(0>=d.visualDRemaining&&0>=d.visualTRemaining?a.finishContract():(d=(a.gameTime-d.startTime)/(1E3*d.weeksToFinish*a.SECONDS_PER_WEEK),1<=d?a.finishContract(!0):VisualsManager.gameStatusBar.updateProgress(1-d,!0,100)))}})();var GameDev={ResourceManager:{}};
(function(){rm=GameDev.ResourceManager;rm.resources={};rm.ensureResources=function(a,d){if(0==a.length)d();else{var c=new html5Preloader,b=!1;i=0;for(length=a.length;i<length;i++){var g=a[i];g&&!rm.resources[g]&&(c.addFiles(g),b=!0)}b?(c.onerror=function(a){alert(a)},c.onfinish=function(){i=0;for(length=a.length;i<length;i++){var b=a[i];rm.resources[b]||(rm.resources[b]=c.getFile(b))}d()}):d()}};rm.removeResources=function(a){for(var d=0;d<a.length;d++){var c=a[d];rm.resources.hasOwnProperty(c)&&
(rm.resources[c]=void 0)}}})();"use strict";var Booth=function(a,d,c,b,g,e,h,f){this.id=a;this.name=d;this.standFactor=c;this.description=b;this.cost=g;this.floorImage=e;this.bgImage=h;this.fgImage=f};"use strict";
var Company=function(a){this.name=a;this.timePlayed=0;this.currentGame=void 0;this.cash=0;this.cashLog=[];this.fansChange=this.fans=0;this.gameLog=[];this.trashedGames=[];this.notifications=[];this.activeNotifications=[];this.booths=[];this.booths.push(new Booth(1,"Small Booth".localize("heading"),0.3,"This is a small pop up stand where we can show our marketing material. It isn't very impressive but a common setup at the G3.".localize(),8E4,"./images/superb/boothFloor.png","./images/superb/boothSmallBg.png"));
this.booths.push(new Booth(2,"Medium Booth".localize("heading"),0.5,"This is a larger booth in a better location. We should expect more visitors with this booth and have space to give away demos of our games.".localize(),5E5,"./images/superb/boothFloor.png","./images/superb/boothMediumBg.png"));this.booths.push(new Booth(3,"Large Booth".localize("heading"),1.3,"With this package we get our own section in the main hall of the G3. We can expect a large number of visitors.".localize(),15E5,"./images/superb/boothFloor.png",
"./images/superb/boothLargeBg.png","./images/superb/boothLargeFg.png"));this.booths.push(new Booth(4,"Custom".localize("heading, as in Custom Booth"),2,"",0,"./images/superb/boothCustomFloor.png","./images/superb/boothCustom.png"));this.genres=[];this.topics=[];this.licencedPlatforms=[];this.availablePlatforms=[];this.currentWeek=0;this.currentLevel=1;this.conferenceHype=0;this.staff=[];this.maxStaff=1;this.staff.push(new Character({id:0,name:PlatformShim.getUserName(),dF:0.6,tF:0.6,speedF:0.6,qualityF:0.2,
researchF:0.6,salary:0,slot:0,working:!1,loopCount:-1}));this.researchPoints=0;this.scheduledStoriesShown=[];this.triggerNotificationsShown=[];this.tutorialMessagesShown=[];this.conferenceStandFactor=null;this.trainingEnabled=this.researchEnabled=!1;this.availableResearch=[];this.researchCompleted=[];this.engines=[];this.engineParts=[];this.specialItems=[];this.features=[];this.lastTopScore=this.topScoreAchievements=0;this.flags={secrecy:0,good:0,evil:0,nextGameHypeBonus:0};this.knowledge={};this.eventTriggerCounts=
{}};
(function(){var a=Company.prototype;a.createNewGame=function(){var a=new Game(this);a.title="Game #".localize("followed by number")+(this.gameLog.length+1);this.flags.nextGameHypeBonus&&(a.hypePoints+=this.flags.nextGameHypeBonus,this.flags.nextGameHypeBonus=0);this.currentGame=a;for(var c=0;c<this.staff.length;c++)this.staff[c].flags.workload=0;this.currentGame.flags.featureResponsibility=$.extend({},this.flags.featureResponsibility);return a};a.getCurrentDate=function(){var a=Math.floor(this.currentWeek)%4+
1,c=Math.floor(this.currentWeek)/4,b=c/12+1;return{year:Math.floor(b),month:Math.floor(c%12+1),week:Math.floor(a)}};a.getDate=function(a){var c=Math.floor(a)%4+1,a=Math.floor(a)/4,b=a/12+1;return{year:Math.floor(b),month:Math.floor(a%12+1),week:Math.floor(c)}};a.calculateCurrentNofitications=function(){var a=[];this.notifications.addRange(Media.getNewNotifications(this));this.notifications.addRange(DecisionNotifications.getNewNotifications(this));for(var c=0;c<this.notifications.length;c++){var b=
this.notifications[c];0>=b.weeksUntilFired&&(this.activeNotifications.addRange(b.split()),a.push(b))}for(c=0;c<a.length;c++)b=a[c],this.notifications.splice(this.notifications.indexOf(b),1)};a.hasTopicWithId=function(a){return this.topics.some(function(c){return c.id===a})};a.canDevelopEngine=function(){return-1!=this.researchCompleted.indexOf(Research.CustomEngine)};a.getRandom=function(){this.randomCalled+=1;return this._mersenneTwister.random()};a.adjustFans=function(a){var c=this.fansChange?this.fansChange:
0;this.fansChange=0>this.fans+c+a?-this.fans:c+a};a.adjustCash=function(a,c){if(isNaN(a)){if(GameFlags.ghg6)throw"value cannot be NaN";}else this.cash+=a,c&&this.cashLog.push({amount:a,label:c})};a.adjustHype=function(a){this.currentGame&&(this.currentGame.hypePoints+=a)};a.canDevelopMediumGames=function(){return-1!=this.researchCompleted.indexOf(Research.MediumSizeGames)};a.canDevelopLargeGames=function(){return-1!=this.researchCompleted.indexOf(Research.LargeSizeGames)};a.canDevelopAAAGames=function(){return-1!=
this.researchCompleted.indexOf(Research.AAA)};a.canUseMultiGenre=function(){return-1!=this.researchCompleted.indexOf(Research.MultiGenre)};a.canDevelopMultiPlatform=function(){return-1!=this.researchCompleted.indexOf(Research.MultiPlatform)};a.canDevelopMMOGames=function(){return-1!=this.researchCompleted.indexOf(Research.MMO)};a.isMMOInSale=function(){var a=this.currentWeek;return 0<this.gameLog.filter(function(c){return a>c.releaseWeek&&0<c.currentSalesCash&&!c.soldOut&&c.flags.mmo}).length};a.canSetTargetAudience=
function(){return-1!=this.researchCompleted.indexOf(Research.TargetAudience)};a.getGameById=function(a){return this.gameLog.first(function(c){return c.id===a})};a.getPossibleGamesForSequel=function(){var a=this.gameLog.filter(function(a){return null!=a.sequelTo}).map(function(a){return a.sequelTo});return this.gameLog.filter(function(c){return-1==a.indexOf(c.id)})};a.getPossibleGamesForPack=function(){return this.gameLog.filter(function(a){return!0===a.flags.mmo&&!a.soldOut})};a.isCurrentlyDevelopingGame=
function(){return null!=this.currentGame&&0!=this.currentGame.costs&&!this.currentGame.releaseWeek};a.isGameProgressBetween=function(a,c){return null!=this.currentGame&&(!c||GameManager.getCurrentGameProgress()<c)&&(!a||GameManager.getCurrentGameProgress()>a)};a.isLaterOrEqualThan=function(a,c,b){var g=this.getCurrentDate();return g.year>a||g.year===a&&g.month>c||g.year===a&&g.month===c&&g.week>=b};a.isEarlierOrEqualThan=function(a,c,b){var g=this.getCurrentDate();return g.year<a||g.year===a&&g.month<
c||g.year===a&&g.month===c&&g.week<=b};a.getBestSeller=function(){var a=this.gameLog.slice().sort(function(a,b){return b.unitsSold-a.unitsSold}).first();return a?a:null};a.getLatestCustomConsole=function(){return this.licencedPlatforms.last(function(a){return a.isCustom&&!a.saleCancelled})};Company.load=function(a){var c=new Company;c.uid=a.uid;c.uid||(c.uid=GameManager.getGUID());c.name=a.name;c.timePlayed=a.timePlayed;c.slot=a.slot;c.cash=a.cash;c.cashLog=a.cashLog;c.fans=a.fans;c.fansChange=a.fansChange;
c.flags=a.flags;c.flags||(c.flags={});c.conferenceStandFactor=a.conferenceStandFactor;c.notifications=a.notifications.map(function(a){return Notification.load(a)});c.activeNotifications=a.activeNotifications.map(function(a){return Notification.load(a)});c.genres=a.genres.map(function(a){return Genres.load(a)});c.licencedPlatforms=a.licencedPlatforms.map(function(a){return PlatformsSerializer.load(a)});c.availablePlatforms=a.availablePlatforms.map(function(a){return PlatformsSerializer.load(a)});c.staff=
a.staff.map(function(a){return Character.load(a)});c.maxStaff=a.maxStaff;c.maxStaff||(c.maxStaff=1);c.currentWeek=a.currentWeek;c.topics=a.topics.map(function(a){return TopicsSerializer.load(a)});c.tutorialMessagesShown=a.tutorialMessagesShown;c.tutorialMessagesShown||(c.tutorialMessagesShown=[]);c.triggerNotificationsShown=a.triggerNotificationsShown?a.triggerNotificationsShown:[];c.researchPoints=a.researchPoints;c.researchEnabled=a.researchEnabled;c.trainingEnabled=a.trainingEnabled;var b=Research.getAllItems();
c.availableResearch=a.availableResearch.map(function(a){return b.first(function(b){return b.id===a})}).filter(function(a){return a});c.researchCompleted=a.researchCompleted.map(function(a){return b.concat(Research.bigProjects).first(function(b){return b.id===a})}).filter(function(a){return a});c.engines=a.engines.map(function(a){return EngineSerializer.load(a)});c.engineParts=a.engineParts.map(function(a){return EnginePartsSerializer.load(a)}).filter(function(a){return a});c.specialItems=[];a.specialItems&&
(c.specialItems=a.specialItems.map(function(a){return FeatureSerializer.load(a)}).filter(function(a){return a}));c.features=a.features.map(function(a){return FeatureSerializer.load(a)}).filter(function(a){return a});c.topScoreAchievements=a.topScoreAchievements;c.lastTopScore=a.lastTopScore;a.previousTopScore&&(c.previousTopScore=a.previousTopScore);a.lastTopScoreWeek&&(c.lastTopScoreWeek=a.lastTopScoreWeek);a.lastTopScoreGameSize&&(c.lastTopScoreGameSize=a.lastTopScoreGameSize);c.lastTopScoreIncrease=
a.lastTopScoreIncrease;c.scheduledStoriesShown=a.scheduledStoriesShown;c.currentLevel=a.currentLevel;c.currentLevel||(c.currentLevel=1);c.currentGame=Game.load(a.currentGame,c);a.gameLog&&(c.gameLog=a.gameLog.map(function(a){return Game.load(a,c)}));a.trashedGames&&(c.trashedGames=a.trashedGames.map(function(a){return Game.load(a,c)}));a.rndCrew&&(c.rndCrew=a.rndCrew.map(function(a){return new ProjectWorkerVisual(a)}));a.hwCrew&&(c.hwCrew=a.hwCrew.map(function(a){return new ProjectWorkerVisual(a)}));
a.levelOverlay&&(c.levelOverlay=a.levelOverlay);c.conferenceHype=a.conferenceHype?a.conferenceHype:0;c.seed=a.seed;c.seed||(c.seed=Math.floor(65535*Math.random()));c.randomCalled=a.randomCalled;c._mersenneTwister=new MersenneTwister(c.seed);for(var g=0;g<c.randomCalled;g++)c._mersenneTwister.random();c.knowledge=a.knowledge;c.knowledge||(c.knowledge={});c.eventTriggerCounts=a.eventTriggerCounts;c.eventTriggerCounts||(c.eventTriggerCounts={});return c};a.save=function(){var a={};a.uid=this.uid;a.name=
this.name;a.timePlayed=this.timePlayed;a.slot=this.slot;a.cash=this.cash;a.cashLog=this.cashLog;a.fans=this.fans;a.fansChange=this.fansChange;a.flags=this.flags;a.conferenceStandFactor=this.conferenceStandFactor;a.notifications=this.notifications.map(function(a){return a.save()});a.activeNotifications=this.activeNotifications.map(function(a){return a.save()});a.genres=this.genres.map(function(a){return a.save()});a.licencedPlatforms=this.licencedPlatforms.map(function(a){return PlatformsSerializer.save(a)});
a.availablePlatforms=this.availablePlatforms.map(function(a){return PlatformsSerializer.save(a)});a.staff=this.staff.map(function(a){return a.save()});a.maxStaff=this.maxStaff;this.currentGame&&(a.currentGame=this.currentGame.save());a.currentWeek=this.currentWeek;a.gameLog=this.gameLog.map(function(a){return a.save()});a.trashedGames=this.trashedGames.map(function(a){return a.save()});a.topics=this.topics.map(function(a){return TopicsSerializer.save(a)});a.tutorialMessagesShown=this.tutorialMessagesShown;
a.scheduledStoriesShown=this.scheduledStoriesShown;a.triggerNotificationsShown=this.triggerNotificationsShown;a.researchPoints=this.researchPoints;a.researchEnabled=this.researchEnabled;a.trainingEnabled=this.trainingEnabled;a.availableResearch=this.availableResearch.map(function(a){return a.id});a.researchCompleted=this.researchCompleted.map(function(a){return a.id});a.engines=this.engines.map(function(a){return EngineSerializer.save(a)});a.engineParts=this.engineParts.map(function(a){return EnginePartsSerializer.save(a)});
a.specialItems=this.specialItems.map(function(a){return FeatureSerializer.save(a)});a.features=this.features.map(function(a){return FeatureSerializer.save(a)});a.topScoreAchievements=this.topScoreAchievements;a.lastTopScore=this.lastTopScore;a.previousTopScore=this.previousTopScore;a.lastTopScoreWeek=this.lastTopScoreWeek;a.lastTopScoreGameSize=this.lastTopScoreGameSize;a.lastTopScoreIncrease=this.lastTopScoreIncrease;this.rndCrew&&(a.rndCrew=this.rndCrew.map(function(a){return a.save()}));this.hwCrew&&
(a.hwCrew=this.hwCrew.map(function(a){return a.save()}));a.currentLevel=this.currentLevel;a.conferenceHype=this.conferenceHype;a.seed=this.seed;a.randomCalled=this.randomCalled;VisualsManager.levelOverlay&&(a.levelOverlay=VisualsManager.levelOverlay.saveState());a.knowledge=this.knowledge;a.eventTriggerCounts=this.eventTriggerCounts;return a}})();"use strict";
var Game=function(a){this.id=GameManager.getGUID();this.topic=this.genre=this.title=void 0;this.platforms=[];this.engine=void 0;this.state=GameState.notStarted;this.gameSize="small";this.targetAudience="everyone";this.missionLog=[];this.salesCashLog=[];this.featureLog=null;this.score=0;this.reviews=[];this.topSalesRank=this.currentSalesRank=this.initialSalesRank=this.fansChanged=this.fansChangeTarget=this.releaseWeek=this.amountSold=this.totalSalesCash=this.currentSalesCash=this.designPoints=this.freeBugCount=
this.bugs=this.technologyPoints=this.hypePoints=this.costs=0;this.researchFactor=1;this.revenue=0;this.flags={};this.soldOut=!1;a.conferenceHype&&(this.hypePoints=a.conferenceHype,a.conferenceHype=Math.floor(a.conferenceHype/3))};
(function(){var a=Game.prototype;a.isOnSale=function(){return 0<this.nextSalesCash};a._saveMissionLog=function(){return this.missionLog.map(function(a){return a.id})};a._loadMissionLog=function(a){var c=Missions.getAllMissions();this.missionLog=a.map(function(a){return c.first(function(c){return c.id===a})})};a.getSalesAnomaly=function(){this.flags.salesAnomaly||(this.flags.salesAnomaly=0);var a=SalesEvents.getSaleRecord(GameManager.company,this);if(a)return this.flags.salesAnomaly++,a;if(this.flags.interviewHyped&&
2<=this.salesCashLog.length&&!this.flags.interviewHyped.done)return this.flags.interviewHyped.done=!0,SalesEvents.getHypedGameEvent(GameManager.company,this);GameManager.company.canSetTargetAudience()&&(!this.flags.audienceMismatchShown&&3<=this.salesCashLog.length&&0.8>Platforms.getAudienceWeighting(this.platforms,this.targetAudience))&&(this.flags.audienceMismatchShown=!0,Media.generateAudienceMismatchStory(GameManager.company,this));if(!(3>=this.salesCashLog.length)){if(this.flags.topScore&&(a=
SalesEvents.getTopScoreSalesEvent(GameManager.company,this)))return a;if(!(7>=this.salesCashLog.length)&&!(this.flags.salesAnomaly>(10<=this.score?3:8<=this.score?2:1))&&10==this.score&&!this.flags.earlySalesEvent)if(a=SalesEvents.getEarlySalesEvents(GameManager.company,this))return this.flags.salesAnomaly++,this.flags.earlySalesEvent=!0,a}};a.getGenreDisplayName=function(){return!this.secondGenre?this.genre.name:this.genre.name+"-"+this.secondGenre.name};a.save=function(){var a={};a.title=this.title;
a.id=this.id;this.genre&&(a.genre=this.genre.id);this.secondGenre&&(a.secondGenre=this.secondGenre.id);this.topic&&(a.topic=this.topic.id);this.platforms&&(a.platforms=this.platforms.map(function(a){return{id:a.id}}));a.gameSize=this.gameSize;a.targetAudience=this.targetAudience;a.sequelTo=this.sequelTo;a.hypePoints=this.hypePoints;a.technologyPoints=this.technologyPoints;a.bugs=this.bugs;a.freeBugCount=this.freeBugCount;a.designPoints=this.designPoints;a.costs=this.costs;a.score=this.score;a.reviews=
this.reviews;a.currentSales=this.currentSalesCash;a.totalSales=this.totalSalesCash;a.amountSold=this.unitsSold;a.salesLog=this.salesCashLog;a.maintenanceLog=this.maintenanceLog;a.nextMaintenance=this.nextMaintenance;a.missionLog=this._saveMissionLog();a.currentSalesRank=this.currentSalesRank;a.fansChangeTarget=this.fansChangeTarget;a.fansChanged=this.fansChanged;a.initialSalesRank=this.initialSalesRank;a.releaseWeek=this.releaseWeek;a.state=this.state;a.topSalesRank=this.topSalesRank;a.packReleaseWeek=
this.packReleaseWeek;a.researchFactor=this.researchFactor;this.featureLog&&(a.featureLog=this.featureLog.map(function(a){return CompanyFeatureSerializer.save(a)}));this.engine&&(a.engine_id=this.engine.id);this.features&&(a.features=this.features.map(function(a){return{id:a.id}}));this.reviewMessageDisplayed&&(a.reviewMessageDisplayed=this.reviewMessageDisplayed);a.flags=this.flags;a.nextSR=this.nextSalesRank;a.nFC=this.nextfansChange;a.nS=this.nextSalesCash;a.so=this.soldOut;a.revenue=this.revenue;
this.confAmount&&(a.confAmount=this.confAmount);return a};Game.load=function(a,c){if(a){var b=new Game(c);b.title=a.title;b.id=a.id;b.id||(b.id=GameManager.getGUID());void 0!=a.genre&&(b.genre=GameGenre.getAll().first(function(b){return b.id===a.genre}));void 0!=a.secondGenre&&(b.secondGenre=GameGenre.getAll().first(function(b){return b.id===a.secondGenre}));void 0!=a.topic&&(b.topic=Topics.topics.first(function(b){return b.id===a.topic}));void 0!=a.platforms&&(b.platforms=a.platforms.map(function(a){var b=
Platforms.allPlatforms.first(function(b){return b.id===a.id});b||(b=c.licencedPlatforms.first(function(b){return b.id===a.id}));return b}));b.gameSize=a.gameSize;b.targetAudience=a.targetAudience;b.sequelTo=a.sequelTo;b.hypePoints=a.hypePoints;b.technologyPoints=a.technologyPoints;b.bugs=a.bugs;b.freeBugCount=a.freeBugCount;b.designPoints=a.designPoints;b.score=a.score;b.reviews=a.reviews;b.costs=a.costs;b.currentSalesCash=a.currentSales;b.totalSalesCash=a.totalSales;b.unitsSold=a.amountSold;void 0!=
a.salesLog&&(b.salesCashLog=a.salesLog);void 0!=a.maintenanceLog&&(b.maintenanceLog=a.maintenanceLog);a.nextMaintenance&&(b.nextMaintenance=a.nextMaintenance);a.packReleaseWeek&&(b.packReleaseWeek=a.packReleaseWeek);b._loadMissionLog(a.missionLog);b.currentSalesRank=a.currentSalesRank;b.fansChangeTarget=a.fansChangeTarget;b.fansChanged=a.fansChanged;b.initialSalesRank=a.initialSalesRank;b.releaseWeek=a.releaseWeek;b.state=a.state;b.topSalesRank=a.topSalesRank;b.unitPrice=a.unitPrice?a.unitPrice:Sales.getUnitPrice(b);
b.researchFactor=a.researchFactor;b.featureLog=null;a.featureLog&&(b.featureLog=a.featureLog.map(function(a){return CompanyFeatureSerializer.load(a)}).filter(function(a){return a}));a.engine_id&&(b.engine=c.engines.first(function(b){return b.id===a.engine_id}));a.features&&(b.features=a.features.map(function(a){return FeatureSerializer.load(a)}).filter(function(a){return a}));a.reviewMessageDisplayed&&(b.reviewMessageDisplayed=a.reviewMessageDisplayed);b.flags=a.flags;b.flags||(b.flags={});b.nextSalesRank=
a.nextSR;b.nextfansChange=a.nFC;b.nextSalesCash=a.nS;a.so?b.soldOut=a.so:b.currentSalesCash>=b.totalSalesCash&&0!=b.currentSalesCash&&(b.soldOut=!0);b.revenue=a.revenue?a.revenue:Math.floor(b.unitsSold*b.unitPrice);a.confAmount&&(b.confAmount=a.confAmount);return b}};a.getRatioWorked=function(a){a=a.id;return!this.flags.devTime||!this.flags.staffContribution.hasOwnProperty(a)?0:this.flags.staffContribution[a]/this.flags.devTime};a.isStaffResponsibilityEnabled=function(){return"small"!=this.gameSize};
a.canDoPostMortem=function(){var a=this.id;return!this.flags.postMortemCompleted&&this.releaseWeek<GameManager.company.currentWeek&&GameManager.company.getDate(this.releaseWeek).year>GameManager.company.getCurrentDate().year-2&&!GameManager.company.staff.some(function(c){return c.flags.postMortemGameId==a})}})();"use strict";var GameState={notStarted:0,concept:1,development:2,publishing:3,released:4};"use strict";
var GameGenre={Action:{id:"Action",name:"Action".localize("genre")},Adventure:{id:"Adventure",name:"Adventure".localize("genre")},RPG:{id:"RPG",name:"RPG".localize("genre")},Simulation:{id:"Simulation",name:"Simulation".localize("genre")},Strategy:{id:"Strategy",name:"Strategy".localize("genre")},Casual:{id:"Casual",name:"Casual".localize("genre")},getAll:function(){return[this.Action,this.Adventure,this.RPG,this.Simulation,this.Strategy,this.Casual]},getGoldenRatio:function(a,d){if(d)return(2*GameGenre.getGoldenRatio(a)+
GameGenre.getGoldenRatio(d))/3;if(a===GameGenre.Action)return 1.8;if(a===GameGenre.Adventure)return 0.4;if(a===GameGenre.RPG)return 0.6;if(a===GameGenre.Simulation)return 1.6;if(a===GameGenre.Strategy)return 1.4;if(a===GameGenre.Casual)return 0.5;throw"unknown genre: "+a;},getGenreWeighting:function(a,d,c){if(void 0===a)return 1;if(c)return(GameGenre.getGenreWeighting(a,c)+2*GameGenre.getGenreWeighting(a,d))/3;if(d===GameGenre.Action)return a[0];if(d===GameGenre.Adventure)return a[1];if(d===GameGenre.RPG)return a[2];
if(d===GameGenre.Simulation)return a[3];if(d===GameGenre.Strategy)return a[4];if(d===GameGenre.Casual)return a[5];throw"unknown genre: "+d;},getIndexOf:function(a){var d=GameGenre.getAll().first(function(c){return c.id==a.id});return GameGenre.getAll().indexOf(d)}};"use strict";var Genre=function(a){this.name=a};(function(){Genre.load=function(a){return new Genre(a.name)};Genre.prototype.save=function(){var a={};a.name=this.name;return a}})();var GameTrends={};
(function(){var a=GameTrends;a.getCurrentTrendFactor=function(a){var b=d(GameManager.company).currentTrend;if(!b)return 1;if("genre"===b.type){if(a.genre.id==b.genre)return 1.2}else if("newTopics"===b.type){var c=a.topic.id;if(0===GameManager.company.gameLog.count(function(a){return a.topic.id===c}))return 1.2}else if("audience"===b.type){if(a.targetAudience===b.audience)return 1.2}else if("strangeCombos"===b.type)return a=GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre),1===a?0.85:0.9===
a?1.1:0.8===a?1.2:1.4;return 1};var d=function(a){a.flags.trends||(a.flags.trends={},c(a));return a.flags.trends},c=function(a){var c=a.flags.trends;c.expireBy=GameManager.gameTime+1E3*(24+12*a.getRandom())*GameManager.SECONDS_PER_WEEK;if(1!=a.currentLevel){var d=c.currentTrend;c.currentTrend=null;if(null===d&&0.5<=a.getRandom()){var f=a.getRandom();0.5>=f?(f=General.getAvailableGenres(a).pickRandom(),c.currentTrend={type:"genre",genre:f.id,label:"Popular genre: ".localize()+f.name}):0.7>=f?c.currentTrend=
{type:"newTopics",label:"Popular: New topics".localize()}:0.95>=f?a.canSetTargetAudience()&&(f=["young","everyone","mature"].pickRandom(),c.currentTrend={type:"audience",audience:f,label:"Strong audience: ".localize()+General.getAudienceLabel(f)}):0.96<=f&&(c.currentTrend={type:"strangeCombos",strength:1,label:"Trend: Strange combinations".localize()})}b(a,d,c.currentTrend)}},b=function(a,b,c){var f;if(b&&!c)f=["It seems that the market has normalized again with no particular strong trends at the moment.".localize()].pickRandom();
else if(c)switch(c.type){case "genre":b=General.getAvailableGenres(a).first(function(a){return a.id===c.genre});f=["It seems that {0} games are especially popular at the moment.".localize(),"There is a clear trend towards {0} games recently.".localize()].pickRandom().format(b.name);break;case "newTopics":f="It seems that the market responds particularly well to games with new topics at the moment.".localize();break;case "audience":f="";break;case "strangeCombos":f="Analysts have observed a strange trend lately where players around the world seem to have developed a curious taste for unusual games.{n}As one player put it: 'Sometimes you just want to play something unique. A game based on an idea that's not the usual Military/Action game or Fantasy/RPG just to name two examples.\nI really hope companies bring some unique games to market soon. I would definitely prefer them right now.'{n}This new trend promises to bring an interesting challenge to game developers as topic/genre combinations which used to work well will suddenly be less favorable while more outlandish ideas might flourish.".localize()}f&&
a.notifications.push(new Notification("Market Analysis".localize("heading"),f))};a.updateTrends=function(a){d(a).expireBy<=GameManager.gameTime&&c(a)}})();"use strict";var Notification=function(a,d,c,b){if(1===arguments.length&&arguments[0].constructor=={}.constructor){if($.extend(this,arguments[0]),this.buttonText||(this.buttonText="OK".localize()),void 0===this.weeksUntilFired)this.weeksUntilFired=0}else this.header=a,this.text=d,this.buttonText=c?c:"OK".localize(),this.weeksUntilFired=b?b:0};
(function(){Notification.load=function(a){return new Notification(a)};var a=Notification.prototype;a.save=function(){var a={};$.extend(a,this);return a};a.split=function(){var a=[],c=this.text,c=c?c.split("{n}"):"";if(1>=c.length)return[this];if(1<c.length)for(var b=0;b<c.length;b++){var g={};$.extend(g,this);g.text=c[b];this.buttonText instanceof Array&&(g.buttonText=this.buttonText[b]);this.image&&this.image instanceof Array&&(g.image=this.image.length>b?this.image[b]:this.image.last());if((g.sourceId||
g.options)&&b!=c.length-1)g.sourceId=null,g.options=null;g=new Notification(g);a.push(g)}return a};a.adjustCash=function(a,c){this.actions||(this.actions=[]);this.actions.push({type:"adjustCash",data:{amount:a,label:c}})};a.adjustHype=function(a){this.actions||(this.actions=[]);this.actions.push({type:"adjustHype",data:{amount:a}})};a.adjustFans=function(a){this.actions||(this.actions=[]);this.actions.push({type:"adjustFans",data:{amount:a}})};a.setFlag=function(a,c){this.actions||(this.actions=[]);
this.actions.push({type:"setFlag",data:{key:a,value:c}})};a.activateAchievement=function(a){this.actions||(this.actions=[]);this.actions.push({type:"achivement",data:{id:a.id}})};a.applyActions=function(a){if(this.actions)for(var c=0;c<this.actions.length;c++){var b=this.actions[c];switch(b.type){case "adjustCash":a.adjustCash(b.data.amount,b.data.label);break;case "adjustFans":a.adjustFans(b.data.amount);break;case "setFlag":a.flags[b.data.key]=b.data.value;break;case "adjustHype":a.adjustHype(b.data.amount);
break;case "achivement":b=Achievements.getWidthId(b.data.id);Achievements.activate(b);break;default:if(GameFlags.ghg6)throw new "unknown type: "+b.type;}}}})();"use strict";
var SaveGameData=function(a,d,c,b,g,e){this.slot=a;this.companyName=d;this.cash=c;this.fans=b;this.currentWeek=g;this.saveTime=e},SPAWN_POINTS_DURATION=1200,ON_FIRE_DURATION=5E3,BOOST_RECHARGE_DURATION=45E3,EFFICIENCY_RECHARGE_DURATION=9E4,CharacterState={Idle:"Idle",Working:"Working",Researching:"Researching",CreateEngine:"CreateEngine",WorkOnContract:"WorkOnContract",Training:"Training",Vacation:"Vacation"},CharacterOrientation={NW:"NW",NE:"NE",SW:"SW",SE:"SE"},Character=function(a){this.state=
a.state?a.state:CharacterState.Idle;this.id=a.id;this.slot=a.slot;this.slot||(this.slot=0);this.name=a.name;this.designFactor=a.dF;this.technologyFactor=a.tF;this.workAnimations=["typing","thinking","drawNotepad"];this.idleAnimations=["sitBack"];this.working=a.working;void 0===this.working&&(this.working=!1);this.speedFactor=a.speedF;this.qualityFactor=a.qualityF;this.researchFactor=a.researchF;this.salary=a.salary;this.engineProgress=a.engineProgress;this.contractProgress=a.contractProgress;this.bugFixingDelta=
a.bugFixingDelta;this.relaxDelta=0;a.relaxDelta&&(this.relaxDelta=a.relaxDelta);this.currentFeature=this.currentResearch=null;this.experience=a.experience?a.experience:LevelCalculator.getXpForLevel(5*this.qualityFactor);this.onFire=!1;this.boostRechargeProgress=this.maxBoostLevel=0;void 0!=a.onFire&&(this.onFire=a.onFire);void 0!=a.maxBoostLevel&&(this.maxBoostLevel=a.maxBoostLevel);a.boostRechargeProgress&&(this.boostRechargeProgress=a.boostRechargeProgress);void 0!=a.boostLevel&&(this.boostLevel=
a.boostLevel);this.efficiency=1;void 0!=a.efficiency&&(this.efficiency=a.efficiency);this.flags={};a.flags&&(this.flags=a.flags);this.currentAnimation=a.currentAnimation?a.currentAnimation:null;this.nextAnimation=a.nextAnimation?a.nextAnimation:null;a.currentFeature&&(this.currentFeature=a.currentFeature);this.spawnedPoints=[];a.spawnedPoints&&(this.spawnedPoints=a.spawnedPoints.map(function(a){return SpawnedPointsSerializer.load(a)}));this.visualData=a.visual;this.sex=a.sex;this.dLeft=a.dLeft?a.dLeft:
0;this.tLeft=a.tLeft?a.tLeft:0;this.rLeft=a.rLeft?a.rLeft:0};
(function(){Character.BASE_SALARY_PER_LEVEL=1E4;Character.load=function(a){return new Character(a)};var a=Character.prototype;a.getLevelF=function(){return LevelCalculator.getLevelFractional(this.experience)};a.getLevel=function(){return LevelCalculator.getLevel(this.experience)};a.getResearchSkillPoints=function(){return Math.floor(500*this.researchFactor)};a.getDesignSkillPoints=function(){return Math.floor(500*this.designFactor)};a.getTechnologySkillPoints=function(){return Math.floor(500*this.technologyFactor)};
a.getSpeedSkillPoints=function(){return Math.floor(500*this.speedFactor)};a.getOrientation=function(){var a=GameManager.company.currentLevel;if(1===a)return CharacterOrientation.NW;if(2===a||3===a||4==a)return 0===this.slot||1===this.slot||3===this.slot||5===this.slot?CharacterOrientation.NW:CharacterOrientation.SE};a.refreshPoints=function(){for(var a=VisualsManager.getCharacterOverlay(this),c=0;c<this.spawnedPoints.length;c++){var b=this.spawnedPoints[c],g=void 0;if(g="br"===b.type?a.spawnBugRemovePoint(b.id,
b.type,b.duration):a.spawnPoint(b.id,b.type,b.duration))for(var e=0;e<g.length;e++)g[e].setPosition(GameManager.gameTime-b.gameTime)}};a.isIdle=function(){return this.state===CharacterState.Idle};a.canStartResearch=function(){return this.isIdle()};a.save=function(){var a={};a.id=this.id;a.state=this.state;a.name=this.name;a.dF=this.designFactor;a.tF=this.technologyFactor;a.speedF=this.speedFactor;a.qualityF=this.qualityFactor;a.experience=this.experience;a.researchF=this.researchFactor;a.salary=this.salary;
a.engineProgress=this.engineProgress;a.contractProgress=this.contractProgress;a.bugFixingDelta=this.bugFixingDelta;a.relaxDelta=this.relaxDelta;a.slot=this.slot;a.working=this.working;a.currentAnimation=this.currentAnimation;a.nextAnimation=this.nextAnimation;a.onFire=this.onFire;a.maxBoostLevel=this.maxBoostLevel;a.boostRechargeProgress=this.boostRechargeProgress;a.boostLevel=this.boostLevel;a.efficiency=this.efficiency;a.flags=this.flags;this.currentFeature&&(a.currentFeature=this.currentFeature);
this.spawnedPoints&&(a.spawnedPoints=this.spawnedPoints.map(function(a){return SpawnedPointsSerializer.save(a)}));a.visual=VisualsManager.getCharacterOverlay(this).saveState();a.sex=this.sex;a.dLeft=this.dLeft;a.tLeft=this.tLeft;a.rLeft=this.rLeft;return a};a.adjustBoostRechargeProgress=function(a){this.boostRechargeProgress=(this.boostRechargeProgress+a).clamp(0,1)};a.getMaxEfficiency=function(){return 1};a.adjustEfficiency=function(a){this.efficiency=(this.efficiency+a).clamp(0.001,this.getMaxEfficiency())};
a.tick=function(){this.lastUpdate||(this.lastUpdate=GameManager.gameTime);var a=GameManager.gameTime-this.lastUpdate,c=!0;0!=this.id&&(!this.onFire&&this.flags.nextVacation<GameManager.gameTime)&&(this.flags.needsVacation=!0,this.adjustEfficiency(-a/EFFICIENCY_RECHARGE_DURATION),Tutorial.needsAHoliday(),c=!1);1!=this.efficiency&&c&&this.adjustEfficiency(a/EFFICIENCY_RECHARGE_DURATION);this.isIdle()&&(GameManager.currentFeature&&1>GameManager.currentFeature.progress&&null===this.currentFeature?(this._resetBugFixingWork(),
this._calcFeature(),this.state=CharacterState.Working,this.working=!0):GameManager.currentFeature&&1>GameManager.currentFeature.progress?(this.state=CharacterState.Working,this.working=!0):GameManager.currentEngineDev?(this._resetEngineWork(),this.state=CharacterState.CreateEngine,this.working=!0):GameManager.currentContract&&GameManager.currentContract.isGenericContract&&(this._resetContractWork(),this.state=CharacterState.WorkOnContract,this.working=!0));this.state===CharacterState.Working?this._doWork(a):
this.state===CharacterState.Researching?this._doResearch(a):this.state===CharacterState.CreateEngine?this._doEngineWork(a):this.state===CharacterState.WorkOnContract?this._doContractWork(a):this.state===CharacterState.Vacation&&(this._doRelax(a),"sitBack"===this.currentAnimation&&(c=VisualsManager.getCharacterOverlay(this),0.5<c.sitBackAnimation.alpha&&(c.sitBackAnimation.alpha=Math.max(c.sitBackAnimation.alpha-a/3E3,0.5))));this.onFire&&"thinking"!=this.currentAnimation?(c=this.boostRechargeProgress-
a/ON_FIRE_DURATION,0>=c?void 0!=this.boostLevel&&0<this.boostLevel?(this.boostLevel--,this.boostRechargeProgress=1-c):(VisualsManager.getCharacterOverlay(this).setOnFire(!1),this.boostLevel=0,this.onFire=!1):this.boostRechargeProgress=c):this.maxBoostLevel>this.boostLevel&&1>this.boostRechargeProgress&&(c=a/BOOST_RECHARGE_DURATION,this.state===CharacterState.Idle&&(c*=0.5),c=this.boostRechargeProgress+c,1!=this.boostRechargeProgress&&1<=c&&(this.boostLevel?this.boostLevel++:this.boostLevel=1,c=0),
this.boostRechargeProgress=c.clamp(0,1));this.state!=CharacterState.Vacation&&"sitBack"===this.currentAnimation&&(c=VisualsManager.getCharacterOverlay(this),1>c.sitBackAnimation.alpha&&(c.sitBackAnimation.alpha=Math.min(c.sitBackAnimation.alpha+a/3E3,1)));this.lastUpdate=GameManager.gameTime};a.getBoostFactor=function(){if(!this.onFire)return 1;var a=this.boostLevel;a||(a=1);return 1+0.25*(a+1)};a.startAnimations=function(){var a=VisualsManager.getCharacterOverlay(this,!0);a&&(this.currentAnimation=
"sitBack",this.loopCount=1,a.startSitBackLoop())};a.startWorking=function(){this.working=!0};a.endWorking=function(){this.working=!1};a.playNextAnimation=function(){this.currentAnimation=this.nextAnimation;this.nextAnimation=void 0;var a=VisualsManager.getCharacterOverlay(this,!0);a&&("typing"===this.currentAnimation?a.startTyping():"thinking"===this.currentAnimation?a.startThinking():"drawNotepad"===this.currentAnimation&&a.startDrawNotepad())};a.playRandomIdleAnimation=function(){var a=VisualsManager.getCharacterOverlay(this,
!0);a&&(this.currentAnimation="sitBack",a.startSitBack())};a.activateBoost=function(){this.onFire=!0;VisualsManager.getCharacterOverlay(this).setOnFire(!0)};a.loopEnded=function(){if(0<VisualsManager.characterOverlays.length){var a=VisualsManager.getCharacterOverlay(this,!0);if(a)if("typing"===this.currentAnimation)if(!1===this.working)GameManager.workEnded(this),a.endTyping();else if(GameManager.IsAnimationSwitchAllowed(this)){for(;;)if(this.nextAnimation=this.workAnimations.pickRandom(),"thinking"===
this.nextAnimation&&!this.onFire){var c=0.3-(0.25*this.speedFactor).clamp(0,0.25);if(GameManager.company.getRandom()<c)break}else if("drawNotepad"===this.nextAnimation&&0.5<GameManager.company.getRandom())break;else if("typing"===this.nextAnimation){this.nextAnimation=void 0;a.continueTyping();return}a.endTyping()}else a.continueTyping();else"thinking"===this.currentAnimation?(this.nextAnimation="typing",a.endThinking()):"sitBack"===this.currentAnimation?!0===this.working?(this.nextAnimation="typing",
a.endSitBack()):(GameManager.workEnded(this),a.continueSitBack()):"drawNotepad"===this.currentAnimation&&(this.nextAnimation="typing",a.endDrawNotepad())}};a.animationEnded=function(a){this.currentAnimation===a&&(this.working?(this.nextAnimation||(this.nextAnimation="typing"),this.playNextAnimation()):(this.playRandomIdleAnimation(),GameManager.workEnded(this)))};a._doResearch=function(a){if("thinking"!=this.currentAnimation&&!(0>=a||!1===this.isWorking())){var a=a-a/2*(1-this.efficiency),c=this.currentResearch,
b=a/c.duration,b=b*this.getBoostFactor();c.isTraining&&this._doTraining(c,a);GameManager.increaseResearchProgress(this,b)}};a.finishTraining=function(a){this.flags.lastTrainingTimestamp=GameManager.gameTime;this.flags.secondLastTrainingId=this.flags.lastTrainingId;this.flags.lastTrainingId=a.id};a._doTraining=function(a,c){var b=GameManager.company,g=Training.getAllTrainings().first(function(b){return b.id===a.id});if(g)if(g.tick)g.tick(this,c);else{var e=[];if(void 0===this.currentResearch.lastSpawnTick)this.currentResearch.lastSpawnTick=
0;else{var h=a.duration*a.progress;if(2E3<=h-a.lastSpawnTick){a.lastSpawnTick=h;h=this.efficiency*this.getBoostFactor();if(!this.onFire){this.flags.lastTrainingTimestamp&&this.flags.lastTrainingTimestamp>GameManager.gameTime-1E4*GameManager.SECONDS_PER_WEEK?h-=0.2:(this.flags.lastTrainingId=null,this.flags.secondLastTrainingId=null);this.flags.secondLastTrainingId===g.id&&(h-=0.1);this.flags.lastTrainingId===g.id&&(h-=0.3);var f=b.gameLog.last();b.currentWeek>f.releaseWeek+22&&(h-=0.2)}var h=Math.max(0.3,
h),j=g.basePoints*h,h=Math.floor(g.tF*j*b.getRandom()),f=Math.floor(g.dF*j*b.getRandom()),l=Math.floor(g.rF*j*b.getRandom()),j=Math.floor(g.sF*j*b.getRandom());b.getRandom();g=g.maxP/500;b=b.getRandom();h&&(this.technologyFactor+h/500<=g||0.1>b)&&e.push({p:h,t:"t"});f&&(this.designFactor+f/500<=g||0.1>b)&&e.push({p:f,t:"d"});if(l&&(this.researchFactor+l/500<g||0.1>b))e.push({p:l,t:"r"}),"specialTraining"===a.type&&this.spawnPoints(l,"r");j&&(this.speedFactor+j/500<g||0.1>b)&&e.push({p:j,t:"s"});VisualsManager.getCharacterOverlay(this,
!0).animateTrainingProgress(e)}}}};a.applyTrainingUpdate=function(a){var c=a.p/500;switch(a.t){case "t":this.technologyFactor+=c;break;case "d":this.designFactor+=c;break;case "s":this.speedFactor+=c;break;case "r":this.researchFactor+=c}};a._resetEngineWork=function(){this.engineProgress={points:0,research:0}};a._resetContractWork=function(){this.contractProgress={d:0,t:0,r:0}};a._resetBugFixingWork=function(){this.bugFixingDelta=0};a.getCurrentQualityFactor=function(){var a=0.3;if(0===this.id){var c=
LevelCalculator.getLevel(this.experience);1==c?a+=0.3:2==c?a+=0.2:3==c&&(a+=0.1)}a+=this.qualityFactor;return 1<a?1+0.5*(a-1):a};a._doEngineWork=function(a){if("thinking"!=this.currentAnimation&&!(0>=a||!1===this.isWorking())){var a=a/Missions.BASE_ENGINE_DURATION,c=Missions.BASE_POINTS*this.getCurrentQualityFactor()*a*this.efficiency,c=c*this.getBoostFactor(),b=this.engineProgress.points;this.engineProgress.points+=c;Math.floor(this.engineProgress.points)>Math.floor(b)&&(c=Math.floor(this.engineProgress.points)-
Math.floor(b),GameManager.currentEngineDev.remainingPoints<c&&(c=GameManager.currentEngineDev.remainingPoints),0!=c?this.spawnPoints(c,"e"):0===GameManager.currentEngineDev.remainingPoints&&0>=GameManager.currentEngineDev.remainingPointsDisplay&&this.endWorking());c=this.engineProgress.research;this.engineProgress.research+=Missions.BASE_RESEARCH_POINTS/2*this.researchFactor*a*this.efficiency;Math.floor(this.engineProgress.research)>Math.floor(c)&&(c=Math.floor(this.engineProgress.research)-Math.floor(c),
0!=c&&this.spawnPoints(c,"r"))}};a._doContractWork=function(a){if("thinking"!=this.currentAnimation&&this.isWorking){var c=GameManager.currentContract,b=GameManager.company;if(!c||!b)this.endWorking(),this.state=CharacterState.Idle;else{var a=a/Missions.BASE_ENGINE_DURATION,a=Missions.BASE_POINTS*this.getCurrentQualityFactor()*a*this.efficiency,a=a/2,g=0<c.requiredD-c.spawnedD,e=0<c.requiredT-c.spawnedT;if(!g&&!e)this.endWorking(),this.state=CharacterState.Idle;else{if(!g||!e)a+=0.4*a;if(g){var h=
a*this.designFactor,h=h+0.2*h*b.getRandom(),g=this.contractProgress.d;this.contractProgress.d+=h;if(Math.floor(this.contractProgress.d)>Math.floor(g)&&(g=Math.floor(this.contractProgress.d)-Math.floor(g),c.remainingD<g&&(g=c.remainingD),0!=g))this.spawnPoints(g,"d"),c.remainingD-=g,c.spawnedD+=g}if(e&&(e=a*this.technologyFactor,e+=0.2*e*b.getRandom(),g=this.contractProgress.t,this.contractProgress.t+=e,Math.floor(this.contractProgress.t)>Math.floor(g)&&(g=Math.floor(this.contractProgress.t)-Math.floor(g),
c.remainingT<g&&(g=c.remainingT),0!=g)))this.spawnPoints(g,"t"),c.remainingT-=g,c.spawnedT+=g;b=a*this.researchFactor/6;c.rF&&(b*=c.rF);g=this.contractProgress.r;this.contractProgress.r+=b;Math.floor(this.contractProgress.r)>Math.floor(g)&&(g=Math.floor(this.contractProgress.r)-Math.floor(g),0!=g&&this.spawnPoints(g,"r"))}}}};a.isWorking=function(){if("typing"===this.currentAnimation||"drawNotepad"===this.currentAnimation)return!0;if(this.working&&"sitBack"===this.currentAnimation){var a=VisualsManager.getCharacterOverlay(this,
!0);a&&a.continueSitBack()}return!1};a._doRelax=function(a){"sitBack"===this.currentAnimation&&(this.relaxDelta+=a,10<this.relaxDelta*this.speedFactor&&(this.relaxDelta=0,this.flags.relaxGained+=0.001,this.adjustEfficiency(0.001),this.efficiency===this.getMaxEfficiency()&&0.3<=this.flags.relaxGained&&(this.state=CharacterState.Idle)))};a._doWork=function(a){if(GameManager.currentFeature){var c=this.currentFeature;void 0===c.startTime&&(c.startTime=GameManager.gameTime,c.progress=0);var b=GameManager.company;
if("thinking"===this.currentAnimation&&1===GameManager.staffCountWorkingOnFeature(this.currentFeature)||"sitBack"===this.currentAnimation)c.startTime+=a;else if("BugFixing"===c.id)this._doFinishingWork(b,a);else{var g=this.getBoostFactor(),g=this.onFire?(g-1)/2:0,e=0.44+0.5*this.getCurrentQualityFactor().clamp(0,1),h=GameManager.gameTime-c.startTime;if(!(0>=h)&&(h/=c.duration,0!=h&&1!=this.currentFeature.progress&&(1<h&&(a-=c.duration*(h-1)),h=Math.min(h,1),c.progress=h,1>=h))){var f=this.efficiency;
var j=GameManager.staffCountWorkingOnFeature(c),l=General.getOptimalTeamSize(GameManager.company.currentGame),j=(l/j).clamp(0,1);a*=f*(1===l?j:0.5+0.5*j);c.currentDf+=c.d/c.duration*a;c.currentTf+=c.t/c.duration*a;c.currentRf+=c.r/c.duration*a;a=Math.floor(c.currentDf);f=Math.floor(c.currentTf);l=Math.floor(c.currentRf);if(a>c.currentD&&("thinking"!=this.currentAnimation&&1>h||1===h)){for(j=0;j<a-c.currentD;j++)b.getRandom()>e?this.spawnPoints(1,"b",200*j):(this.spawnPoints(1,"d",200*j),this._chanceToSpawnRandombug(b,
200*(j+1))),b.getRandom()<g&&this.spawnPoints(1,"d",250*j);this.dLeft-=a-c.currentD;c.currentD=a}if(f>c.currentT&&("thinking"!=this.currentAnimation&&1>h||1===h)){for(j=0;j<f-c.currentT;j++)b.getRandom()>e?this.spawnPoints(1,"b",180*(j+1)):(this.spawnPoints(1,"t",180*(j+1)),this._chanceToSpawnRandombug(b,180*(j+1))),b.getRandom()<g&&this.spawnPoints(1,"t",220*(j+1));this.tLeft-=f-c.currentT;c.currentT=f}if(l>c.currentR&&("thinking"!=this.currentAnimation&&1>h||1===h)){for(j=0;j<l-c.currentR;j++)this.spawnPoints(1,
"r",160*j),b.getRandom()<g&&this.spawnPoints(1,"r",190*j);this.rLeft-=l-c.currentR;c.currentR=l}}}}};a._doFinishingWork=function(a,c){var b=a.currentGame,g=1/(this.technologyFactor+this.designFactor)*this.designFactor;if(!(0>=c||!1===this.isWorking()))if(a.currentGame.flags.finished)0>=GameManager.spawnedPoints&&GameManager.finishCurrentMission();else if(this.bugFixingDelta+=c,!(500>this.bugFixingDelta*this.speedFactor)){this.bugFixingDelta=0;var e=1*this.efficiency;0===b.bugs&&!b.flags.bugsFixedTimestamp&&
(b.flags.bugsFixedTimestamp=GameManager.gameTime);if(0<b.bugs&&0.9>a.getRandom()){if(a.currentGame.bugs-GameManager.spawnedPoints<=e&&(e=a.currentGame.bugs-GameManager.spawnedPoints),0<e)for(var h=0;h<e;h++){this.spawnPoints(1,"br");var f=b.bugs-b.freeBugCount;if(0<b.freeBugCount&&(0>=f||0.5<a.getRandom()))b.freeBugCount--;else if(0.3>a.getRandom()||this.onFire)a.getRandom()<this.getCurrentQualityFactor().clamp(0,1)&&(a.getRandom()<g?this.spawnPoints(1,"d"):this.spawnPoints(1,"t"))}}else if(e=0.44+
0.5*this.getCurrentQualityFactor().clamp(0,1),h=(0.5*this.getCurrentQualityFactor()*this.getBoostFactor()).clamp(0,1)/2,a.getRandom()<h)if(a.getRandom()>e)this.spawnPoints(1,"b"),b.freeBugCount++;else if(b.flags.bugsFixedTimestamp?(e=GameManager.gameTime-b.flags.bugsFixedTimestamp,h=1E4*General.getGameSizePointsFactor(b),h=e<h/2?1:Math.max(0,h-e)/(h/2)):h/=8,0===h)0<b.hypePoints&&b.hypePoints--;else if(1===h||a.getRandom()<h)a.getRandom()<g?this.spawnPoints(1,"d"):this.spawnPoints(1,"t")}};a._chanceToSpawnRandombug=
function(a,c){var b=0.05+0.6*Math.max(0,(General.getEffectiveWorkload(this,a.currentGame)-100)/100);a.getRandom()<b&&(this.spawnPoints(1,"b",c),a.currentGame.freeBugCount++)};a.spawnPoints=function(a,c,b){for(var g=VisualsManager.getCharacterOverlay(this),e=0;e<a;e++){"e"===c&&GameManager.increaseEnginePoints();var h={gameTime:GameManager.gameTime,type:c,duration:SPAWN_POINTS_DURATION,delay:b};h.id=Math.floor(65535*Math.random());for(var f=[],j=0;j<this.spawnedPoints.length;j++)this.spawnedPoints[j].gameTime+
this.spawnedPoints[j].duration<=GameManager.gameTime&&f.push(this.spawnedPoints[j]);for(j=0;j<f.length;j++)this.spawnedPoints.remove(f[j]);this.spawnedPoints.push(h);"br"===h.type?g.spawnBugRemovePoint(h.id,h.type,h.duration,b):g.spawnPoint(h.id,h.type,h.duration,b)}};a.removeSpawnedPoint=function(a){var c=this.spawnedPoints.first(function(b){return b.id===a});c&&this.spawnedPoints.remove(c)};a.resetLeftOverPoints=function(){this.rLeft=this.tLeft=this.dLeft=0};a._calcFeature=function(){var a=GameManager,
c=a.currentFeature,b=General.getD(a.company.currentGame,c)*this.designFactor*this.getCurrentQualityFactor(),b=b+this.dLeft;0!==this.id&&(1>b&&0.6<b)&&(b=1);var g=General.getT(a.company.currentGame,c)*this.technologyFactor*this.getCurrentQualityFactor(),g=g+this.tLeft;0!==this.id&&(1>g&&0.6<g)&&(g=1);a=General.getR(a.company.currentGame,c)*this.researchFactor;a+=this.rLeft;console.log("feature:{0}, d:{1} t:{2}".format(c.id,b,g));this.dLeft=b-Math.floor(b*c.progress);this.tLeft=g-Math.floor(g*c.progress);
this.rLeft=a-Math.floor(a*c.progress);this.currentFeature={id:c.id,type:c.type,d:b,t:g,r:a,currentD:Math.floor(b*c.progress),currentT:Math.floor(g*c.progress),currentR:Math.floor(a*c.progress),currentDf:0,currentTf:0,currentRf:0,duration:c.duration,progress:c.progress}};a.goOnVacation=function(){this.relaxDelta=0;this.state=CharacterState.Vacation;this.working=!1;this.currentFeature=this.currentResearch=null;this.resetLeftOverPoints();var a=54;GameFlags.G782&&15<=GameManager.company.getCurrentDate().year&&
(a=20);this.flags.nextVacation=GameManager.gameTime+1E3*a*GameManager.SECONDS_PER_WEEK;this.flags.relaxGained=0;this.flags.needsVacation=!1};a.fire=function(){var a=GameManager.company;a.staff.remove(this);a.flags.usedNames||(a.flags.usedNames=[]);a.flags.usedNames.push(this.name);VisualsManager.removeStaff(this)}})();var LOGWEEKSALES=!1,General={};
(function(){General.updateNotifications=function(a){for(var b=0;b<a.notifications.length;b++)a.notifications[b].weeksUntilFired-=0.1};General.proceedOneWeek=function(a,b){var c=a.currentWeek;b&&(c=b);if(0<c){var f=a.getDate(c);4<f.year&&GameManager.ghg2()?a.notifications.push(new Notification("{TrialEnd}")):f.year>30*GameManager.flags.gameLengthModifier&&!a.flags.endGameShown&&(Media.createFinishGameStories(),a.flags.endGameShown=!0);Sales.processSales(a);if(1===f.week&&(General.payMonthlyCosts(a),
Sales.sellSDKs(a),a.flags.grid)){for(var j=Platforms.getPlatformsOnMarket(a),d=Platforms.getMarketSizeForWeek(j.first(function(a){return a.id==="PC"}),a.currentWeek,a,!0),m="PC",k=j.filter(function(a){return a.isCustom}),n=0;n<k.length;n++){var p=Platforms.getMarketSizeForWeek(k[n],a.currentWeek,a,!0);p>d&&(d=p,m=k[n].id)}n=j.first(function(a){return a.id===m});a.adjustCash(2E6*(Platforms.getTotalMarketSizePercent(n,GameManager.company)/100),"Grid income".localize("heading"))}GameTrends.updateTrends(a);
1<a.currentLevel&&5===f.month&&1===f.week&&7<f.year?GameFlags.CONFERENCE_DISABLED||(a.flags.customConference?(f=a.booths.first(function(a){return a.id===4}),a.conferenceStandFactor=f.standFactor,a.flags.customConference=!1,a.notifications.push(new Notification("News".localize("heading"),"Our own game convention is taking place in 4 weeks!".localize())),a.flags.isCustomConference=!0,a.flags.customConference=!1):a.notifications.push(new Notification("{BoothPicker}"))):6===f.month&&2===f.week&&a.conferenceStandFactor&&
!GameFlags.CONFERENCE_DISABLED&&General.runConference(a);GDT.fire(GameManager,GDT.eventKeys.gameplay.weekProceeded,{company:a})}for(n=0;n<Platforms.allPlatforms.length;n++)f=Platforms.allPlatforms[n],Platforms.getPublishDate(f)===Math.floor(c)&&(0===f.licencePrize?a.licencedPlatforms.push(f):a.availablePlatforms.push(f),0<Math.floor(c)&&(a.activeNotifications.push(new Notification("{PlatformReleaseNews}",f.id,"OK".localize())),a.flags.contractspublisher&&(a.flags.contractspublisher.expireBy=GameManager.gameTime-
1)));General.checkAndRemoveRetiredPlatforms(a,a.licencedPlatforms,c);General.checkAndRemoveRetiredPlatforms(a,a.availablePlatforms,c);LOGWEEKSALES&&General.logMaxSalesForWeek(c)};General.getWeekFromDateString=function(a,b){var c=a.split("/");if(3!=c.length)return 0;c=48*(c[0]-1)+4*(c[1]-1)+(c[2]-1);if(!b){var f=GameManager.flags.gameLengthModifier;f&&1!=f&&(c=Math.round(c*f))}return c};General.logMaxSalesForWeek=function(a){GameManager.pause(!0);var b=new Company("SalesLogCompany");b.currentWeek=
a;var c=new Game(b);c.topic=Topics.topics[0];c.genre=GameGenre.Action;for(var f=GameManager.company.availablePlatforms.concat(GameManager.company.licencedPlatforms),j=0;j<f.length;j++)0<Platforms.getMarketSizeForWeek(f[j],a,b)&&(c.platforms=[],c.platforms.push(f[j]));"Sales week {0}".format(a).log();for(j=1;11>j;j++)c.score=j,Sales.calculateSales(b,c),"score {0}, income {2}".format(c.score,c.unitsSold,c.totalSalesCash).log();GameManager.resume(!0)};General.checkAndRemoveRetiredPlatforms=function(a,
b,c){for(var f=0;f<b.length;f++){var j=b[f];Platforms.getRetireDate(j)===Math.floor(c)+8&&a.activeNotifications.push(new Notification("News".localize("heading"),"In two months the {0} will be taken off the market!".localize().format(j.name)));if(Platforms.getRetireDate(j)===Math.floor(c)){for(var d=0,m=0,k=0;k<a.gameLog.length;k++){var n=a.gameLog[k];!n.flags.isExtensionPack&&0<n.platforms.filter(function(a){return a.id===j.id}).length&&(d++,m+=n.revenue)}0<d?1==d?a.activeNotifications.push(new Notification("News".localize("heading"),
"{0} is no longer supported.\nYou've released {1} game for the platform and earned a total of {2}!".localize().format(j.name,d,UI.getShortNumberString(m)))):a.activeNotifications.push(new Notification("News".localize("heading"),"{0} is no longer supported.\nYou've released {1} games for the platform and earned a total of {2}!".localize().format(j.name,d,UI.getShortNumberString(m)))):a.activeNotifications.push(new Notification("News".localize("heading"),"{0} is no longer supported.".localize().format(j.name)))}}};
General.runConference=function(a){var b=a.fans,c=a.getCurrentDate().year,f=Math.floor(49876+47500*c),j=Math.floor(0.005*f),c=j,b=(b/5E5).clamp(0,1),d=Math.floor(0.7*f*b),m=Math.floor(0.3*f*a.conferenceStandFactor),c=Math.floor((c+d+m).clamp(0,f)),k=c/f,b=Math.floor(Math.abs(200*k-199));"conference. attendees: {0}, booth visitors: {1}({2}min+{3}fans+{4}stand), booth-rank: {5}".format(f,c,j,d,m,b).log();f=Math.floor(10+20*a.getRandom()+100*k);a.currentGame&&(a.currentGame.hypePoints+=f,"hype points generated for current game: {0}".format(f).log());
f="We had {0} people visiting our booth this year.".localize().format(UI.getLongNumberString(c));f=100<b?f+("\n"+"We didn't make it in the top 100 booths this year. Once we gain more fans I'm sure we will!".localize()):1===b||0===b?f+("\n"+"We were voted the number one booth this year! Congratulations!".localize()):f+("\n"+"We made it into the top 100 conference attractions this year at place {0}.".localize().format(b));a.notifications.push(new Notification("{GameConferenceAnimation}","",c,0));a.flags.isCustomConference&&
(f="Our convention had {0} visitors this year!".localize().format(UI.getLongNumberString(c)),a.flags.isCustomConference=!1);a.notifications.push(new Notification("Game Conference".localize("heading"),f,"OK".localize(),0))};General.getMonthlyCosts=function(a){var b=8E3;2===a.currentLevel||3===a.currentLevel?b*=4:4===a.currentLevel&&(b*=8);a.flags.solarPowerInstalled&&(b*=0.8);for(var c=0;c<a.staff.length;c++)a.staff[c].salary&&(b+=a.staff[c].salary);return b};General.payMonthlyCosts=function(a){var b=
General.getMonthlyCosts(a);a.cash-=b;a.cashLog.push({amount:-b,label:"monthly costs".localize("heading")});a.currentGame&&(a.currentGame.costs+=b);a.flags.creditCardStolen&&!a.flags.creditCardSwitched&&a.adjustCash(-Math.floor(a.flags.creditCardDamages/3),"MSCDPN_88");if(4<=a.currentLevel&&(a.flags.fractionalHwLabCosts&&(a.adjustCash(-a.flags.fractionalHwLabCosts,"Hardware lab".localize()),a.flags.fractionalHwLabCosts=0),a.flags.fractionalRndLabCosts))a.adjustCash(-a.flags.fractionalRndLabCosts,"R&D lab".localize()),
a.flags.fractionalRndLabCosts=0};General.releaseGame=function(a){var b=a.currentGame;GDT.fire(GameManager,GDT.eventKeys.gameplay.beforeReleaseGame,{company:a,game:b});b.state=GameState.released;b.releaseWeek=Math.floor(a.currentWeek)+1;for(var c=0;c<a.staff.length;c++){var f=a.staff[c];b.flags.staffContribution.hasOwnProperty(f.id)&&(f.flags.gamesContributed||(f.flags.gamesContributed=0),f.flags.gamesContributed+=b.getRatioWorked(f))}Tutorial.gameReleased();Reviews.reviewGame(a);Sales.calculateSales(a,
b);0===a.gameLog.length&&(a.researchEnabled=!0,a.availableResearch.addRange(Research.BasicItems),Tutorial.firstGameFinished(b.releaseWeek-a.currentWeek+0.4));a.gameLog.push(b);a.flags.contractsEnabled||3<=a.gameLog.length&&GameManager.enableContracts();a.flags.featureResponsibility=$.extend({},b.flags.featureResponsibility);a.currentGame=null;GameManager.currentContract&&"gameContract"==GameManager.currentContract.type&&GameManager.finishContract(!(b.score>=GameManager.currentContract.minScore));
b.flags.miniBailoutAmount&&DecisionNotifications.inDevBailout.triggerPayBack(b,b.releaseWeek-a.currentWeek);"ghg141kph"==b.title&&(a.flags.ghg141=!0);"ghgnogfc"==b.title&&(a.flags.ghgnogfc=!0);GDT.fire(GameManager,GDT.eventKeys.gameplay.afterReleaseGame,{company:a,game:b})};General.trashGame=function(a){var b=a.currentGame;a.trashedGames.push(a.currentGame);a.flags.featureResponsibility=$.extend({},b.flags.featureResponsibility);a.currentGame=null;GameManager.currentContract&&"gameContract"==GameManager.currentContract.type&&
GameManager.finishContract(!0);b.flags.miniBailoutAmount&&DecisionNotifications.inDevBailout.triggerPayBack(b,0)};General.getAvailableEngineParts=function(a){return a.canDevelopEngine()?[Research.TwoDGraphicsV2,Research.linearStory,Research.saveGame].concat(Research.getAllItems().except(Research.StartEngineParts.concat(Research.BasicItems)).filter(function(b){return 0!=Research.getEnginePoints(b)&&0!=Research.getEngineCost(b)&&-1!=a.researchCompleted.indexOf(b)})):[]};General.hasEnginePart=function(a,
b){return a.parts.some(function(a){return a.id===b.id})};General.getResponsibleStaffFactor=function(a,b,c){var f=1,j=a.currentGame;if(j.flags.featureResponsibility&&j.flags.featureResponsibility.hasOwnProperty(b.id)){var d=j.flags.featureResponsibility[b.id],a=a.staff.first(function(a){return a.id===d});if(!a)return 0.7;j=General.getEffectiveWorkload(a,j);c="d"===c?a.designFactor:a.technologyFactor;f=0.5+0.5*c.clamp(0,1)+0.1*c;a.flags.expert===b.id&&(f+=0.15*c);b=(j/100-1).clamp(-1,1);f=0<b?f-0.75*
f*b:f-0.25*f*-b}return f};General.getEffectiveWorkload=function(a,b){var c=a.flags.workload;return 100/(300/General.getOptimalTeamSize(b))*c};var a=function(a,b,c){var f=GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre,a.secondGenre),j=General.getMission(b.id),l=0;if("focus"!=b.type){if(GameFlags.ghg6)throw"separate features in workLog not implemented";return 0}if("preparation"===j.missionType||"BugFixing"===j.missionType)l=Missions.BASE_POINTS/2;else{for(var l=Missions.BASE_POINTS*Missions.getGeneralFactor(GameManager.company,
j),l=l+General.getGameBasePoints(a)/9,l=l*("d"==c?j.designFactor:j.technologyFactor),l=l*(j.percentage/(100/3)),b=0,m=a.features.filter(function(a){return a.category===j.id}),k=0;k<m.length;k++){var n=d(m[k],a,j);n&&!isNaN(n)&&(b+=n)}if(isNaN(b))throw"invalid featureBonus value";b*=General.getFeatureEfficiencyFromMissionFocus(a,m,j.percentage)/100;l=(l+b)*General.getResponsibleStaffFactor(GameManager.company,j,c)}return l*f},d=function(a,b){var c=1;a.getEfficiency&&(c=a.getEfficiency(b));return 0.8*
a.v*LevelCalculator.getLevelBonusFactor(a.experience)*c};General.getFeatureEfficiencyFromMissionFocus=function(a,b,c){var f=100;0<b.length&&(f=(100/(5*b.sum(function(a){return a.v})*("aaa"==a.gameSize?0.4:"large"==a.gameSize?0.7:1))*c).clamp(0,100));return f};General.getD=function(b,c){return a(b,c,"d")};General.getT=function(b,c){return a(b,c,"t")};General.getR=function(a,b){if("focus"===b.type){var c=General.getMission(b.id),f=0;if("preparation"===c.missionType||"BugFixing"===c.missionType)return 0;
f=Missions.BASE_RESEARCH_POINTS*GameManager.company.currentGame.researchFactor;f+=0.1*f*GameManager.company.getRandom();c.percentage&&(f*=c.percentage/(100/3));f*=this.getGameSizePointsFactor(a);for(c=1;c<GameManager.company.staff.length;c++)f*=0.95;for(c=0;c<GameManager.company.researchPoints/200;c++)f*=0.95;return f}if("feature"===b.type)return General.getFeature(b.id),0};General.getDuration=function(a,b){var c=0;"focus"===b.type?(c=General.getMission(b.id),c="preparation"===c.missionType?Missions.PREP_DURATION:
"BugFixing"===c.missionType?Missions.FINISH_DURATION:void 0!=c.percentage?3*Missions.BASE_DURATION/100*c.percentage:Missions.BASE_DURATION):"feature"===b.type&&(c=General.getFeature(b.id),c=Research.getDuration(c));return c*this.getGameSizeDurationFactor(a.gameSize)*General.getMultiPlatformDurationFactor(a)};General.getGameSizeDurationFactor=function(a){return"small"===a?GameFlags.SMALL_GAME_DURATION_FACTOR:"medium"===a?GameFlags.MEDIUM_GAME_DURATION_FACTOR:"large"===a?GameFlags.LARGE_GAME_DURATION_FACTOR:
"aaa"===a?GameFlags.AAA_GAME_DURATION_FACTOR:1};General.getMultiPlatformDurationFactor=function(a,b){var c=a.platforms,f=1,j=1;a.engine&&void 0==b&&a.engine.parts.first(function(a){return"MultiPlatformOptimized"==a.id})&&(j=0.5);for(var d=1;d<c.length;d++)f*=1+(GameFlags.MULTIPLATFORM_DURATION_FACTOR-1)*j;return f};General.getMultiPlatformCostFactor=function(a){if(1>=a.platforms.length)return 1;var b=1;a.engine&&a.engine.parts.first(function(a){return"MultiPlatformOptimized"==a.id})&&(b=0.5);return General.getMultiPlatformDurationFactor(a,
!0)*b};General.getGameSizePointsFactor=function(a){return"small"===a.gameSize?GameFlags.SMALL_GAME_POINTS_FACTOR:"medium"===a.gameSize?GameFlags.MEDIUM_GAME_POINTS_FACTOR:"large"===a.gameSize?GameFlags.LARGE_GAME_POINTS_FACTOR:"aaa"===a.gameSize?GameFlags.AAA_GAME_POINTS_FACTOR:1};General.getFeature=function(a){return Research.getAllItems().first(function(b){return b.id===a})};General.getMission=function(a){return Missions.getAllMissions().first(function(b){return b.id===a})};General.notificationShown=
function(a,b){a.applyActions(GameManager.company);void 0!=b&&General.broadCastNofificationComplete(a,b)};var c=[];General.registerAsNotificationSource=function(a){c.push(a)};General.broadCastNofificationComplete=function(a,b){if(a.sourceId)for(var d=0;d<c.length;d++){var f=c[d].getAllNotificationsObjects().first(function(b){return b.id===a.sourceId});if(f){f.complete&&f.complete(b);break}}};General.getAvailableFeaturesForConsole=function(){return General.getAvailableEngineParts(GameManager.company).filter(function(a){return a.consolePart})};
General.getAvailableProjects=function(a,b){return Research.bigProjects.filter(function(c){return c.targetZone==b&&c.canResearch(a)})};General.getTopicOrder=function(a){if(!GameFlags.RANDOMIZE_TOPICS)return Topics.topics;for(var b=Topics.topics,c=b.slice(0,0),b=b.slice(0),a=new MersenneTwister(a.seed);0<b.length;){var f=Math.floor(a.random()*b.length);c.push(b[f]);b.splice(f,1)}return c};General.getAudienceWeightinIndex=function(a){return"young"===a?0:"everyone"===a?1:"mature"===a?2:-1};General.getAudienceWeighting=
function(a,b){if(void 0===b||void 0===a)return 1;if("young"===b)return a[0];if("everyone"===b)return a[1];if("mature"===b)return a[2];throw"unknown audience: "+genre;};General.getAvailableGenres=function(a){var b=GameGenre.getAll();-1==a.researchCompleted.indexOf(Research.CasualGames)&&(b=b.filter(function(a){return"Casual"!=a.id}));return b};General.getGameSizeLabel=function(a){switch(a){case "aaa":return"AAA";case "large":return"large";case "medium":return"medium";default:return"small"}};General.getAudienceLabel=
function(a){switch(a){case "young":return"Young".localize("audience category");case "mature":return"Mature".localize("audience category");default:case "everyone":return"Everyone".localize("audience category")}};General.getShortAudienceLabel=function(a){switch(a){case "young":return"Y".localize("target audience button content, Y as in young");case "mature":return"M".localize("target audience button content, M as in mature");default:case "everyone":return"E".localize("target audience button content, E as in everyone")}};
General.getOptimalTeamSize=function(a){switch(a.gameSize){case "aaa":a=6;break;case "large":a=5;break;case "medium":a=3;break;default:a=1}return a};var b=[2,5,7,10,15,20,30,40];General.getGameBasePoints=function(a){var c=a.flags.techLevel;c||(c=0);var a=Math.floor(c),c=c-Math.floor(c),d=b[a];0!=c&&a+1<b.length&&(d+=(b[a+1]-d)*c);return d};General.getApproxWeeksToCompletion=function(a){var b=GameManager.getCurrentGameProgress();return Missions.BASE_DURATION*GameFlags.MAIN_MISSIONS_PER_GAME*General.getGameSizeDurationFactor(a.gameSize)*
General.getMultiPlatformDurationFactor(a)*b/(1E3*GameManager.SECONDS_PER_WEEK)}})();"use strict";var Media={};
(function(){var a=Media;Media.getNewNotifications=function(a){for(var b=[],c=Media.TriggerNotifications.filter(function(b){return-1===a.triggerNotificationsShown.indexOf(b.id)&&b.trigger(a)}),f=0;f<c.length;f++){var j=c[f];a.triggerNotificationsShown.push(j.id);j.getNotification?b.push(j.getNotification(a)):b.push(j.notification)}a.triggerNotificationsShown.addRange(b.map(function(a){return a.id}));b.addRange(Media.getScheduledNotifications(a));return b};Media.getScheduledNotifications=function(a){for(var b=
[],c=Math.floor(a.currentWeek),f=Media.allScheduledStories.filter(function(b){return-1===a.scheduledStoriesShown.indexOf(b.id)}),j=0;j<f.length;j++){var d=f[j];c==General.getWeekFromDateString(d.date,d.ignoreGameLengthModifier)&&b.push(d)}a.scheduledStoriesShown.addRange(b.map(function(a){return a.id}));return b.map(function(b){return b.notification?b.notification:b.getNotification(a)})};var d=function(a,b){var c=GameManager.company.getDate(General.getWeekFromDateString(a)),f=GameManager.company.getDate(General.getWeekFromDateString(b));
if(c.year!=f.year){if(1<Math.abs(f.year-c.year)){if(ghg6)throw"unexpected option";return"in the coming years".localize("date referral sentence fragment")}return 3>=f.month?"early next year".localize("date referral sentence fragment"):8<=f.month?"late next year".localize("date referral sentence fragment"):"later next year".localize("date referral sentence fragment")}c=f.month-c.month;return 0===c?"later this month".localize("date referral sentence fragment"):1===c?"next month".localize("date referral sentence fragment"):
2===c?"in two months".localize("date referral sentence fragment"):4>=c?"in the coming months".localize("date referral sentence fragment"):12==f.month?"at the end of this year".localize("date referral sentence fragment"):"later this year".localize("date referral sentence fragment")};General.getETADescription=d;var c="Industry News".localize("heading"),b={id:"riseOf64",date:"1/6/3",notification:new Notification(c,"Recent market studies suggest that the Govodore G64 is steadily outselling competitors in the PC sector. Consumers prefer the lower price, greater availability and the flexible hardware configuration over other home computers.{n}Experts say that this might spell the end of competing hardware manufacturers.".localize())};
b.notification.image="./images/platforms/G64.png";var g={id:"PCTakesOver",date:"3/6/2",notification:new Notification(c,"Recent market data shows that the Govodore G64 seems to be slowly losing market share against other PC manufacturers.{n}In an unofficial statement a G64 employee said that the company has been unsuccessful in introducing higher priced computers to compete against newer and more advanced PCs.".localize())};g.notification.image="./images/platforms/G64.png";var e={id:"TESRumour",date:"1/8/2",
notification:new Notification(c,"According to rumours the Japanese company Ninvento is planning to launch its very own home gaming console. Ninvento is known for the widely successful arcade game 'Dinkey King'.{n}Many industry experts doubt that home gaming consoles will take off but we are eager to see what Ninvento will deliver.".localize())},h={id:"TargetAudiences",date:"2/9/3",notification:new Notification("Industry Report","Recent studies suggest that the increasing variety of gaming devices also creates a market for more specialized games.\nSome platforms become more popular with younger gamers while others cater for the more mature age groups.{n}As more and more developers enter the market we expect developers to focus their games on specific age groups to really make an impact.".localize())},
f={id:"TESSuccess",date:"2/6/4",notification:new Notification(c,"The recently released TES home console by Ninvento has proven to be a massive success. Sales numbers have exceeded expectations by far.{n}As one customer says: 'I love the games that come with the TES and playing with a controller is so much more fun than on a keyboard.'".localize())};f.notification.image="./images/platforms/TES.png";var j={id:"MasterVRumour",date:"2/10/3",notification:new Notification(c,"Following the massive success of the TES console there are now rumours circulating that Vena, another Japanese company, is planning to release a home gaming console on their own.".localize())},
l={id:"MasterVSuccess",date:"3/3/2",notification:new Notification(c,"The recently released gaming console, Master V by Vena, has stirred up the market worldwide.\nIndustry experts say that the console is not very well marketed in North America but that it will flourish in other parts of the world.".localize())};l.notification.image="./images/platforms/Master V.png";var m={id:"MarketingStory",date:"4/5/2",ignoreGameLengthModifier:!0,notification:new Notification("Industry Report","With the growing interest in video games there is also a growing audience for video game magazines. These magazines offer a great new way for game developers to market their upcoming games.".localize())},
k={id:"SuperTES",date:"5/10/4",notification:new Notification(c,"Today, Ninvento announced the much anticipated successor to the popular TES console. 'This is the greatest console we have ever built. It comes with state of the art 16-bit graphics and sound. It is simply super and that's why we decided to call it the Super TES!'.{n}Fans around the world have been waiting for this moment and it seems that they will not be disappointed.".localize())};k.notification.image="./images/platforms/superb/Super TES.png";
var n={id:"VonnyNinventoAnnouncement1",date:"6/3/4",notification:new Notification(c,"The media is abuzz with the latest news from this year's Entertainment Conference. In a surprise announcement Vonny, a company known for general electronics has presented a prototype console called the Play System.{n}Apparently Vonny has collaborated with Ninvento, creators of the beloved and successful TES and Super TES consoles to develop what is basically a Super TES with a CD drive.{n}This would be the world's first console using a CD drive.".localize())};
n.notification.image="./images/platforms/superb/PlaysystemA.png";var p={id:"VonnyNinventoAnnouncement2",date:"6/3/4",notification:new Notification(c,"Journalists around the world are baffled as only one day after Vonny and Ninvento jointly announced the Play System at the Entertainment Conference things have turned sour.{n}Ninvento announced today that they will cancel the project and instead seek to develop a new console with a different partner.{n}Rumour has it that the distribution deal the companies had worked out was unfavorable to Ninvento handing over much of the control to Vonny.{n}This seems to be the end of the Play System.".localize(),
"OK".localize(),0.1)};p.notification.image="./images/platforms/superb/PlaysystemA.png";var q={id:"PlaySystem2Announcement",date:"11/3/2",notification:new Notification(c,"Today, Vonny has announced the much anticipated successor to their popular Playsystem console. The Playsystem 2 will have upgraded hardware to compete with newer generation consoles such as the DreamVast.{n}Unlike the DreamVast the Playsystem 2 does not focus much on online play but instead seems to focus on the strengths of the previous Playsystem. A solid upgraded controller including vibration function, upgraded graphics, support for DVD titles and even backwards compatibility with Playsystem 1 games.".localize())};
q.notification.image="./images/platforms/superb/Playsystem 2.png";var o={id:"DreamVastSlowing",date:"11/4/2",notification:new Notification(c,"Since release, the DreamVast from Vena has been one of the fastest selling consoles in history but lately it seems that the anticipation of the upcoming Playsystem 2 release is slowing down sales.{n}If the Playsystem 2 can hold up to the hype when it is released then Vena could be in deep trouble.".localize())};o.notification.image="./images/platforms/superb/DreamVast.png";
var s={id:"Playsystem2Launch",date:"11/6/1",notification:new Notification(c,"The launch of the Playsystem 2 has been a phenomenal success. Stores everywhere are out of stock as manufacturing can barely keep up. Fans have resorted to buying the console on internet auction sites for as much as five times the normal price.{n}While Vonny has managed to have the most successful launch in history, sales of Vena's DreamVast have plummeted.".localize())};s.notification.image="./images/platforms/superb/Playsystem 2.png";
var x={id:"DreamVastDiscontinued",date:"12/7/3",notification:new Notification(c,"In a sobering announcement, Vena has today confirmed the discontinuation of the DreamVast. Vena's president said that while many companies will still deliver games for the platform, the company will no longer produce new units in the future.{n}Vena fans worldwide are disappointed, as a beloved part of gaming console history is coming to an end.".localize())};x.notification.image="./images/platforms/superb/DreamVast.png";
var r={id:"GSRumour",date:"13/2/1",notification:new Notification(c,"Rumours are spreading that Ninvento is working on a new game console. Most of the rumours state that it is not a successor to the somewhat disappointing Game Sphere but instead a new console in the mobile market.{n}Ninvento's Gameling has been leading the mobile market thanks to numerous updates and a large list of very popular games available on the platform, but the hardware is aging quickly and many players wonder what will be next.".localize())},
t={id:"Gen7Rumours",date:"15/10/3",notification:new Notification(c,"Industry experts predict that we will see the next generation of video game consoles as early as next year. 'The hardware advancements in the PC industry have not been reflected in gaming consoles yet and we can expect the next generation to be a truly exciting leap forward.'{n}According to rumours, both Mirconoft and Vonny are in a race to introduce the next-generation console, with Mirconoft apparently already collaborating with partners to prepare titles for what is called the 'mBox 360.'".localize())},
w={id:"mBox360",date:"16/5/3",notification:new Notification(c,"Today, Mirconoft presented their new console called the mBox 360. It is the first in the next generation of expected consoles, and features hardware rivaling mid-end PC counterparts. With a relatively cheap purchase price, Mirconoft will be selling the device at a loss as part of a long-term strategy to gain market share.{n}Gamers around the world are excited by the new console and it is predicted that the mBox 360 will have a massive impact on the console market.".localize())};
w.notification.image="./images/platforms/superb/mBox 360.png";var v={id:"Nuu",date:"16/12/4",notification:new Notification(c,"Today, Ninvento has announced their bid in the next-generation console market by announcing the Nuu. Instead of trying to compete with Mirconoft and Vonny on hardware strength and graphical power, Ninvento has decided to deliver a truly unique gaming experience.{n}The Nuu features a controller with a built-in motion sensor, which allows players to stand front of their TV and use the controller as a counterpart to virtual objects such as a tennis racquet.{n}First playtesters were seen with huge grins on their faces. It seems to be a lot of fun.".localize())};
v.notification.image="./images/platforms/superb/Nuu.png";var y={id:"grPad",date:"19/6/2",notification:new Notification(c,"Today, Grapple, the company responsible for the massively successful grPhone has announced their plans to release a tablet device called the grPad. Tablet devices are not a new idea in the computing industry but earlier attempts never seemed to take off. Many expect the grPad to do very well.".localize())};y.notification.image="./images/platforms/superb/grPad.png";var z={id:"mPadReport",
date:"20/11/2",notification:new Notification(c,"The mPad has received mixed reviews at launch, with many of them highlighting the fact that the mPad is indeed not the same as the grPad from Grapple. We will see what the future holds for this platform.".localize())};z.notification.image="./images/platforms/superb/mPad.png";Media.allScheduledStories=[b,g,{id:"EndOFG64",date:"4/5/4",getNotification:function(){return new Notification({header:c,text:"Hardware manufacturers around the world were surprised today as Govodore, the creator of the popular G64, has filed for bankruptcy.{n}Govodore failed to introduce a higher priced alternative and was forced to shut down production of the G64. The platform will retire from the market {0}.".localize("{0} is date referral sentence fragment").format(d("4/5/4",
"4/6/2")),image:"./images/platforms/G64.png"})}},e,{id:"TESRumour2",date:"1/10/2",getNotification:function(){return new Notification({header:c,text:"Today, Ninvento has confirmed recent rumours and announced their plans to release a new home gaming console called 'TES' {0}.\nThe console features cartridge based games and a uniquely designed controller.".localize("{0} is date referral sentence fragment").format(d("1/10/2","2/1/2")),image:"./images/platforms/TES.png"})}},f,j,{id:"MasterVPreAnnouncement",
date:"2/12/1",getNotification:function(){return new Notification({header:c,text:"Today, Vena has confirmed recent rumours about a new gaming console and announced the Master V.\nThe company claims that the Master V is technically superior to the massively successful TES by Ninvento and plans to release it {0}.".localize("{0} is date referral sentence fragment").format(d("2/12/1","3/2/3")),image:"./images/platforms/Master V.png"})}},l,h,m,{id:"Gameling",date:"3/7/4",getNotification:function(){return new Notification({header:c,
text:"Today, Ninvento has announced that they will introduce a portable gaming device called Gameling. The device comes with changeable game cartridges, a monochrome screen on a green background, built-in speakers and even multiplayer support via a connection cable.{n}Compared to PCs and other gaming consoles the Gameling is underpowered but given the lower cost and excellent portability it might find a huge following.{n}The Gameling is said to hit shelves {0}.".localize("{0} is date referral sentence fragment").format(d("3/7/4",
"3/9/2")),image:"./images/platforms/Gameling.png"})}}];Media.allScheduledStories.addRange([{id:"VenaGear",date:"4/1/2",getNotification:function(){return new Notification({header:c,text:"Vena, creator of the Master V console, has announced the Vena Gear, a portable console to directly compete against the Gameling from Ninvento.{n}A spokesperson for the company said, 'Unlike similar devices on the market which don't come close to gaming consoles the Vena Gear has basically the full power of the Master V, except that you can take it with you. The Vena Gear also has a full color screen'.{n}Will this device topple the Gameling? We will see. The Vena Gear will debut {0}.".localize("{0} is date referral sentence fragment").format(d("4/1/2",
"4/2/4")),image:"./images/platforms/superb/Vena Gear.png"})}},{id:"Oasis",date:"5/1/1",getNotification:function(){return new Notification({header:c,text:"Vena has announced that they will release a new gaming console {0}. The Vena Oasis comes with 16-bit graphics and sound which promises a new kind of gaming experience.{n}Vena said at the announcement, 'The Oasis is a new start, it will be the genesis of a new generation of gaming consoles and we believe it will do very well in the market'. Some of the games already announced for the console suggest that it will appeal to more mature audiences.".localize("{0} is date referral sentence fragment").format(d("5/1/1",
"5/2/4")),image:"./images/platforms/superb/Vena Oasis.png"})}},k,n,p,{id:"PlaySystemAnnouncement",date:"7/6/1",getNotification:function(){return new Notification({header:c,text:"Today, Vonny has announced their very own console called the Playsystem. Apparently the company has completely reworked their earlier Play System prototype after Ninvento cancelled the project.{n}The new Playsystem comes with a CD-ROM drive and 32-bit processors and is wholly owned by Vonny. Industry professionals say that this might be the beginning of a new generation of consoles. Ninvento declined to comment. The Playsystem will enter the market {0}.".localize("{0} is date referral sentence fragment").format(d("7/6/1",
"7/7/1")),image:"./images/platforms/superb/Playsystem.png"})}},{id:"TES64Announcement",date:"8/12/1",getNotification:function(){return new Notification({header:c,text:"Ninvento announced their next generation console called TES 64 today. Expected {0} it is the world's first gaming console to sport 64-bit processors for graphics and audio. Ninvento said this will allow never-before-seen 3D realism.{n}In recent years the Super TES has lost a lot of market share to more modern consoles. Market experts said that the hardware of the TES 64 is surely impressive, but expressed their surprise that it still uses ROM cartridges instead of the much cheaper and higher capacity CD-ROM format.{n}Nevertheless, the TES 64 seems like an impressive console and Ninvento has said that it plans to aggressively price it against Vonny's Playsystem.".localize("{0} is date referral sentence fragment").format(d("8/12/1",
"9/2/1")),image:"./images/platforms/superb/TES 64.png"})}},{id:"DreamVast",date:"10/1/2",getNotification:function(){return new Notification({header:c,text:"The day Vena fans have waited a long time for has arrived, as Vena has announced their next generation console, the DreamVast. A company spokesperson said, 'The DreamVast is a dream come true. This console is the most advanced gaming console in history!'.{n}The new console sports powerful graphics hardware promising graphic quality rivaling those on high-end PCs. The DreamVast is also the first console to ship with a modem out-of-the-box, making it ready for online play. The console will be available {0}.".localize("{0} is date referral sentence fragment").format(d("10/1/2",
"10/8/3")),image:"./images/platforms/superb/DreamVast.png"})}},q,o,{id:"mBoxAnnouncement",date:"11/5/1",getNotification:function(){return new Notification({header:c,text:"PC software juggernaut Mirconoft has announced today that they will enter the game console market with their very own gaming console called the mBox.{n}First demonstrations have been impressive, but we will have to wait and see how it fares against the popular DreamVast, as well as against the recently announced and much anticipated Playsystem 2. The new console is said to debut {0}.".localize("{0} is date referral sentence fragment").format(d("11/5/1",
"11/7/1")),image:"./images/platforms/superb/mBox.png"})}},{id:"mBoxDelayed",date:"11/6/2",getNotification:function(){return new Notification({header:c,text:"Mirconoft has announced the delay of their new gaming console, mBox. The new release date is '{0}'. Rumour has it that the incredible success of the Playsystem 2 launch has prompted Mirconoft to delay their own debut.".localize("{0} is date referral sentence fragment").format(d("11/6/2","11/12/4")),image:"./images/platforms/superb/mBox.png"})}},
s,x,{id:"gameSphere",date:"12/10/4",getNotification:function(){return new Notification({header:c,text:"Today, Ninvento announced the new Ninvento Game Sphere, with which it will try to compete with Vonny's market leading Playsystem 2 and Mirconoft's strong alternative, the mBox. The curiously shaped console has similar hardware specifications as other consoles.{n}The Game Sphere is Ninvento's first console to have an optical disc drive instead of cartridges. However, instead of using full sized CD and DVDs, like its competitors, the console features a mini-DVD drive. Game Spheres will start rolling into stores {0}.".localize("{0} is date referral sentence fragment").format(d("12/10/4",
"12/12/1")),image:"./images/platforms/superb/GameSphere.png"})}},r,{id:"NinventoGS",date:"13/8/1",getNotification:function(){return new Notification({header:c,text:"Today, Ninvento has announced a new mobile console called the Ninvento GS. It features two screens, one of them touch sensitive, and promises unique gameplay. While Ninvento has been struggling to regain their market lead ever since the TES 64 they still have a very strong position on the mobile market.{n}The Ninvento GS promises to strengthen this position and aims to breath life into a stagnating mobile market. The console will be in stores {0}.".localize("{0} is date referral sentence fragment").format(d("13/8/1",
"13/8/4")),image:"./images/platforms/superb/GS.png"})}},{id:"PPSAnnouncement",date:"13/8/2",getNotification:function(){return new Notification({header:c,text:"Today, Vonny announced that they are launching a new mobile gaming console called Portable Playsystem, or PPS for short, {0}. Media analysts speculate that this announcement is meant to distract users from Ninvento's launch of the Ninvento GS.{n}While the Ninvento GS utilizes an innovative dual screen, the PPS instead makes use of a single screen and will focus on giving developers access to much more powerful hardware.".localize("{0} is date referral sentence fragment").format(d("13/8/2",
"14/3/4")),image:"./images/platforms/superb/PPS.png"})}},t,w,{id:"mPad",date:"20/6/4",getNotification:function(){return new Notification({header:c,text:"Today, Mirconoft has announced their very own tablet device to combat the massive marketshare of Grapple's grPad device. The mPad features a sophisticated cover that comes with a integrated, ultra-thin keyboard. The tablet itself has a widescreen display and a integrated stand.{n}The mPad seems to be a combination of a traditional notebook and a tablet, and promises to shake up the market. The new product will be on the market {0}.".localize("{0} is date referral sentence fragment").format(d("20/6/4",
"20/10/4")),image:"./images/platforms/superb/mPad.png"})}},z,v,{id:"PS3",date:"17/8/4",getNotification:function(){return new Notification({header:c,text:"Today, Vonny has announced the successor to the massively successful Playsystem 2. The new console is predictably called 'Playsystem 3' and comes with an impressive hardware configuration, making it the most powerful console in gaming history.{n}The console also doubles as a player for BlueRay, which Vonny hopes will be the successor to the DVD format. All this power comes with a hefty price tag, also making the Playsystem 3 the most expensive console ever.{n}We will see how consumers will react to this given the lower-cost alternatives; however, considering the massive success of the Playsystem 2, Vonny can be hopeful.\nThe console is expected to ship {0}.".localize("{0} is date referral sentence fragment").format(d("17/8/4",
"17/12/4")),image:"./images/platforms/superb/Playsystem 3.png"})}},{id:"grPhone",date:"18/6/1",getNotification:function(){return new Notification({header:c,text:"Today, Grapple, a company well known for their role in the early PC industry and, more recently, for their portable music player, grPod, have announced that they will soon release a powerful new mobile phone. The phone has a touch screen and sports a surprisingly powerful CPU.{n}The integrated graphics chipset should also allow the phone to run games and, since the phone comes with its own application delivery platform, it could become a great device for mobile games. The grPhone will be available {0}.".localize("{0} is date referral sentence fragment").format(d("18/6/1",
"18/9/1")),image:"./images/platforms/superb/grPhone.png"})}},y,{id:"PS3Hype",date:"17/12/2",getNotification:function(){return new Notification({header:c,text:"In what some call a bizarre show of arrogance Vonny representatives have been trash-talking Mirconoft's successful mBox 360 while praising their own upcoming Playsystem 3 in the lead-up to their launch {0}.{n}Asked about the unusually high price of the Playsystem 3, a high-ranking company official replied, 'People will work more hours to buy one. We want people to feel that they want it more than anything else.'.{n}We are not sure that players will really want it so badly, as, so far, no major game titles have been announced for the Playsystem 3. It might be a while before developers are able to take full advantage of the powerful new console.".localize("{0} is date referral sentence fragment").format(d("17/12/2",
"17/12/4")),image:"./images/platforms/superb/Playsystem 3.png"})}},{id:"wuu",date:"20/8/4",getNotification:function(){var a="Ninvento has revealed that their bid in the next generation of consoles will be called the Wuu. The new console features a controller with a integrated display.{n}This is said to make local multiplayer games much more interesting by giving each player a unique screen. Ninvento has always been at the forefront of innovation and this console seems, once again, to be a brave move.\nThe Wuu is said to be available {0}.".localize("{0} is date referral sentence fragment").format(d("20/8/4",
"20/12/4"));return new Notification({header:c,text:a,image:"./images/platforms/superb/Wuu.png"})}},{id:"mboxOne",date:"23/4/4",getNotification:function(a){var b=a.getLatestCustomConsole(),f="For fans of the mBox, the long wait for an update to the console will soon be over as Mirconoft has announced that the mBox One will be available {0}.".localize("{0} is date referral sentence fragment").format(d("23/4/4","23/8/4"));b&&(f+=" Mirconoft has lost a substantial share of the market since {0} released their {1} console.{n}".localize().format(a.name,
b.name));f+=" "+"The new console is marketed as a unified entertainment platform and comes with voice control and a camera which is always watching to enable gesture control. A camera which is always on is not the only controversial feature as the new console also seems to require internet access at least once a day to function properly, does not support previous mBox games and seems to place restrictions on how games can be shared or resold.{n}Clearly, Mirconoft wants to push the current status quo and deliver a console for a new future of gaming but we are not sure if players will share Micronoft's vision.".localize();
return new Notification({header:c,text:f,image:"./images/platforms/superb/mBox One.png"})}},{id:"ps4",date:"23/5/1",getNotification:function(a){var a=a.getLatestCustomConsole(),b="Just after Mirconoft have announced their new bet in the upcoming console generation, Vonny has announced that they will release their new, long-awaited console, the Playsystem 4, {0}. The console seems to do everything that the Playsystem 3 did, only better.{n}Unlike the mBox One, the Playsystem 4 doesn't have an always-online requirement and seems much more player friendly. We think that there is a hardly a risk of Vonny fans being disappointed".localize("{0} is date referral sentence fragment, sentence itself is a fragment and continues with 'but ...'").format(d("23/5/1",
"23/10/4")),b=a?b+" but we will see how well the new console competes with the popular {0} console.".localize().format(a.name):b+" but we will see how the new console will fare against its competitors.".localize();return new Notification({header:c,text:b,image:"./images/platforms/superb/Playsystem 4.png"})}},{id:"mboxOnePs4",date:"23/6/2",getNotification:function(a){a=a.getLatestCustomConsole()?"Vonny and {0}".localize().format(a.name):"Vonny";a="After a massive public backlash to the controversial features announced for the upcoming mBox One, Mirconoft has today published a letter outlining their change of plans. The mBox One will no longer require a constant internet connection and will not place restrictions on how games are sold or shared.{n}Clearly the different and much more popular strategies of companies like {0}, as well as vocal players themselves, have forced this change of direction.".localize().format(a);
return new Notification({header:c,text:a,image:"./images/platforms/superb/mBox One.png"})}},{id:"gameEndNotification",date:"30/5/4",getNotification:function(a){a="Dear {0}, we, the worldwide game developers guild, would like to invite you to a special award ceremony at our main meeting at the end of the year. Please come.\n\n(Hint: The game will end at the end of this year.)".localize().format(a.staff[0].name);return new Notification("Invitation".localize("heading"),a)}},{id:"visorius",date:"25/9/2",
getNotification:function(){var a="A company by the name of RiseVR has developed a virtual reality headset which promises to finally start the path towards true 3D immersion. The new headset called Visorius looks like a pair of giant ski-goggles and provides a large field of vision as well as near-perfect motion tracking.".localize(),a=a+("{n}"+"A first test left some players feeling a little motion-sick but with the right game this technology can surely deliver a new level of immersion.".localize()),
a=new Notification({header:c,text:a,image:["./images/platforms/superb/visorius.png"]});a.setFlag("visoriusAnnounced",!0);return a}},{id:"growingPC",date:"22/10/2",getNotification:function(){var a="Just as the industry seems to have silently accepted the slow demise of PC gaming as more and more games are primarily developed for consoles, there seems to be a resurgence of the PC market.{n}New powerful and affordable hardware, a growing indie-developer scene and the rise of crowd-funded financing has meant a slew of new exciting projects hitting the PC market.\nIt seems that the PC market will only grow stronger in the coming years.{n}For console lovers, this isn't bad news either as many PC games are also ported to the most successful consoles.".localize();
return new Notification({header:c,text:a,image:["./images/platforms/superb/PC-3.png"]})}},{id:"oya",date:"22/1/4",getNotification:function(){var a="Out of nowhere, a new company called KickIT has kicked up a media storm by successfully crowd-funding the development of a new gaming console in just under eight hours.{n}The console, dubbed 'OYA', uses similar technology as modern phones and tablets and delivers games exclusively via its own online store.\nThe OYA is a cubed-shape console and much smaller than most gamepads but the shape isn't the only thing that is small as the developer states that the price tag of the OYA will be under 100cr.{n} KickIT also stated that every game on the OYA will offer a free DEMO. The OYA will be available {0}.".format(d("22/1/4",
"22/10/4"));return new Notification({header:c,text:a,image:"./images/platforms/superb/OYA.png"})}},{id:"mboxNext",date:"27/3/4",getNotification:function(a){var a=a.getLatestCustomConsole(),b="Mirconoft has announced their plans to release a completely revamped version of the mBox {0} called mBox Next. The new console seems to cleverly integrate Mirconoft's own motion sensor add-on for the mBox One into one small package.{n}Visually, the mBox Next is reminiscent of the earlier mBox 360 with a much lighter tone marking a departure from the bulky and dark style of the mBox One. The technology of the mBox Next seems promising  ".localize("{0} is date referral sentence fragment, sentence itself is a fragment and continues with 'but ...'").format(d("27/3/4",
"27/8/4")),b=a?b+" but we will see how well the new console competes with the popular {0} console.".localize().format(a.name):b+" but we will see how the new console will fare against its competitors.".localize();return new Notification({header:c,text:b,image:"./images/platforms/superb/mBox Next.png"})}},{id:"ps5",date:"27/6/4",getNotification:function(a){var a=a.getLatestCustomConsole(),b="Many have expected that Vonny will announce a new platform before Mirconoft's mBox Next will hit the market and, today, Vonny did just that. Keeping with company tradition, and in contrast to competitor Mirconoft's naming practices, the newly announced console is aptly named Playsystem 5.{n}The Playsystem 5 seems an incremental update, coming out {0} with a form-factor that reminds of the early Playsystem 3. The new system promises to be a solid update".localize("{0} is date referral sentence fragment, sentence itself is a fragment and continues with 'but ...'").format(d("27/6/4",
"27/10/4")),b=a?b+" but we will see how well the new console competes with the popular {0} console.".localize().format(a.name):b+" but we will see how the new console will fare against its competitors.".localize();return new Notification({header:c,text:b,image:"./images/platforms/superb/Playsystem 5.png"})}}]);Media.createFirstGameStory=function(a){var b=a.currentGame,c="{0}, a newcomer in the game industry, has just released their first game '{1}'.\nThe game ".localize("fragment, continue with firstGameStoryRatingFragments").format(a.name,
b.title);return c=3>=b.score?c+"got generally low scores from reviewers but with a bit of experience we are sure that we will see better games from {0} in the future.".localize("firstGameStoryRatingFragments").format(a.name):5.6>=b.score?c+"had a moderate response from reviewers. We are curious what {0} will deliver in the future.".localize("firstGameStoryRatingFragments").format(a.name):c+"received favorable reviews. \nWith such a good start {0} are sure to gain fans quickly.".localize("firstGameStoryRatingFragments").format(a.name)};
Media.createSequelStory=function(a,b){var c=a.getGameById(b.sequelTo),f=9<b.score?"outstanding".localize():7<b.score?"great".localize():5<b.score?"moderate".localize():3<b.score?"below average".localize():"pretty bad".localize(),f="{0} has recently released a sequel to their game {1}. The newest game in the series titled {2} was met with {3} responses.".localize().format(a.name,c.title,b.title,f);6<b.score&&b.flags.hasBetterEngineThanSequel&&(f+=" "+"Critics praised that {0} had a newer engine than the original, really driving technical innovation.".localize().format(b.title));
b.flags.sequelsTooClose&&(c=Math.floor(b.releaseWeek-c.releaseWeek),f+="{n}"+"A major negative reaction came from fans who felt that with the original coming out just {0} weeks before, the company is trying to milk the franchise for more money without delivering much new for players to enjoy.".localize().format(c));a.notifications.push(new Notification("Sequel".localize(),f,"OK".localize(),2+2*a.getRandom()))};Media.createExtensionPackStory=function(a,b){var c=a.getGameById(b.sequelTo),f=9<b.score?
"outstanding".localize():7<b.score?"great".localize():5<b.score?"moderate".localize():3<b.score?"below average".localize():"pretty bad".localize(),f="{0} has recently released an expansion pack to their game {1}. The expansion pack titled {2} was met with {3} responses.".localize().format(a.name,c.title,b.title,f);b.flags.sequelsTooClose&&(c=Math.floor(b.releaseWeek-c.releaseWeek),f+="{n}A major negative reaction came from fans who felt that with the main game coming out just {0} weeks before, the company is trying to milk the franchise for more money without delivering much new for players to enjoy.".localize().format(c));
a.notifications.push(new Notification("Expansion Pack".localize(),f,"OK".localize(),2+2*a.getRandom()))};a.createWelcomeNotifications=function(){var a=GameManager.company;if(GameManager.ghg2()){var b=GameManager.ghg0()?"lite".localize("as in lite edition of the game"):"trial".localize();a.notifications.push(new Notification({header:"{0} version".localize("could either be lite version or trial version").format(b),text:"This is the {0} version of Game Dev Tycoon in which you can play until year five.".localize("{0} is either lite or trial").format(b)}))}b=
"Welcome to Game Dev Tycoon!\nIn this business simulation you have been transported back in time to start your very own game development company right at the beginning of the PC revolution. In the next {0} years you can build your dream company, create best selling games, gain fans and become the leader of the market.{n}Before you can start your adventure you have to give your upcoming company a name.".localize().format(35);a.notifications.push(new Notification("Welcome".localize("heading to greet the player"),
b));a.notifications.push(new Notification("{enterCompanyName}"))};a.generateAudienceMismatchStory=function(a,b){var c=8<b.score?"outstanding".localize():6<b.score?"good".localize():"moderate".localize(),f="It seems that the initial sales for {0} have fallen way below expected numbers. The game received {1} reviews but it seems that the chosen platform isn't very popular with the target audience.".localize("{1} is adjective like good, moderate, outstanding");a.notifications.push(new Notification("Sales Report".localize(),
f.format(b.title,c)))};a.createSameGenreTopicStory=function(a,b){if(7>b.score){var c="The latest game by {0} has had reviewers scratching their heads. Rather than bringing a new and innovative game to market the company delivered another {1}/{2} game which is more or less the same setting as their previous game.{n}One reviewer commented:'I think {3} was simply developed too soon after the previous game with not enough innovations in technology and design.'".localize();return new Notification("Media Report".localize(),
c.format(a.name,b.topic.name,b.genre.name,b.title))}};a.createLevel2Notifications=function(){var a=GameManager.company,b="Welcome to your new office!\nNow that you have a bigger office you can also hire staff and forge a world-class development team to make even better games.".localize();a.notifications.push(new Notification("New Office".localize(),b,"OK".localize(),0.3))};a.createLevel2OfficeStory=function(){var a=0.5+1.5*Math.random(),b=GameManager.company,c="It seems that {0} has recently moved into an office in a well known technology park and is now searching for employees.{n}The company, which is known for games such as {1}, has reportedly operated out of a garage until now.{n}One of the many fans of {2} commented: 'I can't believe that they didn't even have a proper office until now and that those games were created by only one person!\nI am really looking forward to their future games!".localize(),
f=b.gameLog.slice().sort(function(a,b){return b.fansChanged-a.fansChanged}),j=f[0].title,d=j;2<=f.length&&(d=d+" "+"and".localize()+" "+f[1].title);c=c.format(b.name,d,j);b.notifications.push(new Notification("News".localize("heading"),c,"OK".localize(),a))};a.createLevel4Notifications=function(){var a=GameManager.company,b="Welcome to the new headquarters of {0}!\nWe now have more space so you can increase the team further. The new office is also close to some renowned universities which gives us great access to new talent.".localize().format(a.name);
a.notifications.push(new Notification("New Office".localize(),b));var c=2,f=a.staff.slice(1).sort(function(a,b){return b.designFactor-a.designFactor})[0],b="Wow, this new office is amazing and the location is perfect too. I took a walk around the building earlier and had this radical idea.\nWhy don't we open up our own research and development department?{n}This could really speed up our research and would allow us to attack bigger projects and innovations.\nIt wouldn't be cheap but I think it would allow us to be the leading innovator in the gaming industry.{n}Anyway, I have done some research and I think we should open a lab and hire a whole team of researchers. Before we can do this however, we should have at least one design specialist in our team.".localize(),
b=new Notification(f.name,b,"OK".localize(),c);b.setFlag("dTSpecialistTrainingEnabled",!0);a.notifications.push(b);Tutorial.designSpecialist(c);c="Greenheart"==a.name?"Lone Tree":"Greenheart";b=new Notification("Training","Hello {0},\nWe have just learned that you have opened your new headquarters not too far away from our university! We are just about to start a special course about game development and could really use your help.{n}Unfortunately we cannot offer any pay but I think you will find that teaching students about game development will be a great exercise to refine your own skills.\n{1} University{n}New training options available.".localize().format(a.name,
c));b.weeksUntilFired=0.5;b.setFlag("trainingV3Enabled",!0);a.notifications.push(b);c=4+3*a.getRandom();GameManager.enableLargeContracts(c)};a.enterRndLab=function(a){if(!a.flags.enterRndLab){a.flags.enterRndLab=!0;var b="Welcome to our very own research and development lab! At the moment it is empty but we have a number of skilled people eager to start working.{n}You don't have to hire them individually, instead you can simply decide on the budget for the R&D lab. The higher the budget, the more researchers will work and the higher the research progress will be.{n}Running your own R&D lab can be very expensive so be careful that you don't overspend. I suggest you start with smaller projects and don't be afraid to cut down the budget if necessary.{n}If there is no active project researchers will generate research points slowly, which you can use to train your main staff and unlock more game options.".localize();
a.notifications.push(new Notification("R&D lab".localize(),b,"OK".localize(),0.35));Tutorial.rndLab(0.35)}};a.enterHwLab=function(a){if(!a.flags.enterHwLab){a.flags.enterHwLab=!0;var b="Welcome to our very own hardware lab! This is the place where we will create our own game console. Before you start, make sure you have a lot of cash saved up. Building a console isn't cheap. When you are ready to start simply {0} on the screen to access the action menu.".localize().format(Tutorial.getClickVerb());
a.notifications.push(new Notification("Hardware lab".localize(),b,"OK".localize(),0.35))}};a.createMMOEndStory=function(a){var b=Math.roundToDecimals((GameManager.company.currentWeek-a.releaseWeek)/4,1),c=GameManager.company,f="We just got word that {0} is retiring its MMO game {1} from the market. The game has been on the market for {2} months and racked up over {3} in sales.".localize(),f=a.flags.isProfitable?f+(" "+"We are not quite sure why {0} has decided to take {1} off the market as the game likely still generated income for the company.".localize()):
f+(" "+"{1} was likely not profitable anymore as the maintenance costs were likely larger than the income.".localize()),j=0,d=GameManager.company.gameLog.first(function(b){return b.id!=a.id&&b.flags.mmo&&b.isOnSale()});d?f+="{n}"+"While fans of {0} weren't happy about the news many of them also play {1} which is still on the market.".localize().format(c.name,d.title):(f+="{n}"+"Fans of {1} have voiced complaints with one fan saying: 'I love {0} and played {1} a lot but now that they took it off the market I don't know what MMO I should play. If only {0} had released a new MMO I wouldn't be so upset.'".localize(),
j=Math.floor(0.1*a.fansChanged*c.getRandom()));b=new Notification("Industry News".localize("heading"),f.format(c.name,a.title,b,UI.getLongNumberString(a.unitsSold)));b.weeksUntilFired=0.7;j&&b.adjustFans(-j);c.notifications.push(b)};a.createConsoleStartStory=function(a){var b=GameManager.company,f=a.isGoodTech,j=a.featureFactor,d=a.successFactor,e=a.qF,h="{0} has released their game console {1} today.".localize().format(b.name,a.name),h=f?h+(" "+"The console seems to really push the limits of technology and is the most modern console ever to hit shelves.".localize()):
h+(" "+"The console does not seem quite on par with the high tech competitors but we will see what players think.".localize()),h=h+" Looking at the features of {0}, it seems that the ".localize().format(a.name),h=0.8<=j?h+"list is extensive which is a good sign and could lead to a wide variety of games becoming available.".localize():h+(" "+"list is a bit slim. Don't expect too many gadgets and controllers to be available for this console.".localize()),h=h+("{n}"+"First tests indicate that {0}".localize().format(a.name)),
h=0.8<=e?h+"'s build quality is excellent and will likely run for decades without issues.".localize():0.5<=e?h+(" "+"is of average build quality. Don't expect it to last forever but in general you should not see many issues.".localize()):h+(" "+"is a bit fragile. We wouldn't be surprised if you need to make use of the warranty sooner or later.".localize()),h=h+("\n"+"All in all ".localize("fragment continues with 'we think that the console...'")),h=1<=d?h+(" "+"we think that the console will stir up the market and prove to be very successful.".localize("fragment, started with 'All in all'").format(a.name)):
0.8<=d?h+(" "+"we think that the console will do reasonably well in the market and it is a welcome addition.".localize("fragment, started with 'All in all'").format(a.name)):h+(" "+"it's hard to say whether the console will do well as there are so many other good products on the market.".localize("fragment, started with 'All in all'").format(a.name));b.notifications.push(new Notification({header:c,text:h,weeksUntilFired:0.4,image:a.iconUri}))};a.createConsoleEndStory=function(a){var b=GameManager.company,
f=1===a.version?"first".localize():2===a.version?"second".localize():3===a.version?"third".localize():a.version,f="{0} has taken their game console {1} off the market.\n{1} was the {2} console created by the company.".localize().format(b.name,a.name,f);b.notifications.push(new Notification({header:c,text:f,weeksUntilFired:0.4,image:a.iconUri}))};a.createFinishGameStories=function(){var a=GameManager.company,b=a.getBestSeller(),b="The worldwide game developers guild has awarded {0}, CEO of {1} the lifetime achievement award for contributions to the game industry. {0} has, during a stunning {3} year career at {1} delivered many ground breaking games.{n}The company is most recently known for {2}.".localize().format(a.staff[0].name,
a.name,b.title,Math.floor(30*GameManager.flags.gameLengthModifier)),f=a.getLatestCustomConsole();f&&(b+=" They are also known for their console {0} which has done very well on the market.".localize().format(f.name));a.notifications.push(new Notification(c,b));a.notifications.push(new Notification("Game finished".localize(),"Congratulations. You have finished Game Dev Tycoon. We will now calculate your final score and show you some statistics. You may continue playing after that.".localize()));a.notifications.push(new Notification("{GameEnd}"))};
a.createEndOfGameStories=function(){PlatformShim.ISWIN8?GameManager.company.notifications.push(DecisionNotifications.endOfGame1.getNotification(GameManager.company)):GameManager.company.notifications.push(DecisionNotifications.endOfGameNative.getNotification(GameManager.company))}})();"use strict";var Missions={BASE_POINTS:5,BASE_RESEARCH_POINTS:1.5,BASE_DURATION:1800,BASE_ENGINE_DURATION:1500,PREP_DURATION:1E3,FINISH_DURATION:1E3};
(function(){Missions.getGeneralFactor=function(a,d){var c=General.getMission(d.id);if("preparation"===c.type||"BugFixing"===c.type)return 1;var b=LevelCalculator.getLevelBonusFactor(c.experience);return Missions.getGenreWeighting(c,a.currentGame,a.currentGame)*b};Missions.getRepeatMissionModifier=function(a,d){var c=1,b=0,b=a.currentGame;b.featureLog&&(b=b.featureLog.count(function(a){return a.id===d.id}),1===b?c=0.7:2<=b&&(c=0.3));return c};Missions.executePublishingMission=function(a,d){var c=a.currentGame,
b=General.getMission(d.id),g=1,e=Missions.getRepeatMissionModifier(a,d),g=g*e,e=GameManager.getCurrentGameProgress(),e=Math.abs(e-0.7),g=g-e/2;c.featureLog.count(function(a){return"marketing"===a.type});e=LevelCalculator.getMissionLevel(b);g*=b.marketingFactor/5*e;e=100*g*GameGenre.getGenreWeighting(c.topic.genreWeightings,c.genre,c.secondGenre);e=Math.floor(0.9*e+0.1*e*a.getRandom());if(c.sequelTo){var h=0.2*e;c.flags.sequelsTooClose&&(h*=-1);c.flags.usesSameEngineAsSequel?h=0>h?2*h:h/2:c.flags.hasBetterEngineThanSequel&&
(h=0>h?-1*h:1.2*h);e+=h}c.hypePoints+=e;c.costs+=b.cost;a.adjustCash(-b.cost,b.name);"game hype: {0}. delta: {1}. factor contribution of mission: {2}".format(c.hypePoints,e,g).log();c.featureLog.push(b)};Missions.getTopicMissionOverrides=function(a,d){if(d.missionOverrides){var c=a;c.genreWeightings||(c=Missions.getAllMissions().first(function(a){return a.id===c.id}));var b=[],g=Missions.DevMissions.indexOf(c);if(-1!=g)for(var e=game.topic.missionOverrides,h=0;h<e.length;h++)b.push(e[h][g]);return b}};
Missions.getGenreWeighting=function(a,d){var c=d.genre,b=d.secondGenre,g=a;g.genreWeightings||(g=Missions.getAllMissions().first(function(a){return a.id===g.id}));var e=g.genreWeightings.slice();if(d.topic.missionOverrides){var h=Missions.DevMissions.indexOf(g);if(-1!=h)for(var f=d.topic.missionOverrides,j=0;j<f.length;j++){var l=f[j][h];l&&(e[j]=l)}}return GameGenre.getGenreWeighting(e,c,b)};Missions.getMissionWithId=function(a){return Missions.getAllMissions().first(function(d){return d.id===a})};
Missions.Stage1Missions=[{id:"Engine",name:"Engine".localize(),description:"Improves the game engine.",technologyFactor:0.8,designFactor:0.2,genreWeightings:[1,0.7,0.7,0.9,0.9,0.6],percentage:100/3},{id:"Gameplay",name:"Gameplay".localize(),description:"Improves the gameplay.",technologyFactor:0.2,designFactor:0.8,genreWeightings:[0.9,0.8,0.9,1,1,1],percentage:100/3},{id:"Story/Quests",name:"Story/Quests".localize(),description:"Work on the story and quests.",technologyFactor:0.2,designFactor:0.8,
genreWeightings:[0.7,1,1,0.8,0.8,0.7],percentage:100/3}];Missions.Stage2Missions=[{id:"Dialogs",name:"Dialogues".localize(),description:"Work on the dialogues.",technologyFactor:0.1,designFactor:0.9,genreWeightings:[0.6,1,1,0.7,0.7,0.7],percentage:100/3},{id:"Level Design",name:"Level Design".localize(),description:"Improves the level design.",technologyFactor:0.6,designFactor:0.4,genreWeightings:[0.9,0.8,0.9,0.9,1,1],percentage:100/3},{id:"AI",name:"Artificial Intelligence".localize(),description:"Improves the AI.",
technologyFactor:0.8,designFactor:0.2,genreWeightings:[1,0.7,0.8,1,0.9,0.6],percentage:100/3}];Missions.Stage3Missions=[{id:"World Design",name:"World Design".localize(),description:"Work on the world design.",technologyFactor:0.4,designFactor:0.6,genreWeightings:[0.8,1,1,0.8,1,0.7],percentage:100/3},{id:"Graphic",name:"Graphic".localize(),description:"Improves the graphics.",technologyFactor:0.5,designFactor:0.5,genreWeightings:[1,0.9,0.9,1,0.8,1],percentage:100/3},{id:"Sound",name:"Sound".localize(),
description:"Improves the sound.",technologyFactor:0.4,designFactor:0.6,genreWeightings:[0.9,0.8,0.8,0.9,0.9,0.9],percentage:100/3}];Missions.DevMissions=Missions.Stage1Missions.concat(Missions.Stage2Missions.concat(Missions.Stage3Missions));Missions.MarketingMissions=[{id:"MagazineMarketing",name:"Advertise in magazines".localize(),shortName:"Magazines".localize("short name"),description:"Advertise in gaming magazines to get the game well known before it hits the shelves.".localize(),marketingFactor:0.5,
cost:5E4},{id:"DemosMarketing",name:"Magazines & Demos".localize(),shortName:"Magazines & Demos".localize("short name"),description:"Advertise in gaming magazines and distribute demos of the game to give players an opportunity to try the game.".localize(),marketingFactor:1,cost:15E4},{id:"Marketing Campaign",name:"Small Marketing Campaign".localize(),shortName:"Small Campaign".localize("short name"),description:"Start a global marketing campaign including magazine ads, demos and interviews.".localize(),
marketingFactor:1.5,cost:5E5},{id:"Marketing CampaignXL",name:"Large Marketing Campaign".localize(),shortName:"Large Campaign".localize("short name"),description:"Start a global marketing campaign to promote the game far and wide. Organize exclusive reviews, behind the scenes reports, TV trailers and more.".localize(),marketingFactor:2,cost:2E6}];Missions.PreparationMission={id:"preparation",missionType:"preparation"};Missions.BugFixingMission={id:"BugFixing",missionType:"BugFixing"};Missions.Stage1Missions.forEach(function(a){a.missionType=
"dev";a.level=1;a.experience=0});Missions.Stage2Missions.forEach(function(a){a.missionType="dev";a.level=1;a.experience=0});Missions.Stage3Missions.forEach(function(a){a.missionType="dev";a.level=1;a.experience=0});Missions.MarketingMissions.forEach(function(a){a.missionType="marketing";a.level=1;a.experience=0});Missions.getAllMissions=function(){return Missions.Stage1Missions.concat(Missions.Stage2Missions.concat(Missions.Stage3Missions.concat(Missions.MarketingMissions).concat([Missions.PreparationMission,
Missions.BugFixingMission])))}})();"use strict";var Platforms={};
(function(){Platforms.getNormalizedAudienceWeighting=function(a){return 0.8<=a?a+0.2:0.7<=a?a+0.1:a+0.05};Platforms.getNormalizedGenreWeighting=function(a){return 1==a?1.1:0.9==a?1.05:0.8==a?1:0.7==a?0.95:0.6==a?0.9:1};Platforms.getNormGenreWeighting=function(a,c,b){if(void 0===a)return 1;if(b)return(Platforms.getNormGenreWeighting(a,b)+2*Platforms.getNormGenreWeighting(a,c))/3;if(c===GameGenre.Action)return Platforms.getNormalizedGenreWeighting(a[0]);if(c===GameGenre.Adventure)return Platforms.getNormalizedGenreWeighting(a[1]);
if(c===GameGenre.RPG)return Platforms.getNormalizedGenreWeighting(a[2]);if(c===GameGenre.Simulation)return Platforms.getNormalizedGenreWeighting(a[3]);if(c===GameGenre.Strategy)return Platforms.getNormalizedGenreWeighting(a[4]);if(c===GameGenre.Casual)return Platforms.getNormalizedGenreWeighting(a[5]);throw"unknown genre: "+c;};var a=[{id:"PC",name:"PC",imageDates:["1/1/1","4/9/1","16/3/1"],startAmount:0.22,marketKeyPoints:[{date:"2/1/1",amount:0.24},{date:"4/1/1",amount:0.41},{date:"4/10/2",amount:0.48},
{date:"11/5/2",amount:1.1},{date:"16/12/1",amount:2.1},{date:"20/7/1",amount:2.4},{date:"22/9/2",amount:2.6},{date:"23/4/1",amount:4},{date:"26/12/4",amount:5.7}],unitsSold:5.7,licencePrize:0,published:"1/1/1",platformRetireDate:"260/12/4",developmentCosts:5E3,genreWeightings:[0.9,1,0.9,1,1,0.6],audienceWeightings:[0.8,0.9,1]},{id:"G64",name:"G64",company:"Govodore",startAmount:0.28,marketKeyPoints:[{date:"2/5/1",amount:0.36},{date:"3/1/1",amount:0.38},{date:"4/1/1",amount:0.386}],unitsSold:0.388,
licencePrize:0,published:"1/1/1",platformRetireDate:"4/6/2",developmentCosts:2E4,genreWeightings:[0.9,1,0.9,0.9,1,0.7],audienceWeightings:[0.8,0.9,1],techLevel:1},{id:"TES",name:"TES",company:"Ninvento",startAmount:0.356,marketKeyPoints:[{date:"2/5/1",amount:0.41},{date:"3/1/1",amount:0.444},{date:"4/1/1",amount:0.46}],unitsSold:0.42,licencePrize:8E4,published:"2/1/2",platformRetireDate:"6/6/2",developmentCosts:3E4,genreWeightings:[0.8,0.7,0.8,0.8,0.7,1],audienceWeightings:[1,0.9,0.6],techLevel:2},
{id:"Master V",name:"Master V",company:"Vena",startAmount:0.43,marketKeyPoints:[{date:"4/1/1",amount:0.456},{date:"6/6/2",amount:0.466}],unitsSold:0.7,licencePrize:8E4,published:"3/2/3",platformRetireDate:"11/3/4",developmentCosts:3E4,genreWeightings:[0.9,0.7,0.8,0.8,0.7,1],audienceWeightings:[0.9,1,0.7],techLevel:2},{id:"Gameling",name:"Gameling",company:"Ninvento",startAmount:0.8,unitsSold:1,licencePrize:5E4,published:"3/9/2",platformRetireDate:"14/4/2",developmentCosts:3E4,genreWeightings:[0.8,
0.7,0.9,0.9,0.6,1],audienceWeightings:[1,0.9,0.6],techLevel:2}];Platforms.allPlatforms=[];Platforms.allPlatforms.addRange(a);Platforms.allPlatforms.addRange([{id:"Vena Gear",name:"Vena Gear",company:"Vena",startAmount:0.6,unitsSold:0.84,licencePrize:5E4,published:"4/2/4",platformRetireDate:"8/4/1",developmentCosts:3E4,genreWeightings:[0.9,0.8,0.8,0.9,0.6,1],audienceWeightings:[0.9,1,0.8],techLevel:3},{id:"Vena Oasis",name:"Vena Oasis",company:"Vena",startAmount:0.62,unitsSold:0.65,licencePrize:1E5,
published:"5/2/4",platformRetireDate:"10/11/1",developmentCosts:5E4,genreWeightings:[1,0.8,0.8,0.9,0.6,0.7],audienceWeightings:[0.8,1,0.9],techLevel:3},{id:"Super TES",name:"Super TES",company:"Ninvento",startAmount:0.65,marketKeyPoints:[{date:"6/6/1",amount:0.7},{date:"8/10/1",amount:0.73}],unitsSold:0.8,licencePrize:5E4,published:"5/12/4",platformRetireDate:"9/8/1",developmentCosts:6E4,genreWeightings:[0.9,0.9,0.9,1,0.7,0.9],audienceWeightings:[1,0.9,0.7],techLevel:3},{id:"Playsystem",name:"Playsystem",
company:"Vonny",startAmount:0.85,unitsSold:1.22,licencePrize:2E5,published:"7/7/1",platformRetireDate:"12/11/3",developmentCosts:6E4,genreWeightings:[1,0.8,1,0.9,0.7,0.6],audienceWeightings:[0.8,1,0.9],techLevel:3},{id:"TES 64",name:"TES 64",company:"Ninvento",startAmount:0.7,marketKeyPoints:[{date:"9/7/1",amount:0.85}],unitsSold:1.25,licencePrize:2E5,published:"9/2/1",platformRetireDate:"13/5/4",developmentCosts:6E4,genreWeightings:[0.9,0.8,0.7,0.8,0.7,0.9],audienceWeightings:[1,0.9,0.9],techLevel:3},
{id:"DreamVast",name:"DreamVast",company:"Vena",startAmount:1.1,marketKeyPoints:[{date:"11/4/2",amount:1.2}],unitsSold:0.9,licencePrize:25E4,published:"10/8/3",platformRetireDate:"14/1/4",developmentCosts:6E4,genreWeightings:[1,0.7,0.8,1,0.7,0.7],audienceWeightings:[0.7,1,1],techLevel:4},{id:"Playsystem 2",name:"Playsystem 2",company:"Vonny",startAmount:1.3,unitsSold:2.4,licencePrize:35E4,published:"11/5/2",platformRetireDate:"18/6/3",developmentCosts:7E4,genreWeightings:[1,0.8,1,0.9,0.7,0.9],audienceWeightings:[0.9,
1,0.8],techLevel:4},{id:"mBox",name:"mBox",company:"Mirconoft",startAmount:1.35,marketKeyPoints:[{date:"12/10/1",amount:1.6},{date:"14/4/1",amount:1.7}],unitsSold:2.1,licencePrize:35E4,published:"11/12/4",platformRetireDate:"17/2/3",developmentCosts:7E4,genreWeightings:[1,0.8,0.9,0.9,0.7,0.7],audienceWeightings:[0.8,1,0.9],techLevel:4},{id:"gameSphere",name:"Game Sphere",company:"Ninvento",startAmount:1,unitsSold:1.7,licencePrize:45E4,published:"12/12/1",platformRetireDate:"17/2/3",developmentCosts:9E4,
genreWeightings:[0.8,0.8,0.7,0.8,0.7,1],audienceWeightings:[0.9,0.9,0.8],techLevel:3},{id:"GS",name:"GS",company:"Ninvento",startAmount:1.5,unitsSold:3.8,licencePrize:35E4,published:"13/8/4",marketKeyPoints:[{date:"26/12/4",amount:3.8}],platformRetireDate:"260/12/4",developmentCosts:5E4,genreWeightings:[0.9,0.9,1,0.9,0.9,1],audienceWeightings:[1,0.9,0.8],techLevel:3},{id:"PPS",name:"PPS",company:"Vonny",startAmount:1.44,unitsSold:3.1,licencePrize:35E4,published:"14/3/4",marketKeyPoints:[{date:"26/12/4",
amount:3.1}],platformRetireDate:"260/12/4",developmentCosts:5E4,genreWeightings:[1,0.7,1,0.8,0.8,0.8],audienceWeightings:[0.8,0.9,1],techLevel:4},{id:"mBox 360",name:"mBox 360",company:"Mirconoft",startAmount:2.4,unitsSold:3.7,licencePrize:5E5,published:"16/8/4",platformRetireDate:"24/2/3",developmentCosts:8E4,genreWeightings:[1,0.9,1,0.9,0.7,0.9],audienceWeightings:[0.8,0.9,1],techLevel:5},{id:"Nuu",name:"Nuu",company:"Ninvento",startAmount:2,unitsSold:2.8,licencePrize:5E5,published:"17/4/4",platformRetireDate:"21/6/3",
developmentCosts:8E4,genreWeightings:[0.8,0.6,0.7,1,0.7,1],audienceWeightings:[1,1,0.7],techLevel:4},{id:"Playsystem 3",name:"Playsystem 3",company:"Vonny",startAmount:2.5,unitsSold:3.7,licencePrize:5E5,published:"17/12/4",platformRetireDate:"24/9/3",developmentCosts:8E4,genreWeightings:[1,0.9,0.9,1,0.7,0.8],audienceWeightings:[0.8,1,0.9],techLevel:5},{id:"grPhone",name:"grPhone",company:"Grapple",startAmount:2.3,unitsSold:3.7,licencePrize:5E5,published:"18/9/1",marketKeyPoints:[{date:"26/12/4",amount:3.7}],
platformRetireDate:"260/12/4",developmentCosts:8E4,genreWeightings:[0.8,0.8,0.7,0.9,0.7,1],audienceWeightings:[0.9,1,0.6],techLevel:4},{id:"grPad",name:"grPad",company:"Grapple",startAmount:2.3,unitsSold:3.8,licencePrize:5E5,published:"19/7/4",marketKeyPoints:[{date:"26/12/4",amount:3.8}],platformRetireDate:"260/12/4",developmentCosts:8E4,genreWeightings:[0.8,0.9,0.7,0.9,0.9,1],audienceWeightings:[0.9,1,0.6],techLevel:4},{id:"mPad",name:"mPad",company:"Mirconoft",startAmount:2.2,unitsSold:3.4,licencePrize:5E5,
published:"20/10/4",marketKeyPoints:[{date:"26/12/4",amount:3.4}],platformRetireDate:"260/12/4",developmentCosts:8E4,genreWeightings:[0.7,0.9,0.8,0.9,0.7,0.9],audienceWeightings:[0.7,0.9,0.8],techLevel:4},{id:"Wuu",name:"Wuu",company:"Ninvento",startAmount:3,unitsSold:5,licencePrize:1E6,published:"20/12/4",marketKeyPoints:[{date:"29/12/4",amount:5}],platformRetireDate:"260/12/4",developmentCosts:8E4,genreWeightings:[0.9,0.7,0.8,1,0.7,1],audienceWeightings:[0.9,1,0.7],techLevel:5},{id:"OYA",name:"OYA",
company:"KickIT",startAmount:2.5,unitsSold:4,licencePrize:1E4,published:"22/10/4",marketKeyPoints:[{date:"29/12/4",amount:4}],platformRetireDate:"260/12/4",developmentCosts:4E4,genreWeightings:[0.9,0.7,0.8,0.9,0.8,1],audienceWeightings:[0.8,1,0.9],techLevel:4},{id:"mBox One",name:"mBox One",company:"Mirconoft",startAmount:3.6,marketKeyPoints:[{date:"23/9/1",amount:4.1},{date:"28/12/4",amount:5.5}],unitsSold:5.5,licencePrize:1E6,published:"23/8/4",platformRetireDate:"29/12/4",developmentCosts:1E5,
genreWeightings:[1,0.8,0.9,0.9,0.7,0.9],audienceWeightings:[0.7,1,0.8],techLevel:6},{id:"Playsystem 4",name:"Playsystem 4",company:"Vonny",startAmount:3.7,unitsSold:6,licencePrize:1E6,published:"23/10/4",marketKeyPoints:[{date:"28/4/4",amount:6}],platformRetireDate:"29/4/4",developmentCosts:1E5,genreWeightings:[1,0.8,1,0.9,0.7,0.9],audienceWeightings:[0.8,1,0.9],techLevel:6},{id:"mBox Next",name:"mBox Next",company:"Mirconoft",startAmount:5.6,marketKeyPoints:[{date:"28/9/1",amount:5.8},{date:"29/12/4",
amount:6.6}],unitsSold:6.6,licencePrize:15E5,published:"27/8/4",platformRetireDate:"260/12/4",developmentCosts:2E5,genreWeightings:[0.9,0.9,0.9,0.8,0.7,1],audienceWeightings:[0.9,1,0.8],techLevel:7},{id:"Playsystem 5",name:"Playsystem 5",company:"Vonny",startAmount:5.2,unitsSold:6.4,licencePrize:15E5,published:"27/10/4",marketKeyPoints:[{date:"29/12/4",amount:6.4}],platformRetireDate:"260/12/4",developmentCosts:2E5,genreWeightings:[1,0.7,0.9,1,0.7,0.9],audienceWeightings:[0.8,1,0.9],techLevel:7}]);
Platforms.getPlatformImage=function(d,c){if(d.iconUri)return d.iconUri;var b=-1!=a.indexOf(d)?"./images/platforms":"./images/platforms/superb",g=null;if(c&&d.imageDates)for(var e=0;e<d.imageDates.length;e++)General.getWeekFromDateString(d.imageDates[e])<=c&&(0===e?g="{0}/{1}.png".format(b,d.id):("PC"===d.id&&(b="./images/platforms/superb"),g="{0}/{1}{2}.png".format(b,d.id,"-"+(e+1))));return null===g?"{0}/{1}.png".format(b,d.id):g};Platforms._getMarketShareDataForExelGraph=function(){for(var a="",
c=0;c<Platforms.allPlatforms.length;c++){for(var b=Platforms.allPlatforms[c],a=a+(b.id+","),g=0;2E3>g;g+=4)Platforms.getRetireDate(b)>g&&(a=Platforms.getPublishDate(b)<=g?a+(Math.floor(Platforms.getMarketSizeForWeek(b,g)/5)+","):a+",");a+="\n"}};Platforms._getSalesGraph=function(){for(var a=1;11>a;a++)for(var c=0;144>c;c+=1){var b=new Company("SalesLogCompany");b.currentWeek=c;var g=new Game(b);g.topic=Topics.topics[0];g.genre=GameGenre.Action;for(var e=0;e<Platforms.allPlatforms.length;e++)Platforms.getRetireDate(Platforms.allPlatforms[e])>
c&&(Platforms.getPublishDate(Platforms.allPlatforms[e])<=c&&0<Platforms.getMarketSizeForWeek(Platforms.allPlatforms[e],c,b))&&(g.platform=Platforms.allPlatforms[e]);g.score=a;Sales.calculateSales(b,g)}};Platforms.getRetireDate=function(a){return a.isCustom?GameManager.company.currentWeek+GameFlags.CONSOLE_SALES_LENGTH:"260/12/4"===a.platformRetireDate?GameManager.company.currentWeek+1E3:General.getWeekFromDateString(a.platformRetireDate)};Platforms.getPublishDate=function(a){return General.getWeekFromDateString(a.published)};
Platforms.getMarketSize=function(a,c){return Platforms.getMarketSizeForWeek(a,c.currentWeek,c)};Platforms.isStrongestPlatform=function(a,c,b){for(var g=Platforms.getPlatformsOnMarket(b),e=Platforms.getMarketSizeForWeek(g.first(function(a){return"PC"===a.id}),c,b,!0),g=g.filter(function(a){return a.isCustom}),h=0;h<g.length;h++)e=Math.max(e,Platforms.getMarketSizeForWeek(g[h],c,b,!0));return Platforms.getMarketSizeForWeek(a,c,b,!0)===e?!0:!1};Platforms.getMarketSizeForWeek=function(a,c,b,g){if(a.isCustom){if(a.currentSalesCash){var e=
1;b.flags.grid&&!g&&Platforms.isStrongestPlatform(a,c,b)&&(e=1.05);return Math.max(5*Math.floor(a.currentSalesCash/Sales.consoleUnitPrice*e),5E6*a.startAmount)}return 5E6*a.startAmount}var h=c-Platforms.getPublishDate(a);if(0>h)return 0;var f=a.startAmount,j=a.unitsSold,l=Platforms.getRetireDate(a)-Platforms.getPublishDate(a);if(a.marketKeyPoints){for(var e=Platforms.getPublishDate(a),l=Platforms.getRetireDate(a),m=0;m<a.marketKeyPoints.length;m++){var k=General.getWeekFromDateString(a.marketKeyPoints[m].date);
c>=k&&(h=c-k,f=a.marketKeyPoints[m].amount,e=k)}for(m=a.marketKeyPoints.length-1;0<=m;m--)k=General.getWeekFromDateString(a.marketKeyPoints[m].date),c<=k&&(l=k,j=a.marketKeyPoints[m].amount);l-=e}e=1;b.flags.grid&&!g&&"PC"===a.id&&Platforms.isStrongestPlatform(a,c,b)&&(e=1.05);if(0===l)return 5E6*f;h>l&&(h=l);return 5E6*((j-f)*(h/l)+f)*e};Platforms.getTotalMarketSizePercent=function(a,c){for(var b=0,g=Platforms.getPlatformsOnMarket(GameManager.company),e=0;e<g.length;e++)b+=Platforms.getMarketSize(g[e],
c);return 100/b*Platforms.getMarketSize(a,c)};Platforms.getGenreWeighting=function(a,c,b){for(var g=1,e=1,h=0,f=0;f<a.length;f++){var j=Platforms.getNormGenreWeighting(a[f].genreWeightings,c,b);f<a.length-1?(g*=GameFlags.MULTIPLATFORM_WEIGHTING,h+=j*g,e-=g):h+=j*e}return h};Platforms.getAudienceWeighting=function(a,c,b){if(void 0===c)return 1;for(var g=1,e=1,h=0,f=0;f<a.length;f++){var j=Platforms.getPlatformsAudienceWeighting(a[f].audienceWeightings,c,b);f<a.length-1?(g*=GameFlags.MULTIPLATFORM_WEIGHTING,
h+=j*g,e-=g):h+=j*e}return h};Platforms.getPlatformsAudienceWeighting=function(a,c,b){if(void 0===c||void 0===a)return b?0.8:1;if("young"===c)return b?a[0]:Platforms.getNormalizedAudienceWeighting(a[0]);if("everyone"===c)return b?a[1]:Platforms.getNormalizedAudienceWeighting(a[1]);if("mature"===c)return b?a[2]:Platforms.getNormalizedAudienceWeighting(a[2]);throw"unknown audience: "+genre;};Platforms.doesPlatformSupportGameSize=function(a,c){return"small"!=c&&"medium"!=c?"Gameling"!=a.id&&"Vena Gear"!=
a.id&&"grPhone"!=a.id&&"PPS"!=a.id&&"GS"!=a.id:!0};Platforms.getPlatformsOnMarket=function(a){return Platforms.getPlatforms(a).filter(function(a){return Platforms.getRetireDate(a)>Math.floor(GameManager.company.currentWeek)&&!a.isCustom||!0===a.isCustom&&GameManager.company.currentWeek>General.getWeekFromDateString(a.published)&&!a.soldOut})};Platforms.getPlatforms=function(a,c){return c?Platforms.allPlatforms.concat(a.licencedPlatforms):a.availablePlatforms.concat(a.licencedPlatforms)}})();"use strict";
var Topics={};
Topics.topics=[{id:"Sports",name:"Sports".localize("game topic"),genreWeightings:[1,0.6,0.6,1,0.7,1],audienceWeightings:[1,1,0.8],missionOverrides:[[0.9,1,0,0.7,0.8,1,0.6,0,0],[0,0.9,0,0,0.9,0,0,0,0],[0,1,0.9,0,0,0,0.7,1,0.9],[0,0,0,0.8,0,0,0.7,0,0],[0.8,1,0.9,0,0,0,0.8,1,0.9],[0,0,0,0,0,0,0,0,0]]},{id:"Military",name:"Military".localize("game topic"),genreWeightings:[1,0.6,0.8,1,1,0.6],audienceWeightings:[0.7,0.9,1]},{id:"Medieval",name:"Medieval".localize("game topic"),genreWeightings:[1,1,1,0.8,
1,0.7],audienceWeightings:[1,1,0.9]},{id:"Space",name:"Space".localize("game topic"),genreWeightings:[1,0.8,0.6,1,1,0.7],audienceWeightings:[0.8,1,1]},{id:"Racing",name:"Racing".localize("game topic"),genreWeightings:[0.9,0.6,0.8,1,0.7,1],audienceWeightings:[1,1,0.9],missionOverrides:[[0,0,0,0,0,0,0.7,0.9,1],[0,0.9,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0.7,0.9,1],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]]},{id:"Fantasy",name:"Fantasy".localize("game topic"),genreWeightings:[1,1,1,0.8,1,0.6],
audienceWeightings:[1,1,1]},{id:"Pirate",name:"Pirate".localize("game topic"),genreWeightings:[0.8,1,0.9,0.9,0.7,0.8],audienceWeightings:[1,1,0.8]},{id:"Sci-Fi",name:"Sci-Fi".localize("game topic"),genreWeightings:[1,1,1,1,1,0.8],audienceWeightings:[0.8,1,1]},{id:"Airplane",name:"Airplane".localize("game topic"),genreWeightings:[1,0.6,0.8,1,1,1],audienceWeightings:[1,1,0.9]},{id:"Dungeon",name:"Dungeon".localize("game topic"),genreWeightings:[1,0.8,1,1,1,0.6],audienceWeightings:[0.8,1,1]},{id:"Mystery",
name:"Mystery".localize("game topic"),genreWeightings:[0.6,1,1,0.8,0.6,0.8],audienceWeightings:[0.8,0.9,1],missionOverrides:[[0.9,0.8,1,0.9,1,0.8,1,0.8,0.9],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0.8,1,0.9,0.8,1,0.9,1,0.8,0.9],[0.8,1,0.9,0.8,1,0.9,1,0.8,0.9],[0,0,0,0,0,0,0,0,0]]},{id:"Martial Arts",name:"Martial Arts".localize("game topic"),genreWeightings:[1,0.8,1,1,0.7,1],audienceWeightings:[0.7,0.9,1]},{id:"History",name:"History".localize("game topic"),genreWeightings:[0.8,0.8,0.8,1,1,0.9],
audienceWeightings:[0.8,1,0.9]},{id:"Horror",name:"Horror".localize("game topic"),genreWeightings:[1,1,0.8,0.6,0.7,0.8],audienceWeightings:[0.6,0.9,1]},{id:"Business",name:"Business".localize("game topic"),genreWeightings:[0.6,0.8,0.8,1,1,0.6],audienceWeightings:[0.9,1,0.7]},{id:"Transport",name:"Transport".localize("game topic"),genreWeightings:[0.6,0.6,0.6,1,1,0.6],audienceWeightings:[0.9,1,0.7]},{id:"Comedy",name:"Comedy".localize("game topic"),genreWeightings:[0.6,1,0.8,0.6,0.6,1],audienceWeightings:[0.8,
0.9,1]},{id:"Ninja",name:"Ninja".localize("game topic"),genreWeightings:[1,0.8,0.8,0.6,0.8,0.9],audienceWeightings:[1,0.9,0.9]},{id:"Romance",name:"Romance".localize("game topic"),genreWeightings:[0.6,1,0.8,0.9,0.6,0.9],audienceWeightings:[0.8,1,1]},{id:"Movies",name:"Movies".localize("game topic"),genreWeightings:[0.8,0.8,0.6,1,0.6,1],audienceWeightings:[0.9,1,0.9]},{id:"Spy",name:"Spy".localize("game topic"),genreWeightings:[1,1,1,0.8,0.7,0.8],audienceWeightings:[0.8,0.9,1]},{id:"Detective",name:"Detective".localize("game topic"),
genreWeightings:[0.6,1,1,0.8,0.6,0.9],audienceWeightings:[0.9,1,0.8],missionOverrides:[[0.9,0.8,1,0.9,1,0.8,1,0.8,0.9],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0.8,1,0.9,0.8,1,0.9,1,0.8,0.9],[0.8,1,0.9,0.8,1,0.9,1,0.8,0.9],[0,0,0,0,0,0,0,0,0]]},{id:"Cyberpunk",name:"Cyberpunk".localize("game topic"),genreWeightings:[1,0.8,1,0.8,0.7,0.6],audienceWeightings:[0.7,0.9,1],missionOverrides:[[1,0.8,0.9,0.8,1,0.9,1,0.9,0.8],[0,0,0,0,0,0,1,0.9,0.8],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,1,0,0],[0,0,0,0,0,0,1,0,
0],[0,0,0,0,0,0,1,0,0]]},{id:"UFO",name:"UFO".localize("game topic"),genreWeightings:[1,0.8,0.6,0.8,1,0.8],audienceWeightings:[0.8,1,0.9]},{id:"Hospital",name:"Hospital".localize("game topic"),genreWeightings:[0.6,0.6,0.8,1,0.8,0.7],audienceWeightings:[0.7,1,0.8]},{id:"Evolution",name:"Evolution".localize("game topic"),genreWeightings:[0.7,0.6,0.6,1,1,0.6],audienceWeightings:[0.8,1,0.7]},{id:"Time Travel",name:"Time Travel".localize("game topic"),genreWeightings:[0.9,1,1,0.7,0.6,0.7],audienceWeightings:[0.9,
1,0.8]},{id:"Life",name:"Life".localize("game topic"),genreWeightings:[0.6,1,0.9,1,0.6,0.8],audienceWeightings:[1,1,0.8]},{id:"Virtual Pet",name:"Virtual Pet".localize("game topic"),genreWeightings:[0.6,0.8,0.9,1,0.9,1],audienceWeightings:[1,0.8,0.7]},{id:"Vocabulary",name:"Vocabulary".localize("game topic"),genreWeightings:[0.6,0.6,0.6,1,1,1],audienceWeightings:[0.9,1,0.6]},{id:"Hunting",name:"Hunting".localize("game topic"),genreWeightings:[1,0.9,0.9,1,0.7,0.9],audienceWeightings:[0.9,1,0.9]},{id:"Law",
name:"Law".localize("game topic"),genreWeightings:[0.6,1,0.9,0.9,0.9,0.6],audienceWeightings:[0.8,1,0.7],missionOverrides:[[0,0,0,1,0.8,0.9,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0.8,0.9,1,1,0.8,0.9,1,0.9,0.8],[0,0,0,0,0,0,0,0,0],[0,0,0,1,0.9,0,0,0,0]]},{id:"Game Dev",name:"Game Dev".localize("game topic"),genreWeightings:[0.6,0.7,0.6,1,0.6,0.8],audienceWeightings:[0.9,1,0.7]},{id:"City",name:"City".localize("game topic"),genreWeightings:[0.7,0.6,0.7,1,1,0.7],audienceWeightings:[0.9,1,0.8]},
{id:"School",name:"School".localize("game topic"),genreWeightings:[0.8,1,1,1,1,0.8],audienceWeightings:[1,0.9,0.7]},{id:"Fashion",name:"Fashion".localize("game topic"),genreWeightings:[0.6,0.8,1,1,0.6,1],audienceWeightings:[1,0.8,0.6]},{id:"Zombies",name:"Zombies".localize("game topic"),genreWeightings:[1,0.9,0.6,0.6,0.9,1],audienceWeightings:[0.9,0.8,1]},{id:"Hacking",name:"Hacking".localize("game topic"),genreWeightings:[0.7,0.8,0.7,1,1,0.6],audienceWeightings:[0.7,0.9,1]},{id:"Government",name:"Government".localize("game topic"),
genreWeightings:[0.6,0.6,0.6,1,1,0.7],audienceWeightings:[0.6,1,0.8]},{id:"Prison",name:"Prison".localize("game topic"),genreWeightings:[1,1,0.8,1,0.8,0.6],audienceWeightings:[0.7,0.9,1]},{id:"Surgery",name:"Surgery".localize("game topic"),genreWeightings:[0.8,0.7,0.6,1,0.7,0.6],audienceWeightings:[0.8,1,0.9]},{id:"Music",name:"Music".localize("game topic"),genreWeightings:[1,0.9,0.6,1,0.6,1],audienceWeightings:[1,0.9,0.8],missionOverrides:[[0,0,0,0,0,0,0.8,0.9,1],[0,0,0,0,0,0,0.9,0.8,1],[0,0,0,0,
0,0,0.9,0.8,1],[0,0,0,0,0,0,0.8,0.9,1],[0,0,0,0,0,0,0.9,0.8,1],[0,0,0,0,0,0,0.7,0.9,1]]},{id:"Rythm",name:"Rhythm".localize("game topic"),genreWeightings:[1,0.7,0.7,1,0.6,1],audienceWeightings:[1,0.9,0.8],missionOverrides:[[0,0,0,0,0,0,0.8,0.9,1],[0,0,0,0,0,0,0.9,0.8,1],[0,0,0,0,0,0,0.9,0.8,1],[0,0,0,0,0,0,0.8,0.9,1],[0,0,0,0,0,0,0.9,0.8,1],[0,0,0,0,0,0,0.7,0.9,1]]},{id:"Superheroes",name:"Superheroes".localize("game topic"),genreWeightings:[1,0.6,0.9,0.6,0.6,0.7],audienceWeightings:[1,1,1]},{id:"Post Apocalyptic",
name:"Post Apocalyptic".localize("game topic"),genreWeightings:[1,0.8,1,0.6,0.9,0.6],audienceWeightings:[0.6,0.9,1]},{id:"Alternate History",name:"Alternate History".localize("game topic"),genreWeightings:[1,0.8,1,0.8,0.9,0.6],audienceWeightings:[0.6,1,1]},{id:"Vampire",name:"Vampire".localize("game topic"),genreWeightings:[1,0.8,1,0.6,0.6,0.7],audienceWeightings:[0.7,1,1]},{id:"Werewolf",name:"Werewolf".localize("game topic"),genreWeightings:[1,0.8,1,0.6,0.6,0.7],audienceWeightings:[0.7,0.9,1]},
{id:"Aliens",name:"Aliens".localize("game topic"),genreWeightings:[1,0.8,1,0.6,0.9,0.7],audienceWeightings:[0.9,1,1]},{id:"Wild West",name:"Wild West".localize("game topic"),genreWeightings:[0.9,0.7,1,0.6,0.6,0.7],audienceWeightings:[1,0.9,1]},{id:"Dance",name:"Dance".localize("game topic"),genreWeightings:[0.7,0.6,0.6,1,0.6,1],audienceWeightings:[1,0.9,0.8]}];
if(GameFlags.ghg6&&Topics.topics.some(function(a){return 6!=a.genreWeightings.length||a.genreWeightings.some(function(a){return 0.6>a||1<a})}))throw"invalid topic data";"use strict";var Reviews={};
(function(){var a=function(a){if(a.lastTopScore){var b=6>=a.getCurrentDate().year?1.15:23<a.getCurrentDate().year?1.1:1.2,c=a.previousTopScore?a.previousTopScore:20,b=Math.floor(a.lastTopScore+a.lastTopScoreIncrease*b),e=6+9*General.getGameSizeDurationFactor(a.lastTopScoreGameSize);return!a.lastTopScoreWeek||a.currentWeek>=a.lastTopScoreWeek+e?b:Math.floor(c+(b-c)*(a.currentWeek-a.lastTopScoreWeek)/e)}return 20},d=function(b,c){if(!b.lastTopScore||b.lastTopScore<c){var e=a(b);b.lastTopScore?(b.lastTopScoreIncrease=
Math.max(c-b.lastTopScore,0.1*e),2<=b.currentLevel&&b.lastTopScoreIncrease>0.2*b.lastTopScore&&(b.lastTopScoreIncrease=0.2*b.lastTopScore)):b.lastTopScoreIncrease=Math.max(c-e,0.1*e);var d=20<b.lastTopScore?b.lastTopScore:20;b.previousTopScore=d>e?e:d;b.previousTopScore+=Math.abs((c-b.previousTopScore)/3);b.previousTopScore>c&&(b.previousTopScore=c);b.lastTopScore=c;b.lastTopScoreWeek=b.currentWeek;b.lastTopScoreGameSize=b.currentGame.gameSize}},c=function(a,b){a.topScoreAchievements++;a.currentGame.flags.topScore=
!0;d(a,b)};Reviews.reviewGame=function(a){var b=a.currentGame,c=g(a),e=b.releaseWeek-a.currentWeek;a.currentGame.reviews=c;c="The first reviews for our newly released game, {0}, came in!".localize().format(a.currentGame.title);a.notifications.push(new Notification("Game review".localize("heading"),c,"OK".localize(),e+0.3));a.notifications.push(new Notification("{Reviews}",null,null,e+0.3));0===a.gameLog.length&&a.notifications.push(new Notification("News".localize("heading"),Media.createFirstGameStory(a),
"OK".localize(),e+0.7));if(b.flags.sameGenreTopic&&(b=Media.createSameGenreTopicStory(a,b)))b.weeksUntilFired=e+1,a.notifications.push(b)};var b=function(a,b){var c=Missions.getAllMissions().filter(function(a){return"dev"===a.missionType&&0.9<=Missions.getGenreWeighting(a,b)}).count(function(c){if(b.flags.featureResponsibility.hasOwnProperty(c.id)){var e=b.flags.featureResponsibility[c.id],d=a.staff.first(function(a){return a.id===e});if(d&&d.flags.expert===c.id)return!0}return!1});2<=c&&(b.flags.psEnabled=
!0);if("small"===b.gameSize&&2<=a.currentLevel||"medium"===b.gameSize&&1E5>=a.fans)return 9;var e=b.flags.techLevel;return"large"===b.gameSize?(e=(3-e).clamp(0,3),10-e):"aaa"===b.gameSize?(e=(5-e).clamp(0,3),c=(3-c).clamp(0,3),10-(e+0.6*c)):10},g=function(f){var j=[],h=[],g=1,k=f.currentGame;GDT.fire(GameManager,GDT.eventKeys.gameplay.beforeGameReview,{company:f,game:k});k.flags.mmo&&(g=2);var n=null;k.sequelTo&&(n=f.getGameById(k.sequelTo),n.releaseWeek>f.currentWeek-40&&(k.flags.sequelsTooClose=
!0));var p=k.technologyPoints,q=k.designPoints,o=0,s=0,x=0;if(30<=q+p){var r=GameGenre.getGoldenRatio(k.genre,k.secondGenre),r=q*r-p,t=0,t=p>q?Math.abs(100*(r/p)):Math.abs(100*(r/q));"goldenRatio percentDifference: {0}".format(t).log();25>=Math.abs(t)?(o+=0.1,s+=1,h.push("They achieved a great balance between technology and design.".localize())):50<Math.abs(t)&&(o-=0.1,0>r?j.push("They should focus more on design.".localize()):j.push("They should focus more on technology.".localize()))}r=k.featureLog.filter(function(a){return a.missionType===
"mission"});t=r.filter(function(a){var b=a.duration/General.getGameSizeDurationFactor(k.gameSize)/General.getMultiPlatformDurationFactor(k)/(Missions.BASE_DURATION*3);return Missions.getGenreWeighting(a,k)>=0.9&&b>=0.4});2<=t.length?(o+=0.2,s+=t.length,h.push("Their focus on {0} served this game very well.".localize().format(t.map(function(a){return Missions.getMissionWithId(a.id)}).pickRandom().name))):1===t.length?(o+=0.1,s+=1):o-=0.15*g;var w=r.filter(function(a){var b=a.duration/General.getGameSizeDurationFactor(k.gameSize)/
General.getMultiPlatformDurationFactor(k)/(Missions.BASE_DURATION*3);return Missions.getGenreWeighting(a,k)<0.8&&b>=0.4});2===w.length?(t=Missions.getMissionWithId(w.pickRandom().id),o-=0.2*g,x+=w.length,j.push("Their focus on {0} is a bit odd.".localize().format(t.name))):1===w.length&&(o-=0.1*g,x+=1);w=r.filter(function(a){var b=a.duration/General.getGameSizeDurationFactor(k.gameSize)/General.getMultiPlatformDurationFactor(k)/(Missions.BASE_DURATION*3);return Missions.getGenreWeighting(a,k)>=0.9&&
b<=0.2});for(r=0;r<w.length;r++)t=Missions.getMissionWithId(w[r].id),o-=0.15*g,x+=1,j.push("They shouldn't forget about {0}.".localize().format(t.name));g=(q+p)/2/General.getGameSizePointsFactor(k);q=GameGenre.getGenreWeighting(k.topic.genreWeightings,k.genre,k.secondGenre);0.6>=q?j.push("{0} and {1} is a terrible combination.".localize().format(k.topic.name,k.getGenreDisplayName())):1===q&&h.push("{0} and {1} is a great combination.".localize().format(k.topic.name,k.getGenreDisplayName()));t=k.genre.name;
k.secondGenre&&(t+="-"+k.secondGenre.name);if((p=f.gameLog.last())&&!k.flags.isExtensionPack&&p.genre===k.genre&&p.secondGenre===k.secondGenre&&p.topic===k.topic)x+=1,p="Another {0}/{1} game?".localize().format(t,k.topic.name),j.push(p),k.flags.sameGenreTopic=!0,"repeat genre/topic penalty: {0}:".format(-0.4).log(),o+=-0.4;p=Platforms.getGenreWeighting(k.platforms,k.genre,k.secondGenre);if(0.6>=p){for(var v=Platforms.getNormGenreWeighting(k.platforms[0].genreWeightings,k.genre,k.secondGenre),y=0,
r=1;r<k.platforms.length;r++)w=Platforms.getNormGenreWeighting(k.platforms[r].genreWeightings,k.genre,k.secondGenre),w<v&&(y=r);j.push("{0} games don't work well on {1}.".localize().format(t,k.platforms[y].name))}else if(1<p){v=Platforms.getNormGenreWeighting(k.platforms[0].genreWeightings,k.genre,k.secondGenre);y=0;for(r=1;r<k.platforms.length;r++)w=Platforms.getNormGenreWeighting(k.platforms[r].genreWeightings,k.genre,k.secondGenre),w>v&&(y=r);h.push("{0} games work well on {1}.".localize().format(t,
k.platforms[y].name))}t=General.getAudienceWeighting(k.topic.audienceWeightings,k.targetAudience);0.6>=t&&j.push("{0} is a horrible topic for {1} audiences.".localize().format(k.topic.name,General.getAudienceLabel(k.targetAudience)));k.flags.sequelsTooClose&&(o-=0.4,x+=1,k.flags.isExtensionPack?j.push("Already a expansion pack?".localize()):j.push("Didn't we just play {0} recently?".localize().format(n.title)));k.flags.usesSameEngineAsSequel&&!k.flags.isExtensionPack?(o-=0.1,x+=1):k.flags.hasBetterEngineThanSequel&&
(o+=0.2,s+=1);k.flags.mmo&&1>GameGenre.getGenreWeighting(k.topic.genreWeightings,k.genre,k.secondGenre)&&(o-=0.15);w=1;0<k.bugs&&(w=1-0.8*((k.bugs*(100/(k.technologyPoints+k.designPoints))).clamp(0,100)/100),0.6>=w?j.push("Riddled with bugs.".localize()):0.9>w&&j.push("Too many bugs.".localize()));r=1;if(1<k.platforms.length){y=k.platforms[0].techLevel;"PC"==k.platforms[0].id&&(y=k.platforms[1].techLevel);for(var z=y,u=1;u<k.platforms.length;u++)"PC"!=k.platforms[u].id&&(y=Math.max(y,k.platforms[u].techLevel),
z=Math.min(z,k.platforms[u].techLevel));r-=(y-z)/20}g=(g+g*o)*p*t*w*r;r=GameTrends.getCurrentTrendFactor(k);k.flags.trendModifier=r;g*=r;y=a(f);v=g/y;if(0.6<=v&&(0.7>=t||0.7>=q))v=0.6+(v-0.6)/2;if(0.7<v)for(r=0;r<k.platforms.length;r++)if(0.8>=Platforms.getPlatformsAudienceWeighting(k.platforms[r].audienceWeightings,k.targetAudience)){g*=Platforms.getPlatformsAudienceWeighting(k.platforms[r].audienceWeightings,k.targetAudience,!0);v=g/y;break}"achieved {0} / top game {1} = {2}".format(g,Reviews.topScore,
v).log();q=!1;v=(10*v).clamp(1,10);k.flags.teamContribution=0;f.staff.forEach(function(a){k.flags.teamContribution=a.flags.gamesContributed<1?k.flags.teamContribution+1:k.flags.teamContribution+k.getRatioWorked(a)});k.flags.teamContribution/=f.staff.length;if(0<f.lastTopScore&&v<=5.2-0.2*k.platforms.length&&0<s&&s>x&&0.8<=k.flags.teamContribution){var r=6,y=0,A;for(A in k.flags.staffContribution)k.flags.staffContribution.hasOwnProperty(A)&&y++;A=General.getOptimalTeamSize(k);A=Math.abs(A-y);1<A&&
(r-=A-1);(A=Reviews.getNewStaff(k))&&0<A.length&&(r-=A.length/2);r+=s/2-x/2;0.9>w?r-=0.5:0.6>=w&&(r-=1);0.8>=p&&(r-=1-p);0.8>=t&&(r-=1-t);if(1<k.platforms.length){y=k.platforms[0].techLevel;"PC"==k.platforms[0].id&&(y=k.platforms[1].techLevel);z=y;for(u=1;u<k.platforms.length;u++)"PC"!=k.platforms[u].id&&(y=Math.max(y,k.platforms[u].techLevel),z=Math.min(z,k.platforms[u].techLevel));r-=(y-z)/0.5}r-=f.getRandom();r=Math.min(r,7.7);v<r&&(k.flags.scoreWithoutBrackets=v,v=r);if(3<f.gameLog.length){s=
!0;for(r=1;3>=r;r++)if(x=f.gameLog[f.gameLog.length-r],x.score>5.2-0.2*x.platforms.length&&!x.flags.scoreWithoutBrackets){s=!1;break}s&&(f.lastTopScore=g,k.flags.topScoreDecreased=!0)}}s=b(f,k)/10;"medium"!=k.gameSize&&("small"!=k.gameSize&&1>s)&&j.push("Technology is not state of the art.".localize());v*=s;if(9<=v&&(0.1>o&&0.8>f.getRandom()?q=!0:(A=Reviews.getNewStaff(k),0<A.length&&(q=!0,k.flags.newStaffIds=A.map(function(a){return a.id}))),q))v=k.flags.newStaffIds&&0<k.flags.newStaffIds.length?
8.15+0.95/k.flags.newStaffIds.length*f.getRandom():8.45+0.65*f.getRandom(),0.1>f.getRandom()&&(v=9+0.25*f.getRandom()),d(f,g);n&&(4>=v?k.flags.isExtensionPack?j.push("What a horrible expansion pack!".localize()):j.push("What a horrible sequel!".localize()):7>=v?k.flags.isExtensionPack?j.push("Average expansion pack.".localize()):j.push("Average sequel.".localize()):k.flags.isExtensionPack?j.push("Great expansion pack.".localize()):h.push("Great sequel!".localize()));2>f.topScoreAchievements&&4>f.getCurrentDate().year&&
(10==v?(v-=1.05+0.45*f.getRandom(),c(f,g)):9<=v?(v-=1.05+0.2*f.getRandom(),c(f,g)):8.5<v&&(v-=0.4+0.2*f.getRandom()));9<=v&&c(f,g);10!=v&&(k.flags.topScore&&3===f.topScoreAchievements)&&(v=10);k.score=v;"final score: {0}".format(v).log();if(n&&(0.5>=f.getRandom()||!f.gameLog.some(function(a){return a.sequelTo!=null})))k.flags.isExtensionPack?Media.createExtensionPackStory(f,k):Media.createSequelStory(f,k);j=e(k,v,h,j);GDT.fire(GameManager,GDT.eventKeys.gameplay.afterGameReview,{company:f,game:k,reviews:j});
return j};Reviews.getNewStaff=function(a){for(var b=GameManager.company,c=[],e=1;e<b.staff.length;e++){var d=b.staff[e];if(a.flags.staffContribution&&a.flags.staffContribution.hasOwnProperty(d.id)){var h=d.flags.gamesContributed;0.2<=h&&2>=h&&c.push(d)}}return c};var e=function(a,b,c,e){var d=Math.floor(b).clamp(1,10);9.5<=b&&(d=10);for(var g=["Star Games","Informed Gamer","Game Hero","All Games"],p=[],q=[],o=[],s=1,x=0;4>x;x++){if(5===d||6===d)s=0.05>GameManager.company.getRandom()?2:1;var r=1==
Math.randomSign()?0:s*Math.randomSign(),t=(d+r).clamp(1,10);10===t&&(3===o.length&&10===o.average())&&(a.flags.psEnabled?10==Math.floor(b)&&0.4>GameManager.company.getRandom()&&t++:(10>Math.floor(b)||0.8>GameManager.company.getRandom())&&t--);var w=void 0;do 0.2>=GameManager.company.getRandom()?0<=r&&2<t&&0!=c.length?w=c.pickRandom():0>r&&(6>t&&0!=e)&&(w=e.pickRandom()):w=void 0,w||(w=h(a,t));while(-1!=q.weakIndexOf(w));q.push(w);o.push(t);p.push({score:t,message:w,reviewerName:g[x]})}return p},h=
function(a,b){b=Math.floor(b);if(3<b&&(7>b&&!a.flags.hasCustomName)&&0.1>=GameManager.company.getRandom())return["As {0} as the name.".localize("{0} adjective").format(["boring".localize(),"generic".localize("used as adjective"),"blunt".localize(),"uninspired".localize(),"dull".localize()].pickRandom()),"The name says it all.".localize(),"They put as much thought into the game as into the game's name.".localize(),"Our review inspired by the game's name: bad review #{0}.".localize().format([1,2,3,
4,5,6].pickRandom())].pickRandom();if(7<=b&&!a.flags.hasCustomName&&0.1>=GameManager.company.getRandom())return["Good, despite the name.".localize(),"It's better than the name.".localize()].pickRandom();if(1===b)return["N/A not worth a statement.".localize(),"One of the worst!".localize(),"Makes you cry.".localize(),"Don't buy!".localize(),"Horrible.".localize(),"I still have nightmares!".localize(),"A disaster!".localize(),"Really bad.".localize()].pickRandom();if(2===b)return["Utterly uninspiring.".localize(),
"Not fun.".localize(),"Boring.".localize(),"Disappointing.".localize(),"Bin material.".localize(),"Bad.".localize(),"Abysmal.".localize()].pickRandom();if(3===b)return["Disappointing.".localize(),"Waste of money.".localize(),"Waste of time.".localize(),"Not much fun.".localize(),"Pretty bad.".localize()].pickRandom();if(4===b)return["Not bad. Not good.".localize(),"Meh!".localize(),"OK.".localize(),"Uninspiring.".localize()].pickRandom();if(5===b)return["Falls a bit short.".localize(),"Fun at stages.".localize(),
"Has its moments.".localize(),"Have seen better.".localize()].pickRandom();if(6===b)return["Shows potential.".localize(),"Could have been better.".localize(),"Quirky but good.".localize(),"I like it.".localize()].pickRandom();if(7===b)return["Good game.".localize(),"Enjoyable.".localize(),"Nice experience.".localize(),"Beautiful.".localize()].pickRandom();if(8===b)return["Very good.".localize(),"Very enjoyable.".localize(),"Love it!".localize(),"Played it for days.".localize()].pickRandom();if(9===
b)return["Great!".localize(),"Almost perfect.".localize(),"One of the best.".localize(),"More please.".localize(),"Great game.".localize(),"Outstanding game.".localize(),"Can't wait for the sequel.".localize()].pickRandom();if(10===b)return["A masterpiece.".localize(),"Best of its kind.".localize(),"Truly great.".localize(),"Everyone loves it!".localize(),"Must have!".localize(),"Outstanding achievement.".localize(),"Awesome!".localize(),"My new favorite!".localize()].pickRandom();if(11===b)return["11 out of 10. Game of the year, any year!".localize(),
"11 out of 10. Nuff said.".localize(),"11 out of 10. A exceptional score for an exceptional game.".localize(),"11 out of 10. Rules don't apply to this outstanding game.".localize()].pickRandom();throw"score cannot be "+b;}})();"use strict";var Sales={};
(function(){Sales.smallUnitPrice=7;Sales.mediumUnitPrice=11;Sales.largeUnitPrice=14;Sales.aaaUnitPrice=18;Sales.consoleUnitPrice=50;var a=function(a,b){var d=0;switch(b.gameSize){case "medium":d=1;break;case "large":d=1.2;break;case "aaa":d=1.5;break;default:return 1}return 1+d};Sales.MediumTargetFans=1E5;Sales.LargeTargetFans=25E4;Sales.AAATargetFans=1E6;Sales.getTargetFans=function(a,b){switch(b.gameSize){case "medium":return Sales.MediumTargetFans;case "large":return Sales.LargeTargetFans;case "aaa":return Sales.AAATargetFans;
default:return 1}};Sales.calculateSales=function(c,b){b.flags.fansAtLaunch=c.fans;var d=c.getCurrentDate().year,e=b.score.clamp(1,10);GameFlags.G782&&12<=d&&0.75>=c.getRandom()&&(e=1,c.notifications.push(new Notification("Sales Report","Boss, it seems that while many players play our new game, they steal it by downloading a cracked version rather than buying it legally.\nIf players don't buy the games they like, we will sooner or later go bankrupt.",":-(",3.3+2.8*c.getRandom())),b.flags.noSalesEvents=
!0);for(var h=e/10,f=Math.min(15E5,c.fans)+Math.max(0,c.fans-15E5)/10,j=[0,0,0],l=8,m=0;m<b.platforms.length;m++)"PC"!=b.platforms[m].id&&(l=Math.min(l,b.platforms[m].techLevel));for(m=0;m<b.platforms.length;m++){var k=b.platforms[m].techLevel;"PC"==b.platforms[m].id&&(k=l);var n=1;0==m&&1<b.platforms.length?n=0.7:1==m?n=2==b.platforms.length?0.55:0.4:2==m&&(n=0.3);j[m]+=Platforms.getMarketSize(b.platforms[m],c)*n*(1/k*l)*a(c,b)}l=[0,0,0];k=0;m=1;9>=e?(k=0.2*(Math.pow(e,3)/100),4===c.currentLevel&&
(m=1.25)):(k=Math.pow(e,3)/(100-35*(e-9)),m=6>d?0.65:4===c.currentLevel?0.35:0.5);k=0.2*(k*m/15)+0.008;k=[k,k,k];for(m=0;m<b.platforms.length;m++)k[m]*=Platforms.getAudienceWeighting([b.platforms[m]],b.targetAudience),l[m]+=Math.floor(j[m]*k[m]);if(b.hypePoints)if(d=Math.min(500,b.hypePoints)/500,m=5<=e,b.flags.interviewHyped&&b.flags.interviewHyped.decision&&(m=8<=e),m)for(m=0;m<b.platforms.length;m++)l[m]+=Math.floor(0.05*j[m]*d*((e-5)/5));else for(m=0;m<b.platforms.length;m++)l[m]-=Math.floor(0.25*
(j[m]*k[m])*d*(e/5));for(m=0;m<b.platforms.length;m++)l[m]=Math.floor(Math.min(l[m],j[m]));if(b.flags.royaltyRate){l[0]+=Math.max(0,Sales.getTargetFans(c,b)-f)*h;for(m=0;m<b.platforms.length;m++)l[m]*=10}else l[0]+=f*h;LOGWEEKSALES||"market size {0}. total reach {1}. existing fans {2}".format(j.sum(function(a){return a}),l.sum(function(a){return a}),f).log();j=Math.floor(0.8*l.sum(function(a){return a})*h+0.2*l.sum(function(a){return a})*c.getRandom());d=0;7<=e&&!b.flags.sequelsTooClose&&(d+=0.05*
f+0.05*f*c.getRandom());d=5<=e&&!b.flags.sequelsTooClose?b.flags.royaltyRate&&0>=Sales.getTargetFans(c,b)-f?d+Math.floor((0.005*j*h+0.005*j*c.getRandom())/10):d+Math.floor(0.005*j*h+0.005*j*c.getRandom()):0.25*(-c.fans*(1-h))*c.getRandom();b.unitPrice=Sales.getUnitPrice(b);b.flags.mmo&&"aaa"===b.gameSize&&(j*=1.45);e=j*b.unitPrice;LOGWEEKSALES||"units sold: {0}, sales: {1}$, fanMod{2}".format(j,e,d).log();b.totalSalesCash||(b.totalSalesCash=0);b.totalSalesCash+=e;b.fansChangeTarget=d;b.initialSalesRank=
Sales.getInitialSalesRank(c,b);b.topSalesRank=b.initialSalesRank;GDT.fire(GameManager,GDT.eventKeys.gameplay.salesCalculated,{company:c,game:b})};Sales.getInitialSalesRank=function(a,b){var d=Math.floor(b.score);GameGenre.getGenreWeighting(b.topic.genreWeightings,b.genre,b.secondGenre);var e=-1;if(10===d)e=1;else if(9===d)e=5;else if(8===d)e=10;else if(7===d)e=20;else if(6===d)e=40;else if(5===d)e=60;else return-1;var d=e*a.getRandom(),d=d+0.5*e*a.getRandom()*Math.randomSign(),h=Math.floor(e+d);if(100<
h)return-1;0>=h&&(h=1);LOGWEEKSALES||"rank = {0} ({1}(initial)+{2}(variation))".format(h,e,Math.floor(d)).log();return h};Sales.getSalesLengthInWeek=function(a){if("small"===a.gameSize)return 10;if("medium"===a.gameSize)return 15;if("large"===a.gameSize)return 20;if("aaa"===a.gameSize)return 25};Sales.getUnitPrice=function(a){return"medium"===a.gameSize?Sales.mediumUnitPrice:"large"===a.gameSize?Sales.largeUnitPrice:"aaa"===a.gameSize?Sales.aaaUnitPrice:Sales.smallUnitPrice};Sales.getMMOIncome=function(a,
b){var d=b.totalSalesCash-b.currentSalesCash,d=1;"medium"===b.gameSize?d=0.75:"large"===b.gameSize?d=0.65:"aaa"===b.gameSize&&(d=0.5);d=(b.totalSalesCash-b.currentSalesCash)*(0.05*a.getRandom()*d+0.05*d);b.totalSalesCash+=d/2;1E4>d&&(d=1E4,b.totalSalesCash+=d);return d};Sales.getIncome=function(a,b){var d=b.totalSalesCash-b.currentSalesCash,e=1;"medium"===b.gameSize?e=0.75:"large"===b.gameSize?e=0.65:"aaa"===b.gameSize&&(e=0.5);(b.totalSalesCash-b.currentSalesCash)/b.totalSalesCash<0.1*e?(b.totalSalesCash-
b.currentSalesCash)/b.totalSalesCash>0.01*e&&(d=(b.totalSalesCash-b.currentSalesCash)*(0.4*a.getRandom()*e+0.4*e)):d=(b.totalSalesCash-b.currentSalesCash)*(0.2*a.getRandom()*e+0.2*e);return d};Sales.getGamesToSell=function(a){var b=Math.floor(a.currentWeek);return a.gameLog.filter(function(a){return b>a.releaseWeek&&!a.soldOut&&!a.flags.isExtensionPack})};Sales.getConsolesToSell=function(a){var b=Math.floor(a.currentWeek);return a.licencedPlatforms.filter(function(a){return!0===a.isCustom&&b>General.getWeekFromDateString(a.published)&&
!a.soldOut})};Sales.processSales=function(a){for(var b=Math.floor(a.currentWeek),d=a.gameLog.filter(function(a){return b>a.releaseWeek&&!a.soldOut&&!0===a.flags.isExtensionPack}),e=0,h=d.length;e<h;e++){var f=d[e],j=a.getGameById(f.sequelTo);j?(j.fansChangeTarget+=f.fansChangeTarget,j.initialSalesRank=f.initialSalesRank,j.packReleaseWeek=f.releaseWeek,j.totalSalesCash+=Math.floor(0.1*j.totalSalesCash+f.totalSalesCash),j.confAmount=f.totalSalesCash,f.soldOut=!0):f.flags.isExtensionPack=!1}d=Sales.getGamesToSell(a);
e=0;for(h=d.length;e<h;e++)Sales.sellGame(a,d[e],b);d=Sales.getConsolesToSell(a);e=0;for(h=d.length;e<h;e++)Sales.sellConsole(a,d[e],b)};Sales.sellGame=function(a,b,d){b.unitsSold||(b.unitsSold=0);b.revenue||(b.revenue=0);b.flags.saleCancelled&&(b.totalSalesCash=b.currentSalesCash);var e=Sales.getSalesLengthInWeek(b);if(b.nextSalesCash){b.currentSalesRank=b.nextSalesRank;b.fansChanged+=b.nextfansChange;b.flags.royaltyRate?(b.currentSalesCash+=b.nextSalesCash/b.flags.royaltyRate,b.unitsSold+=Math.floor(b.nextSalesCash/
b.flags.royaltyRate/b.unitPrice)):(b.currentSalesCash+=b.nextSalesCash,b.unitsSold+=Math.floor(b.nextSalesCash/b.unitPrice));0!=b.nextSalesCash&&(a.adjustCash(b.nextSalesCash,"{0} sales".localize().format(b.title)),b.revenue+=Math.floor(b.nextSalesCash));b.nextMaintenance&&0!=b.nextMaintenance&&(a.adjustCash(-b.nextMaintenance,"{0} maintenance".localize().format(b.title)),b.costs+=Math.floor(b.nextMaintenance));b.flags.mmo&&(b.flags.isProfitable=b.nextSalesCash>=b.nextMaintenance);if(0!=b.nextfansChange){var h=
Math.floor(b.nextfansChange);if(0===a.fans){if(0>=h)return;var f="{0} was so successful that we now have {1} fans!".localize().format(b.title,UI.getLongNumberString(h));a.notifications.push(new Notification("Fans".localize("heading"),f,"OK".localize(),0.2))}a.adjustFans(h)}if(b.firstSales){if(2>a.gameLog.length||10<=b.rank)f="{0} sold {1} units in its first week on the market.".localize().format(b.title,UI.getLongNumberString(b.unitsSold)),h=b.currentSalesRank,0<h&&(f+="\n"+"We made it in the charts at #{0}!".localize().format(h)),
a.notifications.push(new Notification("First week of sales!".localize(),f,"OK".localize())),Tutorial.firstSales();b.flags.mmo&&Tutorial.mmoOnSale()}b.nextfansChange=void 0;b.nextSalesCash=void 0}if(b.totalSalesCash>b.currentSalesCash||b.flags.mmo&&!b.flags.saleCancelled){f=0===b.currentSalesCash;h=0;if(!b.flags.mmo){var j=b.getSalesAnomaly();0<j?h=Math.floor(0.3*b.totalSalesCash*j):0>j&&(h=Math.floor(0.3*b.totalSalesCash*j))}j=0;j=b.flags.mmo?Sales.getMMOIncome(a,b):Sales.getIncome(a,b);b.nextfansChange=
Math.floor(b.fansChangeTarget*(j/b.totalSalesCash));b.nextSalesCash=Math.floor(j+h/2);b.flags.royaltyRate&&(b.nextSalesCash=Math.floor(b.nextSalesCash*b.flags.royaltyRate),h=Math.floor(h*b.flags.royaltyRate));b.flags.mmo&&(b.maintenanceLog||(b.maintenanceLog=[]),b.nextMaintenance=Math.floor((b.currentSalesCash+b.nextSalesCash)/100),b.nextMaintenance+=Math.floor(b.nextSalesCash/(Math.pow(b.maintenanceLog.length,3)+3)));0>=b.nextSalesCash?(b.nextSalesCash=void 0,b.nextMaintenance=void 0,b.totalSalesCash=
b.currentSalesCash):(b.flags.mmo&&b.maintenanceLog.push(b.nextMaintenance),b.salesCashLog.push(b.nextSalesCash),b.totalSalesCash+=Math.floor(h));-1!=b.initialSalesRank&&(a=(d-b.releaseWeek)/e,b.packReleaseWeek&&(a=(d-b.packReleaseWeek)/e),d=Math.max(b.initialSalesRank,Math.floor(b.initialSalesRank+2*b.initialSalesRank*(a-0.1))),d=GameManager.getUniqueSalesRank(d,b),b.nextSalesRank=100<d?-1:d);f?(b.firstSales=!0,UI.addSalesCard(b.id,b.title,b.currentSalesCash,b.totalSalesCash,b.unitsSold,b.currentSalesRank,
b.salesCashLog,b.nextSalesCash,b.unitPrice,b.nextMaintenance,b.maintenanceLog,b.flags.royaltyRate)):(b.firstSales=!1,UI.updateSalesCard(b.id,b.unitsSold,b.nextSalesCash,b.salesCashLog,b.unitPrice,b.currentSalesRank,b.nextMaintenance,b.maintenanceLog,b.flags.royaltyRate))}else b.soldOut=!0,b.currentSalesRank=-1,UI.removeSalesCard(b.id,!0),f="{0} is now off the market. It sold {1} units generating {2} in sales.".localize().format(b.title,UI.getLongNumberString(b.unitsSold),UI.getLongNumberString(b.revenue)),
a.notifications.push(new Notification("Game off the market.".localize("heading"),f,"OK".localize()))};Sales.getConsoleIncome=function(a,b){var d=1E6*b.unitsSold*Sales.consoleUnitPrice,e=d-b.currentSalesCash,e=0.1;General.getWeekFromDateString(b.published)+10>a.currentWeek?e=0.2:General.getWeekFromDateString(b.published)+20>a.currentWeek&&(e=0.13);e=(d-b.currentSalesCash)*(0.15*a.getRandom()*e+0.15*e);1E4>e&&(e=5E3+5E3*a.getRandom(),b.unitsSold=(d+e)/1E6/Sales.consoleUnitPrice);return e};Sales.getSalesAnomalyForConsole=
function(a,b){for(var d=Math.floor(a.currentWeek),e=0,h=a.gameLog.filter(function(a){return d>a.releaseWeek&&!a.soldOut&&0<a.platforms.filter(function(a){return a.id===b.id}).length&&100>=a.currentSalesRank&&0<a.currentSalesRank}),f=0,j=h.length;f<j;f++)e=Math.max(e,(101-h[f].currentSalesRank)/100);0>b.satisFaction-1&&(e+=(b.satisFaction-1).clamp(-0.5,0));return e};Sales.sellConsole=function(a,b,d){b.saleCancelled&&(b.unitsSold=b.currentSalesCash/Sales.consoleUnitPrice/1E6,b.soldOut=!0);var e=1E6*
b.unitsSold*Sales.consoleUnitPrice;b.currentSalesCash||(b.currentSalesCash=0);b.currentUnitsSold||(b.currentUnitsSold=0);b.salesCashLog||(b.salesCashLog=[]);b.nextSalesCash&&(b.currentSalesCash+=b.nextSalesCash,b.currentUnitsSold+=Math.floor(b.nextSalesCash/Sales.consoleUnitPrice),0!=b.nextSalesCash&&a.adjustCash(b.nextSalesCash,"{0} sales".localize().format(b.name)),b.nextSalesCash=void 0);if(Math.floor(e)>b.currentSalesCash){d>General.getWeekFromDateString(b.published)+1&&Sales.generateMaintenancePoints(a,
b,d);d=0===b.currentSalesCash;General.getWeekFromDateString(b.published);var h=Sales.getConsoleIncome(a,b),a=Sales.getSalesAnomalyForConsole(a,b),f=0;0!=a&&(f=Math.floor(h*a),b.unitsSold+=f/Sales.consoleUnitPrice/1E6);b.nextSalesCash=Math.floor(h+f);0>=b.nextSalesCash?(b.nextSalesCash=void 0,b.currentUnitsSold=b.currentSalesCash/Sales.consoleUnitPrice):b.salesCashLog.push(b.nextSalesCash);d?(b.firstSales=!0,UI.addSalesCard(b.id,b.name,b.currentSalesCash,e,b.currentUnitsSold,-1,b.salesCashLog,b.nextSalesCash,
Sales.consoleUnitPrice)):(b.firstSales=!1,UI.updateSalesCard(b.id,b.currentUnitsSold,b.nextSalesCash,b.salesCashLog,Sales.consoleUnitPrice,-1))}else UI.removeSalesCard(b.id,!0),UI.removeMaintenanceCard(b,!1),"{0} is now off the market. It sold {1} units generating {2} in sales.".localize().format(b.name,UI.getLongNumberString(b.currentUnitsSold),UI.getLongNumberString(b.currentSalesCash))};var d=function(a){for(var b=a.salesCashLog.length,d=0,e=b-1;e>Math.max(b-5,0);e--)d+=a.salesCashLog[e];return Math.floor(d/
Sales.consoleUnitPrice)};Sales.generateMaintenancePoints=function(a,b){void 0===b.maintenancePoints&&(b.repairPoints=0,b.maintenancePoints=0,b.maintenanceLog=[]);var g=1E6*b.unitsSold,g=Math.min(10*(32.5*d(b)/g),45),g=Math.max(5,Math.floor(g-g*(0.4*a.getRandom()+0.6*b.qF)));b.maintenancePoints+=g;b.maintenanceLog.push(b.maintenancePoints);UI.updateMaintenanceCard(b)};Sales.sellSDKs=function(a){var b=a.engines.filter(function(a){return-1!=a.parts.indexOf(Research.sdk)});if(0<b.length)for(var b=b.sort(function(a,
b){return a.techLevel-b.techLevel}),d=0;d<b.length;d++)if(b[d].releaseWeek+96>a.currentWeek){var e=b[d].costs/12,h=Platforms.getPlatformsOnMarket(a).filter(function(a){return!a.isCustom}).max(function(a){return a.techLevel});h&&(e*=b[d].techLevel/h);a.adjustCash(e,b[d].name+" SDK".localize("short for Software Development Kit"));break}}})();var SalesEvents={};
(function(){var a=SalesEvents;a.getAllNotificationsObjects=function(){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];void 0!=d.id&&b.push(d)}return b};General.registerAsNotificationSource(a);a.getSaleRecord=function(a,b){if(!b.flags.royaltyRate&&!b.flags.noSalesEvents){var c=[1E4,5E4,1E5].reverse(),d=[0.1,0.2,0.3].reverse();if(!a.flags.game100Ksales)for(var e=0;e<c.length;e++){var h=c[e];if(b.unitsSold>h&&!a.flags["game"+UI.getShortNumberString(h)+"sales"])return c.slice(e).forEach(function(b){a.flags["game"+
UI.getShortNumberString(b)+"sales"]=!0}),a.notifications.push(new Notification({header:"Sales Record".localize("heading"),text:"{0} has achieved a company sales record with over {1} units sold!\nThis is an important milestone in the history of {2}!".localize().format(b.title,UI.getShortNumberString(h),a.name)})),d[e]}for(var g=[5E5,1E6,5E6,1E7,5E7,1E8].reverse(),d=[0.4,0.5,0.6,0.7,0.8,0.9].reverse(),q="We just got word that {0} which was recently released by {1} has racked up over {2} in sales.".localize()+
"\n",c=["Gold","Platinum",void 0,"Diamond",void 0,void 0].reverse(),e=0;e<g.length;e++)if(h=g[e],!(b.unitsSold<=h)){if(b.flags["game"+UI.getShortNumberString(h)+"sales"])break;g=q.format(b.title,a.name,UI.getShortNumberString(h));c.length>e&&void 0!=c[e]&&0.5<a.getRandom()&&(g+="If the game were a music record it would have {0} status.{n}".localize("{0} gold, platinum etc.").format(c[e]));g=2==e?g+["An incredible achievement".localize(),"This is an unbelievably high number.".localize(),"This game truly deserves to be called AAA.".localize()].pickRandom():
1==e?g+"Only a true master of the industry could achieve such a milestone. {0} will forever be remembered in gaming history for this.".localize().format(a.staff[0].name):g+["The excitement around the game seems to have no end.".localize(),"We wonder how many more it will sell.".localize(),"Competitors have been observed muttering jealous remarks.".localize(),"Go {0}! Well done!".localize().format(a.name)].pickRandom();a.notifications.push(new Notification({header:"Industry News".localize("heading"),
text:g}));d=d[e];b.flags["game"+UI.getShortNumberString(h)+"sales"]=!0;return d/(b.flags.salesAnomaly+1)}}};a.getTopScoreSalesEvent=function(a,b){if(!b.flags.topScoreAchievementShown){var c="",e;switch(a.topScoreAchievements){case 1:c="According to our market research the recently published game '{0}' is a surprise hit with players.".localize().format(b.title);c+="\n\n "+"The developer {0} is fairly new to the gaming industry but we cannot wait for what they will develop next!".localize().format(a.name);
e=0.2;break;case 2:var h=b.reviews.max(function(a){return a.score}),c=b.reviews.first(function(a){return a.score==h}),c="The latest game by {0} has received very positive reviews overall!\n{1} gave it a '{2}' saying '{3}'.".localize().format(a.name,c.reviewerName,c.score,c.message),c=c+("\n"+"If {0} continues to innovate like this they might become a new fan favorite!".localize().format(a.name));e=0.3;break;case 3:c="{0}, the newest game by {1} has caused a storm of good reviews and excited customers.".localize().format(b.title,
a.name),c+="\n\n"+"Industry professionals say that {0} is one of these rare games that will set a new quality standard for future games.{n}".localize().format(b.title),c+="It seems that {0} really has made gaming history with {1}!\nWell done!".localize().format(a.name,b.title),e=0.5}!c&&9<=b.score&&(c=d(a,b))&&(e=0.4*a.getRandom());c&&(b.flags.topScoreAchievementShown=!0,a.notifications.push(new Notification("News",c,"OK")));return e}};var d=function(a,b){var d=b.featureLog.filter(function(a){return"mission"===
a.missionType}).filter(function(a){var c=a.duration/General.getGameSizeDurationFactor(b.gameSize)/General.getMultiPlatformDurationFactor(b)/(3*Missions.BASE_DURATION);return 0.9<=Missions.getGenreWeighting(a,b)&&0.4<=c});if(0!=d.length){var e=d.pickRandom(),d=["If you are not a fan of {0} now then chances are you will be after playing their latest hit {1}.".localize(),"Ladies and gentlemen, the surprise hit of the year is {1} by {0}.".localize(),"When I started playing {1} I had no idea what I was in for.".localize(),
"There are a lot of good surprises waiting for you in {1}.".localize(),"Another memorable game by {0} has been released.".localize(),"I have been playing {1} and have tremendously enjoyed the experience.".localize(),"{0} surprises us again with a very enjoyable game.".localize()],e=c(e),g=["Rarely will a game captivate you as much as {1}.".localize(),"{1} really deserves the top spots in the charts.".localize(),"Simply one of the best games I've played.".localize(),"Well, what can I say? Stop reading. Start playing.".localize(),
"A stellar effort by {0}.".localize(),"To {0}: Keep the hits coming please :)".localize(),"Only a game with unicorns, rainbows, pirates and ninjas could possibly be better.".localize(),"Summary: best. game. ever.".localize()],n=h(a).pickRandom();return(d.pickRandom()+" "+e+" "+g.pickRandom()).format(a.name,b.title)+"\n{0}, {1}".format(n.author,n.name)}},c=function(a){var b={Engine:["There is a rare technical polish in this game which really comes through in the overall experience.".localize(),"The game shines of technical excellence. Clearly the developers know what they are doing.".localize(),
"I was positively surprised to see the level of polish that went into the underlying game engine. The effort really paid off.".localize()],Gameplay:["In this type of game the core gameplay mechanics are really important and the developer has nailed it.".localize(),"I have rarely seen such responsive game controls. A true joy to play.".localize(),"The attention to detail to the core gameplay has really paid off.".localize()],"Story/Quests":["This game doesn't just tell a story, no, it manages to draw you in so that you truly feel part of an adventure.".localize(),
"A true achievement in interactive story telling, the characters and the captivating scenarios just stick in your mind.".localize(),"Whoever wrote the story of {1} will likely win a prize for it.".localize()],Dialogs:["The character dialogues in this game are just oustanding. Rarely will you be so captivated in a conversation.".localize(),"The term dialogue tree really doesn't do {1} justice. This game has a dialogue forest... in a good way.".localize(),"A perfect example on how dialogues in a game can be so much more thrilling than in a movie or book. At every stage I felt like I really had choices and was driving the story.".localize()],
"Level Design":["The progression in this story is just perfect. Just when you start to think things settle down something surprising will happen.".localize(),"The level design is both sophisticated and surprisingly intuitive. I never felt like I was guided through a level but I never ever got lost either. A true achievement.".localize(),"Simply iconic level designs, from start to finish.".localize()],AI:["The computer-controlled entities in this game are so incredibly convincing that I caught myself talking at them at times.".localize(),
"Rarely manages a game to blend the A.I. so well into the game world that you just feel completely immersed.".localize(),"The game responds to the player in such a realistic fashion that it makes you sometimes forget that this is just a game.".localize()],"World Design":["A wonderfully imaginative gameworld makes {1} a joy to discover. You will spend hours travelling through this world.".localize(),"This is world design at its best. Brave, imaginative and unapologetically following its incredible artistic vision.".localize(),
"The attention to detail in the world design really sets this game apart from others in the genre.".localize()],Graphic:["Visually pleasing is an understatement. This game looks incredibly good.".localize(),"The art style in {1} blends so well with the general feeling of the game. A perfect match.".localize(),"Truly oustanding visual design is only one of the many reasons why {1} deserves your attention.".localize()],Sound:["I rarely highlight the sound of a game instead of the many other noteworthy features but in {1} the sound design was truly awe-inspiring.".localize(),
"The sound in this game gives you goose bumps. Very well designed.".localize(),"The game doesn't just look good it sounds incredibly good too. A true feast for players who appreciate high quality sound.".localize()]};return b.hasOwnProperty(a.id)?b[a.id].pickRandom():""};a.getEarlySalesEvents=function(){};a.getPossibleEvents=function(b){return a.getAllNotificationsObjects().filter(function(a){return a&&a.trigger(GameManager.company,b)})};a.getHypedGameEvent=function(a,b){var c=0,d=b.flags.interviewHyped.decision,
e=b.flags.interviewHyped.source,h="In an exclusive interview a while ago, {0} from {1}".localize("followed by sentence fragment (hypgfr1 or hypgfr2)").format(a.staff[0].name,a.name),h=d?h+" made very bold remarks about their then-in-development game {0} predicting that it will be \u00fcber successful.".localize("fragment: hypgfr1").format(b.title):h+" was holding back when discussing their expections for {0}.".localize("fragment: hypgfr2").format(b.title),g;8<b.score?d?(c=0.5,g="was spot on as the game has received very positive reviews.".localize("fragment")):
(c=0.2,g="was just humble as the game received critical acclaim.".localize("fragment")):6<b.score?d?(c=-0.2,g="should've been more careful as the final product doesn't match the hyped expectations.".localize("fragment")):(c=0.4,g="was right to stay realistic as the game is good but nothing too our of the ordinary.".localize("fragment")):d&&(c=-0.5,g="needs a lesson in how to be humble as the game received mediocre reviews.".localize("fragment"));h+="{n}"+"Now, that the game is out on the market the consensus is that {0} {1}".localize("{0} is player name, {1} is description").format(a.staff[0].name,
g);h=0<c?h+("\n\n"+"Overall, this had a positive effect on sales.".localize()):h+("\n\n"+"Overall, this had a negative effect on sales.".localize());0!=c&&a.notifications.push(new Notification({header:e.name,text:h}));return c};var b=[{name:"Gaming World",author:"Jason Green"},{name:"SMASH",author:"Roland Kean"},{name:"Electric Games",author:"Arnie Kunkel"},{name:"GamerPro",author:"Julian Rickstall"},{name:"Game Informant",author:"Andrew McNara"},{name:"GameNova",author:"J\u00f6rg Longer"},{name:"Gamers",
author:"Gary White"},{name:"Gamers",author:"Kirton Gillen"},{name:"Center",author:"Tom Mott"},{name:"eGaming Check",author:"Christopher Rignall"}];b.forEach(function(a){a.type="magazine"});var g=[{name:"Planet GG",author:"Steve O'Connell"},{name:"Planet GG",author:"Jason Ray"},{name:"Planet GG",author:"Steph Benhexen"},{name:"Don't Cheat!",author:"Nicole Kolt"},{name:"Y-Play",author:"Adam Hessler"},{name:"Y-Play",author:"Morgan Net"},{name:"Y-Play",author:"Jessie Nobot"},{name:"Game Red",author:"Geoff Keyley"}];
g.forEach(function(a){a.type="TV show"});var e=[{name:"Rock, Paper, Shogun",author:"Alex Seer"},{name:"Rock, Paper, Shogun",author:"James Rosenol"},{name:"Gamedroid",author:"Vanier Gonza"},{name:"Kottago",author:"Stephen Tort"},{name:"GameRye",author:"Patrick Toint"}];e.forEach(function(a){a.type="blog"});var h=function(a){a=a.getCurrentDate();10<=a.year&&b.concat(g);16<=a.year&&b.concat(e);return b};a.getPossibleSources=h})();var Steam={};
(function(){var a=null,d=!1;if(!PlatformShim.ISWIN8&&require){try{a=require("./steamIntegration/gdt-steam-win")}catch(c){a=null}if(!a)try{a=require("./steamIntegration/gdt-steam-osx")}catch(b){a=null}if(!a)try{a=require("./steamIntegration/gdt-steam-linux")}catch(g){a=null}}Steam.isAvailable=function(b){if(!a)return b&&b("no steam integration available"),!1;if(!d){var c;a:{if(!d){d=!0;try{if(!a.initAPI()){a=null;b&&b("steam Init failed");c=!1;break a}}catch(f){a=null;Logger.LogWarning("Steam initialization failed",
f,"Steam initialization failed".localize());f&&f("steam Init failed");c=!1;break a}}c=!0}if(!c)return!1}return!0};Steam.saveTextToFile=function(b,c,f,d){Steam.isAvailable(d)&&a.saveTextToFile(b,c,f,d)};Steam.readTextFromFile=function(b,c,f,d){Steam.isAvailable(d)&&a.readTextFromFile(b,c,f,d)};Steam.activateAchievement=function(b,c){Steam.isAvailable()&&a.activateAchievement(b,c,function(a){GameFlags.ghg6&&PlatformShim.alert(a,"Error".localize())})}})();var DecisionNotifications={};
(function(){var a=DecisionNotifications;a.modNotifications=[];var d=function(a){if(a.date&&Math.floor(GameManager.company.currentWeek)<General.getWeekFromDateString(a.date,a.ignoreGameLengthModifier))return!1;if(a.maxTriggers||a.date){var b=GameManager.company.eventTriggerCounts[a.id],c=a.date?1:a.maxTriggers;if(b&&b>=c)return!1}return a.date||a.trigger&&a.trigger(GameManager.company)},c=function(a){var b=GameManager.company;b.eventTriggerCounts[a.id]?b.eventTriggerCounts[a.id]++:b.eventTriggerCounts[a.id]=
1};a.getNewNotifications=function(b){var b=GameManager.company,j=a.getAllNotificationsObjects().filter(function(a){return!a.isRandomEvent&&d(a)}).map(function(a){c(a);return a.notification?a.notification:a.getNotification(b)});0==j.length&&(j=a.getRandomEvents(b));return j};a.getRandomEvents=function(b){var j=b.flags.nextRandomEvent&&b.flags.nextRandomEvent<=GameManager.gameTime;b.flags.nextRandomEvent||(b.flags.nextRandomEvent=1E3*(48+24*b.getRandom())*GameManager.SECONDS_PER_WEEK);if(j){j=36+48*
b.getRandom();b.flags.nextRandomEvent=GameManager.gameTime+1E3*j*GameManager.SECONDS_PER_WEEK;j=a.getAllNotificationsObjects().filter(function(a){return a.isRandomEvent&&b.flags.lastRandomEventId!=a.id&&d(a)}).pickRandom();if(!j)return[];b.flags.lastRandomEventId=j.id;c(j);return[j.getNotification(b)]}return[]};a.getAllNotificationsObjects=function(){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];void 0!=d.id&&b.push(d)}b.addRange(a.modNotifications);return b};General.registerAsNotificationSource(a);
a.hobbyComputerClub={id:"hobbyComputerClub",isRandomEvent:!0,trigger:function(a){return!a.flags.hobbyComputerClub&&1===a.currentLevel&&1<a.gameLog.length&&a.isEarlierOrEqualThan(2)},getNotification:function(a){a.flags.hobbyComputerClub=!0;return new Notification({header:"Invitation".localize("heading"),text:"Hi, I'm Gordon Hench the host of the local hobby computer club. I just discovered that your company is close-by. I'm a huge fan of {0} and would love for you to join our meetup this week!\nEagerly awaiting your reply.\nGordon".localize().format(a.gameLog.pickRandom().title),
sourceId:"hobbyComputerClub",options:["Sure".localize("decision action button"),"No time".localize("decision action button")]})},complete:function(a){var b=GameManager.company;0===a?(b.activeNotifications.addRangeAt(0,new Notification("Invitation".localize("heading"),"Thank you very much! I'm sure our members will love what you have to say.\nGordon".localize())),b.notifications.push(new Notification({header:"Computer Club".localize("heading"),text:"Hi I'm Frank More. We met at the Hobby Computer Club a week ago. Just wanted to say thanks for talking about your projects. I love your games and have told all my friends about them.".localize(),
weeksUntilFired:2})),a=8+5*b.getRandom(),b.currentGame?b.currentGame.hypePoints+=a:b.flags.nextGameHypeBonus+=a):(b.flags.secrecy++,b.activeNotifications.insertAt(0,new Notification("Invitation".localize("heading"),"Sorry to hear that you are busy.\nGordon".localize())))}};a.localNewsPaper={id:"localNewsPaper",isRandomEvent:!0,trigger:function(a){return!a.flags.localNewsPaper&&1===a.currentLevel&&1<=a.gameLog.length&&a.isEarlierOrEqualThan(2,7)&&a.isGameProgressBetween(0.4,0.9)},getNotification:function(a){a.flags.localNewsPaper=
!0;return new Notification({header:"Local News".localize("heading"),text:"Hi, I'm Caroline Richards from the local news. I've heard rumours that you are already working on your next game and would love to do an interview about this. Do you have some time?".localize(),options:["Sure".localize("decision action button"),"No time".localize("decision action button")],sourceId:"localNewsPaper"})},complete:function(a){var b=GameManager.company;if(0===a){b.activeNotifications.addRangeAt(0,(new Notification("Local News".localize("heading"),
"Great!\n\n\n ... Thank you for your time.{n}The interview should be published soon.".localize())).split());b.flags.interviewHypePointsBonus=5+8*b.getRandom();var a=b.name,c=b.staff[0].name,d=b.currentGame.flags.isNewCombination?"not done".localize("localNewsPaperFragment"):"done".localize("localNewsPaperFragment"),a="{0}, a local start-up, is trying to make it big in the gaming industry. The company has already published {1} games and is working hard on their next.{n}In an interview founder {2} said that the next game is going to be a {3}/{4} game, something the company has {5} before. It's great to see small local companies enter exciting new industries. All the best of luck to {0}.".localize("{0} is company name, {1} nr. of games, {2} player name, {3} topic name, {4} genre name, {5} either not done/done (localNewsPaperFragment)").format(a,
b.gameLog.length,c,b.currentGame.topic.name,b.currentGame.genre.name,d);b.notifications.push(new Notification({header:"Local News".localize("heading"),text:a,weeksUntilFired:0.5,sourceId:"localNewsActiveCallback"}))}else b.flags.secrecy++,b.activeNotifications.insertAt(0,new Notification("Local News".localize("heading"),"Sorry to bother you".localize()))}};a.localNewsActiveCallback={id:"localNewsActiveCallback",trigger:function(){return!1},complete:function(){GameManager.company.currentGame&&GameManager.company.flags.interviewHypePointsBonus&&
(GameManager.company.currentGame.hypePoints+=GameManager.company.flags.interviewHypePointsBonus);GameManager.company.flags.interviewHypePointsBonus=0}};a.firstMatureGame={id:"firstAdultGame",trigger:function(a){return a.isGameProgressBetween(0.35,0.9)&&"mature"===a.currentGame.targetAudience&&!a.flags.firstMatureGame?a.flags.firstMatureGame=!0:!1},getNotification:function(){var a="Media Enquiry".localize("heading"),b="Hi, I'm Steve O'Connell, a reporter for Planet GG.\nWe've heard a rumour that your company is developing a game for mature audiences.\nWould you be willing to give an interview about this?".localize();
return new Notification({sourceId:"firstAdultGame",header:a,text:b,options:["Give interview".localize("decision action button"),"No comment".localize("decision action button")],weeksUntilFired:2})},complete:function(a){var b=GameManager.company,c="Many industry experts say that sooner or later games with mature themes will become more common. We are curious to see how the market will react to these games.".localize();void 0==b.flags.secrecy&&(b.flags.secrecy=0);0===a?(b.staff[0].adjustBoostRechargeProgress(0.3),
b.staff[0].adjustEfficiency(0.3),b.flags.interviewHypePointsBonus=5+12*b.getRandom(),b.notifications.push(new Notification({header:"Industry News".localize("heading"),text:"Planet GG has recently published an interview with {0}. According to the interview the company is working on its first game targeted at mature players. {1}, owner and CEO of {0} said, 'We think that players are looking for more mature content in games and we are willing to take a risk to give it to them.'{n}".localize("{0} company name, {1} staff name").format(b.name,
b.staff[0].name)+c,weeksUntilFired:1,sourceId:"firstMatureGameInterviewActiveCallback"})),b.activeNotifications.addRangeAt(0,(new Notification("Media Enquiry".localize("heading"),"Great!\n\n\n ... Thank you for your time.{n}We will publish the interview next week.".localize())).split())):(b.flags.secrecy++,b.flags.interviewHypePointsBonus=2+4*b.getRandom(),b.notifications.push(new Notification({header:"Industry News".localize("heading"),text:"There have been rumours circulating in the industry that {0} might be working on a game for mature audiences.".localize("{0} company name").format(b.name)+
c,weeksUntilFired:3,sourceId:"firstMatureGameInterviewActiveCallback"})),b.activeNotifications.insertAt(0,new Notification("Media Enquiry".localize("heading"),"Okay. Thank you for your time.".localize())))}};a.firstMatureGameInterviewActiveCallback={id:"firstMatureGameInterviewActiveCallback",trigger:function(){return!1},complete:function(){GameManager.company.currentGame&&GameManager.company.flags.interviewHypePointsBonus&&(GameManager.company.currentGame.hypePoints+=GameManager.company.flags.interviewHypePointsBonus);
GameManager.company.flags.interviewHypePointsBonus=0}};a.skipStartTutorials={id:"skipStartTutorials",isRandomEvent:!1,trigger:function(){return!1},getNotification:function(){return new Notification({sourceId:"skipStartTutorials",header:"Skip Tutorials".localize("heading"),text:"Hello there! It seems that you have already played before. You can get right into development and skip the tutorial messages. Note that you can always review tutorial messages (even the ones you have skipped) in the Help menu while you play a game.".localize(),
options:["Skip tutorial!".localize("decision action button"),"Don't skip".localize("decision action button")]})},complete:function(a){0===a&&Tutorial.skipShownTutorials();ghg4.ghg5("skipped tutorials?",{decision:0===a,type:"start"})}};a.moveToLevel2={id:"moveToLevel2",trigger:function(a){var b=GameManager.isIdle()&&1===a.currentLevel&&1E6<=a.cash&&(!a.flags.lastMoveUpLevelQ||a.flags.lastMoveUpLevelQ<=GameManager.gameTime-2E4*GameManager.SECONDS_PER_WEEK);return b&&GameManager.ghg0()?(a.flags.shownLvl2Move||
(a.notifications.push(new Notification("Lite version","You have amassed over {0} in cash!\nUsually I would suggest that you should grow your company by moving into a larger office but unfortunately there don't seem to be any larger offices available in the lite version.{n}You can still continue your game until year 4 to see how much cash you will end up with and how many fans you will gain.".localize("{0} cash amount").format(UI.getShortNumberString(a.cash)))),a.flags.shownLvl2Move=!0),!1):b},getNotification:function(a){a.flags.lastMoveUpLevelQ=
GameManager.gameTime;a="Congratulations! You have made quite a name for yourself and have saved up a lot of capital. If you want to grow the company further then moving into a new office is the next step. I've found the perfect office, situated in a technology park. Would you like to move your company to the next level?".localize();return new Notification({sourceId:"moveToLevel2",header:"New Office?".localize("heading"),text:a,options:["Move (pay {0})".localize("decision action button; move as in move to new office").format(UI.getShortNumberString(15E4)),
"Not yet".localize("decision action button")]})},complete:function(a){var b=GameManager.company;0===a&&(b.currentLevel=2,b.adjustCash(-15E4,"New Office".localize()),VisualsManager.nextLevel(),Media.createLevel2Notifications(),Tutorial.level2(),GameManager.save(GameManager.company.slot+"L2"));ghg4.ghg5("move to level 2?",{decision:0===a})}};a.bailout={id:"bailout",isRandomEvent:!1,trigger:function(){return!1},canUse:function(a){return a.flags.bailoutAmount?!1:!a.flags.bailoutPaybackTime||a.flags.bailoutPaybackTime<
GameManager.gameTime-24E3*GameManager.SECONDS_PER_WEEK},getNotification:function(a){var b=Math.abs(a.cash),b=b*[1.5,2,3.2,2.5][a.currentLevel-1],b=1E3*Math.floor(b/1E3);a.flags.bailoutAmount=b;a.flags.bailoutPaybackAmount=1.8*b;var c=UI.getLongNumberString(b),d="It seems that you have some serious financial difficulties and your company is about to go bankrupt. After careful consideration we have decided to offer you a deal.".localize(),d=d+("\n"+"We will give you {0} which should move you out of the danger zone but in return you have to commit to pay us {1} in a year's time.".localize());
return new Notification({sourceId:"bailout",header:"Bank offer".localize("heading"),text:d.format(c,UI.getLongNumberString(a.flags.bailoutPaybackAmount)),options:["Agree (receive {0})".localize("decision action button").format(UI.getShortNumberString(b)),"No (go bankrupt)".localize("decision action button")]})},complete:function(a){var b=GameManager.company;if(0===a){var c=1.8*b.flags.bailoutAmount;b.adjustCash(b.flags.bailoutAmount,"Bailout".localize("heading"));b.flags.bailoutPaybackTime=GameManager.gameTime+
48E3*GameManager.SECONDS_PER_WEEK;b.flags.bailouts=isNaN(b.flags.bailouts)?1:b.flags.bailouts+1;var d=new Notification("Bank".localize("heading"),"This is a reminder that we require you to pay back the agreed amount of {0} in three months' time.".localize().format(UI.getLongNumberString(c)));d.weeksUntilFired=36;b.notifications.push(d);d=new Notification("Bank".localize("heading"),"The amount of {0} has been deducted from your account.".localize().format(UI.getLongNumberString(c)));d.adjustCash(-c,
"Bailout payback".localize("heading"));d.setFlag("bailoutAmount",0);d.setFlag("bailoutOffered",!1);d.weeksUntilFired=48;b.notifications.push(d)}b.flags.bailoutOffered=!0;ghg4.ghg5("bailout?",{decision:0===a,year:b.getCurrentDate().year});0!==a&&GameManager.checkGameOver()}};a.miniBailout={id:"miniBailout",canUse:function(a){return 0<a.gameLog.length&&!a.gameLog.last().flags.miniBailoutUsed},getNotification:function(a){a.gameLog.last().flags.miniBailoutUsed=!0;var b=Math.abs(a.cash)+2*General.getMonthlyCosts(a);
a.flags.miniBailoutAmount=b;a="We see that you are in financial difficulties. Since you've just released your latest game {0}, we are willing to offer you a mini-credit to get you over this months' payments.\n\nWe will give you {1} to cover your costs and expect to be paid back the full amount, plus a small adminstration fee of {2} in two months time.".localize().format(a.gameLog.last().title,UI.getLongNumberString(b),UI.getShortNumberString(25E3));return new Notification({header:"Bank".localize("heading"),
text:a,sourceId:"miniBailout",options:["Agree (receive {0})".localize("decision action button").format(UI.getShortNumberString(b)),"No (go bankrupt)".localize("decision action button")]})},complete:function(a){if(0===a){var a=GameManager.company,b=a.flags.miniBailoutAmount;a.adjustCash(b,"Bailout".localize("heading"));var c=new Notification("Bank".localize("heading"),"The amount of {0} has been deducted from your account.".localize().format(UI.getLongNumberString(-b-25E3)));c.weeksUntilFired=8;c.adjustCash(-b-
25E3,"Bailout payback".localize("heading"));a.notifications.push(c)}else GameManager.checkGameOver()}};a.inDevBailout={id:"inDevBailout",canUse:function(a){return!a.currentGame.flags.miniBailoutAmount},getNotification:function(a){var b=Math.abs(a.cash)+General.getMonthlyCosts(a)*(General.getApproxWeeksToCompletion(a.currentGame)+6);a.currentGame.flags.miniBailoutAmount=b;a="We see that you are, again, in serious financial difficulties. We are willing to offer you a mini-credit to tie you over until your current game is on the market.\n\nWe will give you {1} to cover your costs and expect to be paid back the full amount, plus a fee of {2}, one month after the game is released.".localize().format(a.currentGame.title,
UI.getLongNumberString(b),UI.getShortNumberString(0.05*b));return new Notification({header:"Bank".localize("heading"),text:a,sourceId:"inDevBailout",options:["Agree (receive {0})".localize("decision action button").format(UI.getShortNumberString(b)),"No (go bankrupt)".localize("decision action button")]})},complete:function(a){0===a?(a=GameManager.company,a.adjustCash(a.currentGame.flags.miniBailoutAmount,"Bailout".localize("heading"))):GameManager.checkGameOver()},triggerPayBack:function(a,b){var c=
GameManager.company,d=a.flags.miniBailoutAmount,e=new Notification("Bank".localize("heading"),"The amount of {0} has been deducted from your account.".localize().format(UI.getLongNumberString(-d-25E3)));e.adjustCash(-d-0.05*d,"Bailout payback".localize("heading"));e.weeksUntilFired=b+5;c.notifications.push(e)}};a.gameOver={id:"gameOver",trigger:function(){return!1},getNotification:function(){return new Notification({sourceId:"gameOver",header:"Game Over".localize("heading"),text:"This is the end of your journey.\n\nYou can either load a saved game, restart this level or start a new game.".localize(),
options:["Restart level".localize("decision action button"),"Start over".localize("decision action button")]})},complete:function(a){var b=GameManager.company;0===a?GameManager.reload(b.slot+"L"+b.currentLevel):GameManager.startNewGame();ghg4.ghg5("Restart level?",{decision:0===a})}};a.moveToLevel3={id:"moveToLevel3",trigger:function(a){return GameManager.isIdle()&&2===a.currentLevel&&1<a.staff.length&&5E5<=a.cash&&a.currentWeek>=General.getWeekFromDateString("11/6/2",!0)&&(!a.flags.lastMoveUpLevelQ||
a.flags.lastMoveUpLevelQ<=GameManager.gameTime-2E4*GameManager.SECONDS_PER_WEEK)},getNotification:function(a){a.flags.lastMoveUpLevelQ=GameManager.gameTime;var a=a.staff.skip(1).pickRandom(),b="Boss, our office could really do with some renovation work and our computer systems are also out of date. Investing a little bit in a more modern office and upgraded computers would be a great.\nDo you want to renovate the office?".localize();return new Notification({sourceId:"moveToLevel3",header:a.name,text:b,
options:["Invest (pay {0})".localize("decision action button").format(UI.getShortNumberString(15E4)),"Not yet".localize("decision action button")]})},complete:function(a){var b=GameManager.company;if(0===a){b.currentLevel=3;b.adjustCash(-15E4,"New equipment".localize());VisualsManager.nextLevel();var c=new Notification("G3 Training","Dear {0}!\nSince G3 has become the biggest meetup of game developers every year we have decided to use our name for the greater good. Starting today we offer different game development challenges throughout the year where game devs from around the world can compete with each other.{n}This will be a great way for game developers to learn something new. You are welcome to join in at any time. There are no prizes but it should be a great way to increase everyone's skills.\nThe G3 committee.".localize("{0} company name").format(b.name));
c.weeksUntilFired=2;c.setFlag("trainingV2Enabled",!0);b.notifications.push(c);GameManager.save(GameManager.company.slot+"L3")}ghg4.ghg5("move to level 3?",{decision:0===a})}};a.moveToLevel4={id:"moveToLevel4",trigger:function(a){return GameManager.isIdle()&&3===a.currentLevel&&3<a.staff.length&&16E6<=a.cash&&a.currentWeek>=General.getWeekFromDateString("13/9/2",!0)&&(!a.flags.lastMoveUpLevelQ||a.flags.lastMoveUpLevelQ<=GameManager.gameTime-2E4*GameManager.SECONDS_PER_WEEK)},getNotification:function(a){a.flags.lastMoveUpLevelQ=
GameManager.gameTime;var b=a.staff[1],a="Boss, {0} has grown well under your management. I think it is time to move the company out of this technology park and into a building worthy of our success.{n}I've seen the perfect building for our new headquarters.\nIt's not cheap but will us allow to grow even further. The new office also has space for additional expansions.\nDo you want to move?".localize("{0} company name").format(a.name);return new Notification({sourceId:"moveToLevel4",header:b.name,
text:a,options:["Move (pay {0})".localize("decision action button; move as in move to new office").format(UI.getShortNumberString(8E6)),"Not yet".localize("decision action button")]})},complete:function(a){var b=GameManager.company;0===a&&(b.currentLevel=4,b.maxStaff=7,b.adjustCash(-8E6,"New office".localize()),VisualsManager.nextLevel(),Media.createLevel4Notifications(),GameManager.save(GameManager.company.slot+"L4"));ghg4.ghg5("move to level 4?",{decision:0===a})}};a.unlockHwLab={id:"unlockHwLab",
trigger:function(a){return 4===a.currentLevel&&a.flags.customHardwareResearched&&!a.flags.hwLabUnlocked&&a.staff.some(function(a){return a.flags.technologySpecialist})&&(!a.flags.lastHwQuestion||a.flags.lastHwQuestion<=GameManager.gameTime-2E4*GameManager.SECONDS_PER_WEEK)},getNotification:function(a){a.flags.lastHwQuestion=GameManager.gameTime;var b="We can open our own hardware lab now.".localize(),c=a.staff.first(function(a){return a.flags.technologySpecialist});a.flags.selectedStaffName=c.name;
return new Notification({header:c.name,text:b,sourceId:"unlockHwLab",options:["Let's do it! (pay {0})".localize("decision action button").format(UI.getShortNumberString(5E6)),"Not yet".localize("decision action button")]})},complete:function(a){var b=GameManager.company;0===a&&(b.adjustCash(-5E6,"Hardware lab".localize()),b.flags.hwLabUnlocked=!0,GameManager.company.flags.hwBudget=0,GameManager.company.flags.fractionalHwLabCosts=0,b.notifications.push(new Notification("Hardware lab".localize(),"Our hardware lab is ready.".localize())),
Tutorial.hwLabReady(),GameManager.pause(!0),UI.fadeInTransitionOverlay(function(){VisualsManager.loadStage(!0);VisualsManager.refreshLabCrew();VisualsManager.updateProjectStatusCards();UI.fadeOutTransitionOverlay(function(){GameManager.resume(!0)})}));ghg4.ghg5("unlocked hardware lab?",{decision:0===a})}};a.unlockrnDLab={id:"unlockRnDLab",trigger:function(a){return 4===a.currentLevel&&!a.flags.rndLabUnlocked&&a.staff.some(function(a){return a.flags.designSpecialist})&&(!a.flags.lastRnDQuestion||a.flags.lastRnDQuestion<=
GameManager.gameTime-2E4*GameManager.SECONDS_PER_WEEK)},getNotification:function(a){a.flags.lastRnDQuestion=GameManager.gameTime;var b="We can open our own research and development lab now.".localize(),c=a.staff.first(function(a){return a.flags.designSpecialist});a.flags.selectedStaffName=c.name;return new Notification({header:c.name,text:b,sourceId:"unlockRnDLab",options:["Let's do it! (pay {0})".localize("decision action button").format(UI.getShortNumberString(25E5)),"Not yet".localize("decision action button")]})},
complete:function(a){var b=GameManager.company;0===a&&(b.adjustCash(-25E5,"R&D lab".localize()),b.flags.rndLabUnlocked=!0,GameManager.company.flags.rndBudget=0,GameManager.company.flags.fractionalRndLabCosts=0,b.notifications.push(new Notification("R&D lab".localize(),"Our R&D  lab is ready.".localize())),Tutorial.rndLabReady(),GameManager.pause(!0),UI.fadeInTransitionOverlay(function(){VisualsManager.loadStage(!0);VisualsManager.refreshLabCrew();VisualsManager.updateProjectStatusCards();UI.fadeOutTransitionOverlay(function(){GameManager.resume(!0)})}));
ghg4.ghg5("unlocked r&d lab?",{decision:0===a})}};a.fireEmployee={id:"fireEmployee",trigger:function(){return!1},getNotification:function(a,b){if(b)return a.flags.fireEmployeeId=b.id,new Notification({sourceId:"fireEmployee",header:"Fire employee?".localize("heading"),text:"Are you sure you want to fire {0}?".localize("{0} staff name").format(b.name),options:["Yes".localize(),"No".localize()]})},complete:function(a){if(0===a&&(a=GameManager.company.staff.first(function(a){return a.id===GameManager.company.flags.fireEmployeeId})))a.currentResearch&&
GameManager.currentResearches.remove(a.currentResearch),a.fire(),ghg4.ghg5("fired staff")}};a.securityUpgrade={id:"securityUpgrade1",isRandomEvent:!0,trigger:function(a){return 2<=a.staff.length&&!a.flags.securityUpgrades},getNotification:function(a){var b=a.staff.skip(1).pickRandom();a.flags.securityUpgradeStaffRef=b.id;return new Notification({sourceId:"securityUpgrade1",header:b.name,text:"Hi Boss! I have a knack for security and I think we could really do with some security upgrades in our office.\nI have done some research and I think with an investment of {0} we would be a lot safer than we're now.\nWhat do you say?".localize("{0} amount").format(UI.getShortNumberString(5E4)),
options:["Yes (invest {0})".localize("decision action button").format(UI.getShortNumberString(5E4)),"No".localize()]})},complete:function(a){var b=GameManager.company,c="",d=b.staff.first(function(a){return a.id===b.flags.securityUpgradeStaffRef}),e=0.3;1==a&&(e*=-1);d&&(d.adjustEfficiency(e),c=d.name);0===a?(a="Thanks Boss!\nI will get right to it.".localize(),b.flags.securityUpgrades=1,b.cash-=5E4,b.cashLog.push({amount:-5E4,label:"security upgrades"})):a="Okay, sorry that I bothered you.".localize();
GameManager.company.activeNotifications.insertAt(0,new Notification({header:c,text:a}))}};var b=function(){var a=GameManager.company;return 0.3<a.getRandom()?a.name:g(a.name)},g=function(a){if(3<a.length)var b=a[3],a=a.replaceAt(3,a[2]),a=a.replaceAt(2,b);7<a.length&&(b=a[6],a=a.replaceAt(6,a[5]),a=a.replaceAt(5,b));return a};a.scam1={id:"scam1",isRandomEvent:!0,trigger:function(a){return a.isLaterOrEqualThan(10)&&!a.flags.scam1},getNotification:function(a){a.flags.scam1=!0;a=g(a.name);return new Notification({sourceId:"scam1",
header:"Investment".localize("heading"),text:"Dear esteemed sir/madame.\nI'm financial advisor to CEO at WOMOBA OIL LIMITED in Nigeria. I'm writing because I know of your high repute and trustworthiness. Our CEO has authorzied me to invest {0} in {1}.{n}We have deposited the amount at a safe bank and will transfer this money to you but the bank requires confirmation from you. If you wish to receive the funds you must transfer a one-time verification payment of {2}. I trust in you.".localize("Note: this is a scam msg in game. immitate scammers language such as odd choice of words,  typos etc. {0} investAmount, {1} company name, {2} payment amount").format(UI.getShortNumberString(25E5),
a,UI.getShortNumberString(12E4)),options:["Pay ({0})".localize("decision action button").format(UI.getShortNumberString(12E4)),"Decline".localize("decision action button")]})},complete:function(a){var b=GameManager.company;0===a&&(b.adjustCash(-12E4,"Gullibility Tax".localize("name of expense when player falls into the scam trap.")),b.staff.skip(1).forEach(function(a){a.adjustEfficiency(-0.3)}));ghg4.ghg5("scam",{decision:0===a});b.notifications.push(new Notification("News".localize("heading"),"It appears that recently a few companies have fallen victim to Nigerian scammers.\nThe scammers often claimed to invest large sums of money into companies but required a sizable up-front payment to make the deal.{n}Those who were unwise enough to pay will not see their money again.\nPolice are investigating but seem helpless to stop these international scammers.".localize(),
"OK".localize(),5+4*b.getRandom()))}};a.patchRequired={id:"patchRequired",isRandomEvent:!0,trigger:function(a){return 1<a.currentLevel&&2<a.gameLog.length&&100<a.fans&&a.gameLog.last().releaseWeek+2<a.currentWeek&&a.isGameProgressBetween(0.1)&&a.gameLog.last().releaseWeek+30>a.currentWeek&&(!a.flags.patchData||a.flags.patchData.lastPatchEvent+6E4*GameManager.SECONDS_PER_WEEK<GameManager.gameTime)},getNotification:function(a){a.flags.patchData||(a.flags.patchData={});a.flags.patchData.lastPatchEvent=
GameManager.gameTime;var b=a.gameLog.last(),c=Math.floor((0.05*b.costs+0.15*b.costs*a.getRandom())/1E4);a.flags.patchData.gameName=b.title;a.flags.patchData.canEarnBonus=5>b.bugs;a.flags.patchData.patchCost=1E4*c+1E4;a.flags.patchData.patchAvailableUntil=GameManager.gameTime+3E3*GameManager.SECONDS_PER_WEEK;c=Math.abs(Math.floor(0.1*b.fansChanged+0.2*b.fansChanged*a.getRandom()));a.adjustFans(-c);a.flags.patchData.fansChange=c;c=new Notification({flags:{isPatchNotification:!0},header:"News".localize("heading"),
text:"The recent pleas for a patch for {0} seem to have been unanswered by {1}.\nMany fans have voiced their disappointment.".localize("{0} game title, {1} company name").format(b.title,a.name),weeksUntilFired:7});a.notifications.push(c);return new Notification({header:"Bugs!".localize("heading"),text:"Oh no! It seems that {0} had quite a few undiscovered bugs when we released it.\nSome of our customers are having a bad time with this and they demand that we patch the game.{n}We could either spend the money and time to patch it or ignore their pleas. If you want to patch the game then {1} on a character and use the action menu to develop a patch but make sure that you don't wait for too long.".localize("{0} game title, {1} click/touch verb").format(b.title,
Tutorial.getClickVerb())})}};var e="Administrative Expenses".localize("label of expense for illegal activity");a.industrialSpyTopic={id:"industrialSpyTopic",isRandomEvent:!0,trigger:function(a){return 0<a.cash&&a.isLaterOrEqualThan(4)&&a.researchEnabled&&3<Topics.topics.except(a.topics).length&&(!a.flags.industrialSpyTopic||2>a.flags.industrialSpyTopic)},getNotification:function(a){var b=Topics.topics.except(a.topics).pickRandom();a.flags.industrialSpyTopicRef=b.id;void 0==a.flags.industrialSpyTopic?
a.flags.industrialSpyTopic=1:a.flags.industrialSpyTopic++;b=5+60*a.getRandom();b=1E3*Math.floor(b);a.flags.industrialSpyTopicAmount=b;a="HgqNHQobJHLKypvBXJPe6+Eg1Z0Dccx Ra585nXkuRPR9AWS QZoIqQkcTm+qO7ahqZXq YL1P5qU39WUpJDrUgj 4jsQdncebVlj3oQhkAvC7z0ZH jz4yCn0h/dLlNzspebs6B7 C9QwqCY2KIizX3DRvA4 RIb1D99e6mC1mPLNlQ j9WenbAbWXGw8yK/AQeBO2G=="+"{n}This is a very special offer. Our agents have recently managed to 'borrow' some research information which might be of interest to you.\nIf you are interested then transfer {0} to the enclosed uplink location.\nWe'll contact you, Agent Blowfish".localize("use writing style of secret agent msg (in game it was decrypted). keep words 'blowfish' and 'uplink' in the message.").format(UI.getShortNumberString(b));
return new Notification({sourceId:"industrialSpyTopic",header:"Proposition".localize("heading"),text:a,buttonText:"Decrypt Message".localize("decision action button"),options:["Transfer ({0})".localize("decision action button; as in Transfer amount of money").format(UI.getShortNumberString(b)),"Decline".localize("decision action button")]})},complete:function(a){var b=GameManager.company;if(0===a){var c=b.flags.industrialSpyTopicAmount,d=Topics.topics.first(function(a){return a.id===b.flags.industrialSpyTopicRef});
b.adjustCash(-c,e);b.topics.push(d);c="OLvsz3uLP6QeZEeL0XuUDw===={n}"+"Thank you for your business.".localize()+"\n\n"+"You have successfully researched {0}.".localize("{0} topic name").format(d.name);b.activeNotifications.addRangeAt(0,(new Notification({header:"Transaction complete".localize("heading"),text:c,buttonText:["Decrypt Message".localize("decision action button"),"OK".localize()]})).split());b.flags.evil++;ghg4.ghg5("evil")}else b.flags.secrecy&&b.flags.secrecy++,b.flags.good++,ghg4.ghg5("good");
ghg4.ghg5("accepted spy?",{decision:0===a})}};a.industrialSabotage={id:"industrialSabotage",isRandomEvent:!0,trigger:function(a){return 0<a.cash&&a.isLaterOrEqualThan(6)&&(!a.flags.industrialSabotage||2>a.flags.industrialSabotage)},getNotification:function(a){void 0==a.flags.industrialSabotage?a.flags.industrialSabotage=1:a.flags.industrialSabotage++;var b=50+120*a.getRandom(),b=1E3*Math.floor(b);a.flags.industrialSabotageAmount=b;a="A9zbngUAfnu5aIo7ot2J LouBaOVUlVftN22gJaP2V3gS+N7 7vaRCtIb2TpaVPsh651s3sT6n gp21VgO2KCiFRtKhp/he OixN+XSB00RBXZhMrb1rYNWsZ+xRNBTZCljm/U QrUmzYrArkPNeusa65R+y TNXSWMZmWSSMv+mAokr0==={n}"+
"This is a very special offer. Our agents have recently managed to gain access to some critical systems of one of your competitors.\nIf you want to play war games then transfer {0} to the enclosed location and we'll initiate sabotage.,\nAgent Blowfish".localize("use writing style of secret agent msg (in game it was decrypted). keep words 'war games' and 'blowfish' in the message.").format(UI.getShortNumberString(b));return new Notification({sourceId:"industrialSabotage",header:"Proposition".localize("heading"),
text:a,buttonText:"Decrypt Message".localize("decision action button"),options:["Sabotage ({0})".localize("decision action button").format(UI.getShortNumberString(b)),"Decline".localize("decision action button")]})},complete:function(a){var b=GameManager.company;if(0===a){b.adjustCash(-b.flags.industrialSabotageAmount,e);var c="0DeAZWaEfhmiEuRgn7WWdw===={n}"+"Thank you for your business.".localize();b.activeNotifications.addRangeAt(0,(new Notification({header:"Transaction complete".localize("heading"),
text:c,buttonText:["Decrypt Message".localize("decision action button"),"OK".localize()]})).split());b.flags.evil++;ghg4.ghg5("evil");b.getRandom();b.notifications.push(new Notification({header:"News".localize("heading"),text:"In a statement the game development company {0} has said that they have been the victim of industrial sabotage. Unfortunately development on their current project has been severely affected.\nPolice are investigating.".localize("{0} is random company name").format(CompanyNames.pickRandom()),
weeksUntilFired:3+4*b.getRandom()}))}else b.flags.good++,ghg4.ghg5("good");ghg4.ghg5("sabotaged?",{decision:0===a})}};a.womenInTech={id:"womenInTech",isRandomEvent:!0,trigger:function(a){return!a.flags.womenInTech&&0<a.cash&&a.isLaterOrEqualThan(9)&&1<a.staff.length},getNotification:function(a){var b=a.staff.skip(1).pickRandom(),c=4+7*a.getRandom(),c=1E4*Math.floor(c);a.flags.womenInTechAmount=c;a.flags.womenInTech=!0;a="Hi Boss! A friend of mine is greatly involved in an organization which aims to get more women into technology. They are looking for a sponsor and I thought that this would be a perfect opportunity for us.\nWould you like to help out?".localize();
return new Notification({sourceId:"womenInTech",header:b.name,text:a,options:["Sponsor (pay {0})".localize("decision action button").format(UI.getShortNumberString(c)),"Decline".localize("decision action button")]})},complete:function(a){var b=GameManager.company;if(0===a){b.adjustCash(-b.flags.womenInTechAmount,"Sponsorship".localize("heading"));b.staff.forEach(function(a){a.adjustBoostRechargeProgress(0.3);a.adjustEfficiency(0.3)});var c="We have got word that {0} has recently sponsored a highly praised move to get more women into technology roles.\n{1}, the CEO at {0} said, 'We would love to see more women in the game industry.'".localize("{0} company name, {1} staff name").format(b.name,
b.staff[0].name);b.notifications.push(new Notification({header:"News".localize("heading"),text:c,weeksUntilFired:2+6*b.getRandom()}));b.flags.good++;ghg4.ghg5("good")}else b.staff.skip(1).forEach(function(a){a.adjustEfficiency(-0.3)});ghg4.ghg5("womenInTech?",{decision:0===a})}};a.piracy1={id:"piracy1",isRandomEvent:!0,trigger:function(a){return 1<a.staff.length&&a.isLaterOrEqualThan(5)&&!a.flags.piracy1},getNotification:function(a){var b=a.staff.skip(1).pickRandom(),c=a.gameLog.last();a.flags.piracy1=
c.title;a.flags.selectedStaffName=b.name;return new Notification({sourceId:"piracy1",header:b.name,text:"Boss, it seems that quite a few players use illegal copies of {0}.\nI've managed to identify some of them.\nWe could either sue them to defend our copyright or send them warnings to ask them to stop.\nWhat do you want to do?".localize("{0} game title").format(c.title),options:["Sue them".localize("decision action button"),"Warn them".localize("decision action button")]})},complete:function(a){var b=
GameManager.company;b.activeNotifications.insertAt(0,new Notification({header:b.flags.selectedStaffName,text:"Right away!"}));var c=b.flags.piracy1,d="{n}"+"Piracy is an increasingly big problem in the industry. Some companies invest a lot of money and effort to fight piracy while others argue that it's better to take a more relaxed approach and invest in better games instead.".localize(),e=0===a?Math.floor(-(1E3+1300*b.getRandom())):Math.floor(100+300*b.getRandom());if(0===a){b.flags.evil++;ghg4.ghg5("evil");
var h=1E4*Math.floor(2+7*b.getRandom()),d=d+("{n}"+"We have lost {0} fans but won {1} in legal claims.".localize("{0} nr of fans, {1} cash amount").format(UI.getLongNumberString(e),UI.getShortNumberString(h))),c=new Notification({header:"News".localize("heading"),text:"In what some have called a drastic move, {0} has recently taken legal action against illegal players of their game {1}.".localize("{0} company name, {1} game name").format(b.name,c)+d,weeksUntilFired:2+3*b.getRandom()});c.adjustCash(h,
"legal claims".localize("expense label"))}else b.flags.good++,ghg4.ghg5("good"),d+="{n}"+"We have gained {0} fans!".localize().format(UI.getLongNumberString(e)),c=new Notification({header:"News".localize("heading"),text:"{0} has recently sent warnings to several players using illegal copies of their game {1}.".localize("{0} company name, {1} game title").format(b.name,c)+d,weeksUntilFired:2+3*b.getRandom()});c.adjustFans(e);b.notifications.push(c);ghg4.ghg5("piracy?",{decision:0===a})}};a.infringment=
{id:"infringment",isRandomEvent:!0,trigger:function(a){return void 0===a.flags.infringment&&a.gameLog.some(function(a){return 6<a.score})&&1<a.staff.length},getNotification:function(a){a.flags.infringment=!0;var b=a.staff.skip(1).pickRandom(),c=a.gameLog.filter(function(a){return 6<a.score}).pickRandom();a.flags.selectedStaffName=b.name;a.flags.infringmentGameName=c.title;return new Notification({sourceId:"infringment",header:b.name,text:"Boss, I've discovered that some really dedicated fans of {0} have created a fan game using a lot of the material from our game.\nThey don't make any money with it and just seem to do it for fellow fans. Our legal advisors strongly suggest that we shouldn't allow this to go on. What do you want to do?".localize("{0} game title").format(c.title),
options:["Stop them".localize("decision action button"),"Let them be".localize("decision action button")]})},complete:function(a){var b=GameManager.company;0===a?(b.flags.infringment=!0,b.activeNotifications.insertAt(0,new Notification({header:b.flags.selectedStaffName,text:"Right away!"})),b.flags.evil++,ghg4.ghg5("evil"),b.notifications.push(new Notification({sourceId:"infringmentCallback",header:"Project disbanded".localize("heading"),text:"Hi, I'm Denise Ried the main developer of the {0} fan game. I just want to tell you that upon your recent 'request' from your legal department my project has shut down.{n}I poured a lot of effort into this and have always loved your company but I guarantee you that I shall not 'bother' nor support you ever again.".localize("{0} game name").format(b.flags.infringmentGameName),
weeksUntilFired:2+3*b.getRandom()}))):(b.flags.infringment=!1,b.flags.good++,ghg4.ghg5("good"),b.notifications.push(new Notification({sourceId:"infringmentCallback",header:"Thank you".localize("heading"),text:"Hi, I'm Denise Ried the main developer of the {0} fan game. I've recently been informed that your legal department has advised you to stop us and I just wanted to say that I'm very grateful that you didn't.{n}{1} is the best company in the world and I'm glad I can be part of the fan community.".localize("{0} game name, {1} company name").format(b.flags.infringmentGameName,
b.name),weeksUntilFired:2+3*b.getRandom()})));ghg4.ghg5("infringement?",{decision:0===a})}};a.infringmentCallback={id:"infringmentCallback",complete:function(){var a=GameManager.company,b=a.flags.infringment,c=a.fans,c=Math.floor(0.05*c+0.05*c*a.getRandom());b&&(c*=-1);a.adjustFans(c);0<c?a.activeNotifications.insertAt(0,new Notification("Fans".localize("heading"),"We have gained {0} fans!".localize().format(UI.getLongNumberString(c)),":-)")):0>c&&a.activeNotifications.insertAt(0,new Notification("Fans".localize("heading"),
"We have lost {0} fans!".localize().format(UI.getLongNumberString(c)),":-("))}};a.codingContest={id:"codingContest",isRandomEvent:!0,trigger:function(a){return 2>a.currentLevel||(a.flags.codingContest||4>=a.staff.length||15E4>=a.cash||null!=a.currentGame)||a.staff.some(function(a){return a.state===CharacterState.Researching||a.state===CharacterState.Training||a.state===CharacterState.Vacation})?!1:!0},getNotification:function(a){var b=a.staff.skip(1).pickRandom();a.flags.selectedStaffName=b.name;
return new Notification({sourceId:"codingContest",header:b.name,text:"Boss, we would like to stage an internal coding contest! I think we could all learn a lot by doing this. As an incentive we would need a prize for the winner ({0}). We agreed that the prize will go to charity. Should we do it?".localize().format(UI.getShortNumberString(9E4)),options:["Yes".localize(),"No".localize()]})},complete:function(a){var b=GameManager.company;if(0===a)b.flags.codingContest=!0,b.activeNotifications.insertAt(0,
new Notification({header:b.flags.selectedStaffName,text:"Great! We will start right away!".localize()})),b.staff.forEach(function(a){GameManager.uiSettings.selectedChar=a.id;GameManager.codingContest(Training.codingContest,"training",a)});else{for(a=0;a<b.staff.length;a++)b.staff[a].name===b.flags.selectedStaffName&&b.staff[a].adjustEfficiency(-0.4);b.activeNotifications.insertAt(0,new Notification({header:b.flags.selectedStaffName,text:"Okay, maybe another time...".localize(),buttonText:":-("}))}}};
a.codingContestParticipationFinished=function(){for(var a=0;a<GameManager.company.staff.length;a++)if(GameManager.company.staff[a].currentResearch&&"codingContest"===GameManager.company.staff[a].currentResearch.id)return!1;a=GameManager.company.staff.slice().sort(function(a,b){return a.flags.codingContestDone-b.flags.codingContestDone}).first();GameManager.company.notifications.push(new Notification({header:"Coding Contest".localize("heading"),text:"Thanks for agreeing to the coding contest. It was a big success! {0} won the contest and is lucky to distribute the prize of {1} to charity. We have also learned a lot in the process.".localize().format(a.name,
UI.getShortNumberString(9E4)),weeksUntilFired:0.6}))};a.creditCard={id:"creditCard",isRandomEvent:!0,trigger:function(a){return 5E4<a.cash&&!a.flags.creditCardStolen&&1<a.staff.length&&2<=a.flags.evil},getNotification:function(a){a.flags.creditCardStolen=!0;a.flags.creditCardDamages=0.007*a.cash;var b=a.staff.skip(1).pickRandom();return new Notification({sourceId:"creditCard",header:b.name,text:"Boss, someone seems to have stolen our credit card information and used it to buy a lot of things in the past three months. Unfortunately we have lost {0}!".localize().format(UI.getLongNumberString(a.flags.creditCardDamages)),
buttonText:":-(",weeksUntilFired:12})},complete:function(){GameManager.company.flags.creditCardSwitched=!0}};var h="EPA".localize("heading for 'Environmental Protection Agency' story");a.solarPower={id:"solarPower",isRandomEvent:!0,trigger:function(a){return!a.flags.solarPowerInstalled&&2<a.currentLevel&&a.isLaterOrEqualThan(12)&&4E5<a.cash},getNotification:function(){return new Notification({sourceId:"solarPower",header:h,text:"I am an employee of the Environmental Protection Agency and have an offer for you. Your company has a high electrical footprint right now. If you would install solar panels you could decrease your footprint and save money in the long run. We would sponsor 50% of the costs which brings your investment to {0}!\nWould you like to install it?".localize("headings for this story need to use acronym consistent with the Environmental Protection Agency translation. look for 'heading for 'Environmental Protection Agency' story'").format(UI.getShortNumberString(2E5)),
options:["Install (pay {0})".localize("decision action button").format(UI.getShortNumberString(2E5)),"Ignore offer".localize("decision action button")]})},complete:function(a){0===a?(a=GameManager.company,a.flags.good++,ghg4.ghg5("good"),a.flags.solarPowerInstalled=!0,a.adjustCash(-2E5,"solar panels".localize("heading")),a.activeNotifications.insertAt(0,new Notification(h,"Great, it was a wise decision installing a solar collector!".localize(),":-)")),a.notifications.push(new Notification("Industry News".localize("heading"),
"{0} has recently installed solar panels in their offices. While the video game and software industries are one of the cleanest industries on earth they do eat up a lot of electricity so installing solar panels can really make an impact.".localize("{0} company name").format(a.name),"OK".localize(),4))):(a=GameManager.company,a.flags.evil++,ghg4.ghg5("evil"),a.activeNotifications.insertAt(0,new Notification(h,"Sorry to hear that you are declining our offer".localize(),"OK".localize())))}};a.airCon=
{id:"airCon1",isRandomEvent:!0,trigger:function(a){return(2===a.currentLevel||3===a.currentLevel)&&3<a.staff.length&&!a.flags.airCon1&&2E5<=a.cash},getNotification:function(a){a.flags.airCon1=!0;a=a.staff.skip(1).pickRandom();return new Notification({sourceId:"airCon1",header:a.name,text:"Boss, it's way too hot in our office and the heat is starting to impact on our work. I've researched and found an air conditioner which would be perfect for us. It costs {0}.\nShould we order it?".localize().format(UI.getShortNumberString(9E4)),
options:["Yes (pay {0})".localize("decision action button").format(UI.getShortNumberString(9E4)),"No".localize()]})},complete:function(a){var b=GameManager.company;0===a?(b.adjustCash(-9E4,"air conditioner".localize("heading")),b.flags.airConInstalled=!0,VisualsManager.installAirCon()):(b.staff.forEach(function(a){a.adjustEfficiency(-0.3)}),b.flags.airCon1Declined=15+15*b.getRandom()+b.currentWeek);ghg4.ghg5("aircon1?",{decision:0===a})}};a.airCon1Callback={id:"airCon1Callback",isRandomEvent:!1,trigger:function(a){return!a.flags.airConInstalled&&
(2===a.currentLevel||3===a.currentLevel)&&3<a.staff.length&&!a.flags.airCon2&&2E5<=a.cash&&void 0!=a.flags.airCon1Declined&&a.flags.airCon1Declined<a.currentWeek},getNotification:function(a){a=a.staff.skip(1).pickRandom();return new Notification({sourceId:"airCon1Callback",header:a.name,text:"Boss, the heat is becoming a serious problem. Just yesterday my mouse melted and my keyboard is covered in sweat. Not a good environment to work in. We really need an air conditioner.{n}Unfortunately the previous offer has expired and we would need to pay {0}.\nShould we order it?".localize("try to make the reason lightweight and fun").format(UI.getShortNumberString(18E4)),
options:["Yes (pay {0})".localize("decision action button").format(UI.getShortNumberString(18E4)),"No".localize()],weeksUntilFired:0})},complete:function(a){var b=GameManager.company;0===a?(b.adjustCash(-18E4,"air conditioner".localize("heading")),b.flags.airConInstalled=!0,VisualsManager.installAirCon()):(b.staff.forEach(function(a){a.adjustEfficiency(-0.4)}),b.flags.airCon2=!0,b.flags.airCon2Declined=15+15*b.getRandom()+b.currentWeek);ghg4.ghg5("aircon2?",{decision:0===a})}};a.airCon2Callback={id:"airCon2Callback",
isRandomEvent:!1,trigger:function(a){return!a.flags.airConInstalled&&(2===a.currentLevel||3===a.currentLevel)&&3<a.staff.length&&2E5<=a.cash&&void 0!=a.flags.airCon2Declined&&a.flags.airCon2Declined<a.currentWeek},getNotification:function(a){a=a.staff.skip(1).pickRandom();return new Notification({sourceId:"airCon2Callback",header:a.name,text:"Boss, We've had enough and ordered the air conditioner ourselves. Thanks for nothing.".localize(),weeksUntilFired:0})},complete:function(){var a=GameManager.company;
a.flags.evil-=2;ghg4.ghg5("evil");a.flags.airConInstalled=!0;VisualsManager.installAirCon();ghg4.ghg5("aircon3")}};a.productPlacement={id:"productPlacement1",isRandomEvent:!0,trigger:function(a){return 3<a.currentLevel&&!a.flags.productPlacement1},getNotification:function(a){a.flags.productPlacement1=!0;a="Dave Johnson here, CEO of Departure Science. Some of our test subjects were recently exposed to some of your games and, surprisingly, they didn't go totally insane. They seemed to quite enjoy the experience in fact. Anyway, I have some products that need advertising and could do with some product placement.{n}My marketing boys tell me that making you this offer is a bad idea but that's exactly why I want it. I'll pay you {0} to place some of our fine red painted exploding barrels in one of your games. What'd ya say?".localize("see Portal 2 reference hint").format(UI.getShortNumberString(2E5));
return new Notification({sourceId:"productPlacement1",header:"Product Placement".localize("heading"),text:a,options:["Sure!".localize("decision action button"),"No".localize()]})},complete:function(a){var b=GameManager.company;0===a&&(b.adjustCash(2E5,"Departure Science".localize("see Portal 2 reference hint")),b.activeNotifications.push(new Notification("Message","Excellent! Good to hear you have some spirit in you. One more thing: Don't feel like you have to go and rush those barrels into your next game. I'd rather have you place them in a game where they fit well.\nJohnson out.".localize("see Portal 2 reference hint"))),
b.flags.productPlacement1Active=!0,b.specialItems.push(Research.ProductPlacement1));ghg4.ghg5("productPlacement?",{decision:0===a})}};a.productPlacement1Finished={trigger:function(a){return a.flags.productPlacement1Active&&!a.flags.productPlacement1Finished&&0<a.gameLog.length&&-1!=a.gameLog.last().features.indexOf(Research.ProductPlacement1)},id:"productPlacement1Finished",getNotification:function(a){a.flags.productPlacement1Finished=!0;a.specialItems.remove(Research.ProductPlacement1);var b=a.gameLog.last().genre===
GameGenre.Action,c="Dave Johnson here! Listen! You did well placing our beloved barrels in {0} - my marketing eggheads say profits are increasing which means more science for us. Well done. Here, have this cake.".localize("see Portal 2 reference hint");b?a.flags.hadCake=!0:c="Dave Johnson here! Listen! Those red exploding barrels I'd asked you to place in your game. Well, seems that folks didn't really enjoy them as much in {0}. Oh well, was worth a try.".localize("see Portal 2 reference hint");c=
c.format(a.gameLog.last().title);a=new Notification("Message".localize("heading"),c,"OK".localize(),4);b&&(a.image="./images/misc/cake.png",a.activateAchievement(Achievements.cake));ghg4.ghg5("product placement finished",{success:b});return a}};a.announceConsole={id:"announceConsole",trigger:function(){return!1},getNotification:function(){var a=GameManager.currentHwProject,a="Boss, I think it's time to announce the {0} to the world. Should we go ahead and make a press release?".localize("{0} custom console name").format(a.name);
return new Notification({sourceId:"announceConsole",header:"Hardware lab".localize(),text:a,options:["Announce".localize("decision action button"),"Don't announce".localize("decision action button")]})},complete:function(a){var b=GameManager.company;if(0===a){var c=GameManager.currentHwProject,d;if(1===GameManager.currentHwProject.version)d="In a surprise announcement {0}, a company known for games such as {1} has revealed that they have been working on their very own game console. The console which is called {2} is said to compete with the high end consoles from companies like Mirconoft and Vonny.{n}We are eager to see how much of an impact this new console will have.".localize().format(b.name,
b.getBestSeller().title,c.name);else{d=b.licencedPlatforms.last(function(a){return a.isCustom});var e=0.7>d.successFactor?" which had only limited commercial success.".localize("consoleAnnouncementPastSuccessFragment"):1>=d.successFactor?"which had moderate commercial success.".localize("consoleAnnouncementPastSuccessFragment"):"which had a sizeable following and really made an impact in the market.".localize("consoleAnnouncementPastSuccessFragment");d="{0} has announced that they are working on a new game console. The console named {1} is planned as a successor to their earlier contender, the {2} ".localize("{2} is consoleAnnouncementPastSuccessFragment").format(b.name,
c.name,d.name)+e}b.activeNotifications.insertAt(0,new Notification("Hardware lab".localize(),"I will get right to it.".localize()));d=new Notification({header:"Industry News".localize("heading"),text:d,image:GameManager.currentHwProject.iconUri,weeksUntilFired:0.7});c.announced=!0;b.notifications.push(d)}else b.activeNotifications.insertAt(0,new Notification("Hardware lab".localize(),"Okay, you are the boss.".localize()));ghg4.ghg5("announce console?",{decision:0===a})}};a.endOfGame1={id:"endOfGame1",
trigger:function(){return!1},isRandom:!1,getNotification:function(){var a=DataStore.remoteSettings.supporterPacksEnabled,b="Congratulations on finishing Game Dev Tycoon and thank you for playing! If you enjoyed our little game then please consider rating the game on the Store. You can also send us some feedback".localize("gameFinishMsg, either stops with a . or continues with fragment"),b=a?b+" and, if you really loved the game, you can (if you wish) vote with your wallet to support us even further.".localize("fragment of gameFinishMsg"):
b+".";return new Notification({sourceId:"endOfGame1",header:"Thank you".localize("heading"),text:b,image:"images/greenheart.png",options:["See options...".localize("decision action button"),"No, thanks".localize("decision action button")]})},complete:function(a){var b=GameManager.company,c=new Notification("Continue game".localize("heading"),"If you wish you can continue playing but please note that there will be no more platform releases or other story elements.".localize());0===a&&b.notifications.push(new Notification("{SupportGreenheartGames}"));
b.notifications.push(c);ghg4.ghg5("show support options?",{decision:0===a})}};a.endOfGameNative={id:"endOfGameNative",trigger:function(){return!1},isRandom:!1,getNotification:function(){var a="Congratulations on finishing Game Dev Tycoon and thank you for playing! If you enjoyed our little game then please consider telling your friends about it.".localize()+"{n}"+"If you wish you can continue playing but please note that there will be no more platform releases or other story elements.".localize();
return new Notification({header:"Thank you".localize("heading"),text:a,image:"images/greenheart.png"})}};a.gameinterview={id:"gameinterview",trigger:function(a){return a.isGameProgressBetween(0.2,0.9)&&1E4<a.fans&&(!a.flags.lastInterviewEvent||a.flags.lastInterviewEvent<GameManager.gameTime-8E4*GameManager.SECONDS_PER_WEEK)},isRandom:!0,getNotification:function(a){if(a.currentGame){var b=SalesEvents.getPossibleSources(a).pickRandom();a.flags.lastInterviewEvent=GameManager.gameTime;a.flags.interviewSource=
b;a="Hi, this is {0} from {1}. I got word that {2} is working on a new game.\nWould you be willing to share some information on your current game project and do an interview about it?".localize().format(b.author,b.name,a.name);return new Notification({sourceId:"gameinterview",header:"Media Enquiry".localize("heading"),text:a,options:["Agree".localize("decision action button"),"Decline".localize("decision action button")]})}},complete:function(b){var c=GameManager.company,d=c.flags.interviewSource,
e=c.currentGame;if(0===b)c.flags.secrecy--,c.activeNotifications.addRangeAt(0,a.gameInterviewQuestions.getNotification(c,e).split());else if(c.flags.secrecy++,0.5<=c.getRandom()){var h=c.gameLog.slice(-1)[0],g="{0} has declined a request for an interview about their current project.\n".localize().format(c.name),b=0;7<=h.score?(g+="Given that their most recent game {0} enjoyed universal success we simply cannot wait for them to unveil their new project!".localize().format(h.title),b+=20+20*c.getRandom()):
5<h.score?(g+="With {0} only receiving a lukewarm reception, fans are sure to be expecting better from them and we are curious about their next title.".localize().format(h.title),b+=10+10*c.getRandom()):(g+="Hopefully the company can do better than last time. We don't need another {0}.".localize().format(h.title),b+=5+5*c.getRandom());b*=General.getGameSizePointsFactor(e);2<c.flags.secrecy&&(b*=2);b=Math.round(b);d=new Notification({header:d.name,text:g,weeksUntilFired:0.2+0.2*c.getRandom()});d.adjustHype(b);
c.notifications.push(d)}}};a.gameInterviewQuestions={id:"gameInterviewQuestions",getNotification:function(b,c){return[a.gameInterviewQ1,a.gameInterviewQ2].pickRandom().getNotification(b,c)}};a.gameInterviewQ1={id:"gameInterviewQ1",getNotification:function(a,b){var c=a.flags.interviewSource;return new Notification({sourceId:"gameInterviewQ1",header:c.name,text:"{0}:\nWhat is your expectation regarding the success of {1}? Do you think that the game will be well received?".localize().format(c.author,
b.title),options:["Hype game!".localize(),"Be modest.".localize()]})},complete:function(a){var b=GameManager.company,c=b.currentGame;0===a?(c.flags.interviewHyped={decision:!0,source:$.extend({},b.flags.interviewSource)},c.hypePoints+=Math.round(60+40*b.getRandom())):c.hypePoints+=Math.round(20+20*b.getRandom());b.notifications.push(new Notification(b.flags.interviewSource.name,"Thank you for your time.".localize()))}};a.gameInterviewQ2={id:"gameInterviewQ2",getNotification:function(a,b){var c=a.flags.interviewSource,
d=Missions.DevMissions.filter(function(a){return 0.9<=Missions.getGenreWeighting(a,b)}).pickRandom(),e=Missions.DevMissions.filter(function(a){return 0.9>Missions.getGenreWeighting(a,b)}).pickRandom(),h=0.5<a.getRandom(),g;h?(g=d.name,d=e.name):(g=e.name,d=d.name);e="{0}:\nMany of our readers are curious about what decisions go into making a video game and how companies prioritize development areas.\nYour new game is a {1}/{2} game, can you tell us whether such a game would usually receive more focus on {3} or on {4}?".localize().format(c.author,
b.topic.name,b.getGenreDisplayName(),g,d);b.flags.gameInterviewQ2={option1:g,option2:d,correctOption:h?0:1,gameName:b.title,gameDescr:b.topic.name+"/"+b.getGenreDisplayName()};return new Notification({sourceId:"gameInterviewQ2",header:c.name,text:e,options:["More on {0}".localize().format(g),"More on {0}".localize().format(d),"I don't know".localize()]})},complete:function(a){var c=GameManager.company,d=c.currentGame,e=c.flags.interviewSource,h=d.flags.gameInterviewQ2,g="In a recent interview with {0} we discussed their upcoming {1} game and asked company founder {2} how different development areas are prioritized.\nIn the interview {2} said that {3} is of particular importance for such a game ".localize("continues with fragment").format(b(),
h.gameDescr,c.staff[0].name,2==a?"they are still experimenting what area".localize("sentence fragment"):0===a?h.option1:h.option2),g=(d=a===d.flags.gameInterviewQ2.correctOption)?g+"and it seems that other industry professionals agree with this. Every game development project has limited resources so it's very important to use the time most effectively.".localize("sentence fragment"):g+"but it seems that other industry professionals disagree with that point of view saying that {0} is usually more important for this type of game.".localize("sentence fragment").format(0===
h.correctOption?h.option1:h.option2),h=new Notification({header:e.name,text:g,weeksUntilFired:0.6+0.2*c.getRandom()});2!=a&&(d&&h.adjustFans(Math.floor(200+1E3*c.getRandom())),h.adjustHype(Math.round(5+20*c.getRandom()*d?2:0)));c.notifications.push(new Notification(e.name,"Thank you for your time.".localize()));c.notifications.push(h)}};a.OldEngine={id:"oldEngine",isRandomEvent:!0,trigger:function(a){return a.engines&&a.engines.some(function(a){return!a.isSold&&a.releaseWeek+240<GameManager.company.currentWeek})&&
a.isLaterOrEqualThan(10,3,4)},getNotification:function(a){var b=a.engines.filter(function(a){return!a.isSold&&a.releaseWeek+240<GameManager.company.currentWeek}).pickRandom();a.flags.engineEventId=b.id;a="Boss, a small number of dedicated fans have asked that we release the source code to one of our older game engines '{0}'. Doing so would surely satisfy these fans but given that we worked hard on the engine, we could also sell licenses for it and make some money. Alternatively, we could simply refuse their request completely.\nWhat would you like to do?".localize().format(b.name);
return new Notification({sourceId:"oldEngine",header:"Old Engine",text:a,options:["Give it away".localize(),"Sell it".localize(),"Refuse".localize()]})},complete:function(a){var b=GameManager.company,c=b.engines.first(function(a){return a.id==b.flags.engineEventId});if(c){c.isSold=2!=a;var d=(0.02*b.fans+0.05*b.fans*b.getRandom()).clamp(1E3,2E4),e=-2E3+-3E3*b.getRandom(),h,g;switch(a){case 0:h="give away".localize();g="positive".localize();0.5<b.getRandom()&&(d*=2,g="outstanding".localize());break;
case 1:h="sell".localize();e=2*d+1.5*d*b.getRandom();d/=5;g="mixed".localize();0.5<b.getRandom()&&(g="negative".localize(),d*=-1);0.5<b.getRandom()&&(e*=3);break;case 2:0.3>b.getRandom()&&(-1*d,a=new Notification({header:"Old Engine".localize(),text:"Boss, it seems the fans who requested that we open source {0} were particularly upset with our decision and have caused quite a negative stirr. We've lost {1} fans.".localize().format(c.name,UI.getShortNumberString(d)),weeksUntilFired:0.2+0.3*b.getRandom()}),
a.adjustFans(Math.round(d)),b.notifications.push(a));return}d=Math.round(d);e=Math.round(e);msg="Boss, our recent decision to {0} our engine {1} was met with {2} responses from fans. Overall we {3} fans and {4}.".localize().format(h,c.name,g,(0<d?"gained".localize():"lost".localize())+" "+UI.getShortNumberString(d),(0>e?"it cost us {0}".localize():"we made {0}".localize("{0} is amount of money")).format(UI.getShortNumberString(e)));a=new Notification({header:"Old Engine".localize(),text:msg,weeksUntilFired:0.3+
0.9*b.getRandom()});a.adjustCash(e);a.adjustFans(d);b.notifications.push(a)}}};a.patentTroll={id:"patentTroll",isRandomEvent:!0,trigger:function(a){return 2E6<=a.cash&&a.isLaterOrEqualThan(10)&&a.engines&&3<=a.engines.length&&a.engines.last().releaseWeek>a.currentWeek-20&&a.engines.last().releaseWeek<a.currentWeek-1&&(!a.flags.lastPatentTroll||!a.flags.lastPatentTroll.disabled&&a.flags.lastPatentTroll.week+192<a.currentWeek)},getNotification:function(a){a.flags.lastPatentTroll={week:a.currentWeek,
count:0};var b=a.engines.last(),c=a.cash/8,d=1E5+2E5*a.getRandom();c<d&&(c=d);c=Math.floor(c);a.flags.lastPatentTroll.cost=c;d=30+10*Math.floor(6*(a.fans/15E4).clamp(0,1));a.flags.lastPatentTroll.fanChance=d;a="We've just received a letter from a company called 'All Your IP Belongs To US' and they say that our engine {0} is infringing on one of their patents.{n}They 'graciously' offer a license to their patent for {1} and are willing to give us a 50% discount if we just pay them without fighting them in court. We could pay this and hope that they won't bother us again or we could refuse and try to resolve this in front of the courts. Alternatively we might be able to rally our fans and publicly fight them.\nHow would you like to proceed?".localize().format(b.name,
UI.getShortNumberString(c));return new Notification({sourceId:"patentTroll",header:"Legal Department".localize(),text:a,options:["Pay for license ({0})".localize().format(UI.getShortNumberString(Math.floor(c/2))),"Go to court. [~{0}% chance]".localize().format(50),"Rally fans! [~{0}% chance]".localize().format(d)]})},complete:function(a){var b=GameManager.company;if(0===a)b.adjustCash(-Math.floor(b.flags.lastPatentTroll.cost/2));else{var c=0,d=0,e=!1,h=Math.round(b.flags.lastPatentTroll.cost/20);
if(1===a){var g=0.5<b.getRandom(),a=g?"The court dismissed the patent infringement claims made against us stating that the claim was ridiculous. All costs were paid by the suing party.".localize():"Unfortunately, it seems that the patent infringement case was decided against us. We have to pay the full amount of {0} as well as the court costs of {1}. This is ridiculous.".localize().format(UI.getShortNumberString(b.flags.lastPatentTroll.cost),UI.getShortNumberString(h));g||(c-=b.flags.lastPatentTroll.cost+
h)}else g=b.flags.lastPatentTroll.fanChance,a="We rallied our fans to publicly fight against All Your IP Belongs To US".localize("continues with fragment"),b.getRandom()<g/100?(d=Math.floor(1E4+1E4*b.getRandom()),a+=" and fight we did! We not only caused them to retract their claims but we also won {0} fans and the public's admiration. I doubt we will hear from those patent trolls again.".localize("sentence fragment").format(UI.getLongNumberString(d)),e=!0):(a+=" but it seems that our efforts were fruitless. Seems we still have to pay {0} and the court costs of {1}. Maybe next time we'll have more luck.".localize("sentence fragment").format(UI.getShortNumberString(b.flags.lastPatentTroll.cost),
UI.getShortNumberString(h)),c=-b.flags.lastPatentTroll.cost-h);h=new Notification({header:"Legal Department".localize(),text:a,weeksUntilFired:2+2*b.getRandom()});c&&h.adjustCash(c,"All Your IP Belongs To US".localize());d&&h.adjustFans(d);b.notifications.push(h)}b.flags.lastPatentTroll.count?b.flags.lastPatentTroll.count++:b.flags.lastPatentTroll.count=1;if(3==b.flags.lastPatentTroll||e)b.flags.lastPatentTroll.disabled=!0}}})();var ProjectContracts={};
(function(){var a=ProjectContracts;a.getAvailable=function(b,c){for(var d=[],e=a.getAllContracts().filter(function(a){return(!a.type||a.type==c)&&a.isAvailable&&a.isAvailable(b)}),f=0;f<e.length;f++){var h=e[f].getContract(b);h instanceof Array?d.addRange(h):d.push(h)}return d};a.getAllContracts=function(){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];void 0!=d.id&&b.push(d)}return b};var d=[{name:"Logo Animation".localize("heading"),description:"Create an animation for an existing logo.".localize(),
tF:1,dF:2.5,rF:1.5},{name:"Character Design".localize("heading"),description:"Design some game characters.".localize(),tF:1,dF:4.5,rF:1.5},{name:"Playtest".localize("heading"),description:"Help to playtest a game.".localize(),tF:1,dF:1,rF:1.5},{name:"Game Backdrops".localize("heading"),description:"Design some simple background graphics for a game.".localize(),tF:1,dF:2,rF:1.5},{name:"Setup Computers".localize("heading"),description:"Install Mirconoft BOSS on computers".localize(),tF:2,dF:0.4},{name:"Debug program".localize("heading"),
description:"Help debugging a convoluted BASE program.".localize(),tF:2,dF:0.2},{name:"Spritesheet Software".localize("heading"),description:"Our staff needs to be taught how to use these modern technologies.".localize(),tF:3,dF:2},{name:"Library Software".localize("heading"),description:"Develop a simple library management system".localize(),tF:5,dF:1}],c=[{name:"Usability Study".localize("heading"),description:"Perform a detailed usability study.".localize(),tF:5,dF:6.5},{name:"Review Game Concept".localize("heading"),
description:"Review a game concept using your expertise.".localize(),tF:3,dF:8,rF:1.5},{name:"Game Art".localize("heading"),description:"Help out on a project with some game art".localize(),tF:5,dF:6,rF:1.5},{name:"Clean up database".localize("heading"),description:"Should one table really have 200 columns? Probably not.".localize(),tF:5,dF:1},{name:"Accounting Software".localize("heading"),description:"Develop a simple accounting software. Are those ever simple?".localize(),tF:5,dF:1},{name:"Time Tracking".localize("heading"),
description:"Design and develop a time tracking system.".localize(),tF:3,dF:1},{name:"Design a board game".localize("heading"),description:"Let's see how your skills translate to traditional games.".localize(),dF:5,tF:0.2,rF:2},{name:"Horoscope Generator".localize("heading"),description:"Making up horoscopes is hard work. We want it automated.".localize(),dF:5,tF:1},{name:"Character Dialogues".localize("heading"),description:"Improve our character dialogues.".localize(),dF:5,tF:1,rF:1.4},{name:"Futuristic Application".localize("heading"),
description:"We need an application that looks futuristic for a movie.".localize(),dF:3,tF:2,rF:1.5},{name:"Vacuum Robot".localize("heading"),description:"Create a revolutionary AI for a vacuum robot".localize(),tF:2,dF:1.4},{name:"Website".localize("heading"),description:"We just heard of this thing called internet. We want to have one.".localize(),tF:2,dF:1.3}],b=[{name:"Game Port".localize("heading"),description:"Port a game to a different platform.".localize(),tF:3.2,dF:1.7,rF:1.2},{name:"Cut Scenes".localize("heading"),
description:"Deliver professional cut scenes for a game.".localize(),tF:1,dF:1,rF:1.5},{name:"Space Shuttle".localize("heading"),description:"Deliver part of the space shuttle control software.".localize(),tF:3,dF:2},{name:"Alien Search".localize("heading"),description:"Optimize our search for alien life forms using advanced AI techniques.".localize(),tF:3,dF:1.8,rF:1.3},{name:"Movies".localize("heading"),description:"We need your skills in our latest blockbuster production.".localize(),tF:1,dF:1,
rF:1.5}];a.genericContracts={id:"genericContracts",type:"generic",isAvailable:function(){return!0},getContract:function(a){var f=l(a,"small"),j=e(f),j=new MersenneTwister(j),f=h(f,d,"small",4);a.flags.mediumContractsEnabled&&f.addRange(h(l(a,"medium"),c,"medium",3));a.flags.largeContractsEnabled&&f.addRange(h(l(a,"large"),b,"large",2));return f.shuffle(j).filter(function(a){return!a.skip})},complete:function(a,b,c){l(a,c.size).contractsDone.push(c.index);b?a.notifications.push(f(c)):a.notifications.push(j(c));
GameManager.contractFinished(b)}};var g=function(a){a.seed=Math.floor(65535*Math.random());a.expireBy=GameManager.gameTime+24E3*GameManager.SECONDS_PER_WEEK;a.contractsDone=[]},e=function(a){a.seed?a.expireBy<=GameManager.gameTime&&(g(a),a.initialSettings=!1):(g(a),a.initialSettings=!0);return a.seed},h=function(a,b,c,d){var f=e(a),f=new MersenneTwister(f),h=[],b=b.slice(),d=m(f,d);a.initialSettings&&(d=Math.max(1,d));for(var j=0;j<d&&0<b.length;j++){var g=b.pickRandom(f);b.remove(g);var l=c,k=f,
n=k.random();0.8<k.random()&&(n+=k.random());var u=11;"medium"==l?u=30:"large"==l&&(u=100);12==u&&2<GameManager.company.staff.length&&(u+=6);var A=GameManager.company.getCurrentDate().year/25,u=u+u*A,A=u+u*n,u=A/(g.dF+g.tF),n=u*g.dF,u=u*g.tF,n=n+0.2*n*k.random()*k.randomSign(),u=u+0.2*u*k.random()*k.randomSign(),n=Math.floor(n),u=Math.floor(u),A=1E3*A,A=A/1E3,A=1E3*Math.floor(A),J=Math.floor(3+7*k.random());"small"===l&&(J=Math.floor(3+3*k.random()));k=0.2*A+0.3*A*k.random();k/=1E3;k=1E3*Math.floor(k);
g=contract={name:g.name,description:g.description,requiredD:n,requiredT:u,spawnedD:0,spawnedT:0,payment:A,penalty:-k,weeksToFinish:J,rF:g.rF,isGeneric:!0,size:l};g.id="genericContracts";g.index=j;-1!=a.contractsDone.indexOf(j)&&(g.skip=!0);h.push(g)}return h},f=function(a){var b=["Thank you for taking care of this for us.".localize(),"Well done.".localize(),"Just what we wanted.".localize(),"Excellent work.".localize(),"Thank you for the quick work.".localize(),"Would hire again.".localize(),"Nice job.".localize(),
"Success!".localize()],b=new Notification({header:"Contract Successful".localize("heading"),text:b.pickRandom()+"\n"+"We will transfer {0} to your account.".localize().format(UI.getShortNumberString(a.payment)),weeksUntilFired:0.2});b.adjustCash(a.payment,"contract payment".localize("heading"));return b},j=function(a){var b=["This is very disappointing.".localize(),"You didn't complete the contract on time".localize(),"Hope you can make it next time.".localize(),"Seems like this was too big of a job for you.".localize(),
"Unfortunately the deadline is here.".localize()],a=a.penalty,b=new Notification({header:"Contract Failed".localize("heading"),text:b.pickRandom()+"\n"+"A penalty of {0} will be applied to your account.".localize().format(UI.getShortNumberString(a)),weeksUntilFired:0.2});b.adjustCash(a,"contract penalty".localize("heading"));return b},l=function(a,b){var c="contracts"+b,d=a.flags[c];d||(d={id:c},a.flags[c]=d);return d};a.publisherContracts={id:"publisherContracts",type:"gameContract",isAvailable:function(){return!0},
getContract:function(a){var b=l(a,"publisher");return n(a,b,5).filter(function(a){return!a.skip})},complete:function(a,b,c){var d;d=b?["The game meets the required ratings. We are looking forward to future business.".localize()].pickRandom():["The game doesn't live up to expectations.\nAs per contract a penalty will be applied to your account.".localize()].pickRandom();d=new Notification({header:"Publisher".localize("heading"),text:c.publisher+": "+d,weeksUntilFired:2+2*a.getRandom()});b||d.adjustCash(-c.penalty,
"contract penalty".localize("heading"));a.notifications.push(d)}};var m=function(a,b){var c=a.random();return Math.max(b-1,Math.floor(c*b))},k=[{id:"ActiveVisionaries",name:"Active Visionaries"},{id:"ea",name:"Electronic Mass Productions"},{id:"RockvilleSoftworks",name:"Rockville Softworks"},{id:"BlueBitGames",name:"Blue Bit Games"},{id:"CapeCom",name:"CapeCom"},{id:"Codemeisters",name:"Codemeisters"},{id:"DeepPlatinum",name:"Deep Platinum"},{id:"InfroGames",name:"InfroGames"},{id:"LoWoodProductions",
name:"LoWood Productions"},{id:"TGQ",name:"TGQ"},{id:"\u00dcberSoft",name:"\u00dcberSoft"}],n=function(a,b,c){var d=[],f=b.seed,h=new MersenneTwister(e(b));b.seed!=f&&(b.topics=void 0,b.researchedTopics=void 0,b.excludes=void 0,b.platforms=void 0);var j,g;if(b.topics){f=b.topics.map(function(a){return Topics.topics.first(function(b){return b.id===a})});j=b.researchedTopics.map(function(a){return Topics.topics.first(function(b){return b.id===a})});var l=Platforms.getPlatforms(a,!0);g=b.platforms.map(function(a){return l.first(function(b){return b.id===
a})})}else{g=General.getTopicOrder(a);var f=[],n=0;j=[];for(var z=0;z<g.length;z++){var u=g[z];-1!=a.topics.indexOf(u)?(f.push(u),j.push(u)):n<Research.TOPICS_VISIBLE&&(n++,f.push(u))}b.topics=f.map(function(a){return a.id});b.researchedTopics=j.map(function(a){return a.id});g=Platforms.getPlatformsOnMarket(a).filter(function(a){return!a.isCustom&&Platforms.doesPlatformSupportGameSize(a,"medium")});b.platforms=g.map(function(a){return a.id});b.excludes=[];(z=a.gameLog.last())&&b.excludes.push({genre:z.genre.id,
topic:z.topic.id})}n=b.excludes.slice();c=m(h,c);b.initialSettings&&(c=Math.max(1,c));b=["medium"];a.canDevelopLargeGames()&&b.addRange(["large","large","large"]);for(var A=["young","everyone","mature"],J={medium:15E4,large:75E4},z=0;z<c;z++){var E=0,C=void 0,u=void 0;0.7>=h.random()&&(C=General.getAvailableGenres(a).pickRandom(h),E+=0.1);if(0.7>=h.random()){do if(u=0.7>=h.random()?f.except(j).pickRandom(h):f.pickRandom(h),void 0===u)break;while(n.some(function(a){return(C===void 0||a.genre===C.id)&&
a.topic===u.id}));void 0!=u&&(E+=0.1)}if(C||u)n.push({genre:C?C.id:void 0,topic:u?u.id:void 0});var B=void 0;0.7>=h.random()&&(B=g.pickRandom(h));var L=void 0;a.canSetTargetAudience()&&0.2>=h.random()&&(L=A.pickRandom(h));var E=E+0.8*h.random(),I=4+Math.floor(5*E),D;do D=b.pickRandom(h);while(void 0!=B&&!Platforms.doesPlatformSupportGameSize(B,D));var F=J[D]*(I/10),F=F/5E3,F=5E3*Math.max(1,Math.floor(F)),G=1.2*F+1.8*F*h.random(),G=G/5E3,G=5E3*Math.floor(G),K;K=B&&B.company&&0.2>=h.random()?B.company:
k.pickRandom(h).name;var E=Math.floor(7+8*E)/100,H=u?u.name:"Any Topic".localize(),H=H+(" / "+(C?C.name:"Any Genre".localize()));!B||Platforms.getPlatformsOnMarket(a).first(function(a){return a.id===B.id})?d.push({id:"publisherContracts",refNumber:Math.floor(65535*Math.random()),type:"gameContract",name:H,description:"Publisher: {0}".localize().format(K),publisher:K,topic:u?u.id:u,genre:C?C.id:C,platform:B?B.id:void 0,gameSize:D,gameAudience:L,minScore:I,payment:F,penalty:G,royaltyRate:E}):c++}return d}})();
var FlippingCounter={};
(function(){var a=FlippingCounter;a.panel;a.img0=new Image;a.img1=new Image;a.img2=new Image;a.img3=new Image;a.img4=new Image;a.img5=new Image;a.img6=new Image;a.img7=new Image;a.img8=new Image;a.img9=new Image;a.img10=new Image;a._activeUITweens;a.loaderImageAmount=10;a.numberBitmapsArr=[];a.rectUp=new createjs.Rectangle(0,0,104,91);a.rectDown=new createjs.Rectangle(0,91,104,91);a.getAllImages=function(){return"./images/superb/counter/0.png ./images/superb/counter/1.png ./images/superb/counter/2.png ./images/superb/counter/3.png ./images/superb/counter/4.png ./images/superb/counter/5.png ./images/superb/counter/6.png ./images/superb/counter/7.png ./images/superb/counter/8.png ./images/superb/counter/9.png ./images/superb/counter/panel.png".split(" ")};var d;
a.init=function(){d||(d=!0,this.img0.src="./images/superb/counter/0.png",this.img1.src="./images/superb/counter/1.png",this.img2.src="./images/superb/counter/2.png",this.img3.src="./images/superb/counter/3.png",this.img4.src="./images/superb/counter/4.png",this.img5.src="./images/superb/counter/5.png",this.img6.src="./images/superb/counter/6.png",this.img7.src="./images/superb/counter/7.png",this.img8.src="./images/superb/counter/8.png",this.img9.src="./images/superb/counter/9.png",this.img10.src=
"./images/superb/counter/panel.png",this.img0.onload=this.handleImageLoad,this.img1.onload=this.handleImageLoad,this.img2.onload=this.handleImageLoad,this.img3.onload=this.handleImageLoad,this.img4.onload=this.handleImageLoad,this.img5.onload=this.handleImageLoad,this.img6.onload=this.handleImageLoad,this.img7.onload=this.handleImageLoad,this.img8.onload=this.handleImageLoad,this.img9.onload=this.handleImageLoad,this.img10.onload=this.handleImageLoad)};a.handleImageLoad=function(){a.loaderImageAmount--;
if(0==a.loaderImageAmount){for(var c=0;10>c;c++)a.numberBitmapsArr[c]=[],a.numberBitmapsArr[c].up=new createjs.Bitmap(a["img"+c]),a.numberBitmapsArr[c].down=new createjs.Bitmap(a["img"+c]);a.panel=new createjs.Bitmap(a.img10)}};a.FlippingBox=function(c,b){this.container=new createjs.Container;var d=[];this.init=function(){for(var e=0;e<c;e++){var h=new a.FlippingNumber(0);h.init();h.container.x=e*(a.rectUp.width+b);this.container.addChild(h.container);d.push(h)}};this.fill=function(b){var b=(""+b).split("").splice(0,
c),h=c-b.length;if(0<h)for(var f=0;f<h;f++)b.splice(0,0,"0");for(f=0;f<d.length;f++)d[f].setNumber(!1==a.is_int(b[f])?0:b[f])}};a.is_int=function(a){return parseFloat(a)==parseInt(a)&&!isNaN(a)?!0:!1};a.FlippingNumber=function(c){function b(){j=a.numberBitmapsArr[l].down.clone();j.sourceRect=a.rectDown;j.scaleY=0;j.y=91;this.container.addChild(j);Sound.playSoundOnce("flipflap",0.5);0==k.length&&0==n.length?a._activeUITweens.push(createjs.Tween.get(j).to({scaleX:1,scaleY:1},this.speedUltimateDown,
createjs.Ease.backOut).call(d,null,this)):a._activeUITweens.push(createjs.Tween.get(j).to({scaleX:1,scaleY:1},this.speedDown,createjs.Ease.lineer).call(d,null,this))}function d(){this.container.removeChild(e);this.container.removeChild(h);e=f;h=j;this.currentLetter=l;0<k.length?(this.shiftAt(k[0]),k.splice(0,1)):(m=!1,0<n.length&&(console.log(n[n.length-1],n),this.setNumber(n[n.length-1]),n=[]))}this.container=new createjs.Container;this.currentLetter=c;this.speedDown=this.speedUp=100;this.speedUltimateUp=
250;this.speedUltimateDown=500;var e=a.numberBitmapsArr[this.currentLetter].up.clone(),h=a.numberBitmapsArr[this.currentLetter].down.clone(),f,j,l,m=!1,k=[],n=[];this.init=function(){e.sourceRect=a.rectUp;e.regY=e.y=91;h.sourceRect=a.rectDown;h.y=91;this.container.addChild(e);this.container.addChild(h)};this.setNumber=function(a){if(!1==m){if(a!=this.currentLetter){m=!0;if(a>this.currentLetter)var b=this.currentLetter+1;else{for(b=this.currentLetter+1;9>=b;b++)k.push(b);b=0}for(;b<=a;b++)k.push(b);
this.shiftAt(k[0]);k.splice(0,1)}}else n.push(a)};this.shiftAt=function(c){l=c;f=a.numberBitmapsArr[l].up.clone();f.sourceRect=a.rectUp;f.regY=f.y=91;this.container.addChild(f);this.container.swapChildren(f,e);speed=0==k.length?this.speedUltimateUp:this.speedUp;a._activeUITweens.push(createjs.Tween.get(e).to({scaleX:1,scaleY:0},speed,createjs.Ease.lineer).call(b,null,this))}}})();var Knowledge={};
(function(){Knowledge.hasComboKnowledge=function(a,b,c){c||(c=a.knowledge);return!c.combos?!1:c.combos.first(function(a){return a.topicId==b.topic.id&&a.genreId==b.genre.id&&(!b.secondGenre||b.secondGenre.id==a.secondGenreId)})};Knowledge.setComboKnowledge=function(b,c){a(b,c,b.knowledge);a(b,c,e)};var a=function(a,b,c){c.combos||(c.combos=[]);Knowledge.hasComboKnowledge(a,b,c)||(a={topicId:b.topic.id,genreId:b.genre.id},b.secondGenre&&(a.secondGenreId=b.secondGenre.id),c.combos.push(a))};Knowledge.getComboHintText=
function(a){a=GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre,a.secondGenre);return Knowledge.getFactorAdj(a,!0)};Knowledge.getFactorAdj=function(a,b){a=Math.round(10*a)/10;return 1<=a?b?"great".localize():"+++":0.9<=a?b?"good".localize():"++":0.8<=a?b?"okay".localize():"+":0.7<=a?b?"bad".localize():"--":b?"terrible".localize():"---"};Knowledge.getPlatformAudienceHintHtml=function(a,b){if(!a.canSetTargetAudience())return"";var c=Knowledge.getPlatformAudienceWeightingKnowledge(a,b);return Knowledge.getAudienceHintHtml(c,
!0)};Knowledge.getAudienceHintHtml=function(a,b){var c="";b&&(c='<span style="font-weight:bold">{0}</span>'.format("Audience match:".localize()));if(!a||0===a.sum())return c+' <span style="font-style:italic">{0}</span>'.format("unknown".localize());var d=function(a,b){if(!b||0==b)return'<span style="opacity=0.5;font-style:italic">{0}</span>'.format("{0}?").format(General.getShortAudienceLabel(a));var c=Knowledge.getFactorAdj(b);return'<span class="{0}" style="font-weight:bold">{1}</span>'.format(c.startsWith("+")?
"green":"red","{0}".format(General.getShortAudienceLabel(a)+c))},c=c+(" "+d("young",a[0])),c=c+(" "+d("everyone",a[1]));return c+=" "+d("mature",a[2])};Knowledge.getPlatformGenreHintHtml=function(a,b){var c='<span style="font-weight:bold">{0}</span>'.format("Genre match:".localize()),d=General.getAvailableGenres(a),e=Knowledge.getPlatformGenreWeightingKnowledge(a,b);if(!e||0===e.sum())return c+' <span style="font-style:italic">{0}</span>'.format("unknown".localize());for(var g=0,n=0;n<d.length;n++){g++;
c+=" ";2==g&&(c+="<br/>");var p;p=d[n];var q=e[n];!q||0==q?p='<span style="opacity=0.5;font-style:italic">{0}</span>'.format("{0}?").format(p.name):(q=Knowledge.getFactorAdj(q),p='<span class="{0}" style="font-weight:bold">{1}</span>'.format(q.startsWith("+")?"green":"red","{0}".format(p.name+q)));c+=p}return c};Knowledge.hasMissionWeightingKnowledge=function(a,b,c,d,e){e||(e=a.knowledge);if(e.missionWeightings)return void 0!=e.missionWeightings.first(function(a){return a.missionId==b.id&&(d||a.topicId==
c.topic.id)&&a.genreId==c.genre.id&&(!c.secondGenre||c.secondGenre.id==a.secondGenreId)})};Knowledge.setMissionWeightingKnowledge=function(a,b,c){d(a,b,c,a.knowledge);d(a,b,c,e)};var d=function(a,b,c,d){d.missionWeightings||(d.missionWeightings=[]);Knowledge.hasMissionWeightingKnowledge(a,b,c,!1,d)||(a={missionId:b.id,genreId:c.genre.id,topicId:c.topic.id},c.secondGenre&&(a.secondGenreId=c.secondGenre.id),d.missionWeightings.push(a))};Knowledge.getMissionWeightingDisplayText=function(a,b){var a=Math.round(10*
a)/10,c;if(b)switch(a){case 0.6:c="not at all important".localize();break;case 0.7:c="not important".localize();break;case 0.8:c="not very important".localize();break;case 0.9:c="quite important".localize();break;case 1:c="very important".localize()}else switch(a){case 0.6:c="---";break;case 0.7:c="--";break;case 0.8:c="-";break;case 0.9:c="++";break;case 1:c="+++"}return c};Knowledge.getMissionWeightingHint=function(a,b){var c,d=!1;Knowledge.hasMissionWeightingKnowledge(GameManager.company,a,b,!1)?
(d=!0,c=Missions.getGenreWeighting(a,b)):Knowledge.hasMissionWeightingKnowledge(GameManager.company,a,b,!0)&&(c=GameGenre.getGenreWeighting(a.genreWeightings,b.genre,b.secondGenre));if(c)return{hint:Knowledge.getMissionWeightingDisplayText(c),exactMatch:d}};Knowledge.hasPlatformGenreWeightingKnowledge=function(a,b,c){a=Knowledge.getPlatformGenreWeightingKnowledge(a,b);return!a?!1:0!=a[GameGenre.getIndexOf(c)]};Knowledge.getPlatformGenreWeightingKnowledge=function(a,b){var c=a.knowledge.platformKnowledge;
c||(c=a.knowledge.platformKnowledge=[]);if(c=c.first(function(a){return a.id==b.id}))return c.genreWeightings};Knowledge.setPlatformGenreWeightingKnowledge=function(a,b,d){c(a,b,d,a.knowledge);c(a,b,d,e)};var c=function(a,b,c,d){a=d.platformKnowledge;a||(a=d.platformKnowledge=[]);d=a.first(function(a){return a.id==b.id});d||(d={id:b.id},a.push(d));d.genreWeightings||(d.genreWeightings=[0,0,0,0,0,0]);a=GameGenre.getIndexOf(c);GameGenre.getGenreWeighting(b.genreWeightings,c);d.genreWeightings[a]=b.genreWeightings[a]};
Knowledge.hasPlatformAudienceWeightingKnowledge=function(a,b,c){a=Knowledge.getPlatformAudienceWeightingKnowledge(a,b);return!a?!1:0!=a[General.getAudienceWeightinIndex(c)]};Knowledge.getPlatformAudienceWeightingKnowledge=function(a,b){var c=a.knowledge.platformKnowledge;c||(c=a.knowledge.platformKnowledge=[]);if(c=c.first(function(a){return a.id==b.id}))return c.audienceWeightings};Knowledge.setPlatformAudienceWeightingKnowledge=function(a,c,d){b(a,c,d,a.knowledge);b(a,c,d,e)};var b=function(a,b,
c,d){a=d.platformKnowledge;a||(a=d.platformKnowledge=[]);d=a.first(function(a){return a.id==b.id});d||(d={id:b.id},a.push(d));d.audienceWeightings||(d.audienceWeightings=[0,0,0]);a=Platforms.getAudienceWeighting([b],c,!0);d.audienceWeightings[General.getAudienceWeightinIndex(c)]=a};Knowledge.hasTopicAudienceWeightingKnowledge=function(a,b,c){a=Knowledge.getTopicAudienceWeightingKnowledge(a,b);return!a?!1:!c?0!=a.sum():0!=a[General.getAudienceWeightinIndex(c)]};Knowledge.getTopicAudienceHtml=function(a,
b){return Knowledge.getAudienceHintHtml(Knowledge.getTopicAudienceWeightingKnowledge(a,b),!1)};Knowledge.getTopicAudienceWeightingKnowledge=function(a,b){var c=a.knowledge.topicKnowledge;c||(c=a.knowledge.topicKnowledge=[]);if(c=c.first(function(a){return a.id==b.id}))return c.audienceWeightings};Knowledge.setTopicAudienceWeightingKnowledge=function(a,b,c){g(a,b,c,a.knowledge);g(a,b,c,e)};var g=function(a,b,c,d){a=d.topicKnowledge;a||(a=d.topicKnowledge=[]);d=a.first(function(a){return a.id==b.id});
d||(d={id:b.id},a.push(d));d.audienceWeightings||(d.audienceWeightings=[0,0,0]);a=General.getAudienceWeighting(b.audienceWeightings,c);d.audienceWeightings[General.getAudienceWeightinIndex(c)]=a};Knowledge.setTrainingKnowledge=function(a){var b=GameManager.company,c=b.knowledge.trainingKnowledge;c||(c=b.knowledge.trainingKnowledge=[]);b=c.first(function(b){return b.id==a.id});b||(b={id:a.id},c.push(b))};Knowledge.hasTrainingKnowledge=function(a){var b=GameManager.company,c=b.knowledge.trainingKnowledge;
c||(c=b.knowledge.trainingKnowledge=[]);return c.first(function(b){return b.id==a.id})};Knowledge.getTrainingKnowledgeHtml=function(a){if(!Knowledge.hasTrainingKnowledge(a))return'<span style="font-style:italic;opacity:0.5">{0}</span>'.format("unknown".localize());var b=[{key:"tF",name:"Technology".localize()},{key:"dF",name:"Design".localize()},{key:"rF",name:"Research".localize()},{key:"sF",name:"Speed".localize()}],c="";b.sort(function(b,c){return a[c.key]-a[b.key]});for(var d=0;d<b.length;d++){var e=
b[d];0!=a[e.key]&&(c+=' <span class="green">{0}{1}</span>'.format(e.name,1<=a[e.key]?"+++":0.5<=a[e.key]?"++":"+"))}return c};var e={};Knowledge.loadPlayerKnowledge=function(){DataStore.loadSlotAsync("knowledge",function(a){if(a)try{e=JSON.parse(a)}catch(b){Logger.LogInfo("Could not load already gained knowledge",b)}},function(){})};Knowledge.savePlayerKnowledge=function(){var a=JSON.stringify(e);DataStore.saveToSlotAsync("knowledge",a,function(){DataStore.commit&&DataStore.commit()},function(){})};
Knowledge.usePlayerKnowledge=function(a){a.knowledge=e};Knowledge.isPlayerKnowledgeAvailable=function(){return[e.combos,e.missionWeightings,e.platformKnowledge,e.topicKnowledge].some(function(a){return a&&0<a.length})}})();
var CompanyNames="Original Anvil;Macroprose;Bulldog Entertainment;Red Isles Studios;Obscure Entertainment;Lionfeet Studios;Rockville Softworks;Bungy;Comclap;Epoch Games;Namoni;NGSoftware".split(";"),RealCompanyNames="Origin;Origin Systems;Obsidian;Obsidian Ent.;Blizzard;Valve;Introversion;Cloud Imperium;Broderbund;Bethesda;JoWood;Infrogrames;Black Isle;Sierra;Sierra Entertainment;Sierra On-line;Westwood Studios;MicroProse;0verflow;1st Playable Productions;2K Czech;2XL Games;343 Studios;3DO;38 Studios;3G Studios;42 Entertainment;4A Games;5pb. Inc.;5th Cell;989 Studios;Acclaim Entertainment;Accolade;Access Games;ACE Team;Acheron Design;Acquire;Active Gaming Media;Activision;Activision Blizzard;Adventure Soft;Akella;Aki Corporation;Alfa System;Ancient;Anino Games;Appmania;AQ Interactive;Arc System Works;Arkane Studios;Arkedo Studio;ArenaNet;Arika;Artdink;ArtePiazza;Artificial Mind and Movement;A2M;Artificial Studios;Artoon;Asobo Studio;Ascaron;Aspect;Aspyr Media;Atari;Atlus;Atomic Planet Entertainment;Attic Entertainment Software;Avalanche Studios;Avalanche Software;Aventurine SA;Babaroga;Backbone Entertainment;BattleGoat Studios;Banpresto;Bauhaus Entertainment;Beenox;Behemoth, The;Bethesda Softworks;Big Blue Bubble;Big Huge Games;Binary Hammer;BioWare;Bioware;The Bitmap Brothers;Bizarre Creations;Black Rock Studio;Blitz Games Studios;Blizzard Entertainment;Blue Byte Software;Blue Fang Games;Bohemia Interactive;BreakAway Games;Br\u00f8derbund;Brownie Brown;BSure Interactive;Bullfrog Productions;Bullfrog;Buka Entertainment;Bugbear Entertainment;Bungie Studios;Capcom;Cave;Cavia;Cazap;CCP Games;CD Projekt RED;Centuri;Chunsoft;Cinemaware;Cing;Clap Hanz;Climax Entertainment;Climax Studios;Coded Illusions;Codemasters;Coktel Vision;ColdWood Interactive;Compile Heart;Core Design;Crafts & Meister;Creat Studios;Creative Assembly;Criterion Games;Cryptic Studios;Crystal Dynamics;Crytek;Cyberlore Studios;Cyanide;CyberConnect2;Day 1 Studios;Deadline Games;Deck13;Deep Silver;Demiurge Studios;Digital Illusions;Dimps;Disney Interactive Studios;Double Fine Productions;Double Helix Games;Dynamite Idea;Egosoft;Eidos Interactive;Electronic Arts;EA Games;Engine Software;Epic Games;Epicenter Studios;Epyx;Etranges Libellules;Eugen Systems;Eurocom;Evolution Studios;F4;FarSight Studios;Fatshark;feelplus;Firaxis Games;Firaxis;Firefly Studios;First Star Software;Flagship Games;Flying Lab Software;Foundation 9 Entertainment;Free Radical Design;Frictional Games;From Software;Frozenbyte;Frontier Developments;FUN Labs;Funcom;Futuremark;Game Arts;GameHouse;Gameloft;Games2win;Game Freak;Gearbox Software;Genki;Giants Software;Gogii Games;Good-Feel;Grasshopper Manufacture;Gravity;Griptonite Games;GSC Game World;Guerrilla Games;GungHo Online Entertainment;Gust Corporation;Haemimont Games;HAL Laboratory;Hanaho;Harmonix Music Systems;Hasbro Interactive;HB Studios;HeroCraft;High Moon Studios;High Voltage Software;Hoplon Infotainment;Hothead Games;Housemarque;Hudson Soft;Human Head Studios;Humongous Entertainment;Hyperion Entertainment;id Software;Idea Factory;Ignition Entertainment;IguanaBee;Imageepoch;Infinity Ward;Introversion Software;Incredible Technologies;indieszero;Infogrames;Insomniac Games;Intelligent Systems;Interplay Entertainment;Interplay;IO Interactive;Irem;Irrational Games;Transmission Games;Jadestone Group;Jagex;Jaleco;Javaground;Juice Games;Jupiter;JV Games;Klei Entertainment;Koei;Konami;Krome Studios;Kuju Entertainment;Kush Games;Kuma Reality Games;Ludia;Larian Studios;Legacy Interactive;Legendo Entertainment;Level-5;Lionhead Studios;Llamasoft;Looking Glass Studios;LucasArts;Lucas Arts;Luma Arcade;Luxoflux;Majesco Entertainment;Marvelous Entertainment;Massive Entertainment;Masthead Studios;Mattel;Maxis Software;Mean Hamster Software;Media Molecule;Media.Vision;Mercury Steam;Microsoft Game Studios;Milestone;Milestone S.r.l.;M-Inverse;Mistwalker;Mitchell Corporation;Mojang AB;Monolith Productions;Monolith Soft;Monumental Games;Mythic Entertainment;Namco Bandai;Natsume;Naughty Dog;NCsoft;Ndoors;Neowiz;Nerve Software;NetDevil;Neverland;Neversoft;Nexon;Next Level Games;NGD Studios;Nihon Bussan;Nihon Falcom;Ninjabee;Nintendo;Nippon Ichi Software;Nokia;NHN;Novalogic;Novarama;n-Space;Oddworld Inhabitants;Obsidian Entertainment;Oxygen Studios;Page 44 Studios;Paon;Papaya Studio;Paradox Interactive;Pandemic Studios;Pax Softnica;Pendulo Studios;Penguin Software;People Can Fly;Petroglyph;Phantagram;Piranha Bytes;Pi Studios;Pivotal Games;Playdead;Playdom;Playfish;Playlogic Entertainment;PlayFirst;Platinum Games;Polyphony Digital;PopCap Games;Punch Entertainment;Pyro Studios;Q Entertainment;Q-Games;Quantic Dream;Radical Entertainment;Rainbow Studios;Rare Limited;Raven Software;Reality Pump Studios;Realtime Associates;Realtime Worlds;RedLynx;Red Storm Entertainment;Redtribe;Reflexive Entertainment;Relic Entertainment;Remedy Entertainment;Retro Studios;Revolution Software;Rising Star Games;Rockstar North;Rockstar Games;Rocksteady Studios;Ruffian Games;Runic Games;Running with Scissors;Sarbakan;Sega;SCE Studio Liverpool;Sidhe;Silicon Knights;Silicon Sisters;Silicon Studio;SNK Playmore;Sobee Studios;Snowblind Studios;Software 2000;Sonic Team;Sony Computer Entertainment;Sony Computer Entertainment America;Sony Computer Entertainment Europe;Sora Ltd.;Spectrum HoloByte;Spellborn International;Splash Damage;Square Enix;Starbreeze Studios;Stardock;Star Vault;Strawdog Studios;Sting Entertainment;Straylight Studios;Streamline Studios;Sucker Punch Productions;Sumo Digital;Sunflowers;SuperVillain Studios;Swingin' Ape Studios;Taito Corporation;Tag Games;Take-Two Interactive;Tale of Tales;TaleWorlds;Tamsoft;Tantrumedia;Tantalus Media;Team17;Techland;Tecmo Koei;Telltale Games;Terminal Reality;THQ;Three Rings Design;TimeGate Studios;Torpex Games;Torus Games;Tose;Trapdoor;Traveller's Tales;Treyarch;Tri-Ace;Tripwire Interactive;Triumph Studios;Turn 10 Studios;Two Tribes;Tygron;Ubisoft;Ultimate Play The Game;United Front Games;Universomo;Vivendi Games;Valve Corporation;Vanillaware;Venan Entertainment;Vertigo Games;Vicarious Visions;Viwawa;Virtual Playground;Visceral Games;W!Games;Wahoo Studios;Wanako Games;Wangame Studios;WB Games;Webfoot Technologies;Wideload Games;Wildfire Studios;Wolfire Games;World Forge;Xseed Games;YoYo Games;Yuke's;ZapSpot;ZeniMax;Zipper Interactive;Zylom;Zynga;2.0 Studios;2D Boy;3G Studios;4D Rulers Software;ACE Team;Aldorlea Games;Alec Holowka;Almost Human;Amanita Design;Amaranth Games;Ambrosia Software;Artix Entertainment;Babaroga;Basilisk Games;The Behemoth;Benjamin Rivers;Big Finish Games;Bit Blot;Blitz Games Studios;Blossomsoft;Blue Fang Games;Bohemia Interactive Studio;Boomzap Entertainment;Bplus;Bubble Gum Interactive;Broken Rules;Capybara Games;Caravel Games;Castle Thorn;Chedburn Networks Limited;Christopher Howard Wolf;Chronic Logic;Cing;Cit\u00e9r\u00e9mis;ClockStone Software;cly5m;Coffee Stain Studios;ColdWood Interactive;Crytek Black Sea;Dark Water Studios;Daniel Benmergui;Dejobaan Games;Derek Yu;Digital Eel;Dovogame;Dreadlocks Ltd;Edmund McMillen;Elite Gudz;Elixir Studios;Erik Sved\u00e4ng;Ethereal Darkness Interactive;Eurocom;Evony;Exotypos;Facepunch Studios;Ferry Halim;Firefly Studios;Flashbang Studios;Flying Lab Software;Freebird Games;Frictional Games;Frogwares;Frontier Developments;GameLab;Gaijin Games;GarageGames;Gogii Games;Grasshopper Manufacture;Grey Alien Games;Guild Software;Haemimont Games;Hanako Games;Hemisphere Games;Himalaya Studios;IguanaBee;Insomniac Games;Introversion Software;InvisibleInkStudios;Iron Tower Studio;Irrgheist;Jagex;Jason Rohrer;Jonas Kyratzes;Jph Wacheski;KatGames;Klei Entertainment;Kloonigames;Krillbite;Laminar Research;Level-5;Lexaloffle;Little Green Men Games;Llamasoft;Longbow Digital Arts;M-Inverse;Mad Genius Software;Mangled Eye Studios;Metanet Software;mif2000;Mind Control Software;Mojang;Moonpod;Mousechief;New Star Games;Nicalis;Nifflas;Nival Interactive;Number None;The Odd Gentlemen;OmniSystems;OTS Software;Paladin Studios;Parallax Studio;Pieces Interactive;PixelJAM Games;Playdead;Playtechtonics;Pocketwatch Games;Positech Games;Private Moon Studios;Pronto Games;Prorattafactor;Provox games;PST Team;Psyonix Studios;Punch Entertainment;Q-Games;Queasy Games;Re-logic;realtech VR;Reflexive Entertainment;Relentless Software;Renegade Kid;Reverge Labs;Ronimo Games;Rovio Entertainment;S2 Games;Saber Interactive;Sandlot Games;Santa Cruz Games;Santa Cruz Games;Scientifically Proven;Secret Exit;Seed Studios;Silver Creek Entertainment;Ska Studios;Snowstep Development;Soldak Entertainment;Source Studio;Spiderweb Software;Stoic Studio;Star Vault;Storm Impact;Studio Pixel;Subatomic Studios;Supergiant Games;SuperVillain Studios;Swedish Game Development;Swing Swing Submarine;Tale of Tales;TaleWorlds;Team Shanghai Alice;TeamTNT;thatgamecompany;TheorySpark;Three Rings Design;Torpex Games;Trade Games International;Trendy Entertainment;Tribetoy;Tyler Glaiel;uCool;Unreal Software;Ville M\u00f6nkk\u00f6nen;Vlambeer;WayForward Technologies;Wolfire Games;XMG Studio;Zachary Barth;Zoetrope Interactive;Zoonami;ZootFly;Tale of Tales;TaleWorlds;Tamsoft;Tantrumedia;Tantalus Media;Team17;Techland;Tecmo Koei;Telltale Games;Terminal Reality;THQ;Three Rings Design;TimeGate Studios;Torpex Games;Torus Games;Tose;Trapdoor;Traveller's Tales;Treyarch;Tri-Ace;Tripwire Interactive;Triumph Studios;Turn 10 Studios;Two Tribes;Tygron;Ubisoft;Ultimate Play The Game;United Front Games;Universomo;Vivendi Games;Valve Corporation;Vanillaware;Venan Entertainment;Vertigo Games;Vicarious Visions;Viwawa;Virtual Heroes;Virtual Playground;Visceral Games;Volition;W!Games;Wahoo Studios;Wanako Games;Wangame Studios;WB Games;Webfoot Technologies;Wideload Games;Wildfire Studios;Wolfire Games;World Forge;Xseed Games;YoYo Games;Yuke's;ZapSpot;Zipper Interactive;Zylom".split(";"),UI=
{};
(function(){UI.closeButtonTemplate=PlatformShim.ISWIN8?'<div class="closeDialogButtonWin8 metroCharacterButton">\ue10a</div>':'<div class="closeDialogButton fontCharacterButton icon-remove"></div>';UI._resetCallbacks=[];UI.reset=function(){UI.resetStatusBar();for(var a=0;a<UI._resetCallbacks.length;a++)UI._resetCallbacks[a]()};UI.isTransitionVisible;UI.fadeInTransitionOverlay=function(a){UI.isTransitionVisible=!0;$("#transitionOverlay").show().css({opacity:0}).transition({opacity:1},800).delay(800).queue(function(){a&&a();
$(this).dequeue()})};UI.fadeOutTransitionOverlay=function(a){UI.isTransitionVisible=!1;$("#transitionOverlay").transition({opacity:0},400).delay(400).queue(function(){$(this).hide();a&&a();$(this).dequeue()})};UI.createDefaultUISettings=function(){return{stage1SliderValues:[50,50,50],stage2SliderValues:[50,50,50],stage3SliderValues:[50,50,50],selectedGameFeatures:["Text Based","Basic Sound"],selectedConsoleFeatures:[]}};UI.getShortNumberString=function(a){var c;1E6<=Math.abs(a)?c="{0}M".format(UI.getLongNumberString(Math.roundToDecimals(a/
1E6,1))):1E3<=Math.abs(a)&&(c="{0}K".format(UI.getLongNumberString(Math.roundToDecimals(a/1E3,1))));c||(c=Math.roundToDecimals(a,1));return c};UI.getPercentNumberString=function(a){return"{0} %".format(Math.roundToDecimals(a,1))};UI.getLongNumberString=function(a){if(Math.floor(a)==a)return a=Math.floor(a).toLocaleString(),a.substr(0,a.length-3);for(a=a.toLocaleString();"0"==a[a.length-1];)a=a.substr(0,a.length-1);return a};UI.getHtmlText=function(a){a=a.replace(/\n/g,"<br />");return window.PlatformShim.toStaticHtml(a)};
UI._showFeatureList=function(a,c){PlatformShim.execUnsafeLocalFunction(function(){$.modal.close()});UI.showFeatureList(a.features,{onClose:function(){GameManager.company&&0<GameManager.company.activeNotifications.length&&GameManager.company.activeNotifications.splice(GameManager.company.activeNotifications.indexOf(a),1);c&&c()}})};UI.getCharUnderCursor=function(){var a=CanvasManager.characterStage;if(a.mouseInBounds)for(var c=a.mouseX,a=a.mouseY,d=0;d<VisualsManager.characterOverlays.length;d++){var h=
VisualsManager.characterOverlays[d],f=h.x+VisualsManager.toScreenCoordinates(47,CanvasManager.globalScale),j=h.y+VisualsManager.toScreenCoordinates(37,CanvasManager.globalScale),l=187*CanvasManager.globalScale,m=271*CanvasManager.globalScale;if(c>=f&&c<=f+l&&a>=j&&a<=j+m)return h.character}return null};UI.salesContainerClick=function(b,c){if(a()){var d=b.screenX,h=b.screenY,f=[],j=function(a){var b=$("#takeOffMarketDialog");b.find(".confirmActionButton").clickExclOnce(function(){Sound.click();a();
b.dialog("close")});b.find(".cancelActionButton").clickExclOnce(function(){Sound.click();b.dialog("close")});b.gdDialog({close:!0,popout:!0,onClose:function(){GameManager.resume(!0)}})},l=GameManager.company.gameLog.first(function(a){return a.id===c});if(l&&l.flags.mmo&&(!GameManager.company.currentGame||!1===GameManager.company.currentGame.flags.isExtensionPack||GameManager.company.currentGame.sequelTo!=l.id))f.push({label:"Take off market".localize("menu item"),action:function(){Sound.click();j(function(){l.flags.saleCancelled=
!0;Media.createMMOEndStory(l)})}});else{var m=GameManager.company.licencedPlatforms.first(function(a){return a.id===c});m&&f.push({label:"Take off market".localize("menu item"),action:function(){Sound.click();j(function(){m.saleCancelled=!0;Media.createConsoleEndStory(m)})}})}1<=f.length&&UI._showContextMenu("salesContainer",f,d,h)}};UI._showContextMenu=function(b,c,d,h){a()&&(GDT.fire(this,GDT.eventKeys.ui.contextMenuShowing,{type:b,items:c}),0<c.length&&(GameManager.pause(!0),Sound.click(),UI.showContextMenu(c,
{x:d,y:h})))};var a=function(){return UI.isMenuOpen()?(Sound.click(),GameManager.resume(!0),UI.closeContextMenu(),!1):VisualsManager.isAnimatingScroll?!1:!0};UI.overrideClick;UI.containerClick=function(b){if(UI.overrideClick)UI.overrideClick(b);else if(a()){var g=b.x,b=b.y,e=GameManager.company,h=[],f="primary";void 0===e.flags.currentZone||1===e.flags.currentZone?d(e,h):(c(e,h),f="secondary");UI._showContextMenu(f,h,g,b)}};var d=function(a,c){var d=1<a.currentLevel?UI.getCharUnderCursor():a.staff[0];
if(!d||1==a.currentLevel)GameManager.company.isCurrentlyDevelopingGame()&&-1!=GameManager.company.researchCompleted.indexOf(Research.Marketing)&&c.push({label:"Marketing...".localize("menu item"),action:function(){Sound.click();Tutorial.marketing();GameManager.company.notifications.push(new Notification("{MarketingList}"));GameManager.showPendingNotifications()}}),GameManager.isIdle()&&(!GameManager.currentEngineDev&&0<a.staff.filter(function(a){return a.state===CharacterState.Idle}).length)&&(c.push({label:"Develop New Game...".localize("menu item"),
action:function(){Sound.click();GameManager.flags.selectGameActive=!1;GameManager.flags.createPack=!1;GameManager.transitionToState(State.CreateGame)}}),-1!=a.researchCompleted.indexOf(Research.Sequels)&&0<a.getPossibleGamesForSequel().length&&c.push({label:"Develop Sequel...".localize("menu item"),action:function(){Sound.click();GameManager.flags.selectGameActive=!0;GameManager.flags.createPack=!1;GameManager.transitionToState(State.CreateGame)}}),-1!=a.researchCompleted.indexOf(Research.expansionPack)&&
0<a.getPossibleGamesForPack().length&&c.push({label:"Develop Expansion Pack...".localize("menu item"),action:function(){Sound.click();GameManager.flags.selectGameActive=!0;GameManager.flags.createPack=!0;GameManager.transitionToState(State.CreateGame)}}),a.canDevelopEngine()&&c.push({label:"Create Custom Engine...".localize("menu item"),action:function(){Sound.click();a.notifications.push(new Notification("{CreateEngine}","","",0));GameManager.showPendingNotifications()}}),a.flags.contractsEnabled&&
c.push({label:"Find Contract Work...".localize("menu item"),action:function(){Sound.click();Tutorial.contracts();GameManager.uiSettings.selectedContractType="generic";a.notifications.push(new Notification("{FindContractWork}"));GameManager.showPendingNotifications()}}),a.flags.publishersEnabled&&c.push({label:"Find Publishing Deal...".localize("menu item"),action:function(){Sound.click();GameManager.uiSettings.selectedContractType="gameContract";Tutorial.publishers();a.notifications.push(new Notification("{FindContractWork}"));
GameManager.showPendingNotifications()}})),1<a.currentLevel&&c.push({label:"Staff List...".localize("menu item"),action:function(){Sound.click();UI.showStaffList()}}),a&&a.gameLog&&0<a.gameLog.length&&c.push({label:"Game History...".localize("menu item"),action:function(){Sound.click();UI.showGameHistory()}});d&&(d.state!=CharacterState.Researching&&(d.state!=CharacterState.Training&&d.state!=CharacterState.Vacation)&&(a.flags.patchData&&a.flags.patchData.patchAvailableUntil>GameManager.gameTime&&
c.push({label:"Develop patch ({0})".localize("menu item").format(UI.getShortNumberString(a.flags.patchData.patchCost)),action:function(){GameManager.uiSettings.selectedChar=d.id;Sound.click();var c=Training.patchGame;c.cost=a.flags.patchData.patchCost;a.flags.patchData.patchAvailableUntil=0;GameManager.research(c,"training");GameManager.resume(!0)}}),a.researchEnabled&&d.canStartResearch()&&c.push({label:"Research...".localize("menu item"),action:function(){Sound.click();Tutorial.researchMenu();GameManager.uiSettings.selectedChar=
d.id;GameManager.company.notifications.push(new Notification("{Research}"));GameManager.showPendingNotifications()}}),0<a.gameLog.length&&a.gameLog.some(function(a){return a.canDoPostMortem()})&&c.push({label:"Generate game report...".localize("menu item"),action:function(){Sound.click();GameManager.flags.selectGameActive=!0;GameManager.flags.createPack=!1;var a=GameManager.gameId;UI.showGameHistory(function(){if(a==GameManager.gameId){GameManager.flags.selectGameActive=!1;var b=GameManager.flags.selectedGameId;
if(b){var c=GameManager.company.getGameById(b);c&&(GameManager.uiSettings.selectedChar=d.id,d.flags.postMortemGameId=b,b=Training.postMortem,b.duration=b.baseDuration*General.getGameSizeDurationFactor(c.gameSize),GameManager.research(b,"training"),GameManager.resume(!0))}}},!1,!0)}}),1<a.currentLevel&&(c.push({label:"Train...".localize("menu item"),action:function(){Sound.click();GameManager.uiSettings.selectedChar=d.id;if(0!=d.id||1<GameManager.company.maxStaff)(0===d.id||d.flags.didWelcomeTraining)&&
Tutorial.training();GameManager.company.notifications.push(new Notification("{Training}"));GameManager.showPendingNotifications()}}),d.flags.needsVacation&&c.push({label:"Send on Vacation".localize("menu item"),action:function(){Sound.click();d.goOnVacation();GameManager.resume(!0)}}))),0!=d.id&&c.push({label:"Fire...".localize("menu item"),action:function(){Sound.click();UI.showFireStaffPrompt(d);GameManager.resume(true)}}))},c=function(a,c){var d=a.flags.currentZone,h=0===d?GameManager.currentHwProject:
GameManager.currentRnDProject;null!=h?c.push({label:"Cancel Project...".localize("menu item"),action:function(){Sound.click();var a=$("#cancelProjectDialog");a.find(".confirmActionButton").clickExclOnce(function(){Sound.click();GameManager.cancelProject(h);a.dialog("close")});a.find(".cancelActionButton").clickExclOnce(function(){Sound.click();a.dialog("close")});a.gdDialog({close:!0,popout:!0,onClose:function(){GameManager.resume(!0)}})}}):(0<General.getAvailableProjects(a,d).length&&c.push({label:"Start Project...".localize("menu item"),
action:function(){Sound.click();UI.showGenericProjectWindow(d)}}),0===d&&GameManager.canDevelopConsole()&&c.push({label:"Develop Console...".localize("menu item"),action:function(){Sound.click();Tutorial.devConsole();a.notifications.push(new Notification("{DevelopConsole}","","",0));GameManager.showPendingNotifications()}}))};UI.setVisible=function(a){a=$(a);a.get(0)&&(a.removeClass("collapsed"),a.addClass("visible"))};UI.setInVisible=function(a){a=$(a);a.get(0)&&(a.removeClass("visible"),a.addClass("collapsed"))};
UI.showSnappedView=function(){this.setVisible("#snappedScreen")};UI.hideSnappedView=function(){this.setInVisible("#snappedScreen")};UI.toggleHelpPanel=function(){var a=$("#helpPanel");UI.populateHelpPage(a);GameManager.pause(!0,!0);a.gdDialog({popout:!0,zIndex:8E3,close:!0,onClose:function(){GameManager.resume(!0,!0)}})};$.fn.gdSlider=function(a){var c={autoHeight:!1,autoWidth:!1,arrowsNav:!0,fadeinLoadedSlide:!1,controlNavigationSpacing:5,controlNavigation:"thumbnails",imageScaleMode:"none",imageAlignCenter:!1,
loop:!1,loopRewind:!1,keyboardNavEnabled:!0,navigateByClick:!1,addActiveClass:!0};$.extend(c,a);this.royalSlider(c)};UI.populateHelpPage=function(a){$(a).find("#devStages").accordion({icons:!1,autoHeight:!1,active:!1,collapsible:!0});a=$(a).find("#helpMessagesContainer");a.empty();var c="Previously shown tutorial messages for the active game are shown here. To see tutorial messages here, please continue an existing game or start a new one. You can start a new game via the app bar.".localize();if(GameManager.company){var d=
$("<div></div>"),h=Tutorial.getAllShownMessages(GameManager.company);if(0==h.length)a.append(c);else{h=h.reverse();for(c=0;c<h.length;c++){var f=h[c];d.append($("<h3></h3>").text(f.heading));d.append($("<p></p>").html(f.msg.replaceAll("{n}","<br/>")))}a.append(d);d.accordion({icons:!1,autoHeight:!1,collapsible:!0})}}else a.append($("<span></span>").text(c))};UI.toggleSettingsPanel=function(){var a=$("#settingsPanel");UI.populateSettingsPanel(a);GameManager.pause(!0,!0);a.gdDialog({popout:!0,zIndex:8E3,
close:!0,onClose:function(){DataStore.commit&&DataStore.commit();GameManager.resume(!0,!0)}})};UI.toggleModsPanel=function(){UI.populateModsPanel();GameManager.pause(!0,!0);$("#modsPanel").dialog({width:800,draggable:!1,modal:!0,resizable:!1,show:"fade",zIndex:8E3,open:function(){var a=$(UI.closeButtonTemplate);a.zIndex=8E3;a.clickExclOnce(function(){Sound.click();$("#modsPanel").dialog("close");GameManager.resume(!0)});$(this).parents(".ui-dialog:first").append(a);$(this).siblings(".ui-dialog-titlebar").remove();
$(this).parents(".ui-dialog:first").addClass("tallWindow");$(this).parents(".ui-dialog:first").addClass("windowBorder");$(this).parents(".ui-dialog:first").removeClass("ui-widget-content")},close:function(){$(this).dialog("destroy");this.style.cssText="display:none;";DataStore.commit&&DataStore.commit();GameManager.resume(!0,!0)}})};UI._getElementForMod=function(a){var c=$("#modsButtonTemplate").clone();c.find(".modName").text(a.name);c.find(".author").text(a.author);c.find(".description").text(a.description);
a.active&&c.addClass("activeMod");a.unresolvedDependency&&c.addClass("dependencyWrong");return c};UI.populateModsPanel=function(){var a=$("#modsPanelContent");a.empty();ModSupport.sortMods();for(var c=0;c<ModSupport.availableMods.length;c++){var d=ModSupport.availableMods[c],h=UI._getElementForMod(d);a.append(h);h=h.get(0);h.mod=d;h.onclick=function(){Sound.click();this.mod.active?ModSupport.disableMod(this.mod):this.mod.unresolvedDependency||ModSupport.enableMod(this.mod);UI.populateModsPanel()}}};
UI.populateSettingsPanel=function(a){a.find(".languageSelection").val(GameManager.getPreferredLanguage()).change(function(){var a=$(this).val();GameManager.setPreferredLanguage(a)});a.find(".hintsToggle").val(GameManager.areHintsEnabled()?"on":"off").change(function(){var a=$(this).val();GameManager.setHintsEnabled("on"===a)});a.find(".musicToggle").val(Sound.getMusicAllowed()?"on":"off").change(function(){var a=$(this).val();Sound.allowMusic("on"===a)});a.find(".fxToggle").val(Sound.getFxAllowed()?
"on":"off").change(function(){var a=$(this).val();Sound.allowFx("on"===a)});a.find(".volumeSlider").slider({min:0,max:100,range:"min",value:Sound.getMasterVolume(),animate:!1,slide:function(a,b){var c=b.value;isNaN(c)||Sound.setMasterVolume(c)}});var c=a.find("#toggleFullscreenButton");UI.maxFont(c,34,50);PlatformShim.ISWIN8?a.find("#windowSettings").hide():c.clickExclOnce(function(){var c=PlatformShim.toggleFullscreen();DataStore.setValue("windowed",!c);a.dialog("close")})};UI.showAboutBadge=function(){var a=
$("#aboutBadge");0<a.length&&(a.css("opacity",0).show(),a.transit({opacity:1},400))};UI.hideAboutBadge=function(){var a=$("#aboutBadge");0<a.length&&a.transit({opacity:0},400,null,function(){a.hide()})};UI.Font={isInstalled:function(a){var a=a.replace(/['"<>]/g,""),c=document.body,d=document.createElement("div"),h=!1;a&&(d.innerHTML="<b style=\"display:inline !important; width:auto !important; font:normal 10px/1 'X',sans-serif !important\">mmmmmmmmwwwwwwww</b><b style=\"display:inline !important; width:auto !important; font:normal 10px/1 'X',monospace !important\">mmmmmmmmwwwwwwww</b>".replace(/X/g,
a),d.style.cssText="position: absolute; visibility: hidden; display: block !important",c.insertBefore(d,c.firstChild),a=d.getElementsByTagName("b"),h=a[0].offsetWidth===a[1].offsetWidth,c.removeChild(d));return h}};$(document).ready(function(){UI.IS_SEGOE_UI_INSTALLED=UI.Font.isInstalled("Segoe UI")})})();
(function(){GameFlags.RCLICK_MENU&&document.addEventListener("contextmenu",function(a){a.preventDefault();UI.toggleMainMenu();return!1},!1);GameFlags.ESC_MENU&&window.addEventListener("keydown",function(a){if(27==a.which&&!a.defaultPrevented)return UI.toggleMainMenu(),a.preventDefault(),!1},!1);UI.toggleMainMenu=function(){if(a)d();else{UI.closePanels();var c=$("#mainMenu"),b=c.find(".continueButton");GameManager.company||SplashScreen.isVisible()&&GameManager.getGameToContinue()?(b.removeClass("disabled"),
b.clickExclOnce(function(){Sound.click();d();GameManager.company||GameManager.continueGame()})):(b.addClass("disabled"),b.clickExclOnce());c.find(".newButton").clickExclOnce(function(){Sound.click();GameManager.resume(true,true);SplashScreen.isVisible()||UI.hideAboutBadge();GameManager.startNewGame()});b=c.find(".saveButton");GameManager.company?(b.removeClass("disabled"),b.clickExclOnce(function(){Sound.click();d();GameManager.saveActualGame()})):(b.addClass("disabled"),b.clickExclOnce());c.find(".loadButton").clickExclOnce(function(){Sound.click();
GameManager.openLoadView();d()});c.find(".highscoreButton").clickExclOnce(function(){Sound.click();UI.toggleHighScorePanel();d()});c.find(".achievementsButton").clickExclOnce(function(){Sound.click();UI.toggleAchievementPanel();d()});c.find(".settingsButton").clickExclOnce(function(){Sound.click();UI.toggleSettingsPanel();d()});c.find(".modsButton").clickExclOnce(function(){Sound.click();UI.toggleModsPanel();d()});c.find(".helpButton").clickExclOnce(function(){Sound.click();UI.toggleHelpPanel();d()});
c.find(".version").text((GameFlags.G782?"V":"v")+PlatformShim.getVersion());c=c.find(".exitButton");PlatformShim.ISWIN8?c.hide():c.clickExclOnce(function(){Sound.click();GameManager.autoSave(function(){window.close()})});GameManager.pause(!0,!0);$("#mainMenu").gdDialog({popout:!0,close:!0,zIndex:1E4,onClose:function(){GameManager.resume(true,true);SplashScreen.isVisible()||UI.hideAboutBadge();a=false},onOpen:function(){UI.showAboutBadge()}});a=!0}};var a=!1,d=function(){$("#mainMenu").dialog("close");
a=!1}})();
(function(){UI.resetStatusBar=function(){for(var a=0;a<d.length;a++)createjs.Tween.removeTweens(d[a]._target),d[a]._target.remove();d=[];UI.updateStatusBar(GameManager.company)};UI.updateStatusBar=function(d){if(d){c(d);var h=d.cash,f=UI.getShortNumberString(h),j=$("#money"),l=j.get(0);l&&(0>h?(j.removeClass("green"),j.addClass("red")):(j.removeClass("red"),j.addClass("green")),l.innerText=f);h=d.getCurrentDate();h="Y{0} M{1} W{2}".localize("date display").format(h.year,h.month,h.week);b||(b=$("#date"));
b&&b.text(h);g||(g=$("#weekProgression"));if(g&&(h=GameManager.company.currentWeek%4+1,h-=Math.floor(h),h=0.25>=h?0:0.5>=h?1:0.75>=h?2:3,g.currentProgress!=h)){f=[1,2,3,4];for(j=0;j<f.length;j++)g.find(".p"+f[j]).css("opacity",j<=h?1:0);g.currentProgress=h}h=UI.getShortNumberString(d.fans);if(f=$("#fans").get(0))f.innerText="{0} Fans".localize().format(h);a||(a=$("#trendContainer"));!d||!d.flags.trends?a.hide():a.trend!=d.flags.trends.currentTrend&&(a.trend=d.flags.trends.currentTrend,a.trend&&a.trend.label?
a.text(a.trend.label).addClass("statusBar").show():a.removeClass("statusBar").hide())}};var a,d=[];(function(){GameManager.addTickListener(function(){if(0!=d.length)for(var a=0;a<d.length;a++){var b=d[a]._target;void 0!=b.opacity&&b.css({opacity:b.opacity})}})})();var c=function(a){if(a.cashLog.length){var b=$("#cashLogContainer"),c=[];a.fansChange&&c.push({amount:a.fansChange,label:"fans".localize()});c.addRange(a.cashLog);for(var g=0;g<c.length;g++){var l=c[g],m=$('<div class="cashLogItem"><div class="cashLogAmount"></div><div class="cashLogLabel"></div></div>');
m.find(".cashLogAmount").text(UI.getShortNumberString(Math.floor(l.amount))).addClass(0>l.amount?"red":"green");m.find(".cashLogLabel").text(l.label);m.opacity=0.5;l=createjs.Tween.get(m).to({opacity:1},200).wait(1500).to({opacity:0},400).call(function(a){d.remove(a);this.remove()});b.prepend(m);d.push(l)}5E3<Math.abs(a.cashLog.sum(function(a){return a.amount}))&&Sound.playSoundOnce("cash",0.2);a.cashLog.length=0;a.fansChange&&(a.fans+=a.fansChange,a.fansChange=0)}},b,g})();
(function(){var a=["./images/superb/conf1f.png","./images/superb/conf2f.png","./images/superb/conf3f.png"],d="./images/superb/conff1r.png ./images/superb/conff2r.png ./images/superb/conff3r.png ./images/superb/conff4r.png ./images/superb/confm1r.png ./images/superb/confm2r.png ./images/superb/confm3r.png ./images/superb/confm4r.png".split(" "),c="./images/superb/conff1l.png ./images/superb/conff2l.png ./images/superb/conff3l.png ./images/superb/conff4l.png ./images/superb/confm1l.png ./images/superb/confm2l.png ./images/superb/confm3l.png ./images/superb/confm4l.png".split(" ");
UI.showConferenceBoothList=function(a,b){var c=GameManager.company.booths;GameManager.company.conferenceStandFactor=null;$(".selectionOverlayContainer").hide();var d=$("#conferenceBoothPicker"),e={disableCheckForNotifications:!0,close:!0,onClose:function(){GameManager.company.activeNotifications.remove(a);GameManager.resume(!0);b&&b()}};UI.maxFont(d.find(".windowTitle"),34,50);d.find(".conferenceBoothPickerText").text("The big game convention will take place in four weeks time. Do you want to participate?".localize());
var f=d.find(".conferenceBoothSliderContainer");f.empty();var h=$('<div class="conferenceBoothVariationContainer royalSlider rsDefaultInv"></div>');f.append(h);for(var f=$("#genericBoothTemplate"),g=0;g<c.length;g++){var j=c[g];if(""!==j.description){var m=f.clone();m.find(".boothTitle").text(j.name);m.find(".boothDescription").text(j.description);m.find(".boothCashCost").text("Costs: {0}".localize().format(UI.getShortNumberString(j.cost)));h.append(m)}}PlatformShim.ISWIN8?h.gdSlider():e.onOpen=function(){h.gdSlider()};
d.find(".okButton").clickExcl(function(){Sound.click();var a=d.find(".rsActiveSlide").find(".boothTitle").text(),b=GameManager.company.booths.first(function(b){return b.name==a});GameManager.company.cash>=b.cost?(GameManager.company.conferenceStandFactor=b.standFactor,GameManager.company.adjustCash(-b.cost,b.name),UI.closeModal()):d.find(".centeredButtonWrapper").effect("shake",{times:2,distance:5},50)});UI.showModalContent("#conferenceBoothPicker",e)};var b=function(a,b){var c="",c=GameManager.company.currentGame?
b?GameManager.company.gameLog.last().title:GameManager.company.currentGame.title:b?GameManager.company.gameLog[GameManager.company.gameLog.length-2].title:GameManager.company.gameLog.last().title,d=150,f=50,h=378,g=369;2===a?b?(d=90,f=25,h=385,g=392):(d=140,f=15,h=387,g=274):3===a?(d=245,f=33,h=372,g=234):4===a&&(b?(d=176,f=40,h=379,g=304):(d=150,f=15,h=378,g=252));return e(c,d,f,h,g)},g=function(a,b){var c=GameManager.company.name,d=180,f=30,h=381,g=256;2===a?(d=255,f=35,h=382,g=237):3===a?(d=300,
f=35,h=373,g=180,b&&(d=127,f=15,h=376,g=331)):4===a&&(d=290,f=29,h=378,g=348);return e(c,d,f,h,g)},e=function(a,b,c,d,e){var f=new createjs.Container;f.x=d;f.y=e;d=32;do e="bold {0}pt {1}".format(d,"Segoe UI"),e=new createjs.Text(a,e,"black"),d-=1;while((e.getMeasuredWidth()>b||e.getMeasuredLineHeight()>c)&&1<d);b=d/32;c=createjs.Graphics.getHSL(0,0,24);e=new createjs.Text(a,"bold 32pt {0}".format("Segoe UI"),c);e.textAlign="center";e.textBaseline="middle";f.scaleX=b;f.scaleY=b;f.addChild(e);return f},
h=function(a,b){var c="",d=!1;GameManager.currentHwProject&&GameManager.currentHwProject.announced?(c=GameManager.currentHwProject.iconUri,d=!0):(c=GameManager.company.licencedPlatforms.last(function(a){return a.isCustom}))?(c=c.iconUri,d=!0):c=GameManager.company.currentGame?Platforms.getPlatformImage(GameManager.company.currentGame.platforms[0],GameManager.company.currentWeek):Platforms.getPlatformImage(GameManager.company.gameLog.last().platforms[0],GameManager.company.currentWeek);if(b&&!d)for(d=
GameManager.company.gameLog.length-1;0<d;d--){var e=Platforms.getPlatformImage(GameManager.company.gameLog[d].platforms[0],GameManager.company.currentWeek);if(e!=c){c=e;break}}c=new createjs.Bitmap(c);d=new createjs.Container;d.scaleX=0.2;d.scaleY=0.2;3===a?(d.x=356,d.y=350):2===a?(d.y=315,d.x=b?265:460):4===a&&(d.scaleX=0.08,d.scaleY=0.08,d.y=300,d.x=b?236:509);d.addChild(c);return d};UI._showGameConferenceAnimation=function(a,c){var d=$("#gameConferenceAnimationDialog"),e=GameManager.company.booths.first(function(a){return a.standFactor==
GameManager.company.conferenceStandFactor});d.find(".windowTitle").text(4!=e.id?"Game Convention: G3".localize("heading"):"{0} Convention".localize("heading").format(GameManager.company.name));UI.maxFont(d.find(".windowTitle"),34,50);if(e){d.find(".conventionImageFloor").attr("src",e.floorImage);d.find(".conventionImageBg").attr("src",e.bgImage);var f=d.find(".conventionImageFg");e.fgImage?(f.show(),f.attr("src",e.fgImage)):f.hide()}d.find(".okButton").unbind("click").click(UI.closeConferenceAnimationDialog).hide();
var j=this;UI.showModalContent("#gameConferenceAnimationDialog",{disableCheckForNotifications:!0,onOpen:function(){var c=d.find("#animationLayer");c.empty();j.stage=new createjs.Stage(c[0]);j.stage.canvas.height=j.stage.canvas.clientHeight;j.stage.canvas.width=j.stage.canvas.clientWidth;j.flippingBox=new FlippingCounter.FlippingBox(8,6);j.flippingBox.init();j.flippingBox.fill("00000000");j.flippingBox.container.x=41;j.flippingBox.container.y=41;c=new createjs.Container;c.addChild(FlippingCounter.panel);
c.addChild(j.flippingBox.container);c.x=190;c.scaleX=0.4;c.scaleY=0.4;j.stage.addChild(c);j.stage.addChild(g(e.id));j.stage.addChild(b(e.id));if(3===e.id)j.stage.addChild(g(e.id,!0)),j.stage.addChild(h(e.id));else if(2===e.id||4===e.id)j.stage.addChild(b(e.id,!0)),j.stage.addChild(h(e.id)),j.stage.addChild(h(e.id,!0));UI._startGameConferenceAnimations(a.buttonText,e.id)},onClose:function(){GameManager.company&&-1!=GameManager.company.activeNotifications.indexOf(a)&&GameManager.company.activeNotifications.remove(a);
var b=a.buttonText,d=0.1*(b/1E6)+1,e=GameManager.company;e.currentGame&&(e.currentGame.hypePoints+=Math.min(200,Math.floor(200*(b/1E6))));for(var f=Sales.getGamesToSell(e),h=0;h<f.length;h++)void 0===f[h].confAmount?f[h].totalSalesCash*=d:0<f[h].confAmount&&(f[h].totalSalesCash+=f[h].confAmount*(d-1)),f[h].confAmount=0;f=Sales.getConsolesToSell(e);for(h=0;h<f.length;h++)f[h].unitsSold+=1.5/Sales.consoleUnitPrice*(b/1E6);d=Math.floor(e.fans*(d-Math.floor(d))/10);0<d&&e.adjustFans(d);e.conferenceHype=
Math.min(200,Math.floor(200*(b/1E6)));c&&c()},close:!1})};UI.closeConferenceAnimationDialog=function(){UI.closeModal()};var f=[],j=0.9;GameManager.addTickListener(function(a){if(f&&0<f.length){for(var a=a*j,b=0;b<f.length;b++)f[b].tick(a,!1);UI.stage.update()}});var l=function(){j=1.4},m=[],k=[],n=[];UI._startGameConferenceAnimations=function(b,e){if(0===m.length){for(var h=0;h<a.length;h++)m.push(new createjs.Bitmap(a[h]));for(h=0;h<c.length;h++)n.push(new createjs.Bitmap(c[h]));for(h=0;h<d.length;h++)k.push(new createjs.Bitmap(d[h]))}var g=
$(".simplemodal-data"),r=g.find(".animationLayer");f=[];FlippingCounter._activeUITweens=f;j=0.9;$(window).on("click",l);var t=1200;f.push(createjs.Tween.get(r).wait(0).call(function(){UI.flippingBox.fill(0)}));f.push(createjs.Tween.get(r).wait(t).call(function(){UI.flippingBox.fill(Math.round(b/20))}));f.push(createjs.Tween.get(r).wait(2*t).call(function(){UI.flippingBox.fill(Math.round(b/15))}));f.push(createjs.Tween.get(r).wait(3*t).call(function(){UI.flippingBox.fill(Math.round(b/10))}));f.push(createjs.Tween.get(r).wait(4*
t).call(function(){UI.flippingBox.fill(Math.round(b/9))}));f.push(createjs.Tween.get(r).wait(5*t).call(function(){UI.flippingBox.fill(Math.round(b/6))}));f.push(createjs.Tween.get(r).wait(6*t).call(function(){UI.flippingBox.fill(Math.round(b/4))}));f.push(createjs.Tween.get(r).wait(7*t).call(function(){UI.flippingBox.fill(Math.round(b/2.2))}));f.push(createjs.Tween.get(r).wait(8*t).call(function(){UI.flippingBox.fill(Math.round(b/1.8))}));f.push(createjs.Tween.get(r).wait(9*t).call(function(){UI.flippingBox.fill(Math.round(b/
1.2))}));f.push(createjs.Tween.get(r).wait(10*t).call(function(){UI.flippingBox.fill(b)}));var w=UI.stage.canvas.width,v=UI.stage.canvas.height,y=5E3,z=6E4*t/b;3===e?(y/=2,z/=2):4===e&&(y/=2.5,z/=2.5);t=z;for(h=0;h<=b;h+=y){var t=t+z,u=p(w,v,e);UI.stage.addChild(u);f.push(createjs.Tween.get(u).wait(t).to({alpha:0.15},500))}h=createjs.Tween.get(r).wait(t).call(function(){g.find(".okButton").slideDown("fast");$(window).off("click",l);f=[];FlippingCounter._activeUITweens=f;j=0.9});f.push(h)};var p=function(a,
b,c){var d,e,f,h,g;1===c?(g=1,d=130+Math.random()*(a-260-62*g),e=35*Math.random()+415-176*g,f=283,h=474):2===c?(g=0.625,d=100+Math.random()*(a-200-62*g),e=30*Math.random()+420-176*g,f=233,h=531):3===c?(g=0.075,e=Math.random(),d=113+e*(a-205-62*g),g*=4*Math.abs(0.46-e)+1,e=412-176*g,f=338,h=413):4===c&&(g=0.15,e=Math.random(),g*=4*Math.abs(0-e)+1,d=Math.random()*(a-62*g),e=85*e+365-176*g,f=283,h=476);a=void 0;a=3>c&&d<f||4===c&&d<f||3===c&&d>h?n.pickRandom().clone():3>c&&d>h||4===c&&d>h||3===c&&d>
f?k.pickRandom().clone():m.pickRandom().clone();a.alpha=0;a.x=d;a.y=e;a.scaleX=g;a.scaleY=g;return a}})();
(function(){var a;UI.showDevelopConsoleMenu=function(b,g){$(".selectionOverlayContainer").hide();var l=$("#createConsoleMenu");l.find(".consoleName")[0].value="Console Name".localize();UI.maxFont(l.find(".dialogScreen1Title"),34,50);UI.maxFont(l.find(".dialogScreen2Title"),34,50);UI.maxFont(l.find(".windowMainActionButton"),34,50);var m={disableCheckForNotifications:!0,close:!0,onClose:function(){h();GameManager.company.activeNotifications.remove(b);GameManager.resume(!0);g&&g()}};l.find(".dialogNextButton").clickExcl(function(){$("#createConsoleMenu").find(".dialogNextButton").effect("shake",
{times:2,distance:5},50)});l.find(".dialogBackButton").clickExcl(function(){Sound.click();h();$("#createConsoleMenu").find(".dialogScreen1").transition({"margin-left":0});$("#createConsoleMenu").find(".dialogScreen2").transition({"margin-left":"100%"})});var k=l.find(".consoleQASlider");k.empty();var n=$('<div class="budgetSlider"></div>').slider({orientation:"horizontal",range:"min",min:0,max:100,value:0,animate:"fast",slide:function(a,b){var c=$(b.handle).closest(".budgetSlider");if(!c.hasClass("budgetSlider"))throw"couldn't find target slider";
c.slider("value",b.value);e()}});k.append(n);k=l.find(".consoleSliderContainer");k.empty();n=$('<div class="consoleVariationContainer royalSlider rsDefaultInv"></div>');k.append(n);for(var p=GameManager.company.licencedPlatforms.count(function(a){return a.isCustom})+1,k=d(),q=0;q<k.length;q++){var o=$("<div><img src='images/platforms/superb/{0}' style='width:200px;'/><div class='sliderTabCaption rsTmb'>".format(k[q])+PlatformShim.toStaticHtml("Variation {0}".localize().format(q+1))+"</div></div>");
n.append(o)}PlatformShim.ISWIN8&&n.gdSlider();m.onOpen=function(){PlatformShim.ISWIN8||n.gdSlider();c();e()};var s=l.find(".okButton");s.clickExcl(function(){var b=e();Sound.click();if(b>GameManager.company.cash)s.parent().effect("shake",{times:2,distance:5},50),$(".simplemodal-data").find(".windowCostLabel").effect("pulsate",{times:2});else{s.off("click");var c=l.find(".consoleName")[0].value,d=l.find(".rsActiveSlide img").attr("src"),f=a.filter(function(a){return void 0!=a.techLevel}).average(function(a){return a.techLevel}),
h=Math.floor(500*f),g=l.find(".budgetSlider").slider("value")/100,d={id:"custom console",pointsCost:h,name:c,iconUri:d,targetZone:0,techLevel:f,version:p,variation:parseInt(d.slice(38,39)),qF:g,features:a.map(function(a){return a.id})};GameManager.company.adjustCash(-b,"{0} costs".localize().format(c));GameManager.startProject(d);UI.closeModal()}});UI.showModalContent("#createConsoleMenu",m)};var d=function(){for(var a=[],b=1;5>b&&(GameManager.company.flags["console"+b+"Used"]||!(a=4===b?a.concat(["CustomPlatform"+
b+"V1.png","CustomPlatform"+b+"V2.png"]):a.concat(["CustomPlatform"+b+"V1.png","CustomPlatform"+b+"V2.png","CustomPlatform"+b+"V3.png"]),6===a.length));b++);if(0===a.length){for(b=1;5>b;b++)GameManager.company.flags["console"+b+"Used"]=void 0;return d()}return a},c=function(){var a=$(".simplemodal-data").find(".dialogNextButton");a.clickExcl(function(){Sound.click();PlatformShim.execUnsafeLocalFunction(function(){b();e()});$("#createConsoleMenu").find(".dialogScreen1").transition({"margin-left":"-200%"});
$("#createConsoleMenu").find(".dialogScreen2").transition({"margin-left":0})});a.removeClass("baseButton").addClass("selectorButton").addClass("orangeButton")},b=function(){var b=$(".simplemodal-data").find(".featureSelectionContainer"),c=General.getAvailableFeaturesForConsole().groupBy(function(a){return a.category}),d=c.filter(function(a){return"Graphic"===a.category}),c=d.concat(c.except(d));b.empty();a=[];for(var d=null,h=[],g=function(c,d){if(c.hasClass("selectedFeature")){if("graphic-type"===
d.group)return;c.removeClass("selectedFeature");a.remove(d)}else{if(d.group){var g=".radioButton"+h.indexOf(d.group);b.find(g).removeClass("selectedFeature");for(var g=a.filter(function(a){return a.group===d.group}),j=0;j<g.length;j++)a.remove(g[j])}c.addClass("selectedFeature");a.push(d);UI._updateGameDefinitionCost()}e()},n=0;n<c.length;n++){var p=c[n];p.category!=d&&(b.append($('<div class="featureSelectionCategoryHeading">{0}</div>'.format(p.categoryDisplayName?p.categoryDisplayName:p.category))),
d=p.category);var q=UI.generateFeatureElement(p);q.find(".featureContent").text("{0} ({1})".format(p.name,UI.getShortNumberString(100*Research.getEngineCost(p))));if(p.group){-1==h.indexOf(p.group)&&h.push(p.group);var o="radioButton"+h.indexOf(p.group);q.addClass(o)}(function(a,b){a.clickExcl(function(){g(a,b)})})(q,p);b.append(q);GameManager.uiSettings.selectedConsoleFeatures&&-1!=GameManager.uiSettings.selectedConsoleFeatures.indexOf(p.id)?g(q,p):a.some(function(a){return a.category==="Graphic"})||
g(q,p)}e()},g=function(){return!a||0==a.length?0:a.sum(function(a){return 100*Research.getEngineCost(a)})},e=function(){var a=$(".simplemodal-data"),b;b=1E7+g();var c,d=a.find(".budgetSlider").slider("value")/100;c=(d/=1)*d;d*=c;c=Math.floor(1+19*(0+1*(-0.5*d*c+3*c*c+-3.5*d+2*c)));b+=1E6*c;a.find(".windowCostLabel").empty().append($("<span>{0}</span>".format("Cost: {0}".localize().format(UI.getShortNumberString(b))))).textfill({maxFontPixels:20,maxHeightPts:37});return b},h=function(){a&&(GameManager.uiSettings.selectedConsoleFeatures=
a.map(function(a){return a.id}))};UI.createConsoleClick=function(){Sound.click()}})();
(function(){var a=[];UI.addMaintenanceCard=function(e){if(1<=e.maintenanceLog.length)if(1===e.maintenanceLog.length){var g=c(e),j=b(!0);g.stage.addChild(j);j.x=60;j.y=105;j.width=115;j.scaleY=0;var p=70*(e.maintenanceLog[0]/99);l.push(createjs.Tween.get(j).to({y:105-p,scaleY:p/70},300));g.shapes=[j];j=b(!1);g.stage.addChild(j);j.x=60;j.y=105;j.scaleY=0;j.width=115;g.repairShapes=[j];j=d();p=d();g.lines=[j,p];h(g);g.stage.addChild(j);g.stage.addChild(p);j=new ProgressBarVisual;j.alpha=1;j.progress=
0.5;j.width=20;j.height=65;j.x=10;j.y=33;j.isHorizontal=!1;g.stage.addChild(j);g.progressBar=j;a.push(g);e.repairPointsLog||(e.repairPointsLog=[0])}else f(e)};var d=function(){var a=new createjs.Shape;a.alpha=1;a.x=60;var b=a.graphics;b.beginFill(createjs.Graphics.getRGB(45,45,45,1));b.drawRect(0,0,115,0.5);b.closePath();return a},c=function(a){var b=$("#consoleMaintenanceContainer"),c=$("#consoleMainCardTemplate").clone();c.clickExcl(function(){VisualsManager.scrollToZone(0,!0)});c.removeAttr("id");
c.title=c.find(".title");c.points=c.find(".points");g(c,a.name);e(c,a.maintenancePoints);b.append(c);b=c.find(".consoleMainCardGroupCanvas");b=new createjs.Stage(b[0]);b.canvas.height=105;b.canvas.width=180;return{id:a.id,stage:b,card:c,console:a}},b=function(a){var b=new createjs.Shape;b.alpha=1;b.x=60;var c=b.graphics;a?c.beginFill(createjs.Graphics.getRGB(255,0,0,1)):c.beginFill(createjs.Graphics.getRGB(86,216,86,1));c.drawRect(0,0,115,70);c.closePath();return b},g=function(a,b){var c=UI.getMeasuredWidth(b,
14),c=Math.min(14*(180/c),14);a.title.css("font-size",c+"pt");a.title.text(b)},e=function(a,b){a.points.text("Backlog: {0}".localize().format(b))},h=function(a){a.stage.removeChild(a.lines[0]);a.stage.removeChild(a.lines[1]);var b=Math.max(99,a.console.maintenanceLog.max(function(a){return a}));a.lines[0].y=105-70*(66/b);a.lines[1].y=105-70*(99/b);a.stage.addChild(a.lines[0]);a.stage.addChild(a.lines[1])},f=function(e){var f=c(e),g=new ProgressBarVisual;g.alpha=1;g.progress=e.satisFaction.clamp(0,
1);g.color=createjs.Graphics.getHSL(80*e.satisFaction.clamp(0,1),100,50);g.width=20;g.height=65;g.x=10;g.y=33;g.isHorizontal=!1;f.stage.addChild(g);f.progressBar=g;var j=Math.max(99,e.maintenanceLog.max(function(a){return a})),l=e.maintenanceLog.length,g=[];f.maintenanceShapes=[];f.repairShapes=[];for(var o=0;o<l;o++){var s=b(!0);s.scaleX=1/l;s.x=60+115/l*o;var x=70*(e.maintenanceLog[o]/j);s.y=105-x;s.scaleY=x/70;g.push(s);var r=b(!1);r.scaleX=1/l;r.x=60+115/l*o;x=70*(e.repairPointsLog[o]/j);r.y=
105-x;r.scaleY=x/70;f.repairShapes.push(r);f.stage.addChild(s);f.stage.addChild(r)}e=d();j=d();f.lines=[e,j];h(f);f.stage.update();f.shapes=g;a.push(f)};UI.updateMaintenanceCard=function(c){var d=a.first(function(a){return a.id===c.id});d||(UI.addMaintenanceCard(c),d=a.first(function(a){return a.id===c.id}));e(d.card,c.maintenancePoints);if(d&&d.shapes.length<c.maintenanceLog.length){var f=d.stage,g,j=Math.max(99,c.maintenanceLog.max(function(a){return a})),o=c.maintenanceLog.length,s=115/o;30<=c.maintenanceLog.length&&
(d.stage.removeChild(d.shapes[0]),d.shapes.remove(d.shapes[0]),c.maintenanceLog.splice(0,1),d.stage.removeChild(d.repairShapes[0]),d.repairShapes.remove(d.repairShapes[0]),c.repairPointsLog.splice(0,1),o--);c.repairPointsLog.length<c.maintenanceLog.length&&(c.repairPointsLog.push(0),c.repairPoints=0,g=b(!1),g.y=105,g.x=175-s,g.scaleX=1/o,g.scaleY=0,d.repairShapes.push(g));for(var x=d.shapes.length,r=0;r<x;r++){var t=70*(c.maintenanceLog[r]/j),w=1/o;l.push(createjs.Tween.get(d.shapes[r]).to({scaleX:w,
x:60+115/o*r,y:105-t,scaleY:t/70},500))}x=b(!0);x.y=105;x.x=175-s;x.scaleX=1/o;x.scaleY=0;d.shapes.push(x);t=70*(c.maintenanceLog.last()/j);l.push(createjs.Tween.get(x).wait(500).to({y:105-t,scaleY:t/70},300));for(r=0;r<d.repairShapes.length;r++)t=70*(c.repairPointsLog[r]/j),w=1/o,l.push(createjs.Tween.get(d.repairShapes[r]).to({scaleX:w,x:60+115/o*r,y:105-t,scaleY:t/70},500));f.addChild(x);g&&f.addChild(g);h(d)}};UI.updateRepairPoints=function(b){var c=a.first(function(a){return a.id===b.id});if(c){var d=
Math.max(99,b.maintenanceLog.max(function(a){return a}));b.repairPointsLog[b.repairPointsLog.length-1]=b.repairPoints;var d=70*(b.repairPointsLog.last()/d),f=c.repairShapes.last();f.y=105-d;f.scaleY=d/70;e(c.card,b.maintenancePoints)}};UI.clearMaintenanceCards=function(){a.forEach(function(a){UI.removeMaintenanceCard(a.id,!1)});$("#consoleMaintenanceContainer").empty();a=[]};UI.removeMaintenanceCard=function(b){var c=a.first(function(a){return a.id===b.id});c&&(c.card.remove(),a.remove(c))};var j=
function(b,c){var d=a.first(function(a){return a.id===b.id});b.satisFaction||(b.satisFaction=1);33>b.maintenancePoints?b.satisFaction+=0.04*c/500:66>b.maintenancePoints?b.satisFaction+=0.02*c/500:99<b.maintenancePoints?b.satisFaction-=0.02*c/350:122<b.maintenancePoints&&(b.satisFaction-=0.04*c/350);b.satisFaction=b.satisFaction.clamp(-0.3,1.3);d.progressBar.progress=b.satisFaction.clamp(0,1);d.progressBar.color=createjs.Graphics.getHSL(80*b.satisFaction.clamp(0,1),100,50)},l=[];GameManager.addTickListener(function(b,
c){if(!c&&l&&0<l.length&&!c){for(var d=0;d<l.length;d++)l[d].tick(b,!1);for(d=0;d<a.length;d++)j(a[d].console,b),a[d].stage.update()}},!0)})();
(function(){UI._isModalContentOpen=!1;UI.isModalContentOpen=function(){return c.some(function(a){return a.dialog("isOpen")})||UI._isModalContentOpen||!0===$("#newGameView").dialog("isOpen")||!0===$("#loadView").dialog("isOpen")||!0===$("#saveView").dialog("isOpen")||!0===$("#overwriteGameDialog").dialog("isOpen")||!0===$("#useKnowledgeFromPreviousGameDialog").dialog("isOpen")||!0===$("#gameHistoryDialog").dialog("isOpen")||!0===$("#platformReleaseNewsContent").dialog("isOpen")};UI.realignOpenDialogs=
function(){var a=$(document).find(".ui-dialog"),c=$(document.body);0<a.length&&a.position({of:c,my:"center center",at:"center center",offset:"0 0"})};UI._supressModalAnimations=!1;UI.showModalContent=function(b,c){c||(c={});if(!c.disableCheckForNotifications&&"#notificationContent"!=b)GameManager.showPendingNotifications(function(){PlatformShim.execUnsafeLocalFunction(function(){c.disableCheckForNotifications=!0;UI.showModalContent(b,c)})});else{GameManager.pause(!0);var d=!0===c.close;$(b).modal({close:d,
onOpen:function(a){c.sound?Sound.playSoundOnce(c.sound,c.volume):UI._supressModalAnimations||Sound.playSoundOnce("popupOpen",0.35);if(d){var b=$(UI.closeButtonTemplate);b.css("z-index",5E3);b.clickExcl(function(){Sound.click();var a=$(".simplemodal-data").find(".selectionOverlayContainer");0<a.length&&a.is(":visible")?a.fadeOut("fast"):UI.closeModal()});$(".simplemodal-container").append(b);GDT.fire(a,GDT.eventKeys.ui.dialogOpen)}UI._isModalContentOpen=!0;UI._supressModalAnimations||a.container.addClass("windowStyleStartState");
a.overlay.show();a.container.show();a.data.show();a.overlay.transit({opacity:0.2},UI._supressModalAnimations?0:200);a.container.removeClass("windowStyleStartState");a.container.addClass("windowStyleShowState");if(c&&c.onOpen)c.onOpen()},onClose:function(b){b.container.removeClass("windowStyleShowState");UI._supressModalAnimations||(b.container.addClass("windowStyleHideState"),b.overlay.transit({opacity:0},100));var d=function(){UI.closeModal();b.container.removeClass("windowStyleHideState");UI._isModalContentOpen=
false;if(c&&c.onClose)c.onClose();if(a){a();a=null}GameManager.resume(true)};UI._supressModalAnimations?d():setTimeout(d,100);GDT.fire(b,GDT.eventKeys.ui.dialogClose)},escClose:d,zIndex:4500})}};var a=null;UI.closeModal=function(b){UI._supressModalAnimations=0<GameManager.company.activeNotifications.length;if(null!=a&&b)throw"attempting to override existing callback";b&&(a=b);PlatformShim.execUnsafeLocalFunction(function(){$.modal.close()})};var d=!1;UI.closeAllDialogs=function(){$("#newGameView").dialog("close");
$("#loadView").dialog("close");$("#saveView").dialog("close");$("#overwriteGameDialog").dialog("close");$("#gameHistoryDialog").dialog("close");$("#platformReleaseNewsContent").dialog("close");$("#purchasePlatformDialog").dialog("close");$("#useKnowledgeFromPreviousGameDialog").dialog("close");for(var a=0;a<c.length;a++)d=!0,c[a].dialog("close");d=!1;$.modal.impl.o&&($.modal.impl.o.onClose=null);PlatformShim.execUnsafeLocalFunction(function(){$.modal.close()});UI._isModalContentOpen=!1;UI.closeContextMenu()};
(function(a){var c=a.noop;a.browser.msie&&(c=function(c){var c=a(c).parent(".ui-dialog"),d=c.innerWidth();d&&c.css("width",d)});var d=a.ui.dialog.prototype._init;a.ui.dialog.prototype._init=function(){if("auto"==this.options.width){var h=this.options.open;this.options.open=function(){c(this);h&&h.apply(this)}}a.browser.msie&&"drop"==this.options.hide&&(this.options.hide="fold");return d.apply(this)}})(jQuery);var c=[];$.fn.gdDialog=function(a){a||(a={});void 0==a.zIndex&&(a.zIndex=5E3);var g,e,h;
this.hasClass("tallWindow")?(g=600,e=650,h="tallWindow"):this.hasClass("smallWindow")?(g=500,e=350,h="smallWindow"):this.hasClass("wideWindow")&&(g=800,e=650,h="wideWindow");this.hasClass("windowBorder")&&(h+=" windowBorder");var f=this;c.push(f);f.dialog({close:!1,closeOnEscape:a.close,draggable:!1,width:g?g:"auto",height:e?e:"auto",modal:!0,resizable:!1,show:"fade",zIndex:a.zIndex,open:function(){var c=$(this);if(a.close){var d=$(UI.closeButtonTemplate);d.css("z-index",5500);d.clickExclOnce(function(){Sound.click();
f.dialog("close")});c.parents(".ui-dialog:first").append(d)}a.popout&&$("#gameContainerWrapper").addClass("popout-active");c.siblings(".ui-dialog-titlebar").remove();h&&$(c).parents(".ui-dialog:first").addClass(h);c.parents(".ui-dialog:first").removeClass("ui-widget-content");if(a&&a.onOpen)a.onOpen();$(".ui-widget-overlay:last").css("z-index",a.zIndex-10);c.parents(".ui-dialog:first").css("z-index",a.zIndex);GDT.fire(c,GDT.eventKeys.ui.dialogOpen)},close:function(){a.popout&&$("#gameContainerWrapper").removeClass("popout-active").addClass("popout-inactive");
$(this).dialog("destroy");this.style.cssText="display:none;";c.indexOf(f)!=-1&&c.remove(f);if(a.onClose&&!d)a.onClose();GDT.fire($(this),GDT.eventKeys.ui.dialogClose)}})}})();
(function(){UI.showNotifications=function(a){var c=GameManager.company.activeNotifications;0===c.length&&a();UI._supressModalAnimations=!1;UI._showNotification(c[0],a)};UI._showNotification=function(a,d){GameManager.pause(!0);GDT.fire(GameManager,GDT.eventKeys.ui.beforeShowingNotification,{notification:a});switch(a.header){case "{Reviews}":GameManager.company.gameLog.last().reviewMessageDisplayed=!0;UI.showReviewWindow(a,d);break;case "{BoothPicker}":GameManager.showBoothList(a,d);break;case "{GameDefinition}":UI._showGameDefinition(a,
d);break;case "{FeatureList}":UI._showFeatureList(a,d);break;case "{MarketingList}":UI.showMarketingList(a,d);break;case "{ReleaseGame}":UI._showReleaseGame(a,d);break;case "{GameConferenceAnimation}":UI._showGameConferenceAnimation(a,d);break;case "{Research}":UI.showResearchMenu(a,d);break;case "{Training}":UI.showTrainingMenu(a,d);break;case "{CreateEngine}":UI.showCreateEngineMenu(a,d);break;case "{FindContractWork}":UI.showFindContractWorkMenu(a,d);break;case "{DevelopConsole}":UI.showDevelopConsoleMenu(a,
d);break;case "{TrialEnd}":UI.showTrialEnd(a,d);break;case "{GameEnd}":UI.showGameEnd(a,d);break;case "{PlatformReleaseNews}":UI.showPlatformReleaseNews(a,d);break;case "{enterCompanyName}":UI.showNewGameView(a,d);break;case "{HireStaff}":UI.showHireStaff(a,d);break;case "{SupportGreenheartGames}":UI.showSupportUsOptionsWindow(a,d);break;case "{PostMortemComplete}":UI.showPostMortemComplete(a,d);break;default:c(a,d)}};var a=function(a,c,d){var h=34,d=d?"":"bolder",f=UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":
"Open Sans";do{var j="{0} {1}pt {2}".format(d,h,f),j=new createjs.Text(c,j,"black");h--}while(400<j.getMeasuredWidth()&&10<h);a.css({font:"{0} {1}pt {2}".format(d,h,f)}).text(c)},d=function(a){var c="bold {0}pt {1}".format(22,UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans"),a=new createjs.Text(a,c,"black");return a.getMeasuredWidth()},c=function(b,c){var e=$("#notificationContent");e.empty();var h=$("#notificationContentTemplate").clone();b.options?2==b.options.length?h.find(".smallWindow").removeClass("smallWindow").addClass("notificationTwoOptions"):
h.find(".smallWindow").removeClass("smallWindow").addClass("notificationThreeOptions"):h.find(".notificationOption2").hide();var f=h.find(".windowTitle");a(f,b.header);(f=b.text)&&(f=f.replace(/\n/g,"<br />"));b.image?(h.find(".notificationImage").attr("src",b.image),h.find(".notificationImageContainer").show()):h.find(".notificationImageContainer").hide();var j=h.find(".notificationButton").css({opacity:0}).text(b.buttonText),l=[j[0]];if(b.options){var m=d(b.options[0]),m=Math.min(22*(290/m),22);
$(j[0]).css("font-size",m+"pt");$(j[0]).text(b.options[0]);m=d(b.options[1]);m=Math.min(22*(290/m),22);$(j[1]).css("font-size",m+"pt");$(j[1]).text(b.options[1]);l.push(j[1]);2<b.options.length&&(m=d(b.options[2]),m=Math.min(22*(290/m),22),$(j[2]).css("font-size",m+"pt"),$(j[2]).text(b.options[2]),l.push(j[2]));var k=$("#sidebar").width();$("#sidebar span").each(function(){var a=$(this).width(),a=k/a*12;$(this).css({"font-size":a,"line-height":a/1.2+"px"})})}var n=function(a){Sound.click();GameManager.company.activeNotifications.splice(GameManager.company.activeNotifications.indexOf(b),
1);var d;b.sourceId&&(d=$(a.srcElement).hasClass("notificationOption1")?0:$(a.srcElement).hasClass("notificationOption2")?1:2);General.notificationShown(b,d);GameManager.company&&(GameManager.company.activeNotifications.length>0?UI.closeModal(function(){UI._showNotification(GameManager.company.activeNotifications[0],c)}):UI.closeModal(function(){c&&c()}))};h.find(".notificationText").text(f).typewrite({delay:20,extra_char:"",replace_br:!0,speedUpOnClick:!0,soundLoop:"notificationTyping",volume:0.12,
callback:function(){$(l).transition({opacity:1},"fast").clickExclOnce(function(a){n(a)})}});UI.IS_SEGOE_UI_INSTALLED||h.find(".notificationText").addClass("fallback");"{noButton}"===b.buttonText&&j.hide();e.append(h);e={};b.sound&&$.extend(e,{sound:b.sound,volume:b.volume});UI.showModalContent("#notificationContent",e)};UI.showPlatformReleaseNews=function(a,c){var d=$("#platformReleaseNewsContent");d.empty();var h=$("#platformReleaseNewsTemplate").clone();h.find(".windowTitle").text("News".localize("heading"));
for(var f,j=0;j<Platforms.allPlatforms.length;j++)if(Platforms.allPlatforms[j].id===a.text){f=Platforms.allPlatforms[j];break}j="Today the new game platform {0} by {1} has been released.".localize().format(f.name,f.company);h.find(".platformRelaseNewsImage").attr("src",Platforms.getPlatformImage(f,GameManager.company.currentWeek));var l=h.find(".platformReleaseOkButton").css({opacity:0}).text(a.buttonText),m=function(){Sound.click();GameManager.company.activeNotifications.splice(GameManager.company.activeNotifications.indexOf(a),
1);0<GameManager.company.activeNotifications.length?UI.closeModal(function(){UI._showNotification(GameManager.company.activeNotifications[0],c)}):UI.closeModal(function(){c&&c()})};h.find(".notificationText").text(j).typewrite({delay:20,extra_char:"",replace_br:!0,speedUpOnClick:!0,soundLoop:"notificationTyping",volume:0.12,callback:function(){l.transition({opacity:1},"fast").clickExclOnce(m)}});UI.IS_SEGOE_UI_INSTALLED||h.find(".notificationText").addClass("fallback");d.append(h);UI.showModalContent("#platformReleaseNewsContent",
{disableCheckForNotifications:!0,close:!1})}})();
(function(){UI.pickTopicFontSize=void 0;UI._getMaxFontSize=function(a,c,b,g,e,h){for(var f=a.format(b,c),j=0;j<h.length&&b!=g;j++)(new createjs.Text(h[j],f,"black")).getMeasuredWidth()>e&&(b-=1,f=a.format(b,c),j--);return b};UI.pickTopicClick=function(a){Sound.click();var c="research"===a;if(!c){var b=GameManager.company.currentGame;if(b&&b.flags.lockedSettings&&b.flags.lockedSettings.topic){$(".simplemodal-data").find(".pickTopicButton").parent(".centeredButtonWrapper").effect("shake",{times:2,distance:5},
50);return}}!c&&a?UI._selectTopic(a.innerText):PlatformShim.execUnsafeLocalFunction(function(){var a=$(".simplemodal-data");a.find(".overlayTitle").text("Pick Topic".localize("heading"));var b=a.find(".listContainer");b.empty();var d=0,f=0,j=0,l=General.getTopicOrder(GameManager.company);if(void 0==UI.pickTopicFontSize){for(var m=[],k=0;k<l.length;k++)m.push(l[k].name);UI.pickTopicFontSize=UI._getMaxFontSize("{0}pt {1}",UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans",16,10,175,m)}for(k=0;k<l.length;k++){var n=
l[k];d++;3<d&&(f++,d=1);var m=-1!=GameManager.company.topics.indexOf(n),p=0<GameManager.currentResearches.filter(function(a){return a.topicId===n.id}).length,q=c?!m&&!p&&j<Research.TOPICS_VISIBLE:m,o=q?'<div class="selectorButton whiteButton" onclick="UI.pickTopicClick(this)">{{name}}</div>':'<div class="selectorButton disabledButton">{{name}}</div>',o=c&&!q&&!m&&!p||!c&&!q?o.replace("{{name}}","?"):GameManager.areHintsEnabled()&&Knowledge.hasTopicAudienceWeightingKnowledge(GameManager.company,n)?
('<div class="selectorButton'+(!q?" ":" whiteButton ")+"pickTopicButtonAudienceHintVisible"+(!q?" disabledButton":'" onclick="UI.pickTopicClick(this)')+'"><span style="position:relative;top:5px;">{0}<span style="font-size:11pt;"><br/>{1}</span></span></div>').format(n.name,Knowledge.getTopicAudienceHtml(GameManager.company,n)):o.replace("{{name}}",n.name),q=$(o);q.css("position","absolute");q.css("top",50*f+10*f);q.css("left",190*(d-1)+10);q.css("font-size",UI.pickTopicFontSize+"pt");b.append(q);
c&&(!m&&!p)&&j++}a.find(".selectionOverlayContainer").fadeIn("fast")})};UI._selectTopic=function(a){var c=$(".simplemodal-data").find(".pickTopicButton"),a=a.split("\n");c.get(0).innerText=a[0];c.removeClass("selectorButtonEmpty");$(".simplemodal-data").find(".selectionOverlayContainer").fadeOut("fast");UI._updateGameDefinitionNextButtonEnabled()};UI.pickPlatformClick=function(a){Sound.click();var c=a.hasClass("platform2")?1:a.hasClass("platform3")?2:0,b=GameManager.company.currentGame;if(0===c&&
b&&b.flags.lockedSettings&&b.flags.lockedSettings.platform)$(".simplemodal-data").find("#pickPlatformButton").parent(".centeredButtonWrapper").effect("shake",{times:2,distance:5},50);else if(b&&b.platforms.length<c){var g=".pickPlatformButton";0<b.platforms.length&&(g+=".platform"+b.platforms.length);$($(".simplemodal-data").find(g).get(0)).effect("pulsate",{times:2})}else PlatformShim.execUnsafeLocalFunction(function(){var b=$(".simplemodal-data");b.find(".overlayTitle").text("Pick Platform".localize("heading"));
var h=b.find(".listContainer");h.empty();var f=Platforms.getPlatformsOnMarket(GameManager.company),g=GameManager.company.currentGame,f=f.except(g.platforms);g.platforms.length>c&&f.push(g.platforms[c]);f=f.slice().sort(function(a,b){return Platforms.getTotalMarketSizePercent(b,GameManager.company)-Platforms.getTotalMarketSizePercent(a,GameManager.company)});if(1<g.platforms.length&&g.platforms.length>c){var l=$("<div class='removePlatformButton whiteButton'></div>").text("Remove Platform".localize());
(function(a){a.on("click",function(){var a=GameManager.company.currentGame.platforms;a.length<=c||a.splice(c,1);$(".simplemodal-data").find(".selectionOverlayContainer").fadeOut("fast");UI._updatePickPlatformButtonStates(g);UI._updateGameDefinitionNextButtonEnabled();UI._updateGameDefinitionCost()})})(l);h.append(l)}for(var m=0;m<f.length;m++){l=$("#platformButtonTemplate").clone();l.removeAttr("id");var k=f[m];l.platformId=k.id;var n=-1!=GameManager.company.licencedPlatforms.indexOf(k);l.find(".platformButtonImage").attr("src",
Platforms.getPlatformImage(k,GameManager.company.currentWeek));l.find(".platformTitle").text(k.name);l.find(".cost").text("Dev. cost: ".localize()+UI.getShortNumberString(k.developmentCosts));n?l.find(".licenseCost").hide():(l.find(".licenseCost").text("License cost: ".localize()+UI.getShortNumberString(k.licencePrize)),GameManager.company.cash<k.licencePrize&&l.find(".licenseCost").addClass("red"));l.find(".marketShare").text("Marketshare: ".localize()+UI.getPercentNumberString(Platforms.getTotalMarketSizePercent(k,
GameManager.company)));if(GameManager.areHintsEnabled()){var p=Knowledge.getPlatformAudienceHintHtml(GameManager.company,k);p&&l.find(".audienceHints").html(p);(p=Knowledge.getPlatformGenreHintHtml(GameManager.company,k))&&l.find(".genreHints").html(p)}(function(b){if(n){b.addClass("whiteButton");b.on("click",function(){UI._selectPlatform(b.platformId,a)})}else if(k.licencePrize<=GameManager.company.cash){b.addClass("whiteButton");b.on("click",function(){UI.buyPlatform($(this).find(".platformTitle").get(0).innerText,
function(c){c&&UI._selectPlatform(b.platformId,a)})})}else b.addClass("disabledButton")})(l);h.append(l)}b.find(".selectionOverlayContainer").fadeIn("fast")})};var a=function(a,c){var b=GameManager.company.currentGame.platforms;if(b.length==a)b.push(c);else if(b.length>=a)b[a]=c;else throw"unexpected platform length";UI._updatePickPlatformButtonStates(GameManager.company.currentGame)};UI.getMeasuredWidth=function(a,c){var b="bold {0}pt {1}".format(c,UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans"),
a=new createjs.Text(a,b,"black");return a.getMeasuredWidth()};UI._updatePickPlatformButtonStates=function(a){for(var c=$(".simplemodal-data"),b=0;3>b;b++){var g=".pickPlatformButton";0<b&&(g+=".platform"+(b+1));var g=$(c.find(g).get(0)),e="Pick Platform".localize(),h=GameManager.company.canDevelopMultiPlatform()?145:250;if(a.platforms.length>=b){g.removeClass("selectorButtonEmpty").removeClass("selectorButtonInactive windowStepActionButtonDisabled").addClass("selectorButton windowStepActionButton");
a.platforms[b]&&(e=a.platforms[b].name);var f=UI.getMeasuredWidth(e,16),h=Math.min(16*(h/f),16);g.css("font-size",h+"pt");g.text(e)}else f=UI.getMeasuredWidth(e,16),h=Math.min(16*(h/f),16),g.css("font-size",h+"pt"),g.addClass("selectorButtonInactive windowStepActionButtonDisabled").removeClass("selectorButton windowStepActionButton").text("Pick Platform".localize())}};UI._selectPlatform=function(d,c){var b=GameManager.company.licencedPlatforms.first(function(a){return a.id===d}),g=c?$(c):$(".simplemodal-data").find("#pickPlatformButton");
g.get(0).innerText=b.name;$(".simplemodal-data").find("#gameDefinition")&&a(g.hasClass("platform2")?1:g.hasClass("platform3")?2:0,b);g.removeClass("selectorButtonEmpty");$(".simplemodal-data").find(".selectionOverlayContainer").fadeOut("fast");UI._updateGameDefinitionNextButtonEnabled();UI._updateGameDefinitionCost()};UI.buyPlatform=function(a,c){var b=GameManager.company.availablePlatforms.concat(GameManager.company.licencedPlatforms).first(function(b){return b.name==a});if(b){var g="You require a developer license to be able to develop for this platform.<br/><br/> Do you want to pay <strong>{0}</strong> to acquire a license for the <strong>{1}</strong>?".localize().format(UI.getLongNumberString(b.licencePrize),
b.name);$("#purchasePlatformDialog").find(".purchasePlatformMessage").html(PlatformShim.toStaticHtml(g));$("#purchasePlatformDialog").dialog({draggable:!1,modal:!0,resizable:!1,show:"fade",zIndex:6E3,open:function(){$(this).siblings(".ui-dialog-titlebar").remove();$(this).find(".cancelActionButton").clickExclOnce(function(){Sound.click();$("#purchasePlatformDialog").dialog("close")});$(this).find(".confirmActionButton").clickExclOnce(function(){Sound.click();$("#purchasePlatformDialog").dialog("close");
GameManager.buyPlatform(b);c(!0)})}})}};UI.pickGenreClick=function(a){Sound.click();var c=GameManager.company.currentGame;c&&c.flags.lockedSettings&&c.flags.lockedSettings.genre?$(".simplemodal-data").find("#pickGenreButton").parent(".centeredButtonWrapper").effect("shake",{times:2,distance:5},50):a?UI._selectGenre(a.innerText):PlatformShim.execUnsafeLocalFunction(function(){var a=$(".simplemodal-data");a.find(".overlayTitle").text("Pick Genre".localize("heading"));var c=a.find(".listContainer");
c.empty();for(var d=General.getAvailableGenres(GameManager.company),h=a.find("#pickSecondGenreButton").get(0).innerText,f=!1,j=0;j<d.length;j++)if(h!=d[j].name){var l=$('<div class="selectorButton" onclick="UI.pickGenreClick(this)">{{name}}</div>'.replace("{{name}}",d[j].name));l.css("margin-left",210);f||(l.css("margin-top",90),f=!0);l.addClass("whiteButton");c.append(l)}a.find(".selectionOverlayContainer").fadeIn("fast")})};UI._selectGenre=function(a,c){var b=2==c?$(".simplemodal-data").find("#pickSecondGenreButton"):
$(".simplemodal-data").find("#pickGenreButton"),g=b.get(0).innerText;a==g?(b.text("Pick Genre".localize()),b.addClass("selectorButtonEmpty")):(b.text(a),b.removeClass("selectorButtonEmpty"));b=GameGenre.getAll().first(function(b){return b.name==a});g=GameManager.company.currentGame;2!=c?(g.genre=b,g.genre&&$(".simplemodal-data").find("#pickSecondGenreButton").removeClass("selectorButtonInactive windowStepActionInactive").addClass("selectorButton windowStepActionButton")):g.secondGenre=b;$(".simplemodal-data").find(".selectionOverlayContainer").fadeOut("fast");
UI._updateGameDefinitionNextButtonEnabled()};UI.pickSecondGenreClick=function(a){Sound.click();var c=GameManager.company.currentGame;c&&c.flags.lockedSettings&&c.flags.lockedSettings.secondGenre?$(".simplemodal-data").find("#pickSecondGenreButton").parent(".centeredButtonWrapper").effect("shake",{times:2,distance:5},50):c&&!c.genre?$(".simplemodal-data").find("#pickGenreButton").effect("pulsate",{times:2}):a?UI._selectGenre(a.innerText,2):PlatformShim.execUnsafeLocalFunction(function(){var a=$(".simplemodal-data");
a.find(".overlayTitle").text("Pick Genre".localize("heading"));var c=a.find(".listContainer");c.empty();for(var d=General.getAvailableGenres(GameManager.company),h=a.find("#pickGenreButton").get(0).innerText,f=!1,j=0;j<d.length;j++)if(h!=d[j].name){var l=$('<div class="selectorButton" onclick="UI.pickSecondGenreClick(this)">{{name}}</div>'.replace("{{name}}",d[j].name));l.css("margin-left",210);f||(l.css("margin-top",90),f=!0);l.addClass("whiteButton");c.append(l)}a.find(".selectionOverlayContainer").fadeIn("fast")})};
UI.pickEngineClick=function(a){Sound.click();if(a){var c=GameManager.company.engines.first(function(b){return b.id===a.engineId}),b=c.name,g=$(".simplemodal-data").find(".pickEngineButton");g.get(0).innerText=b;$(".simplemodal-data").find("#gameDefinition")&&(GameManager.company.currentGame.engine=c);g.removeClass("selectorButtonEmpty");$(".simplemodal-data").find(".selectionOverlayContainer").fadeOut("fast");UI._updateGameDefinitionNextButtonEnabled()}else PlatformShim.execUnsafeLocalFunction(function(){var a=
$(".simplemodal-data");a.find(".overlayTitle").text("Pick Engine".localize("heading"));var b=a.find(".listContainer");b.empty();var c=$('<div class="engineButtonContainer"></div>');b.append(c);for(var b=$("#engineButtonTemplate").get(0).outerHTML,d=GameManager.company.engines.slice().reverse(),g=0;g<d.length;g++){var m=d[g],k=$(b);k.engineId=m.id;k.text(m.name);k.addClass("whiteButton");(function(a){a.clickExcl(function(){UI.pickEngineClick(a)})})(k);m=$('<div class="centeredButtonWrapper"></div>');
m.append(k);c.append(m)}a.find(".selectionOverlayContainer").fadeIn("fast")})}})();
(function(){var a=!1,d;UI._showGameDefinition=function(b,d,e){if(!e&&GameManager.flags.selectGameActive){var f=GameManager.gameId;UI.showGameHistory(function(){if(f==GameManager.gameId)if(GameManager.flags.selectGameActive=!1,GameManager.flags.selectedGameId){var a=GameManager.flags.selectedGameId,c=GameManager.company.currentGame,e=GameManager.company.getGameById(a);c.sequelTo=a;c.genre=e.genre;c.secondGenre=e.secondGenre;c.topic=e.topic;c.targetAudience=e.targetAudience;c.gameSize=e.gameSize;GameManager.flags.createPack&&
(c.flags.lockedSettings||(c.flags.lockedSettings={}),c.flags.lockedSettings.topic=!0,c.flags.lockedSettings.genre=!0,c.flags.lockedSettings.platform=!0,c.flags.lockedSettings.targetAudience=!0,c.secondGenre&&(c.flags.lockedSettings.secondGenre=!0),c.flags.lockedSettings.mmo=!0,c.flags.mmo=!0,c.platforms=e.platforms.slice());GameManager.flags.selectedGameId=null;UI._showGameDefinition(b,d,!0)}else GameManager.company.activeNotifications.remove(b),GameManager.gameDefinitionCancelled()},!0)}else UI.showGameDefinition(GameManager.company,
{close:!0,disableCheckForNotifications:!0,onOpen:function(){var a=GameManager.company.currentGame;a.topic&&UI._selectTopic(a.topic.name);var b=a.secondGenre;a.genre?UI._selectGenre(a.genre.name):a.secondGenre||$(".simplemodal-data").find("#pickSecondGenreButton").addClass("selectorButtonInactive windowStepActionButtonDisabled").removeClass("selectorButton windowStepActionButton");b&&UI._selectGenre(b.name,2);UI._updatePickPlatformButtonStates(a);if(a.targetAudience){var c=a.targetAudience,b=$(".simplemodal-data");
b.find(".rating").removeClass("selected");c=b.find("young"===c?".ratingY":"mature"===c?".ratingM":".ratingE");c.addClass("selected");c.hasClass("rating")&&b.find(".ratingLabel").text(k(c))}a.gameSize&&(b=a.gameSize,c=$(".simplemodal-data"),c.find(".gameSizeButton").removeClass("selected"),c.find("small"===b?".gameSizeSmall":"medium"===b?".gameSizeMedium":"large"===b?".gameSizeLarge":".gameSizeAAA").addClass("selected"));a.flags.mmo&&(a=a.flags.mmo,b=$(".simplemodal-data").find(".gameGenreMMO"),b.removeClass("selected"),
a&&b.addClass("selected"));UI._updateGameDefinitionCost();UI._updateGameDefinitionNextButtonEnabled()},onClose:function(){c&&(clearInterval(c),c=void 0);a?GameManager.company.activeNotifications.remove(b):(GameManager.company.activeNotifications.remove(b),GameManager.gameDefinitionCancelled())}})};var c=0,b=function(a){var b;a.focus(function(){c&&clearInterval(c);b=Date.now();c=setInterval(function(){b&&6E4<=Date.now()-b&&(Achievements.activate(Achievements.writersBlock),GameManager.checkAchievements(),
clearInterval(c))},1E3)});a.blur(function(){clearInterval(c);c=0})};UI.showGameDefinition=function(c,e){var f=c.currentGame;$(".selectionOverlayContainer").hide();var h=$(".gameDefinitionContent");h.empty();var g=$("#gameDefinitionContentTemplate").clone();g.find("#gameTitle").attr("value",c.currentGame.title);d=c.currentGame.title;b(g.find("#gameTitle"));g.find(".pickTopicButton").clickExcl(function(){UI.pickTopicClick()});g.find("#pickGenreButton").clickExcl(function(){UI.pickGenreClick()});g.find("#pickSecondGenreButton").clickExcl(function(){UI.pickSecondGenreClick()});
g.find(".pickPlatformButton").clickExcl(function(){UI.pickPlatformClick($(this))});g.find(".pickEngineButton").clickExcl(function(){UI.pickEngineClick()});c.canDevelopMediumGames()?(c.canDevelopLargeGames()||g.find(".gameSizeLarge").hide(),c.canDevelopAAAGames()||g.find(".gameSizeAAA").hide()):g.find("#gameSizeGroup").hide();c.canDevelopMMOGames()||g.find(".gameGenreMMO").hide();c.canUseMultiGenre()?(g.find("#pickSecondGenreButton").css("margin-left","2.5px").css("margin-right","2.5px").css("width",
"145px"),g.find("#pickGenreButton").css("margin-left","2.5px").css("margin-right","2.5px").css("width","145px")):g.find("#pickSecondGenreButton").hide();c.canDevelopMultiPlatform()?g.find(".pickPlatformButton").css("margin-left","2.5px").css("margin-right","2.5px").css("width","145px"):g.find(".pickPlatformButton").slice(1).hide();c.canSetTargetAudience()||g.find("#targetRating").hide();g.find(".gameDefSelection").clickExcl(function(){Sound.click();var a=$(this);if(!(a.hasClass("rating")&&f.flags.lockedSettings&&
f.flags.lockedSettings.targetAudience||a.hasClass("gameSizeButton")&&f.flags.lockedSettings&&f.flags.lockedSettings.gameSize)){if(a.hasClass("gameGenreMMO")){if(f.flags.lockedSettings&&f.flags.lockedSettings.mmo)return;a.hasClass("selected")?a.removeClass("selected"):a.addClass("selected")}else{a.parent().find(".gameDefSelection").removeClass("selected");a.addClass("selected");if(a.hasClass("rating"))g.find(".ratingLabel").text(k(a));else if(a.hasClass("gameSizeButton"))f.gameSize=p(g.find(".gameSizeButton.selected"))}UI._updateGameDefinitionCost();
UI._updateGameDefinitionNextButtonEnabled()}});g.find(".windowCostLabel").hide();0===c.engines.length?g.find(".pickEngineButtonWrapper").hide():g.find(".pickEngineButtonWrapper").show();var j=null!=GameManager.company.currentGame.sequelTo,l=$("#gameDefinition").find(".dialogScreen1Title");j?(j=GameManager.company.getGameById(GameManager.company.currentGame.sequelTo),null===j?(GameManager.company.currentGame.sequelTo=null,l.removeClass("smallerWindowTitle").text("Game Concept".localize())):l.addClass("smallerWindowTitle").text("Sequel to {0}".localize().format(j.title))):
l.removeClass("smallerWindowTitle").text("Game Concept".localize());$("#gameDefinition").find(".dialogNextButton").clickExcl(function(){$("#gameDefinition").find(".dialogNextButton").effect("shake",{times:2,distance:5},50)});var m=Research.getAllItems().filter(function(a){return a.group==="graphic-type"}).map(function(a){return a.id});$("#gameDefinition").find(".dialogBackButton").clickExcl(function(){Sound.click();UI._saveSelectedGameFeatureSettings(function(a){return m.indexOf(a)!=-1});$("#gameDefinition").find(".dialogScreen1").transition({"margin-left":0});
$("#gameDefinition").find(".dialogScreen2").transition({"margin-left":"100%"})});a=!1;PlatformShim.execUnsafeLocalFunction(function(){h.append(g);UI.showModalContent("#gameDefinition",e)})};var g=function(){var a=$(".simplemodal-data").find(".pickTopicButton").text();return GameManager.company.topics.first(function(b){return b.name==a})},e=function(){var a=$(".simplemodal-data").find("#pickGenreButton").text();return GameGenre.getAll().first(function(b){return b.name==a})},h=function(){var a=$(".simplemodal-data").find("#pickSecondGenreButton").text();
return GameGenre.getAll().first(function(b){return b.name==a})},f=function(){var a=$(".simplemodal-data").find(".pickEngineButton").get(0).innerText;return GameManager.company.engines.first(function(b){return b.name.trim()==a.trim()})};UI._updateGameDefinitionCost=function(){var a=$(".simplemodal-data"),b=GameManager.company.currentGame,c;c=0+n(p(a.find(".gameSizeButton.selected")));b&&0<b.platforms.length&&(c+=b.platforms.sum(function(a){return a?a.developmentCosts:0}),c*=General.getMultiPlatformCostFactor(b),
c+=UI._getGameFeatureCosts());a.find(".gameGenreMMO").hasClass("selected")&&(c*=4);a=a.find(".windowCostLabel");a.empty().append($("<span>{0}</span>".format("Cost: {0}".localize().format(UI.getShortNumberString(c))))).textfill({maxFontPixels:20,maxHeightPts:37});a.fadeIn();return c};var j=function(a){a||(a=$(".simplemodal-data"));if(g()&&e()){var b=GameManager.company.currentGame;b.topic=g();b.genre=e();b.secondGenre=h();GameManager.areHintsEnabled()&&Knowledge.hasComboKnowledge(GameManager.company,
b)?a.find(".comboHint").text("{0} combo".localize().format(Knowledge.getComboHintText(b))):a.find(".comboHint").text("")}};UI._updateGameDefinitionNextButtonEnabled=function(){var a=$(".simplemodal-data"),b=a.find(".dialogNextButton");UI.maxFont(a.find(".windowMainActionButton"),22,50);if(0!==b.length){var c=GameManager.company.currentGame,d=g()&&0<c.platforms.length&&e();j(a);var h="",l=p(a.find(".gameSizeButton.selected"));l&&"small"!=l&&(c=c.platforms.filter(function(a){return!Platforms.doesPlatformSupportGameSize(a,
l)}),0<c.length&&(h=c.first(),h="{0} does not support {1} games!".localize("{0} platform, {1} game size").format(h.name,General.getGameSizeLabel(l))));a.find(".gameGenreMMO").hasClass("selected")&&"large"!=l&&"aaa"!=l&&(h="MMO's cannot be small or medium.".localize());0==h.length&&(c=f())&&(a.find(".gameGenreMMO").hasClass("selected")&&!c.parts.some(function(a){return a.id==="mmoSupport"}))&&(h="Engine does not support MMO.".localize());a=a.find(".gameDefinitionWarningText");0<h.length?(a.text(h).fadeIn().effect("pulsate",
{times:3}),d=!1):a.fadeOut();d?(b.clickExcl(function(){Sound.click();PlatformShim.execUnsafeLocalFunction(function(){m()});$("#gameDefinition").find(".dialogScreen1").transition({"margin-left":"-200%"});$("#gameDefinition").find(".dialogScreen2").transition({"margin-left":0})}),b.removeClass("baseButton").addClass("selectorButton").addClass("orangeButton"),PlatformShim.execUnsafeLocalFunction(function(){m()})):b.removeClass("selectorButton").removeClass("orangeButton").addClass("baseButton").addClass("disabledButton").clickExcl(function(){b.effect("shake",
{times:2,distance:5},50)})}};var l=[];UI._getSelectedFeatures=function(){return l};UI._getGameFeatureCosts=function(){if(!l||0==l.length)return 0;var a=GameManager.company.currentGame.features;return(a?l.except(a):l).sum(function(a){return Research.getDevCost(a,GameManager.company.currentGame)})};UI.generateFeatureElement=function(a){var b=$("#selectableGameFeatureItem").clone();b.attr("feature-id",a.id);GameManager.areHintsEnabled()&&a.isSkillTraining&&b.append($('<div style="font-size:12pt;"><span>{0}</span>{1}</div>'.format("Effect: ".localize(),
Knowledge.getTrainingKnowledgeHtml(a))));b.on("mousedown mouseup mouseleave",function(a){b.toggleClass("active","mousedown"===a.type)});return b};var m=function(){UI._updateFeatureListContainer({filter:function(a){return void 0!=a.techLevel||"Special Items"===a.category}},!0);UI._updateGameDefinitionCost();var a=$(".simplemodal-data").find(".featureSelectionPanel");a.hasClass("featureSelectionPanelHiddenState")&&(a.removeClass("featureSelectionPanelHiddenState"),a.addClass("featureSelectionShowState"))};
UI.maxFont=function(a,b,c){if(void 0!=a&&0<a.length){var d=a[0].innerText;void 0!=d&&0<d.length&&a.empty().append($("<span>{0}</span>".format(d))).textfill({maxFontPixels:b,maxHeightPts:c})}};UI._updateFeatureListContainer=function(a,b){var c=a;c||(c={readOnly:!1});var d=c.onChange;d||(d=function(){UI._updateGameDefinitionCost()});var e=$(".simplemodal-data");UI.maxFont(e.find(".dialogScreen1Title"),34,50);UI.maxFont(e.find(".dialogScreen2Title"),34,50);var f=e.find(".featureSelectionContainer"),
h=GameManager.company.currentGame,e=GameManager.getAvailableGameFeatures(h.engine).filter(function(a){return!a.canUse||a.canUse(h)}).groupBy(function(a){return a.category});f.empty();l=[];var g=null,j=[],m=function(a,b){if(a.hasClass("selectedFeature"))"graphic-type"!==b.group&&(a.removeClass("selectedFeature"),l.remove(b),d());else{if(b.group){var c=".radioButton"+j.indexOf(b.group);f.find(c).removeClass("selectedFeature");for(var c=l.filter(function(a){return a.group===b.group}),e=0;e<c.length;e++)l.remove(c[e])}a.addClass("selectedFeature");
l.push(b);d()}};c.categories&&0<c.categories.length&&(e=e.filter(function(a){return-1!=c.categories.indexOf(a.category)}));c.filter&&(e=e.filter(c.filter));var k=$("#featureCategoryHeading");b&&(e=e.slice().sort(function(a,b){return a.techLevel-b.techLevel}));for(var n=0;n<e.length;n++){var q=e[n];if(q.category!=g){g=k.clone();g.removeAttr("id");var p=Missions.getMissionWithId(q.category);p&&g.attr("mission-id",p.id);g.text(p?p.name:q.categoryDisplayName);f.append(g);g=q.category}var p=UI.generateFeatureElement(q,
g),B=GameManager.company.currentGame.features,B=(B=B&&-1!=B.indexOf(q)?0:Research.getDevCost(q,GameManager.company.currentGame))?"{0} ({1})".format(q.name,UI.getShortNumberString(B)):q.name;p.find(".featureContent").text(B);q.group&&(-1==j.indexOf(q.group)&&j.push(q.group),B="radioButton"+j.indexOf(q.group),p.addClass(B));c.readOnly||function(a,b){a.clickExcl(function(){m(a,b)})}(p,q);f.append(p);-1!=GameManager.uiSettings.selectedGameFeatures.indexOf(q.id)?m(p,q):"graphic-type"===q.group&&!l.some(function(a){return a.group===
"graphic-type"})&&m(p,q)}return e.length};UI._saveSelectedGameFeatureSettings=function(a){if(a){var b=GameManager.uiSettings.selectedGameFeatures.filter(function(b){return!a(b)});GameManager.uiSettings.selectedGameFeatures=b.concat(l.map(function(a){return a.id}).filter(function(b){return a(b)}))}else if(GameFlags.ghg6)throw"unexpected method call";};var k=function(a){var b=null;a.hasClass("ratingY")?b="Young".localize("audience category"):a.hasClass("ratingE")?b="Everyone".localize("audience category"):
a.hasClass("ratingM")&&(b="Mature".localize("audience category"));return b},n=function(a){switch(a){case "aaa":return 1E7;case "large":return 15E5;case "medium":return 15E4;default:return 0}},p=function(a){var b=null;a.hasClass("gameSizeSmall")?b="small":a.hasClass("gameSizeMedium")?b="medium":a.hasClass("gameSizeLarge")?b="large":a.hasClass("gameSizeAAA")&&(b="aaa");return b},q=function(){var a=GameManager.company,b=a.currentGame,c=null;b.sequelTo&&(c=a.getGameById(b.sequelTo));a=a.gameLog.concat(a.trashedGames);
b.engine&&(b.flags.isNewBetterEngine=!a.some(function(a){return a.engine&&a.engine.techLevel>=b.engine.techLevel}));a.some(function(a){return a.secondGenre===b.secondGenre&&a.genre===b.genre&&a.topic===b.topic})||(b.researchFactor=Research.FACTOR_FOR_NEW_COMBINATIONS,b.flags.isNewCombination=!0);a=!a.some(function(a){return a.topic.id===b.topic.id});b.flags.isNewTopic=a;if(c)if(c.engine&&b.engine&&c.engine.id===b.engine.id)b.flags.usesSameEngineAsSequel=!0;else if(b.engine&&(!c.engine||b.engine.techLevel>
c.engine.techLevel))b.flags.hasBetterEngineThanSequel=!0;b.flags.hasCustomName=b.title!=d;!0===GameManager.flags.createPack&&(b.flags.isExtensionPack=!0)};UI.closeGameDefinition=function(){Sound.click();var b=GameManager.company.currentGame,c=$(".simplemodal-data"),d=c.find("#gameTitle")[0].value;b.title=d;d=c.find(".rating.selected");b.targetAudience=d.hasClass("ratingY")?"young":!d.hasClass("ratingE")&&d.hasClass("ratingM")?"mature":"everyone";d=p(c.find(".gameSizeButton.selected"));b.gameSize=
d;if(d=g())if(b.topic=d,d=e()){b.genre=d;if(d=h())b.secondGenre=d;0!=b.platforms.length&&(d=f(),b.engine=d,b.costs=UI._updateGameDefinitionCost(),b.features=l,b.flags.techLevel=b.features.filter(function(a){return void 0!=a.techLevel}).average(function(a){return a.techLevel}),c.find(".gameGenreMMO").hasClass("selected")&&(b.flags.mmo=!0),q(),a=!0,UI.closeModal(function(){VisualsManager.gameStatusBar.updateGameName();VisualsManager.gameStatusBar.updatePoints();VisualsManager.gameStatusBar.progressBar.alpha=
0;GameManager.notifyIdleState()}))}}})();
(function(){UI.getDevStageSliderValues=function(a){return GameManager.uiSettings["stage{0}SliderValues".format(a)]};UI.selectedFeatures=[];var a=[],d=[],c=0,b=[],g=[];UI.showFeatureList=function(j,m){var k=GameManager.company.currentGame.isStaffResponsibilityEnabled();UI.selectedFeatures=[];a=[];d=[];b=[];g=[];for(var o=UI.getDevStageSliderValues(GameManager.getCurrentDevStage()),s=0;s<j.length;s++)UI.selectedFeatures.push(j[s]);PlatformShim.execUnsafeLocalFunction(function(){var b=$("#selectFeatureMenu");
b.empty();var c=$("#selectFeatureMenuTemplate").clone();c.find(".focusSliderStaffName").css("opacity",0);var g=GameManager.company.currentGame;c.find(".featureWindowTitle").text("Development Stage {0}".localize().format(GameManager.getCurrentDevStage()));c.find(".gameName").text(g.title);g.secondGenre?c.find(".topicGenre").text(g.topic.name+"/"+g.genre.name+"-"+g.secondGenre.name):c.find(".topicGenre").text(g.topic.name+"/"+g.genre.name);c.find(".featureDurationPreview").each(function(b,c){var d=
$(c);a.push(d)});c.find(".focusSliderWrapper").each(function(a,b){var c=$(b);k&&f(c.find(".focusSliderStaffName"),j[a]);d.push(c);c.value=o[a];c.find(".focusSlider").slider({orientation:"vertical",range:"min",min:0,max:100,value:o[a],animate:!1,slide:function(a,b){c.value=b.value;UI._updateFeatureFocusPreview()}});c.find(".focusSliderTitle")[0].innerText="{0} Lvl. {1}".localize("{0} feature name, {1} lvl number").format(j[a].name,LevelCalculator.getMissionLevel(j[a]));var m=c.find(".focusSliderHint"),
p="";if(GameManager.areHintsEnabled()){var r=Knowledge.getMissionWeightingHint(Missions.getMissionWithId(j[a].id),g);r&&(p=r.hint,r.exactMatch?m.removeClass("unsure"):(m.addClass("unsure"),p+=" ?"))}m.text(p);k&&c.droppable({hoverClass:"dragHover",tolerance:"pointer",drop:function(b,c){var d=$(this).find(".focusSliderStaffName"),f=d.text(),g,m=void 0;c.draggable.hasClass("focusSliderStaffName")?(g=c.draggable.text(),m=c.draggable):g=c.draggable.find(".staffName,").text();if(e(d,g)){h(j[a],g);if(m){e(m,
f);var d=h,k;m=m.parent(".focusSliderWrapper");m.hasClass("feature1")?k=0:m.hasClass("feature2")?k=1:m.hasClass("feature3")&&(k=2);d(j[k],f)}l()}}})});b.append(c);UI.maxFont(b.find(".featureWindowTitle"),34,50);UI.maxFont(b.find(".feature1").find(".focusSliderTitle"),16,40);UI.maxFont(b.find(".feature2").find(".focusSliderTitle"),16,40);UI.maxFont(b.find(".feature3").find(".focusSliderTitle"),16,40);UI.maxFont(b.find(".featureSelectionPanel").find(".windowTitle"),22,33)});UI.showModalContent("#selectFeatureMenu",
{close:!1,onOpen:function(){var a=$(".simplemodal-data"),b=$("#canvasScrollContainer").width(),d=$("#simplemodal-container");d.removeClass("smallScreenPopup");1024>=b&&d.addClass("smallScreenPopup");c=a.find(".featureDurationPreviewWrapper").width();GameManager.company.currentGame.isStaffResponsibilityEnabled()?UI._updateStaffListForFeatures():GameManager.company.currentGame.flags.featureResponsibility={};var e=!1,f=function(){var b=UI.getShortNumberString(UI._getGameFeatureCosts());a.find(".featureSelectionPanel .cost").text("Cost: {0}".localize().format(b))},
h=GameManager.company.currentGame.features.map(function(a){return a.id}),b=UI._updateFeatureListContainer({readOnly:!1,categories:j.map(function(a){return a.id}),filter:function(a){return"graphic-type"!=a.group||-1!=h.indexOf(a.id)},onChange:function(){f();e&&UI._updateFeatureFocusPreview()}});f();e=!0;a.find(".featureSelectionCategoryHeading").each(function(a,b){var c=$(b);c.missionId=c.attr("mission-id");g.push(c)});0<b&&a.find(".featureSelectionPanel").delay(200).queue(function(){$(this).removeClass("featureSelectionPanelHiddenState").addClass("featureSelectionShowState");
$(this).dequeue()});k&&(a.find(".featureStaffAsignPanel").delay(200).queue(function(){$(this).removeClass("hidden").addClass("showState");$(this).dequeue()}),a.find(".focusSliderStaffName").draggable({helper:"clone",zIndex:7E3,appendTo:a,start:function(a,b){b.helper.addClass("staffItemBorder")}}));UI._updateFeatureFocusPreview()},onClose:m.onClose,disableCheckForNotifications:!0})};var e=function(a,b){if(a.text()!=b)return a.transition({opacity:0},null,null,function(){a.text(b).transition({opacity:1},
400)}),!0;a.effect("pulsate",{times:1});return!1},h=function(a,b){var c=GameManager.company,d=c.currentGame,c=c.staff.first(function(a){return a.name==b});d.flags.featureResponsibility[a.id]=c?c.id:null},f=function(a,b){var c=GameManager.company,d=c.currentGame.flags.featureResponsibility,e=!1;if(d.hasOwnProperty(b.id)){var f=d[b.id];if(c=c.staff.first(function(a){return a.id===f}))a.text(c.name).css("opacity",1),e=!0}e||a.text("Drag staff here".localize()).css("opacity",1).delay(800).queue(function(){$(this).effect("pulsate",
{times:1});$(this).dequeue()})};UI._updateStaffListForFeatures=function(){var a=GameManager.company,c=$(".simplemodal-data"),d=c.find(".staffListContainer");d.empty();for(var a=a.staff,e=0;e<a.length;e++){var f=a[e],h,g=f;h=$("#staffListItemTemplate").clone();h.removeAttr("id");h.find(".staffName").text(g.name);g.flags.expert&&h.find(".specialization").text("({0})".format(Missions.getMissionWithId(g.flags.expert).name));var j=Math.floor(500*g.designFactor);h.find(".design").html("{0}<span>{1}</span>".format("Design: ".localize(),
j));g=Math.floor(500*g.technologyFactor);h.find(".technology").html("{0}<span>{1}</span>".format("Tech.: ".localize(),g));g=UI._getMaxFontSize("bold {0}pt {1}",UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans",11,7,75,["Design: ".localize(),"Tech.: ".localize()]);11>g&&h.css("font-size",g+"pt");h.draggable({helper:"clone",zIndex:7E3,appendTo:c});b.push({staffName:f.name,element:h,workLoadElement:h.find(".workload"),captionElement:h.find(".responsibility")});d.append(h)}};var j=[];GameManager.addTickListener(function(){if(0!=
j.length){for(var a=0;a<j.length;a++){var b=j[a],c={};b.width&&(c.width=b.width);b.background&&(c.background=b.background);b.css(c);b.textValue&&b.text(b.textValue)}j=[]}},!1);UI._updateFeatureFocusPreview=function(){for(var b=UI._getSelectedFeaturePercentages(),d=0;d<a.length;d++){var e=a[d];e.width&&(e.width=b[d]/100*c+"px");j.push(e)}GameManager.company.currentGame.isStaffResponsibilityEnabled()&&l(b);m(b)};var l=function(a,c){a||(a=UI._getSelectedFeaturePercentages());var d=GameManager.company,
e=d.currentGame;if(e.isStaffResponsibilityEnabled()){for(var f={},h=0;h<d.staff.length;h++){var g=d.staff[h];g.flags.workload||(g.flags.workload=0);for(var l=f[g.id]?workloads[g.id]:g.flags.workload,m=0;m<UI.selectedFeatures.length;m++){var k=e.flags.featureResponsibility[UI.selectedFeatures[m].id];void 0===k||k!==g.id||(l+=a[m])}f[g.id]=l;l*=100/(300/General.getOptimalTeamSize(e));m=b.first(function(a){return a.staffName==g.name});k=m.workLoadElement;k.width=l.clamp(0,100)+"%";var y=((l-100)/50).clamp(0,
1);k.background=createjs.Graphics.getHSL(120-120*y,100,60,0.5);-1==j.indexOf(k)&&j.push(k);m.captionElement.textValue="{0}%".format(Math.round(l));-1==j.indexOf(m.captionElement)&&j.push(m.captionElement)}if(c)for(h=0;h<d.staff.length;h++)g=d.staff[h],f.hasOwnProperty(g.id)&&(g.flags.workload=f[g.id])}},m=function(a){for(var b=UI._getSelectedFeatures(),c=0;c<UI.selectedFeatures.length;c++){var d=UI.selectedFeatures[c],e=UI.selectedFeatures[c].id,f=b.filter(function(a){return a.category===e}),h=General.getFeatureEfficiencyFromMissionFocus(GameManager.company.currentGame,
f,a[c]),h=Math.round(h);if(f=g.first(function(a){return a.missionId===d.id}))h=100===h?d.name:"{0} ({1}%)".format(d.name,Math.round(h)),f.textValue!=h&&(f.textValue=h,-1==j.indexOf(f)&&j.push(f))}};UI._getSelectedFeaturePercentages=function(){var a=UI._getSelectedSliderValues(),b=a.sum();return 0==b?[100/3,100/3,100/3]:a.map(function(a){return a/(b/70)+10})};UI._getSelectedSliderValues=function(){return d.map(function(a){return a.value})};var k=function(){var a=$(".simplemodal-data"),b=[],c=GameManager.company;
a.find(".focusSliderStaffName").each(function(a,d){var e=$(d),f=e.text();c.staff.first(function(a){return a.name==f})||b.push(e)});return 0<b.length?b:!1};UI.featuresSelectedClick=function(){Sound.click();var a=GameManager.company.currentGame,b=$(".simplemodal-data");if(a.isStaffResponsibilityEnabled()){var c=k();if(c){$(c).each(function(a,b){b.effect("pulsate",{times:3})});b.find(".okButton").parent().effect("shake",{times:2,distance:5},50);return}}for(var c=GameManager.getCurrentDevStage(),d=UI.getDevStageSliderValues(c),
e=UI._getSelectedSliderValues(),f=0;f<e.length;f++)d[f]=e[f];d=UI._getSelectedFeaturePercentages();for(f=0;f<d.length;f++)UI.selectedFeatures[f].percentage=d[f];f=UI._getGameFeatureCosts();0!=f&&GameManager.company.adjustCash(-f,"Dev. stage {0}".localize().format(c));var f=UI._getSelectedFeatures(),h=a.features.map(function(a){return a.id});a.features.addRange(f.filter(function(a){return-1==h.indexOf(a.id)}));3===c&&(GameManager.uiSettings.selectedGameFeatures=a.features.map(function(a){return a.id}));
b.find(".featureSelectionPanel").removeClass("featureSelectionShowState").addClass("featureSelectionPanelHiddenState");b.find(".featureStaffAsignPanel").removeClass("showState").addClass("hidden");b.delay(200).queue(function(){UI.closeModal(function(){l(null,true);GameManager.executeFeatures(UI.selectedFeatures)});$(this).dequeue()})}})();
(function(){UI._showReleaseGame=function(a,b){for(var c=GameManager.company.staff.filter(function(){return!0}),d=0;d<c.length;d++)c[d].state===CharacterState.Working&&(c[d].state=CharacterState.Idle,c[d].currentFeature=null),c[d].resetLeftOverPoints();VisualsManager.gameStatusBar.endDevelopment();GameManager.company.currentGame?UI.showReleaseGameDialog({disableCheckForNotifications:!0,onClose:function(){Research.checkForNewResearch();GameManager.company&&0<GameManager.company.activeNotifications.length&&
GameManager.company.activeNotifications.splice(GameManager.company.activeNotifications.indexOf(a),1);GameManager.notifyIdleState();b&&b()}}):(GameManager.resume(!0),Research.checkForNewResearch(),GameManager.company&&0<GameManager.company.activeNotifications.length&&GameManager.company.activeNotifications.splice(GameManager.company.activeNotifications.indexOf(a),1),GameManager.notifyIdleState(),b&&b())};UI.showReleaseGameDialog=function(a){var b=$("#releaseGameDialog"),c=GameManager.company.currentGame;
b.find(".releaseGameNameDisplay").text("{0}".localize("{0} game name").format(c.title));b.find(".releaseGameNameInput").attr("value","{0}".localize("{0} game name").format(c.title));b.find(".okButton").hide();b.find(".trashGameButton").unbind("click").click(UI.trashGameClick).hide();b.find(".releaseGameNameEditButton").unbind("click").click(UI.releaseGameNameEditButtonClick);b.find(".releaseGameNameEditOKButton").unbind("click").click(UI.releaseGameNameEditOKButtonClick);b.find(".pointsContainer").hide();
b.find(".pointsNewRecord").hide();b.find(".xpTitle").hide();b.find(".xpBonus").hide();UI.showModalContent("#releaseGameDialog",{onOpen:function(){UI._startReleaseGameDialogAnimations()},onClose:a.onClose,disableCheckForNotifications:a.disableCheckForNotifications})};UI.releaseGameNameEditButtonClick=function(){var a=$(".simplemodal-data");a.find(".gameNameDisplay").transit({opacity:0},500);var b=a.find(".gameNameEdit");b.show().css("opacity",0).transit({opacity:1},500);setTimeout(function(){b.focus()},
100)};UI.releaseGameNameEditOKButtonClick=function(){var a=$(".simplemodal-data"),b=a.find(".releaseGameNameInput")[0].value;b&&(a.find(".gameNameDisplay").transit({opacity:1},500),a.find(".gameNameEdit").transit({opacity:0},500,null,function(){a.find(".gameNameEdit").hide()}),a.find(".releaseGameNameDisplay").text(b),GameManager.company.currentGame.title!=b&&(GameManager.company.currentGame.flags.hasCustomName=!0),GameManager.company.currentGame.title=b)};var a=[],d=1;GameManager.addTickListener(function(b){if(a&&
0<a.length)for(var b=b*d,c=0;c<a.length;c++){var h=a[c],f=h._target;f.klug_progress&&f.progressbar({value:f.klug_progress});f.css_width_percent&&f.css({width:f.css_width_percent+"%"});if(f.klug_int_text){var j=Math.floor(f.klug_int_text);f.text(j)}f.klug_number_int_text&&(j=Math.floor(f.klug_number_int_text),f.text(0==j?j:0<j?"+"+j:"-"+j));h.tick(b,!1)}});var c=function(){d=5},b;UI._startReleaseGameDialogAnimations=function(){var g=GameManager.gameId,e=GameManager.company,h=$(".releaseGameFeatureTemplate"),
f=$(".simplemodal-data"),j=f.find(".featuresContainer");j.empty();a=[];d=1;var l=0,m=e.currentGame,k=m.featureLog.first().lastUpdate,n=new MersenneTwister(k),p=0<e.gameLog.length&&!e.gameLog.some(function(a){return a.technologyPoints>m.technologyPoints}),q=0<e.gameLog.length&&!e.gameLog.some(function(a){return a.designPoints>m.designPoints}),k=f.find(".technologyPoints"),o=f.find(".designPoints");k.klug_int_text=0;o.klug_int_text=0;a.push(createjs.Tween.get(k).wait(200).call(function(){$(window).on("click",
c)}));Sound.playSoundLoop("pointCount",1);var s=createjs.Tween.get(k).to({klug_int_text:m.technologyPoints},1800).call(function(){p&&g==GameManager.gameId&&(Sound.playSoundOnce("newRecord",0.7),f.find(".technologyPointsNewRecord").fadeIn().effect("pulsate",{times:3}),f.find(".pointDisplayContainer").transition({height:120}),f.find(".featuresContainer").transition({height:250}))});a.push(s);s=createjs.Tween.get(o).to({klug_int_text:m.designPoints},1800).call(function(){if(q){if(g!=GameManager.gameId)return;
Sound.playSoundOnce("newRecord",0.7);f.find(".designPointsNewRecord").fadeIn().effect("pulsate",{times:3});f.find(".pointDisplayContainer").transition({height:120});f.find(".featuresContainer").transition({height:250})}Sound.stopSound("pointCount")});a.push(s);l+=1800;o=[];m.flags.isNewTopic&&o.push({bonus:0.2,label:"New Topic".localize()});m.flags.isNewCombination&&o.push({bonus:0.3,label:"New Combo".localize()});m.isStaffResponsibilityEnabled()&&(e.staff.count(function(a){return m.getRatioWorked(a)&&
101<=General.getEffectiveWorkload(a,m)})||o.push({bonus:0.3,label:"Good Management".localize()}));var x=1+o.sum(function(a){return a.bonus}),r="",t=f.find(".xpBonusModifier").hide();if(1!=x){for(var w=1,s=createjs.Tween.get(t).wait(l),k=0;k<o.length;k++)(function(a,b){s=s.wait(1200*b).call(function(){g==GameManager.gameId&&(w+=a.bonus,0!=b&&(r+=", "),r+=a.label,t.text("(Bonus: x{0} - {1})".localize("{0} bonusMultiplier, {1} label").format(Math.roundToDecimals(w,2),r)),t.effect("pulsate",{times:2}))})})(o[k],
k),l+=1200;a.push(s)}k=General.getGameSizeDurationFactor(m.gameSize);1<k&&(k*=0.7);for(var x=x*k,v=[],y=m.features,k=0;k<m.featureLog.length;k++){var z=m.featureLog[k];if("mission"==z.missionType){var u=General.getMission(z.id),A=u.percentage?u.percentage/100:1,o=(150+45*n.random())*x,o=0.3*o+0.7*o*A,o=0.75*o,o={originalItem:u,name:u.name,level:LevelCalculator.getLevel(u.experience),progress:LevelCalculator.getProgressToNextLevel(u.experience),xpGain:o,progressColor:"orange",progressGainColor:"#FFC456"};
o.newLevel=LevelCalculator.getLevel(u.experience+o.xpGain);o.progressGain=LevelCalculator.getProgressToLevel(o.level+1,u.experience+o.xpGain)-o.progress;v.push(o);for(var J=y.filter(function(a){return a.showXPGain&&a.category===z.id}),E=0;E<J.length;E++)u=General.getFeature(J[E].id),o=(270+81*n.random())*x,o=0.3*o+0.7*o*A,o*=0.75,o={originalItem:u,name:u.name,level:LevelCalculator.getLevel(u.experience),progress:LevelCalculator.getProgressToNextLevel(u.experience),xpGain:o,progressColor:"#00BFFF",
progressGainColor:"#8CE2FF"},o.newLevel=LevelCalculator.getLevel(u.experience+o.xpGain),o.progressGain=LevelCalculator.getProgressToLevel(o.level+1,u.experience+o.xpGain)-o.progress,v.push(o)}}for(var C=[],B=[],k=0;k<e.staff.length;k++)o=e.staff[k],m.getRatioWorked(o)&&function(a){var b=a.experience,c=LevelCalculator.getLevel(b),d=(80+32*n.random())*x,f=m.getRatioWorked(a),d=d*f.clamp(0,1),d=0.75*d,f=General.getEffectiveWorkload(a,m);void 0!=f&&(isNaN(f)?d*=0.1:(f=0.5*(1-1*(Math.abs(f-100)/100)).clamp(0,
1),d+=d*f));f={originalItem:a,name:a.name,level:c,progress:LevelCalculator.getProgressToNextLevel(b),xpGain:d,newLevel:LevelCalculator.getLevel(b+d),progressColor:"firebrick",progressGainColor:"red",apply:function(){a.experience=a.experience+d;var b=LevelCalculator.getLevel(a.experience);if(b!=c){a.qualityFactor=b/5;if(a.id!==0){var f=(b-c)*Character.BASE_SALARY_PER_LEVEL,f=f+f*0.4*e.getRandom(),f=Math.floor(f/1E3)*1E3;a.salary=a.salary+f;C.push({staff:a,value:f})}if(b==5){Tutorial.staffReachedLvl5();
B.indexOf(a)==-1&&B.push(a)}}}};f.progressGain=LevelCalculator.getProgressToLevel(f.level+1,b+f.xpGain)-f.progress;v.push(f)}(o);y=14;if(void 0==UI.pickTopicFontSize){o="{0}pt {1}";u=UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans";1<v.count(function(a){return a.level<a.newLevel})&&(o="bold {0}pt {1}",y=UI._getMaxFontSize(o,u,y,8,130,["Level Up!".localize()]));A=[];J=[];for(k=0;k<v.length;k++){A.push(v[k].name);var L="Lvl. ".localize()+v[k].level;0==J.count(function(a){return a==L})&&J.push(L)}y=UI._getMaxFontSize(o,
u,y,8,195,A);y=UI._getMaxFontSize(o,u,y,8,53,J)}14==y&&(y=void 0);for(k=0;k<v.length;k++)u=h.clone(),void 0!=y&&u.css("font-size",y+"pt"),o=v[k],function(b,c){b.find(".featureName").text(c.name);b.find(".featureLevel").text("Lvl. ".localize()+c.level);var d=b.find(".featureLevelUp");d.hide();b.find(".featureProgress").css({width:c.progress-1+"%"}).css({"background-color":c.progressColor});var e=b.find(".featureProgressGain").css({"background-color":c.progressGainColor});e.css_width_percent=0;var f=
b.find(".featureGainCaption");f.klug_number_int_text=0;b.hide();s=createjs.Tween.get(b).wait(l).call(function(){g==GameManager.gameId&&(j.append(b),Sound.playSoundOnce("tack",0.2),b.slideDown("normal"),j.stop().animate({scrollTop:b.offset().top},600))});a.push(s);s=createjs.Tween.get(e).wait(l).to({css_width_percent:c.progressGain},800);a.push(s);s=createjs.Tween.get(f).wait(l).to({klug_number_int_text:c.xpGain},800);a.push(s);c.newLevel!=c.level&&(s=createjs.Tween.get(d).wait(l+800).call(function(){g==
GameManager.gameId&&(d.show("slow"),Sound.playSoundOnce("levelUp",0.4),b.find(".featureLevel").text("Lvl. ".localize()+c.newLevel),b.css("font-weight","bold"))}),a.push(s));l+=1200}(u,o);b=function(){for(var a=0;a<v.length;a++){var b=v[a];b.apply?b.apply():v[a].originalItem.experience+=v[a].xpGain}};h=createjs.Tween.get(j).wait(l).call(function(){f.find(".okButton").slideDown("fast").click(function(){b&&(b(),b=null);if(0<C.length){for(var a="Due to increase in experience the following staff have earned a raise:".localize()+
"\n",c=0;c<C.length;c++)var d=C[c],f=d.staff,a=a+"{0}{1}: {2} + {3} = {4}".format(4==c?"{n}":"\n",f.name,UI.getShortNumberString(f.salary-d.value),UI.getShortNumberString(d.value),UI.getShortNumberString(f.salary));e.notifications.push(new Notification("Salary increase".localize("heading"),a))}if(0<B.length){a="Special training available for:".localize()+"\n";for(c=0;c<B.length;c++)d=B[c],a+="{0}{1}".format(4==c?"{n}":"\n",d.name);e.notifications.push(new Notification("Special training".localize("heading"),
a))}UI.closeModal();General.releaseGame(GameManager.company);GameManager.autoSave()});f.find(".trashGameButton").fadeIn();$(window).off("click",c);a=[];d=1});a.push(h)};UI.trashGameClick=function(){var a=$("#trashGameConfirmationDialog");a.find(".cancelActionButton").clickExclOnce(function(){Sound.click();a.dialog("close")});a.find(".confirmActionButton").clickExclOnce(function(){Sound.click();b&&(b(),b=null);a.dialog("close");UI.closeModal(function(){General.trashGame(GameManager.company)})});a.gdDialog({popout:!0,
close:!0})}})();
(function(){var a="Company Name".localize(),d=void 0,c=void 0,b=void 0,g=void 0,e=void 0;UI.showNewGameView=function(f,h){PlatformShim.execUnsafeLocalFunction(function(){$.modal.impl.o&&($.modal.impl.o.onClose=null);$.modal.close()});void 0==d&&(d=!0,b=c=1,e=g=9);var l=$("#newGameViewContent");l.empty();var m=$("#newGameViewTemplate").clone();m.find("#companyName").attr("value",a);var k=PlatformShim.getUserName();k||(k="Player Name".localize());m.find("#playerName").attr("value",k);d?m.find("#maleRadio").attr("checked",
"checked"):m.find("#femaleRadio").attr("checked","checked");l.append(m);UI.closeAllLoadSaveViews();var l=$("#newGameView"),n=l.find(".featureSelectionPanel");l.find(".configButton").clickExcl(function(){n.hasClass("featureSelectionPanelHiddenState")?n.removeClass("featureSelectionPanelHiddenState").addClass("featureSelectionShowState"):n.removeClass("featureSelectionShowState").addClass("featureSelectionPanelHiddenState")});UI.showModalContent("#newGameView",{disableCheckForNotifications:!0,onClose:function(){GameManager.company.activeNotifications.splice(GameManager.company.activeNotifications.indexOf(f),
1);h&&h()},onOpen:function(){UI._updatePreview();var a=$("#canvasScrollContainer").width(),b=$("#simplemodal-container");b.removeClass("smallScreenPopup");a<=1024&&b.addClass("smallScreenPopup")}})};UI._updatePreview=function(){var a=$(".simplemodal-data").find(".characterPreviewCanvas")[0];a.height=254;a.width=360;a=a.getContext("2d");a.drawImage(GameDev.ResourceManager.resources[ResourceKeys.PreviewDesk],0,0,360,254);a.drawImage(UI._getChair(),122,22,200,200);a.drawImage(UI._getPants(),122,22,200,
200);a.drawImage(UI._getHands(),122,22,200,200);a.drawImage(UI._getBody(),122,22,200,200);a.drawImage(UI._getHead(),122,22,200,200)};UI._getChair=function(){return GameDev.ResourceManager.resources[ResourceKeys.PreviewChair]};UI._getPants=function(){return d?GameDev.ResourceManager.resources[ResourceKeys.PreviewPants1]:GameDev.ResourceManager.resources[ResourceKeys.PreviewPants9]};UI._getHands=function(){return d?4===b||7===b?GameDev.ResourceManager.resources[ResourceKeys.PreviewHands4]:5===b||8===
b?GameDev.ResourceManager.resources[ResourceKeys.PreviewHands5]:GameDev.ResourceManager.resources[ResourceKeys.PreviewHands1]:12===e?GameDev.ResourceManager.resources[ResourceKeys.PreviewHands12]:10===e?GameDev.ResourceManager.resources[ResourceKeys.PreviewHands10]:GameDev.ResourceManager.resources[ResourceKeys.PreviewHands9]};UI._getBody=function(){return d?GameDev.ResourceManager.resources[ResourceKeys["PreviewBody"+c]]:GameDev.ResourceManager.resources[ResourceKeys["PreviewBody"+g]]};UI._getHead=
function(){return d?GameDev.ResourceManager.resources[ResourceKeys["PreviewHead"+b]]:GameDev.ResourceManager.resources[ResourceKeys["PreviewHead"+e]]};UI.selectSexClicked=function(a){(d="male"===a)?($(".femaleSex").removeClass("selected"),$(".maleSex").removeClass("selected").addClass("selected")):($(".maleSex").removeClass("selected"),$(".femaleSex").removeClass("selected").addClass("selected"));UI._updatePreview()};UI.nextBody=function(){d?(c+=1,9===c&&(c=1)):(g+=1,13===g&&(g=9));UI._updatePreview()};
UI.prevBody=function(){d?(c-=1,0===c&&(c=8)):(g-=1,8===g&&(g=12));UI._updatePreview()};UI.nextHead=function(){d?(b+=1,9===b&&(b=1)):(e+=1,13===e&&(e=9));UI._updatePreview()};UI.prevHead=function(){d?(b-=1,0===b&&(b=8)):(e-=1,8===e&&(e=12));UI._updatePreview()};UI.closeNewGameView=function(){if(!Knowledge.isPlayerKnowledgeAvailable()||GameManager.useKnowledgeAnswered){Sound.click();GameManager.state=State.Idle;$("#mainBackground").fadeIn();$("foregroundCanvas").fadeIn();var f=$(".simplemodal-data"),
h=GameManager.company;h.name=f.find("#companyName")[0].value;h.flags.hasCustomName=h.name!=a;h.staff[0].name=f.find("#playerName")[0].value;h.staff[0].sex=d?"male":"female";h.staff[0].flags.body=d?c:g;h.staff[0].flags.head=d?b:e;GameManager.flags.gameLengthModifier=parseFloat(f.find("#gameLengthSelection").val());GameManager.openSaveView();VisualsManager.resetAllCharacters();for(f=0;f<h.staff.length;f++)h.staff[f].startAnimations();UI.closeModal()}else UI.showUseKnowledgeFromPrevGameDialog()};UI.showUseKnowledgeFromPrevGameDialog=
function(){var a="Since you have played the game before you can choose to use all previously gained hints in this new game.".localize(),a=a+("<br/><br/>"+"Would you like to import all previously gained hints into this game?".localize());$("#useKnowledgeFromPreviousGameDialog").find(".useKnowledgeFromPreviousGameMessage").html(PlatformShim.toStaticHtml(a));$("#useKnowledgeFromPreviousGameDialog").dialog({draggable:!1,modal:!0,resizable:!1,show:"fade",zIndex:5E3,open:function(){$(this).siblings(".ui-dialog-titlebar").remove();
$(this).find(".cancelActionButton").clickExclOnce(function(){Sound.click();$("#useKnowledgeFromPreviousGameDialog").dialog("close");GameManager.useKnowledgeAnswered=!0;UI.closeNewGameView()});$(this).find(".confirmActionButton").clickExclOnce(function(){Sound.click();$("#useKnowledgeFromPreviousGameDialog").dialog("close");Knowledge.usePlayerKnowledge(GameManager.company);GameManager.useKnowledgeAnswered=!0;UI.closeNewGameView()});UI.maxFont($(this).find(".windowTitle"),34,50)}})};UI._getElementForSaveGame=
function(a,b){var c=$("#loadSaveButtonTemplate").clone();if(void 0!=a.currentWeek)var d=b.getDate(a.currentWeek),e=$.timeago(a.saveTime);c.find(".saveTime").text(e);"auto"==a.slot?c.find(".slot").text("Auto".localize()):c.find(".slot").text("Slot ".localize()+a.slot);c.find(".name").text(a.companyName);e=c.find(".cash").text(UI.getShortNumberString(a.cash));0>a.cash?e.addClass("red"):e.addClass("green");void 0!=a.fans&&c.find(".fans").text(UI.getLongNumberString(a.fans)+" fans".localize());void 0!=
d&&c.find(".week").text("Y{0} M{1} W{2}".localize("date display").format(d.year,d.month,d.week));return c};UI.closeAllLoadSaveViews=function(){$("#loadView").dialog("close");$("#saveView").dialog("close");$("#newGameView").dialog("close");$("#overwriteGameDialog").dialog("close")};UI.showLoadView=function(a){var b=$("#loadViewContent");b.empty();for(var c=new Company("x"),d=0;d<a.length;d++){var e=a[d],h=UI._getElementForSaveGame(e,c);b.append(h);h=h.get(0);h.saveGame=e;h.onclick=function(){Sound.click();
GameManager.reload(this.saveGame.slot)}}UI.closeAllLoadSaveViews();GameManager.pause(!0);GameManager.loadScreenOpened=!0;$("#loadView").dialog({width:630,draggable:!1,modal:!0,resizable:!1,show:"fade",zIndex:6800,open:function(){var a=$(UI.closeButtonTemplate);a.zIndex=6900;a.clickExclOnce(function(){Sound.click();$("#loadView").dialog("close");GameManager.resume(!0)});$(this).parents(".ui-dialog:first").append(a);$(this).siblings(".ui-dialog-titlebar").remove();$(this).parents(".ui-dialog:first").addClass("tallWindow");
$(this).parents(".ui-dialog:first").addClass("windowBorder");$(this).parents(".ui-dialog:first").removeClass("ui-widget-content")},close:function(){$(this).dialog("destroy");this.style.cssText="display:none;";GameManager.resume(!0)}})};var h=0;UI.showSaveView=function(a){var b=$("#saveViewContent");b.empty();$("#loadSaveButtonTemplate").get(0);for(var c=new Company("x"),d=1;3>=d;d++){for(var e=null,g=0;g<a.length;g++)if(a[g].slot==d){e=a[g];break}g=null;if(e)g=UI._getElementForSaveGame(e,c);else{GameManager.company.slot=
d;GameManager.save(GameManager.company.slot);GameManager.save(GameManager.company.slot+"L1");return}b.append(g);g=g.get(0);g.saveGame=e;g.onclick=function(){Sound.click();h=this.saveGame.slot;UI.showOverwriteView()}}UI.closeAllLoadSaveViews();$("#saveView").dialog({width:630,draggable:!1,modal:!0,resizable:!1,show:"fade",zIndex:6E3,open:function(){var a=$(UI.closeButtonTemplate);a.zIndex=6200;a.clickExclOnce(function(){Sound.click();$("#saveView").dialog("close")});$(this).parents(".ui-dialog").append(a);
$(this).siblings(".ui-dialog-titlebar").remove();$(this).parents(".ui-dialog:first").addClass("tallWindow");$(this).parents(".ui-dialog:first").addClass("windowBorder");$(this).parents(".ui-dialog:first").removeClass("ui-widget-content")},close:function(){$(this).dialog("destroy");this.style.cssText="display:none;";GameManager.company.slot?GameManager.resume(!0):GameManager.startNewGame()}})};UI.showOverwriteView=function(){$("#overwriteGameDialog").dialog({draggable:!1,modal:!0,resizable:!1,show:"fade",
zIndex:7E3,title:"Attention",open:function(){$(this).siblings(".ui-dialog-titlebar").remove();$(this).find(".cancelActionButton").clickExclOnce(function(){Sound.click();$("#overwriteGameDialog").dialog("close")});$(this).find(".confirmActionButton").clickExclOnce(function(){Sound.click();GameManager.company.slot=h;$("#overwriteGameDialog").dialog("close");$("#saveView").dialog("close");$("#splashProgress").fadeOut();GameManager.save(GameManager.company.slot);GameManager.save(GameManager.company.slot+
"L1");GameManager.resume(!0)})},close:function(){$(this).dialog("destroy");this.style.cssText="display:none;"}})}})();
(function(){var a=[];UI.addSalesCard=function(h,f,g,l,m,k,n,p,q,o,s,x){g<l&&(0<g&&0===n.length)&&n.push(g);if(1===n.length){if(h=d(h,f,k,m),f=b(q!=Sales.consoleUnitPrice),h.stage.addChild(f),f.y=51,f.width=223,h.shapes=[f],a.push(h),g=1-(GameManager.company.currentWeek-Math.floor(GameManager.company.currentWeek)),e.push(createjs.Tween.get(f).to({y:0,height:51},7500*g)),g=m,p?(g=x?m+p/x/q:m+p/q,e.push(createjs.Tween.get(h).wait(500).to({unitsSold:g},7500))):e.push(createjs.Tween.get(h).wait(500).to({unitsSold:m},
7500)),o)f=b("maintenance"),h.stage.addChild(f),f.y=51,f.width=223,h.maintenanceShapes=[f],e.push(createjs.Tween.get(f).to({y:51-51*(o/q/g),height:51*(o/q/g)},7500))}else 1<n.length&&c(h,f,k,m,n,q,s,x)};var d=function(a,b,c,d){var e=$("#gameSalesContainer"),k=$("#gameSalesCardTemplate").clone();k.removeAttr("id");k.rankElement=k.find(".gameSalesRankLabel");k.unitsElement=k.find(".gameSalesUnitsLabel");k.find(".gameNameLabel").text(b);g(k,c,d,{currentRankText:"",currentUnitsText:""});e.append(k);b=
k.find(".gameSalesCardCanvas");b=new createjs.Stage(b[0]);b.canvas.height=51;b.canvas.width=223;k.on("click",function(b){UI.salesContainerClick(b,a)});return{id:a,stage:b,card:k,currentSalesRank:c,unitsSold:d}},c=function(c,e,g,l,m,k,n){c=d(c,e,g,l);40<=m.length&&(stageObject.stage.removeChild(stageObject.shapes[0]),stageObject.shapes.remove(stageObject.shapes[0]),m.splice(0,1),n&&(stageObject.stage.removeChild(stageObject.maintenanceShapes[0]),stageObject.maintenanceShapes.remove(stageObject.maintenanceShapes[0]),
n.splice(0,1)));e=m.max(function(a){return a});g=m.length;l=[];c.maintenanceShapes=[];if(n)for(var p=0;p<g;p++){var q=k!=Sales.consoleUnitPrice,q=b(q);q.scaleX=1/g-0.01;q.x=223/g*p;var o=51*(m[p]/e);q.y=51-o;q.scaleY=o/51;l.push(q);var s=b("maintenance");s.scaleX=1/g-0.01;s.x=223/g*p;o=51*(n[p]/k/e);s.y=51-o;s.scaleY=o/51;c.maintenanceShapes.push(s);m[p]>n[p]?(c.stage.addChild(q),c.stage.addChild(s)):(c.stage.addChild(s),c.stage.addChild(q))}else for(p=0;p<g;p++)q=k!=Sales.consoleUnitPrice,q=b(q),
c.stage.addChild(q),q.scaleX=1/g-0.01,q.x=223/g*p,o=51*(m[p]/e),q.y=51-o,q.scaleY=o/51,l.push(q);c.stage.update();c.shapes=l;a.push(c)},b=function(a){var b=new createjs.Shape;b.alpha=1;b.x=0;var c=b.graphics;"maintenance"===a?c.beginFill(createjs.Graphics.getRGB(255,0,0,1)):a?c.beginFill(createjs.Graphics.getRGB(86,216,86,1)):c.beginFill(createjs.Graphics.getRGB(0,191,255,1));c.drawRect(0,0,223,51);c.closePath();return b},g=function(a,b,c,d){var e="",g="";0<b&&(e="Rank: ".localize()+b);g="Units: ".localize()+
UI.getShortNumberString(Math.floor(c));d.currentRankText!=e&&(a.rankElement.text(e),d.currentRankText=e);d.currentUnitsText!=g&&(a.unitsElement.text(g),d.currentUnitsText=g)};UI.updateSalesCard=function(c,d,g,l,m,k,n,p,q){void 0===g&&(g=0);if(n=a.first(function(a){return a.id===c})){n.currentSalesRank=k;k=n.stage;40<=l.length&&(n.stage.removeChild(n.shapes[0]),n.shapes.remove(n.shapes[0]),l.splice(0,1),p&&(n.stage.removeChild(n.maintenanceShapes[0]),n.maintenanceShapes.remove(n.maintenanceShapes[0]),
p.splice(0,1)));for(var o=l.max(function(a){return a}),s=l.length,x=223/s,r=m!=Sales.consoleUnitPrice,t=n.shapes.length,w=0;w<t;w++){var v=51*(l[w]/o),y=1/s-0.01;e.push(createjs.Tween.get(n.shapes[w]).to({scaleX:y,x:223/s*w,y:51-v,scaleY:v/51},500))}r=b(r);r.y=51;r.x=223-x;r.scaleX=1/s-0.01;n.shapes.push(r);v=51*(l.last()/o);e.push(createjs.Tween.get(r).wait(500).to({y:51-v,scaleY:v/51},7500));q||(q=1);e.push(createjs.Tween.get(n).wait(500).to({unitsSold:d+g/q/m},7500));if(p){for(w=0;w<n.maintenanceShapes.length;w++)v=
51*(p[w]/o),y=1/s-0.01,e.push(createjs.Tween.get(n.maintenanceShapes[w]).to({scaleX:y,x:223/s*w,y:51-v,scaleY:v/51},500));d=b("maintenance");d.y=51;d.x=223-x;d.scaleX=1/s-0.01;l.last()>p.last()?(k.addChild(r),k.addChild(d)):(k.addChild(d),k.addChild(r));n.maintenanceShapes.push(d);v=51*(p.last()/o);e.push(createjs.Tween.get(d).wait(500).to({y:51-v,scaleY:v/51},7500))}else k.addChild(r)}};UI.clearSalesCards=function(){a.forEach(function(a){UI.removeSalesCard(a.id,!1)});$("#gameSalesContainer").empty();
a=[]};UI.removeSalesCard=function(b){var c=a.first(function(a){return a.id===b});c&&(c.card.off("click"),c.card.slideUp("slow",function(){$(this).remove()}),a.remove(c))};var e=[];GameManager.addTickListener(function(b,c){if(e&&0<e.length&&!c){for(var d=0;d<e.length;d++)e[d].tick(b,!1);for(d=0;d<a.length;d++)a[d].stage.update(),g(a[d].card,a[d].currentSalesRank,a[d].unitsSold,a[d])}},!0)})();
(function(){UI.showMarketingList=function(a,d){var c=Missions.MarketingMissions;$(".selectionOverlayContainer").hide();var b=$("#marketingPicker"),g={disableCheckForNotifications:!0,close:!0,onClose:function(){GameManager.company.activeNotifications.remove(a);GameManager.resume(!0);d&&d()}},e=b.find(".marketingPickerText"),h=GameManager.company.currentGame?GameManager.company.currentGame.title:"";e.text("How do you want to market {0}?".localize().format(h));e=b.find(".marketingSliderContainer");e.empty();
var f=$('<div class="marketingVariationContainer royalSlider rsDefaultInv"></div>');e.append(f);e=$("#genericMarketingTemplate");for(h=0;h<c.length;h++){var j=c[h],l=e.clone();l.find(".marketingTitle").text(j.name);l.find(".marketingShortTitle").text(j.shortName);l.find(".marketingDescription").text(j.description);l.find(".marketingCashCost").text("Costs: {0}".localize().format(UI.getShortNumberString(j.cost)));f.append(l)}PlatformShim.ISWIN8?f.gdSlider():g.onOpen=function(){f.gdSlider()};b.find(".okButton").clickExcl(function(){Sound.click();
var a=b.find(".rsActiveSlide").find(".marketingTitle").text(),c=Missions.MarketingMissions.first(function(b){return b.name==a});GameManager.company.cash>=c.cost?(Missions.executePublishingMission(GameManager.company,c),UI.closeModal()):b.find(".centeredButtonWrapper").effect("shake",{times:2,distance:5},50)});UI.showModalContent("#marketingPicker",g)}})();
(function(){UI.showCreateEngineMenu=function(a,b){UI.selectedEngineParts=[];$("#createEngineMenu").find(".selectionOverlayContainer").hide();g();$(".engineTitleInput")[0].value="Game Engine #{0}".localize("{0} is number").format(GameManager.company.engines.length+1);UI.showModalContent("#createEngineMenu",{disableCheckForNotifications:!0,close:!0,onOpen:function(){c()},onClose:function(){GameManager.company&&0<GameManager.company.activeNotifications.length&&GameManager.company.activeNotifications.splice(GameManager.company.activeNotifications.indexOf(a),
1);GameManager.resume(!0);b&&b()}})};var a=function(){GameManager.uiSettings.selectedEngineParts=b.map(function(a){return a.id})},d=function(a){var b=$(".simplemodal-data").find("#createEngineButton");a?b.hasClass("orangeButton")||(b.removeClass("disabledButton").addClass("orangeButton"),b.clickExcl(function(){UI.createEngineClick()})):b.hasClass("disabledButton")||b.removeClass("orangeButton").addClass("disabledButton").unbind("click")},c=function(){var a=b.sum(function(a){return Research.getEngineCost(a)}),
c=$(".simplemodal-data").find(".engineCost");c.text("Cost: {0}".localize().format(UI.getShortNumberString(a)));a>GameManager.company.cash?(c.addClass("red"),d(!1)):(c.removeClass("red"),d(0<b.length))},b=[],g=function(){var a=$(".enginePartsContainer"),d=General.getAvailableEngineParts(GameManager.company).groupBy(function(a){return a.category});a.empty();var f=null;b=[];for(var g=function(a,c){a.hasClass("selectedFeature")?(a.removeClass("selectedFeature"),b.remove(c)):($(".simplemodal-data").find(".enginePartsContainer"),
a.addClass("selectedFeature"),b.push(c))},l=0;l<d.length;l++){var m=d[l];m.category!=f&&(a.append($('<div class="featureSelectionCategoryHeading">{0}</div>'.format(m.categoryDisplayName))),f=m.category);var k=UI.generateFeatureElement(m);k.find(".featureContent").text("{0} ({1})".format(m.name,UI.getShortNumberString(Research.getEngineCost(m))));k.addClass("radioButton");(function(a,b){a.clickExcl(function(){g(a,b);c()})})(k,m);GameManager.uiSettings.selectedEngineParts&&-1!=GameManager.uiSettings.selectedEngineParts.indexOf(m.id)&&
g(k,m);a.append(k)}};UI.createEngineClick=function(){UI.selectedEngineParts=b;a();if(0!==UI.selectedEngineParts.length){var c=UI.selectedEngineParts.sum(function(a){return Research.getEngineCost(a)});if(!(GameManager.company.cash<c)){var d=$(".simplemodal-data").find(".engineTitleInput")[0].value;UI.closeModal(function(){GameManager.createEngine(d,UI.selectedEngineParts)})}}}})();
(function(){UI.showResearchMenu=function(a,b){d(a,!1,b)};UI.showTrainingMenu=function(a,b){d(a,!0,b)};var a=!0,d=function(b,d,h){a=d;var g=GameManager.company.staff.first(function(a){return a.id===GameManager.uiSettings.selectedChar});PlatformShim.execUnsafeLocalFunction(function(){$(".selectionOverlayContainer").hide();e(g,a);var b=$("#researchMenu");b.find(".windowTitle").text(!a?"What do you want to research?".localize():"Training Options".localize("heading"));var d=b.find(".staffInfoPanel");a&&
d.empty().append(c(g));var f=!a?"Start Research".localize("button"):"Start Training".localize("button");b.find(".okButton").empty().append($("<span>{0}</span>".format(f))).textfill({maxFontPixels:22,maxHeightPts:50});UI.showModalContent("#researchMenu",{close:!0,disableCheckForNotifications:!0,onClose:function(){GameManager.company.activeNotifications.splice(0,1);h&&h()},onOpen:function(){a?d.delay(200).queue(function(){$(this).removeClass("hidden").addClass("showState");$(this).dequeue()}):d.removeClass("showState").addClass("hidden")}})})},
c=function(a){var b=$("#trainingStaffInfo").clone(),c=b.find(".name"),d=15,e=UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans";do{var h="{0} {1}pt {2}".format("bold",d,e),h=new createjs.Text(a.name,h,"black");d--}while(195<h.getMeasuredWidth()&&10<d);c.css({font:"{0} {1}pt {2}".format("bold",d,e)}).text(a.name);a.flags.expert&&b.find(".expert").text("({0})".format(Missions.getMissionWithId(a.flags.expert).name));b.find(".lvl").text(a.getLevel());b.find(".design").text(a.getDesignSkillPoints());b.find(".technology").text(a.getTechnologySkillPoints());
b.find(".speed").text(a.getSpeedSkillPoints());b.find(".research").text(a.getResearchSkillPoints());return b},b=function(){var a=$(".simplemodal-data").find("#startResearchButton");g&&!a.hasClass("orangeButton")&&(a.removeClass("disabledButton").addClass("orangeButton"),a.clickExcl(function(){h()}))},g,e=function(a,c){var d=$("#researchButtonContainer"),e;e=c?Training.getAvailableTraining(a):GameManager.company.availableResearch.filter(function(a){return"New Topic"===a.id||0===GameManager.currentResearches.filter(function(b){return b.id===
a.id}).length}).groupBy(function(a){return a.category});d.empty();var h=null;$("#selectableGameFeatureItem");g=null;for(var n=function(a,c){a.hasClass("selectedFeature")?(a.removeClass("selectedFeature"),g=null):($(".simplemodal-data").find(".selectedFeature").removeClass("selectedFeature"),a.addClass("selectedFeature"),g=c);b()},p=0;p<e.length;p++){var q=e[p],o=Research.getPointsCost(q);q.category!=h&&(d.append($('<div class="featureSelectionCategoryHeading">{0}</div>'.format(q.categoryDisplayName?
q.categoryDisplayName:q.category))),h=q.category);var s=UI.generateFeatureElement(q);s.find(".levelLabel").hide();q.style&&s.addClass(q.style);q.isTraining&&(q.canUse&&!q.canUse(a,GameManager.company))&&s.addClass("disabled");var o=q.name+" ({0} ".format(UI.getShortNumberString(o))+"RP".localize("RP short for research points"),x=Research.getResearchCost(q);x&&(o+=", {0} ".format(UI.getShortNumberString(x))+"cr.".localize("cr. short for credits"));o+=")";s.find(".featureContent").text(o);s.addClass("radioButton");
(function(b,c){var d=Research.getPointsCost(c);b.clickExcl(function(){if(!(d>GameManager.company.researchPoints)&&(!c.isTraining||!c.canUse||c.canUse(a,GameManager.company))){n(b,c);if(c==Research.ResearchTopicItem){UI.pickTopicClick("research");b.hasClass("selectedFeature")||n(b,c)}else $(".simplemodal-data").find(".pickTopicButton").text("{0} ({1} RP)".format(Research.ResearchTopicItem.name,UI.getShortNumberString(Research.ResearchTopicItem.pointsCost)))}})})(s,q);q==Research.ResearchTopicItem&&
s.addClass("pickTopicButton");d.append(s)}},h=function(){Sound.click();if(g){var b=$(".simplemodal-data");if(g===Research.ResearchTopicItem){var c=b.find(".pickTopicButton").get(0).innerText,b=Topics.topics.first(function(a){return a.name==c});if(!b)return;GameManager.researchTopic(b)}else GameManager.research(g,a?"training":"research");UI.closeModal()}}})();
(function(){UI._gameDetailsColumn1FontSize=void 0;UI._getElementForGameDetail=function(a,d){var c=GameManager.company.getDate(a.releaseWeek),b=$("#gameDetailsTemplate").clone();b.removeAttr("id");b.find(".gameDetailsTitle").text(a.title);if(void 0==UI._gameDetailsColumn1FontSize){for(var g=b.find(".gameDetailsColumn1"),e=[],h=0;h<g.length;h++)g[h].innerText&&e.push(g[h].innerText);g=UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans";UI._gameDetailsColumn1FontSize=15;for(var f="bolder {0}pt {1}".format(UI._gameDetailsColumn1FontSize,
g),h=0;h<e.length&&10!=UI._gameDetailsColumn1FontSize;h++)180<(new createjs.Text(e[h],f,"black")).getMeasuredWidth()&&(UI._gameDetailsColumn1FontSize-=1,f="{0}pt {1}".format(UI._gameDetailsColumn1FontSize,g),h--)}b.find(".gameDetailsColumn1").css({"font-size":UI._gameDetailsColumn1FontSize+"pt"});UI.IS_SEGOE_UI_INSTALLED||(b.find(".gameDetailsColumn1").css({"font-family":"Open Sans"}),b.find(".gameDetailsColumn2").css({"font-size":"12pt","font-family":"Open Sans"}));b.find(".gameId").text(a.id);a.secondGenre?
b.find(".gameDetailsTopicGenre").text(a.topic.name+"/"+a.genre.name+"-"+a.secondGenre.name):b.find(".gameDetailsTopicGenre").text(a.topic.name+"/"+a.genre.name);e=a.platforms.map(function(a){return a.name}).join(", ");b.find(".gameDetailsPlatform").text(e);-1!=GameManager.company.researchCompleted.indexOf(Research.TargetAudience)&&b.find(".gameDetailsAudience").text(General.getAudienceLabel(a.targetAudience));b.find(".gameDetailsImage").attr("src",Platforms.getPlatformImage(a.platforms[0],a.releaseWeek));
b.find(".gameDetailsCosts").text(UI.getShortNumberString(a.costs));a.releaseWeek>GameManager.company.currentWeek?b.find(".gameDetailsReleaseWeek").text("coming soon".localize()):b.find(".gameDetailsReleaseWeek").text("Y{0} M{1} W{2}".localize("date display").format(c.year,c.month,c.week));0<a.revenue?(b.find(".gameDetailsAmountEarned").text(UI.getShortNumberString(a.revenue)),c=b.find(".gameDetailsTotal"),e=a.revenue-a.costs,0>e?(b.find(".gameDetailsTotalLabel").text("Loss:".localize()),c.addClass("red")):
c.addClass("green"),c.text(UI.getShortNumberString(e)),b.find(".gameDetailsFansChange").text(UI.getLongNumberString(Math.max(0,Math.round(a.fansChanged)))),0<a.topSalesRank?b.find(".gameDetailsTopSalesRank").text(a.topSalesRank):b.find(".gameDetailsTopSalesRank").text("100+"),b.find(".gameDetailsUnitsSold").text(UI.getShortNumberString(a.unitsSold))):(c=a.flags.isExtensionPack?"-":"?",b.find(".gameDetailsUnitsSold").text(c),b.find(".gameDetailsAmountEarned").text(c),b.find(".gameDetailsTotal").text(c),
b.find(".gameDetailsFansChange").text(c),b.find(".gameDetailsTopSalesRank").text(c),b.find(".gameDetailsAmountEarned").removeClass("green"));a.reviewMessageDisplayed?(b.find(".gameAverageScoreOverview").text(d),b.find(".gameDetailsAvgReview").text(d)):(b.find(".gameAverageScoreOverview").text("?"),b.find(".gameDetailsAvgReview").text("?"));return b};UI.showGameHistory=function(a,d,c){d=d?!0===GameManager.flags.createPack?GameManager.company.getPossibleGamesForPack():GameManager.company.getPossibleGamesForSequel():
GameManager.company.gameLog;c&&(d=GameManager.company.gameLog.filter(function(a){return a.canDoPostMortem()}));if(0<d.length){GameManager.pause(!0);var b=$("#gameHistoryDialog"),g=b.find("#gameHistoryContent");g.empty();var e=$('<div class="gameHistorySliderContainer royalSlider rsDefaultInv"></div>');g.append(e);d.slice().sort(function(a,b){return a.releaseWeek>b.releaseWeek?1:-1});for(g=d.length-1;0<=g;g--){var h=d[g];if(!h.flags.isExtensionPack||c){var f=h.reviews.average(function(a){return a.score}),
h=UI._getElementForGameDetail(h,f);e.append(h)}}var j=GameManager.flags.selectGameActive;j&&(GameManager.flags.selectedGameId=null);c=j?"Select Game".localize("heading"):"Game History".localize();b.find(".windowTitle").text(c);UI.maxFont(b.find(".windowTitle"),34,50);c=j?"Select".localize("button"):"OK".localize();b.find(".okButton").text(c).clickExcl(function(){Sound.click();if(j)GameManager.flags.selectedGameId=b.find(".rsActiveSlide").find(".gameId").text();$("#gameHistoryDialog").dialog("close");
GameManager.resume(true)});PlatformShim.ISWIN8&&e.gdSlider();b.dialog({draggable:!1,width:660,height:650,modal:!0,resizable:!1,show:"fade",zIndex:6E3,open:function(){var a=$(this).parents(".ui-dialog:first").find(".closeDialogButton");if(a.length==0){a=$(UI.closeButtonTemplate);$(this).parents(".ui-dialog:first").append(a)}a.zIndex=4500;a.clickExclOnce(function(){Sound.click();b.dialog("close")});$(this).siblings(".ui-dialog-titlebar").remove();$(this).parents(".ui-dialog:first").addClass("tallWindow");
$(this).parents(".ui-dialog:first").addClass("windowBorder");$(this).parents(".ui-dialog:first").removeClass("ui-widget-content");PlatformShim.ISWIN8||e.gdSlider()},close:function(){$(this).dialog("destroy");this.style.cssText="display:none;";a&&a();GameManager.resume(true)}})}else a&&a()}})();
(function(){UI.showGameEnd=function(c,e){var h=$("#gameEndDialog");b=1;h.find(".next").hide().clickExclOnce(function(){h.dialog("close")});h.find(".companyName").text(GameManager.company.name).hide();$("#gameEndDialog").gdDialog({popout:!0,onOpen:function(){p(h);f(h)},onClose:function(){a=[];d=[];GameManager.company.activeNotifications.remove(c);Media.createEndOfGameStories();GameManager.resume(!0);e&&e()}})};var a=[],d=[],c,b=1,g=function(){b+=0.4},e,h=function(e){if(0!==a.length||c){for(var e=e*
b,f=0;f<a.length;f++)a[f].tick(e,!1);for(f=0;f<d.length;f++)if(e=d[f],e.int_value!=e._currentValue&&(0!=e.int_value&&e.text(UI.getLongNumberString(Math.floor(e.int_value))),e._currentValue=e.int_value),e._scale!=e._currentScale&&(e.transition({scale:e._scale},0),e._currentScale=e._scale),e._opacity!=e._currentOpacity&&(e.css("opacity",e._opacity),e._currentOpacity=e._opacity),e._top!=e._currentTop&&(e.css("top",e._top),e._currentTop=e._top),e._left!=e._currentLeft)e.css("left",e._left),e._currentLeft=
e._left;c&&c.update()}},f=function(b){a=[];d=[];var f=GameManager.company,j=b.find(".counterContainer");j.empty();var k=document.createElement("canvas");k.width=700;k.height=150;var n=new FlippingCounter.FlippingBox(8,6);n.init();n.fill(0);n.container.x=41;n.container.y=41;FlippingCounter._activeUITweens=a;var p=new createjs.Container;p.addChild(FlippingCounter.panel);p.addChild(n.container);p.x=160;p.scaleX=0.5;p.scaleY=0.5;c=new createjs.Stage(k);c.addChild(p);j.append($(k));k=m(f);j=b.find(".animationItemsContainer");
j.empty();for(var p=$("#gameEndAnimationItem"),w=0,v=0,y=createjs.Tween.get(j),z=0;z<k.length;z++){var u=p.clone().removeAttr("id");u.label=u.find(".label");u.value=u.find(".value");u.value.text("0").css("opacity",0);u.value._opacity=0;(function(b,c,e){b.value.int_value=0;var f=createjs.Tween.get(b.value).wait(w).call(function(){l(b,e)});1<=c.value&&f.wait(1700).set({_opacity:1}).to({int_value:c.value},700).call(function(){v+=c.value;n.fill(Math.floor(v))});var h=b.label.text(c.label).typewrite({wait:w+
650,delay:20,soundLoop:"notificationTyping",volume:0.12,type:"return-tween"});d.push(b.value);b.hide();j.append(b);w+=3700;a.addRange([f,h])})(u,k[z],z)}y.wait(w).call(function(){var a=b.find(".companyName").remove();j.append(a);a.fadeIn();b.find(".next").slideDown();f.flags.finalScore=v;DataStore.setScore(f.uid,f.name,v)}).wait(700).call(function(){Achievements.activate(Achievements.finishedGame);GameManager.checkAchievements()});a.push(y);$(window).on("click",g);y.wait(w).call(function(){$(window).off("click",
g)});e||(GameManager.addTickListener(h,!1),e=!0)},j=[],l=function(b,c){0===c&&(j=[]);var e=createjs.Tween.get(b);b.css({position:"absolute",opacity:0}).show();var f=b.width();b.height();b.css({left:390-f/2,top:20});b._opacity=0;b._scale=0;b._top=20;b._left=390-f/2;var h=j.slice();e.to({_opacity:1,_scale:1.6},1500).wait(2500).to({_scale:1,_left:20,_top:130},400);f=createjs.Tween.get(h);f.wait(4E3).call(function(){b.value.transition({opacity:0})}).call(function(){for(var b=0;b<h.length;b++){var c=j[b],
d=createjs.Tween.get(c);c.tween&&-1!=a.indexOf(c.tween)&&a.remove(c.tween);c.tween=d;c.tween.to({_top:c._top+30},400,createjs.Ease.sineIn);a.push(c.tween)}});d.push(b);a.push(e);a.push(f);j.push(b)},m=function(a){var b=[],c=a.gameLog.filter(function(a){return"small"===a.gameSize}),d=a.gameLog.filter(function(a){return"medium"===a.gameSize}),e=a.gameLog.filter(function(a){return"large"===a.gameSize}),f=a.gameLog.filter(function(a){return"aaa"===a.gameSize}),h=c.concat(d).concat(e).concat(f),g=a.gameLog.slice().sort(function(a,
b){return b.costs-a.costs}).first();b.push({label:"Most expensive ({0}): {1}".localize().format(g.title,UI.getShortNumberString(g.costs))});var g=a.gameLog.slice().sort(function(a,b){return b.totalSalesCash-b.costs-(a.totalSalesCash-a.costs)}),j=g.first();b.push({label:"Most profitable ({0}): {1}".localize().format(j.title,UI.getShortNumberString(j.totalSalesCash-j.costs))});1<g.length&&(g=g.last(),b.push({label:"Least profitable ({0}): {1}".localize().format(g.title,UI.getShortNumberString(g.totalSalesCash-
g.costs))}));g=a.gameLog.map(function(a){return a.topic.name});if(j=n(g)){var l=j[0],j=j.join(", ");b.push({label:"Most used topic ({0}): {1}".localize().format(j,g.count(function(a){return a==l}))})}g=a.gameLog.map(function(a){return a.genre.name});if(j=n(g)){var m=j[0],j=j.join(" ,");b.push({label:"Most used genre ({0}): {1}".localize().format(j,g.count(function(a){return a==m}))})}b.push({label:"Researched topics: {0}".localize().format(a.topics.length),value:100*a.topics.length});g=a.researchCompleted.count();
b.push({label:"Total research completed: {0}".localize().format(g),value:100*g});g=h.sum(function(a){return a.designPoints});b.push({label:"Design points generated: {0}".localize().format(g),value:10*g});g=h.sum(function(a){return a.technologyPoints});b.push({label:"Technology points generated: {0}".localize().format(g),value:10*g});g=c.sum(function(a){return a.score/10*1E3*GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre,a.secondGenre)});b.push({label:"Small games: {0}".localize().format(c.count()),
value:g});g=d.sum(function(a){return a.score*5E3*GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre,a.secondGenre)});b.push({label:"Medium games: {0}".localize().format(d.count()),value:g});g=e.sum(function(a){return a.score*1E4*GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre,a.secondGenre)});b.push({label:"Large games: {0}".localize().format(e.count()),value:g});g=f.sum(function(a){return a.score*5E4*GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre,a.secondGenre)});
b.push({label:"AAA games: {0}".localize().format(f.count()),value:g});g=h.count(function(a){return a.score>7.6&&a.score<9});b.push({label:"Good games: {0}".localize().format(g),value:1E5*g});g=h.count(function(a){return a.score>=9});b.push({label:"Top hits: {0}".localize().format(g),value:2E6*g});g=h.count(function(a){return a.flags.royaltyRate});b.push({label:"Publishers used: {0}".localize().format(g),value:1E3*g});g=h.length-g;b.push({label:"Self-published games: {0}".localize().format(g),value:5E3*
g});c=a.getBestSeller();g=1E6*c.score;b.push({label:"Best seller: {0} ({1} units)".localize().format(c.title,UI.getShortNumberString(c.unitsSold)),value:g});b.push({label:"Fans: {0}".localize().format(UI.getShortNumberString(a.fans)),value:4*a.fans});b.push({label:"Cash: {0}".localize().format(UI.getShortNumberString(a.cash)),value:(0.01*a.cash).clamp(0,5555555)});a=a.licencedPlatforms.filter(function(a){return a.isCustom});g=a.sum(function(a){return a.successFactor*1E6});b.push({label:"Custom consoles: {0}".localize().format(a.length),
value:g});return b};UI.getThanksForPurchasingNotification=function(a){a=a?a:PlatformShim.getUserName();if(!a||0==a.length||"Player"==a)a="you";a="To: {0}\nFrom: Patrick & Daniel Klug (Greenheart Games).\nHi {0}, we are the creators of Game Dev Tycoon and would like to thank you very much for purchasing the game and supporting us.{n}Game Dev Tycoon is our very first game and it means a lot to us that you are enjoying it. With your purchase you support our little start-up and this will hopefully make sure that we can bring you more games in the future.{n}Seriously, you rock! Thank you very much and have fun with Game Dev Tycoon.".localize().format(a)+
"\n\nPatrick & Daniel Klug\nGreenheart Games\nwww.greenheartgames.com";a=new Notification({header:"Thank you".localize("heading"),text:a,image:"./images/greenheart.png",weeksUntilFired:1});a.adjustFans(2);return a};purchaseGame=function(a,b){ghg4.ghg5("purchased-clicked");GameManager.ghg3().requestAppPurchaseAsync(!0).done(function(a){a?GameManager.ghg2()?(PlatformShim.alert("It seems that something went wrong when purchasing the app.\nPlease close the app and try again later.\n If the issue persists please contact\n\n{0}".localize().format("support@greenheartgames.com"),
"Store Confirmation Error".localize("heading")),ghg4.ghg5("purchased but still trial")):GameManager.ghg2()||(ghg4.ghg5("purchased"),Achievements.activate(Achievements.supporter),GameManager.checkAchievements(),GameManager.company.notifications.push(UI.getThanksForPurchasingNotification()),DataStore.setValue("thankYouMessageShown",!0),b&&b()):ghg4.ghg5("purchase cancelled")},function(a){ghg4.ghg5("purchase unsuccessful",{error:a.message,"error-number":a.number});PlatformShim.alert("It seems that something went wrong when trying to purchase the app.\nThis usually indicates a problem with the Store. Please try again later and if the issue persists please contact\n\n{0}".localize().format("support@greenheartgames.com"),
"Store Error".localize("heading"))})};var k=function(a,b){Sound.click();if(GameManager.ghg0()){var c=DataStore.getValue("full-game-uri");if(PlatformShim.ISWIN8){c||(c="http://www.greenheartgames.com/game-dev-tycoon-status");var d=new Windows.Foundation.Uri(c);Windows.System.Launcher.launchUriAsync(d).then(function(a){a?ghg4.ghg5("navigate-to-full-game",{url:c,success:!0}):(ghg4.ghg5("navigate-to-full-game",{url:c,success:!1}),Windows.UI.Popups.MessageDialog("It seems that something went wrong when trying to go to the Store page for the full app.\nPlease try again and if the issue persists please contact {0} or search for Game Dev Tycoon manually on the Windows Store.".localize().format("support@greenheartgames.com"),
"Store Error".localize("heading")).showAsync())})}else c||(c="http://www.greenheartgames.com/game-dev-tycoon-downloads"),PlatformShim.openUrlExternal(c)}else purchaseGame(b,function(){GameManager.ghg2()||a.dialog("close")})};UI.showTrialEnd=function(a,b){if(GameManager.ghg2()){var c=$("#gameEndTrialDialog"),d=GameManager.ghg0()?"lite".localize("as in lite edition of the game"):"trial".localize(),e="You have reached the end of the {0} version.\nIf you like what you've seen so far then you should definitely check out the full game. You can find a brief description of what awaits you below.".localize();
GameManager.ghg0()||(e+="\n\n<strong>If you unlock the full game you can continue playing the game you've already started.</strong>".localize());c.find(".endOfGameBlurb").html(e.replaceAll("\n","<br/>").format(d));d=$("#fullGameFeatureTeaser").clone();d.removeAttr("id");c.find(".featureTeaserContainer").empty().append(d);c.find(".purchaseButton").text(GameManager.ghg0()?"Go to full game ...".localize():" Unlock full game ...".localize()).clickExcl(function(){k(c,a)});c.gdDialog({popout:!0,close:!1,
onOpen:function(){p(c)},onClose:function(){GameManager.ghg2()||(GameManager.company.activeNotifications.remove(a),GameManager.resume(!0),b&&b())}})}else GameManager.company.activeNotifications.remove(a),GameManager.resume(!0),b&&b()};var n=function(a){for(var b=[],c=0;c<a.length;c++)-1==b.indexOf(a[c])&&b.push(a[c]);for(var d={},e=0,c=0;c<b.length;c++){var f=a.count(function(a){return a==b[c]});d[c]=f;f>e&&(e=f)}return 1>=e?null:b.filter(function(a){return d[b.indexOf(a)]==e})},p=function(a){var a=
a.find(".gameEndStatisticsContainer"),b=GameManager.company,c=[];c.push({name:"Cash".localize(),value:UI.getShortNumberString(b.cash)});c.push({name:"Total fans".localize(),value:b.fans});c.push({name:"Total game releases".localize(),value:UI.getShortNumberString(b.gameLog.length)});if(0<b.gameLog.length){c.push({name:"Total unit sales".localize(),value:UI.getShortNumberString(b.gameLog.sum(function(a){return a.unitsSold}))});c.push({name:"Total design points generated".localize(),value:UI.getShortNumberString(b.gameLog.sum(function(a){return a.designPoints}))});
c.push({name:"Total technology points generated".localize(),value:UI.getShortNumberString(b.gameLog.sum(function(a){return a.technologyPoints}))});c.push({name:"Total research completed".localize(),value:b.researchCompleted.length});var d=b.gameLog.slice().sort(function(a,b){return b.unitsSold-a.unitsSold}).first();c.push({name:"Most sales ({0})".localize().format(d.title),value:UI.getShortNumberString(d.unitsSold)});d=b.gameLog.slice().sort(function(a,b){return b.fansChanged-a.fansChanged}).first();
c.push({name:"Most fans ({0})".localize().format(d.title),value:UI.getShortNumberString(d.fansChanged)});d=b.gameLog.slice().sort(function(a,b){return b.costs-a.costs}).first();c.push({name:"Most expensive ({0})".localize().format(d.title),value:UI.getShortNumberString(d.costs)});var d=b.gameLog.slice().sort(function(a,b){return b.totalSalesCash-b.costs-(a.totalSalesCash-a.costs)}),e=d.first();c.push({name:"Most profitable ({0})".localize().format(e.title),value:UI.getShortNumberString(e.totalSalesCash-
e.costs)});1<d.length&&(d=d.last(),c.push({name:"Least profitable ({0})".localize().format(d.title),value:UI.getShortNumberString(d.totalSalesCash-d.costs)}));d=b.gameLog.map(function(a){return a.topic.name});if(e=n(d)){var f=e[0],e=e.join(", ");c.push({name:"Most used topic ({0})".localize().format(e),value:d.count(function(a){return a==f})})}b=b.gameLog.map(function(a){return a.genre.name});if(d=n(b)){var h=d[0],e=d.join(" ,");c.push({name:"Most used genre ({0})".localize().format(e),value:b.count(function(a){return a==
h})})}}a.empty();b=$("#gameEndStatisticItem");for(d=0;d<c.length;d++){var e=c[d],g=b.clone();g.removeAttr("id");g.text("{0}: {1}".format(e.name,e.value));a.append(g)}};UI.showgameTrialDialog=function(){GameManager.pause(!0);Sound.click();var a=$("#gameTrialDialog"),b=GameManager.ghg0()?"lite":"trial",c="Thank you for playing the {0} version.\nIf you like what you've seen so far then you should definitely check out the full game.".localize();GameManager.ghg0()||(c+="\n\n<strong>"+"If you unlock the full game you can continue playing the game you've already started.".localize()+
"</strong>");a.find(".gameTrialBlurb").html(PlatformShim.toStaticHtml(c.replaceAll("\n","<br/>").format(b)));b=$("#fullGameFeatureTeaser").clone();b.removeAttr("id");a.find(".featureTeaserContainer").empty().append(b);a.find(".purchaseButton").text(GameManager.ghg0()?"Go to full game ...".localize():" Unlock full game ...".localize()).clickExcl(function(){k(a)});$("#gameTrialDialog").gdDialog({popout:!0,close:!0,onClose:function(){GameManager.resume(!0)}})}})();
(function(){function a(){var a=GameManager.company;if(a.cash<h)$(".okButtonWrapper").effect("shake",{times:2,distance:5},50);else{a.adjustCash(-h,"Find Staff".localize("heading"));var c=f/100,d=1.5+1.5*c;Tutorial.hiringStaff(d);a.notifications.push(new Notification("{HireStaff}",null,null,d));GameManager.uiSettings.findStaffData={costs:h,ratio:c,tests:e.map(function(a){return a.id}),slot:b,startWeek:GameManager.company.currentWeek,targetWeek:GameManager.company.currentWeek+d,seed:Math.floor(65535*
a.getRandom())};e.first();UI.closeModal()}}var d=[{id:"ComplexAlgorithms",name:"Complex Algorithms".localize(),minT:0.6},{id:"GameDemo",name:"Game Demo".localize(),minD:0.3,minT:0.3},{id:"Showreel",name:"Showreel".localize(),minD:0.6}];UI.isStaffSearchInProgress=function(){return!GameManager.uiSettings?!1:null!=GameManager.uiSettings.findStaffData};var c;GameManager.addTickListener(function(){if(UI.isStaffSearchInProgress()&&GameManager.company){var a=GameManager.uiSettings.findStaffData,a=((GameManager.company.currentWeek-
a.startWeek)/(a.targetWeek-a.startWeek)).clamp(0,1);c||(c=$("#canvasContainer"));var b=c.find(".hireStaffButtonBase");b.hasClass("hireStaffButton")&&(b.unbind("click").removeClass("hireStaffButton").find(".hireButtonLabel").text("Searching...".localize("button")),UI.maxFont(b.find(".hireButtonLabel"),12,40));b.find(".hireStaffProgress").css("width",100*a+"%")}},!0);var b=0;UI.showFindStaffWindow=function(c){if(!UI.isStaffSearchInProgress()){b=c;c=$(".hireStaffBudgetSlider");c.empty();var f=$('<div class="budgetSlider"></div>').slider({orientation:"horizontal",
range:"min",min:0,max:100,value:0,animate:"fast",slide:function(a,b){var c=$(b.handle).closest(".budgetSlider");if(!c.hasClass("budgetSlider"))throw"couldn't find target slider";c.slider("value",b.value);j()}});c.append(f);h=0;e=[];c=$(".findStaffFilters");c.empty();for(f=0;f<d.length;f++)c.append(g(d[f]));$("#findStaffDialog").find(".okButton").clickExcl(a);UI.showModalContent("#findStaffDialog",{close:!0,onOpen:function(){j()}})}};var g=function(a){var b=$('<div class="selectableGameFeatureItem"></div>').text(a.name);
b.clickExcl(function(){b.hasClass("selectedFeature")?(b.removeClass("selectedFeature"),e=[]):(b.parent().find(".selectableGameFeatureItem").removeClass("selectedFeature"),e=[],b.addClass("selectedFeature"),e.push(a))});return b},e=[],h=0,f=0,j=function(){var a=$(".simplemodal-data"),b=a.find(".budgetSlider").slider("value"),c,d=b/100;c=(d/=1)*d;d*=c;c=Math.floor(2+198*(0+1*(-0.5*d*c+3*c*c+-3.5*d+2*c)));h=1E4*c;f=b;a=a.find(".windowCostLabel");a.empty().append($("<span>{0}</span>".format("Cost: {0}".localize().format(UI.getShortNumberString(h))))).textfill({maxFontPixels:20,
maxHeightPts:37});a.toggleClass("red",h>GameManager.company.cash)},l=function(){var a=GameManager.uiSettings.findStaffData;a||(a={ratio:0.1,tests:[]});a.seed||(a.seed=Math.floor(65535*GameManager.company.getRandom()));for(var b=a.ratio,c=d.first(function(b){return b.id==a.tests.first()}),e=GameManager.company,f=new MersenneTwister(a.seed),h=[],g=Math.floor(2+3*(b+0.2).clamp(0,1)),j=0,e=4==e.currentLevel?0.8:0.4,l=GameManager.company.staff.map(function(a){return a.name}),m=0;m<g;m++){var k=b/3+(1-
b/3)*f.random();0.95<=f.random()&&(e+=0.2);var L=0.2+e*k,I=Math.floor(5*L).clamp(1,5),D=1,F=0;c&&(c.minT&&(D-=c.minT),c.minD&&(F=c.minD,D-=F));var G=200*I,D=G*F+G*D*f.random(),G=G-D,K=f.random(),F=0.2+e*K,H=f.random(),N=0.2+e*H,M=0.5<H&&0.5<k&&0.5<K;if(!M&&2>j&&f.random()<=(b+0.1).clamp(0,0.7))m--,j++;else{j=0;k=!1;K="male";do K="male",M?(0.15<f.random()?H=0.5>G/D?p.pickRandom(f):0.5>D/G?n.pickRandom(f):q.pickRandom(f):(H=o.pickRandom(f),K="female"),k=!0):(0.25<f.random()?H=x.pickRandom(f)+" "+r.pickRandom(f):
(H=s.pickRandom(f)+" "+r.pickRandom(f),K="female"),k=!1);while(-1!=l.indexOf(H));l.push(H);I*=Character.BASE_SALARY_PER_LEVEL;I+=0.2*I*f.random()*f.randomSign();I=1E3*Math.floor(I/1E3);h.push({name:H,qualityFactor:L,technologyFactor:G/500,designFactor:D/500,researchFactor:F,speedFactor:N,salary:I,isFamous:k,sex:K})}}return h};UI.showHireStaff=function(a,b){var c=$("#hireStaffDialog"),d=l(),e=c.find(".applicantSliderContainer"),f=m(e,d);c.find(".okButton").clickExclOnce(function(){var a=c.find(".rsActiveSlide").find(".staffName").text(),
b=d.first(function(b){return b.name==a});k(b);UI.closeModal()});e={disableCheckForNotifications:!0,close:!0,onClose:function(){GameManager.uiSettings.findStaffData=void 0;VisualsManager.refreshHiringButtons();GameManager.company.activeNotifications.remove(a);GameManager.resume(!0);b&&b()}};PlatformShim.ISWIN8?f.gdSlider():e.onOpen=function(){f.gdSlider()};UI.showModalContent("#hireStaffDialog",e)};var m=function(a,b){a.empty();var c=$('<div class="applicantContainer royalSlider rsDefaultInv"></div>');
a.append(c);for(var d=$("#staffTemplate"),e=0;e<b.length;e++){var f=b[e],h=d.clone();h[0].id=void 0;h.find(".staffName").text(f.name);var g=f.experience?LevelCalculator.getLevelFractional(f.experience):5*f.qualityFactor;h.find(".staffQ").text("Level: ".localize()+Math.floor(g));h.find(".staffS").text(Math.floor(500*f.speedFactor));var j=500*f.designFactor,l=500*f.technologyFactor;h.find(".staffD").text(Math.floor(j));h.find(".staffT").text(Math.floor(l));g=100/((j+l)/j);j=100/((j+l)/l);h.find(".staffDBar").css("width",
g-1+"%");h.find(".staffTBar").css("width",j-1+"%");h.find(".staffR").text(Math.floor(500*f.researchFactor));h.find(".staffSalary").text("{0} per month".localize().format(UI.getShortNumberString(f.salary)));c.append(h)}return c},k=function(a){var b=GameManager.company,c=5*a.qualityFactor,c=new Character({id:GameManager.getGUID(),name:a.name,dF:a.designFactor,tF:a.technologyFactor,speedF:a.speedFactor,qualityF:Math.floor(c)/5,experience:LevelCalculator.getXpForLevel(c),researchF:a.researchFactor,salary:a.salary,
efficiency:0.05,slot:GameManager.uiSettings.findStaffData.slot,sex:a.sex});GameManager.setBodyAndHead(c);c.flags.hiredTimestamp=GameManager.gameTime;c.flags.nextVacation=GameManager.gameTime+48E3*GameManager.SECONDS_PER_WEEK;c.flags.workload=0;GameManager.uiSettings.findStaffData=null;b.staff.forEach(function(a){a.adjustEfficiency(-0.4)});b.staff.push(c);Tutorial.staffHired();VisualsManager.reloadAllCharacters();GameManager.company.staff[GameManager.company.staff.length-1].startAnimations();Research.checkForNewResearch();
VisualsManager.addComputer(c);VisualsManager.refreshHiringButtons();VisualsManager.refreshTrainingOverlays();2<GameManager.company.staff.length&&GameManager.enableMediumContracts();UI.reset();a.isFamous&&Achievements.activate(Achievements.hireSomeoneFamous)};UI.showFireStaffPrompt=function(a){GameManager.company.notifications.insertAt(0,DecisionNotifications.fireEmployee.getNotification(GameManager.company,a))};UI.showStaffList=function(a){var b=$("#staffListDialog"),c=b.find(".staffSliderContainer"),
d=m(c,GameManager.company.staff);b.find(".okButton").clickExclOnce(function(){UI.closeModal()});b={disableCheckForNotifications:!1,close:!0,onClose:function(){a&&a()}};PlatformShim.ISWIN8?d.gdSlider():b.onOpen=function(){d.gdSlider()};UI.showModalContent("#staffListDialog",b)};var n="Sip Meyer;Christoph Sowyer;James E. Garmack;Johnny Rome;James Di Margiti;Mick Brash;David Draben;Hasir Nebelli;Andres Lamot;Scott Rro;Ben Silverman;Martin Person;Tom References".split(";"),p="Jerry Sole;Richard Chariott;Bill Bright;Christian Robertson;Eric Robertson;Dennis Avelone;Drew Darpyshyn;David Drossman;Peter Polynox;Migeru Mayomoto;Tom Schofer;Ron Raglow;Eduard McGillen;Markus Stonefeather;Bill J. Allen;Jona Chen;Paul Reed".split(";"),
q="Warden Vector;Ricky Rartle;Leeroy Rubshaw;Kevin Flin;Ralph Koster;Joe Smodley;Jack Long;Allen Low;Clinton Harris;Arthur Bee;Phillip Fesh;Paul Pres;Kyle Stabler;Ronny Garmel;Dennis Habbabis;Chris Maley;Mark Torris;Tony Rodriguez;Arnt Johnson;Dino Watty".split(";"),o="Erica Robinson;Pauline Zobeck;Lucy Broadshaw;Brenda Wrathbate;Rina Brok;Jennifer Cavanagh;Beverly Larand;Amy Nenning;Laureen Kamo;Heather Hailey;Jane Lean".split(";"),s="Mary Patricia Linda Barbara Elizabeth Jennifer Susan Margaret Dorothy Liza Nancy Karen Betty Helen Sandra Donna Carol Ruth Sharon Michelle Laura Sarah Kimberly Deborah Jessica Shirley Cynthia Angela Melissa Brenda Amy Anna Rebecca Virginia Kathleen Pamela Martha Debra Amanda Stephanie Carolyn Christine Marie Janet Catherine Frances Ann Joyce Diane Alice Julie Heather Teresa Doris Gloria Evelyn Jean Cheryl Katherine Joan Ashley Judith Rose Janice Kelly Nicole Judy Christina Kathy Theresa Beverly Denise Tammy Irene Jane Lori Rachel Marilyn Andrea Kathryn Louise Sara Anne Jacqueline Wanda Bonnie Julia Ruby Lois Tina Phyllis Norma Paula Diana Annie Lillian Emily Robin Peggy Crystal Gladys Rita Dawn Connie Florence Tracy Edna Tiffany Carmen Rosa Cindy Grace Wendy Victoria Edith Kim Sherry Sylvia Josephine Thelma Shannon Ethel Ellen Elaine Marjorie Carrie Charlotte Monica Esther Pauline Emma Juanita Anita Rhonda Hazel Amber Eva Debbie April Leslie Clara Lucille Jamie Joanne Eleanore Valerie Danielle Megan Alicia Suzanne Michele Gail Bertha Darlene Veronica Jill Erin Lauren Cathy Joann Lorraine Lynn Sally Regina Erica Beatrice Dolores Bernice Audrey Yvonne Annette June Samantha Marion Dana Stacy Ana Renee Ida Vivian Roberta Holly Brittany Melanie Loretta Yolanda Jeanette Laurie Katie Kristen Vanessa Alma Sue Elsie Beth".split(" "),
x="Jacob Michael Joshua Matthew Daniel Christopher Andrew Ethan Joseph William Anthony David Alexander Nicholas Ryan Tyler James John Jonathan Noah Brandon Christian Dylan Samuel Benjamin Nathan Zachary Logan Justin Gabriel Jose Austin Kevin Elijah Caleb Robert Thomas Jordan Cameron Jack Hunter Jackson Angel Isaiah Evan Isaac Mason Luke Jason Gavin Jayden Aaron Connor Aiden Aidan Kyle Juan Charles Luis Adam Lucas Brian Eric Adrian Nathaniel Sean Alex Carlos Ian Bryan Owen Landon Julian Chase Cole Diego Jeremiah Steven Sebastian Xavier Timothy Carter Wyatt Brayden Blake Hayden Devin Cody Richard Seth Dominic Jaden Antonio Miguel Liam Patrick Carson Jesse Tristan Alejandro Henry Victor Trevor Bryce Jake Riley Colin Jared Jeremy Mark Caden Garrett Parker Marcus Vincent Kaleb Kaden Brady Colton Kenneth Joel Oscar Josiah Jorge Cooper Ashton Tanner Eduardo Paul Edward Ivan Preston Maxwell Alan Levi Stephen Grant Nicolas Omar Dakota Alexis George Collin Eli Spencer Gage Max Cristian Ricardo Derek Micah Brody Francisco Nolan Ayden Dalton Shane Peter Damian Jeffrey Brendan Travis Fernando Peyton Conner Andres Javier Giovanni Shawn Braden Jonah Bradley Cesar Emmanuel Manuel Edgar Erik Mario Edwin Johnathan Devon Erick Wesley Oliver Trenton Hector Malachi Jalen Raymond Gregory Abraham Elias Leonardo Sergio Donovan Colby Marco Bryson Martin".split(" "),
r="Smith Johnson Williams Jones Brown Davis Miller Wilson Moore Taylor Anderson Thomas Jackson White Harris Martin Thompson Garcia Martinez Robinson Clark Rodriguez Lewis Lee Walker Hall Allen Young Hernandez King Wright Lopez Hill Scott Green Adams Baker Gonzalez Nelson Carter Mitchell Perez Roberts Turner Phillips Campbell Parker Evans Edwards Collins Stewart Sanchez Morris Rogers Reed Cook Morgan Bell Murphy Bailey Rivera Cooper Richardson Cox Howard Ward Torres Peterson Gray Ramirez James Watson Brooks Kelly Sanders Price Bennett Wood Barnes Ross Henderson Coleman Jenkins Perry Powell Long Patterson Hughes Flores Washington Butler Simmons Foster Gonzales Bryant Alexander Russell Griffin Diaz Hayes Myers Ford Hamilton Graham Sullivan Wallace Woods Cole West Jordan Owens Reynolds Fisher Ellis Harrison Gibson Mcdonald Cruz Marshall Ortiz Gomez Murray Freeman Wells Webb Simpson Stevens Tucker Porter Hunter Hicks Crawford Henry Boyd Mason Morales Kennedy Warren Dixon Ramos Reyes Burns Gordon Shaw Holmes Rice Robertson Hunt Black Daniels Palmer Mills Nichols Grant Knight Ferguson Rose Stone Hawkins Dunn Perkins Hudson Spencer Gardner Stephens Payne Pierce Berry Matthews Arnold Wagner Willis Ray Watkins Olson Carroll Duncan Snyder Hart Cunningham Bradley Lane Andrews Ruiz Harper Fox Riley Armstrong Carpenter Weaver Greene Lawrence Elliott Chavez Sims Austin Peters Kelley Franklin Lawson Fields Gutierrez Ryan Schmidt Carr Vasquez Castillo Wheeler Chapman Oliver Montgomery Richards Williamson Johnston Banks Meyer Bishop Mccoy Howell Alvarez Morrison Hansen Fernandez Garza Harvey Little Burton Stanley Nguyen George Jacobs Reid Kim Fuller Lynch Dean Gilbert Garrett Romero Welch Larson Frazier Burke Hanson Day Mendoza Moreno Bowman Medina Fowler Brewer Hoffman Carlson Silva Pearson Holland Douglas Fleming Jensen Vargas Byrd Davidson Hopkins May Terry Herrera Wade Soto Walters Curtis Neal Caldwell Lowe Jennings Barnett Graves Jimenez Horton Shelton Barrett Obrien Castro Sutton Gregory Mckinney Lucas Miles Craig Rodriquez Chambers Holt Lambert Fletcher Watts Bates Hale Rhodes Pena Beck Newman Haynes Mcdaniel Mendez Bush Vaughn Parks Dawson Santiago Norris Hardy Love Steele Curry Powers Schultz Barker Guzman Page Munoz Ball Keller Chandler Weber Leonard Walsh Lyons Ramsey Wolfe Schneider Mullins Benson Sharp Bowen Daniel Barber Cummings Hines Baldwin Griffith Valdez Hubbard Salazar Reeves Warner Stevenson Burgess Santos Tate Cross Garner Mann Mack Moss Thornton Dennis Mcgee Farmer Delgado Aguilar Vega Glover Manning Cohen Harmon Rodgers Robbins Newton Todd Blair Higgins Ingram Reese Cannon Strickland Townsend Potter Goodwin Walton Rowe Hampton Ortega Patton Swanson Joseph Francis Goodman Maldonado Yates Becker Erickson Hodges Rios Conner Adkins Webster Norman Malone Hammond Flowers Cobb Moody Quinn Blake Maxwell Pope Floyd Osborne Paul Mccarthy Guerrero Lindsey Estrada Sandoval Gibbs Tyler Gross Fitzgerald Stokes Doyle Sherman Saunders Wise Colon Gill Alvarado Greer Padilla Simon Waters Nunez Ballard Schwartz Mcbride Houston Christensen Klein Pratt Briggs Parsons Mclaughlin Zimmerman French Buchanan Moran Copeland Roy Pittman Brady Mccormick Holloway Brock Poole Frank Logan Owen Bass Marsh Drake Wong Jefferson Park Morton Abbott Sparks Norton Huff Clayton Massey Lloyd Figueroa Carson Bowers Roberson Barton Tran Lamb Harrington Casey Boone Cortez Clarke Mathis Singleton Wilkins Cain Bryan Underwood Hogan Mckenzie Collier Luna Phelps Mcguire Allison Bridges Wilkerson Nash Summers Atkins".split(" ")})();
(function(){UI._resetBoostUI=function(){d()};UI._resetCallbacks.push(UI._resetBoostUI);var a=[],d=function(){$(".charBoost").remove();a=[];for(var c=VisualsManager.characterOverlays,d=0;d<c.length;d++){var h=c[d];if(0!=h.character.maxBoostLevel){var f=b(h.x,h.y);h.boostButton=f;(function(a,b){b.clickExcl(function(){if(!a.onFire&&1===a.boostRechargeProgress||1<=a.boostLevel)Sound.playSoundOnce("boost",0.065),a.activateBoost(),b.find(".boostButton").removeClass("enabled"),b.enabled=!1;window.event.cancelBubble=
!0})})(h.character,f)}}},c=["#00698C","#007CA5","#008FBF","#00A2D8","deepskyBlue"];GameManager.addTickListener(function(){var a=VisualsManager.characterOverlays;if(a)for(var b=0;b<a.length;b++){var d=a[b],f=d.character,j=d.boostButton;if(j){var l=0,m=f.boostLevel;if(f.onFire)l=f.boostRechargeProgress;else if(l=f.boostRechargeProgress,(1==l||1<=m)&&!j.enabled)j.find(".boostButton").addClass("enabled"),j.enabled=!0;if(j.boostLevel!==m||j.onFire!==f.onFire){j.onFire=f.onFire;m?j.levelElement.text("x"+
m):j.levelElement.text("");j.boostLevel=m;var k,n;switch(m){case 1:k=c[1];n=c[0];break;case 2:k=c[2];n=c[1];break;case 3:k=c[3];n=c[2];break;case 4:k=c[4];n=c[3];break;case 5:c[4];c[4];break;default:k=c[0],n="transparent"}d.boostVisual.fgColor=k;d.boostVisual.bgColor=n;d.boostVisual.invalidate()}j.boostValue!=l&&(d.boostVisual.updateValue(360*l),d.boostVisual.invalidate())}}},!0);var b=function(b,c){var d=$("#boostButtonTemplate").clone();d[0].id=void 0;var f=GameFlags.IS_LOW_RES?-3:0;d.css({position:"absolute",
top:c+VisualsManager.toScreenCoordinates(-3,CanvasManager.globalScale)+"px",left:b+VisualsManager.toScreenCoordinates(159+f,CanvasManager.globalScale)+"px"});d.addClass("charBoost");d.levelElement=d.find(".boostMultiplier");$("#canvasContainer").append(d);a.push(d);return d}})();
(function(){UI.showGenericProjectWindow=function(a){var d=General.getAvailableProjects(GameManager.company,a);if(d&&d.length){var a=$("#genericProjectMenu"),c={close:!0},b=a.find(".genericProjectSliderContainer");b.empty();var g=$('<div class="projectSlider royalSlider rsDefaultInv"></div>');b.append(g);for(var b=$("#genericProjectTemplate"),e=0;e<d.length;e++){var h=d[e],f=b.clone();f[0].id=void 0;f.find(".projectTitle").text(h.name);f.find(".projectIcon").attr("src",h.iconUri);f.find(".projectDescription").text(h.description);
f.find(".projectPointCost").text("Project Size: ".localize()+h.pointsCost);g.append(f)}PlatformShim.ISWIN8?g.gdSlider():c.onOpen=function(){g.gdSlider()};a.find(".okButton").clickExcl(function(){Sound.click();var a=$(".simplemodal-data").find(".projectSlider").find(".rsActiveSlide").find(".projectTitle").text(),b=d.first(function(b){return b.name==a});b&&(GameManager.startProject(b),UI.closeModal())});UI.showModalContent("#genericProjectMenu",c)}}})();
(function(){var a=function(a){if("gameContract"===a.type)return d(a);var c=$("#contractTemplate").clone();c.removeAttr("id");c.find(".contract.name").text(a.name);c.find(".sliderTabCaption").append($("<span>{0}</span>".format(a.shortName?a.shortName:a.name)));c.find(".contract.description").html(UI.getHtmlText(a.description));a.payment&&c.find(".contract.payment").text("Pay: {0}".localize().format(UI.getShortNumberString(a.payment)));a.penalty&&c.find(".contract.penalty").text("Penalty: {0}".localize().format(UI.getShortNumberString(a.penalty)));
a.requiredD&&c.find(".contract.designPoints").text(a.requiredD);a.requiredT&&c.find(".contract.technologyPoints").text(a.requiredT);a.weeksToFinish&&c.find(".contract.duration").text("{0} weeks".localize().format(a.weeksToFinish));a.size&&("medium"===a.size?(c.find(".contract.designPoints").addClass("medium"),c.find(".contract.technologyPoints").addClass("medium")):"large"===a.size&&(c.find(".contract.designPoints").addClass("large"),c.find(".contract.technologyPoints").addClass("large")));return c},
d=function(a){var c=$("#gameContractTemplate").clone();c.removeAttr("id");c.find(".contract.name").text(a.name);if(a.topic){var d=Topics.topics.first(function(c){return c.id===a.topic});-1==GameManager.company.topics.indexOf(d)&&(c.find(".contract.topicNotResearched").text("{0} not researched".localize().format(d.name)),a.disabled=!0)}c.find(".sliderTabCaption").append($("<span>{0}</span>".format(a.shortName?a.shortName:a.name)));c.find(".contract.description").html(UI.getHtmlText(a.description));
d="Min Score: {0}".localize().format(a.minScore);a.gameSize&&(d+="\n"+"Game Size:".localize()+" "+General.getGameSizeLabel(a.gameSize));a.gameAudience&&(d+="\n"+"Target Audience:".localize()+" "+General.getAudienceLabel(a.gameAudience));c.find(".contract.reqs").html(UI.getHtmlText(d));c.find(".contract.royaltyRate").text("Royalties: {0}%".localize().format(Math.floor(100*a.royaltyRate)));c.find(".contract.payment").text("Up-front Pay: {0}".localize().format(UI.getShortNumberString(a.payment)));c.find(".contract.penalty").text("Penalty: {0}".localize().format(UI.getShortNumberString(a.penalty)));
if(a.platform){var h=Platforms.allPlatforms.first(function(c){return c.id===a.platform});if(h){d=Platforms.getPlatformImage(h,GameManager.company.currentWeek);c.find(".contract.platform").attr("src",d);var d=-1!=GameManager.company.licencedPlatforms.indexOf(h),f=h.name;d||(f+=" (no license)".localize(),a.disabled=!0,a.tryEnable=function(c){if(a.topic){var d=Topics.topics.first(function(c){return c.id===a.topic});if(-1==GameManager.company.topics.indexOf(d))return!1}UI.buyPlatform(h.name,c);return!1});
c.find(".contract.platformLabel").text(f);d||c.find(".contract.platformLabel").addClass("red")}}return c},c;UI.showFindContractWorkMenu=function(b,d){var e=GameManager.company;c=ProjectContracts.getAvailable(e,GameManager.uiSettings.selectedContractType);if(0==c.length)e.activeNotifications.remove(b),e.notifications.push(new Notification("Contracts".localize("heading"),"There are no contracts currently available.".localize())),GameManager.showPendingNotifications(d);else{var h=$("#findContractWorkWindow"),
e=h.find("#contractSliderContainer");e.empty();for(var f=$('<div class="contractSlider royalSlider rsDefaultInv"></div>'),j=0;j<c.length;j++){var l=a(c[j]);l.append('<div class="cardId" style="display:none">{0}</div>'.format(j));f.append(l)}e.append(f);h.find(".okButton").clickExcl(function(){Sound.click();var a=f.find(".rsActiveSlide").find(".cardId").text();if(void 0!=a){var b=c[parseInt(a)];b&&(b.disabled?b.tryEnable?b.tryEnable(function(){h.dialog("close");GameManager.startContract(b)}):h.find(".okButton").parent().effect("shake",
{times:2,distance:5},50):(h.dialog("close"),GameManager.startContract(b)))}});PlatformShim.ISWIN8&&f.gdSlider();h.gdDialog({close:!0,onClose:function(){GameManager.company.activeNotifications.remove(b);GameManager.resume(!0);d&&d()},onOpen:function(){PlatformShim.ISWIN8||f.gdSlider()}})}}})();
(function(){var a=[],d=[];UI.resetAchievementsUI=function(){a.forEach(function(a){a.remove()});a=[];d=[];UI._achievementsActiveTimeModifier=1};UI._resetCallbacks.push(UI.resetAchievementsUI);UI._achievementsActiveTimeModifier=1;UI.showAchievements=function(b){var c=GameManager.gameId,h=200,f=$("<div></div>");f.css("font-size",1).animate({"font-size":0},{duration:200,easeing:"easein",step:function(a){GameManager.gameId==c&&(UI._achievementsActiveTimeModifier=a)}});setTimeout(function(){Sound.pauseAllLoopingFx()},
h);for(var j=0;j<b.length;j++){var l=b[j];if(-1==d.indexOf(l.id)){d.push(l.id);var m=$(document.body),k=$("#achievementTemplate").clone().hide();k.removeAttr("id");var n=document.body.clientWidth,p=document.body.clientHeight;k.css({position:"absolute","z-index":5E4,top:-p});l.tint&&(k.find(".tint").css("color",l.tint),k.find(".backgroundTint").css("background",l.tint));m.append(k);var m=k.width(),q=k.height();k.find(".title").text(l.title).hide().css("margin-left",-n/2-m);k.find(".descr").text(l.description).hide().css("margin-left",
n+m);n/=2;p/=2;n-=m/2;p-=q/2;(function(b,f,h){b.delay(h).queue(function(){Sound.playSoundOnce("achievement1",0.3);b.show().transition({left:n,top:p},200,"out");b.find(".achievement.unlocked").transition({"margin-top":-25,delay:200},200,"out");b.find(".title").show().transition({"margin-left":0,delay:500},200,"out");b.find(".descr").show().transition({"margin-left":0,delay:700},200,"out");b.find(".sliceGlow").transition({"margin-left":-230,opacity:0,delay:200},800).transition({"margin-left":120,opacity:0.5},
400,"out").transition({"margin-left":230,opacity:0},800,"out");setTimeout(function(){b.find(".achievement.innerContainer").addClass("hideState");setTimeout(function(){b.remove();if(GameManager.gameId==c){a.remove(b);d.remove(f.id);Achievements.complete(f)}},400)},4E3);$(this).dequeue()})})(k,l,h);a.push(k);h+=4200}}f.delay(h).animate({"font-size":1},{duration:200,easeing:"easein",step:function(a){GameManager.gameId==c&&(UI._achievementsActiveTimeModifier=a)}});setTimeout(function(){Sound.resumeAllLoopingFx()},
h+200)};var c=function(){if(UI.isPanelOpen())return UI.closePanels(),!1};UI._isAchievementsPanelVisible=!1;UI.toggleAchievementPanel=function(){UI._isHighScorePanelVisible&&UI.toggleHighScorePanel();var a=$("#achievementsPanel");a.hasClass("hidden")?(b(a.find(".achievementsContainer")),a.show().removeClass("hidden").addClass("show"),$("#gameContainerWrapper").focus(),a.delay(400).queue(function(){UI.overrideClick=c;GameManager.pause(!0,!0);$(this).dequeue()}),UI._isAchievementsPanelVisible=!0):(a.removeClass("show").addClass("hidden"),
UI.overrideClick=null,UI._isAchievementsPanelVisible=!1,GameManager.resume(!0,!0),a.delay(400).queue(function(){$(this).hide();$(this).dequeue()}))};var b=function(a){a.empty();for(var b=Achievements.getAllItems().filter(function(a){return Achievements.hasAchieved(a)||!a.hidden}),c=[],d=[],j=0;j<b.length;j++){var l=b[j];Achievements.hasAchieved(l)?c.push(l):d.push(l)}b=c.concat(d);d=$("#achievementTemplate");d=d.clone();d.find(".achievement.unlocked").remove();d.find(".achievement.dismiss").remove();
for(j=0;j<b.length;j++){var l=b[j],m=j<c.length,k=d.clone();k.removeAttr("id");k.find(".title").text(l.title);k.find(".descr").text(l.description);l.tint&&(k.find(".tint").css("color",l.tint),k.find(".backgroundTint").css("background",l.tint));m||k.find(".achievement").addClass("disabled");a.append(k)}}})();
(function(){UI.closePanels=function(){UI._isHighScorePanelVisible&&UI.toggleHighScorePanel();UI._isAchievementsPanelVisible&&UI.toggleAchievementPanel()};UI.isPanelOpen=function(){return UI._isHighScorePanelVisible||UI._isAchievementsPanelVisible};UI._isHighScorePanelVisible=!1;var a=function(){if(UI.isPanelOpen())return UI.closePanels(),!1},d=function(a){a=a.find(".highScoreContainer");a.empty();var b=DataStore.getHighScoreList(),b=b.slice().sort(function(a,b){return b.score-a.score});if(0==b.length)a.append($("<p>"+
"No scores yet. Once you finish a game your high score will be listed here.".localize()+"</p>"));else for(var d=$('<div class="highScoreItem"><div class="highScoreItemNname"></div><div class="score"></div></div>'),e=0;e<b.length;e++){var h=b[e],f=d.clone();f.find(".highScoreItemNname").text(h.name);f.find(".score").text(UI.getLongNumberString(h.score));a.append(f)}};UI.toggleHighScorePanel=function(){UI._isAchievementsPanelVisible&&UI.toggleAchievementPanel();var c=$("#highScorePanel");c.hasClass("hidden")?
(d(c),c.show().removeClass("hidden").addClass("show"),$("#gameContainerWrapper").focus(),c.delay(400).queue(function(){UI.overrideClick=a;GameManager.pause(!0,!0);$(this).dequeue()}),UI._isHighScorePanelVisible=!0):(c.removeClass("show").addClass("hidden"),UI.overrideClick=null,UI._isHighScorePanelVisible=!1,GameManager.resume(!0,!0),c.delay(400).queue(function(){$(this).hide();$(this).dequeue()}))}})();
(function(){UI.showReviewWindow=function(b,c){var d=$("#reviewWindow");d.find("#reviewAnimationContainer").empty();d.find(".okButton").hide().clickExclOnce(function(){e=[];h=[];UI.closeModal(c)});UI.showModalContent("#reviewWindow",{disableCheckForNotifications:!0,onOpen:function(){a()},onClose:function(){GameManager.company.activeNotifications.remove(b)}})};var a=function(){e=[];h=[];for(var a=$(".simplemodal-data"),c=a.find("#reviewAnimationContainer"),l=GameManager.company.gameLog.last(),m=$("#reviewItemTemplate"),
k="Reviews for {0}".localize().format(l.title),n=a.find(".windowTitle").text(k).typewrite({type:"return-tween",delay:20,soundLoop:"notificationTyping",volume:0.12}),k=20*k.length,p=0;p<l.reviews.length;p++){var q=m.clone(),o=l.reviews[p];q.removeAttr("id");q.scoreElement=q.find(".score").css("opacity",0);q.textElement=q.find(".text").css("opacity",0);q.reviewerElement=q.find(".reviewer").css("opacity",0);q.css({left:60,top:40+100*p});c.append(q);k+=d(q,o,k)}b=1;$(window).on("click",g);n.wait(k).call(function(){$(window).off("click",
g);a.find(".okButton").slideDown()});e.push(n)},d=function(a,b,d){var g=[],k=createjs.Tween.get(a).wait(d);a.scoreElement.opacity=0;a.scoreElement.marginLeft=0;var n=createjs.Tween.get(a.scoreElement).wait(d).to({opacity:1}),p=createjs.Tween.get(a.scoreElement).wait(d).to({marginLeft:Math.floor(80*Math.random())},7E3),q=c(a.scoreElement,b.score,k);g.addRange([k,n,p]);n=a.textElement;n.marginLeft=10;n.opacity=0;n.text(b.message);n.css("opactity",0);var p=Math.max(20*b.message.length,400),o=n.typewrite({delay:20,
wait:d+q-400,type:"return-tween",soundLoop:"notificationTyping",volume:0.12}),k=createjs.Tween.get(n).wait(d+q-400).to({marginLeft:40,opacity:1},400,createjs.Ease.sineOut),q=q+p;g.addRange([o,k]);h.push(n);q+=500;n=a.reviewerElement;n.marginRight=30;n.opacity=0;k="... {0}".format(b.reviewerName);n.text(k);n.css("opactity",0);b=Math.max(20*k.length,400);o=n.typewrite({delay:20,wait:d+q-400,type:"return-tween",soundLoop:"notificationTyping",volume:0.12});k=createjs.Tween.get(n).wait(d+q-400).to({marginRight:-10,
opacity:1},400,createjs.Ease.sineOut);q+=b;g.addRange([o,k]);h.push(n);e.addRange(g);h.push(a.scoreElement.show());k.wait(p+b).call(function(){for(var b=0;b<g.length;b++)-1!=e.indexOf(g[b])&&e.remove(g[b]);-1!=h.indexOf(a.scoreElement)&&h.remove(a.scoreElement)});return q},c=function(a,b,c){for(var d=0,e=GameManager.gameId,h=0;45>h;h++)(function(a,f){d+=20*(a/4);c=c.wait(20*(a/4)).call(function(){if(e==GameManager.gameId){var c;c=(a+1)/45;1==c?c=b:(c=b+9*Math.random()*(1-c)*Math.randomSign(),c=Math.floor(c).clamp(1,
10));f.textValue!=c&&Sound.playSoundOnce("reviewTack",0.15);f.textValue=c}})})(h,a);return d+=300},b=1,g=function(){b=(b+0.5).clamp(1,3)},e=[],h=[];GameManager.addTickListener(function(a){if(!(0==e.length&&0==h.length)){for(var c=0;c<h.length;c++){var d=h[c];d.textValue!=d.currentText&&(d.text(d.textValue),d.currentText=d.textValue);d.opacity!=d.currentOpacity&&(d.css("opacity",d.opacity),d.currentOpacity=d.opacity);d.marginLeft!=d.currentMarginLeft&&(d.css("margin-left",d.marginLeft),d.currentMarginLeft=
d.marginLeft);d.marginRight!=d.currentMarginRight&&(d.css("margin-right",d.marginRight),d.currentMarginRight=d.marginRight)}for(c=0;c<e.length;c++)e[c].tick(a*b)}},!1)})();
(function(){var a;UI.isMenuOpen=function(){return void 0!=a};UI.showContextMenu=function(b,g){if(b&&0!=b.length){a&&UI.closeContextMenu(a);var e=$("<div id='contextMenu'></div>");d(e,b);var h=$("#gameContainerWrapper");e.hide();h.append(e);var f=e.width(),j=e.height(),l=g.x-f/4,m=g.y-j-5,l=l.clamp(0,h.width()-f),m=m.clamp(0,h.height()-j);e.css({position:"absolute",left:l,top:m});e.show();c(e,!0)}};var d=function(a,c){for(var d=$("#contextMenuItemTemplate"),h=0;h<c.length;h++){var f=c[h],j=d.clone();
j.removeAttr("id");j.text(f.label);(function(c){j.clickExclOnce(function(){UI.closeContextMenu(a);c.action()})})(f);a.append(j)}},c=function(b,c,d){var h=$.makeArray(b.children());c||h.reverse();for(var f=0;f<h.length;f++)(function(a){b.delay(100).queue(function(){c?a.removeClass("hideState").addClass("showState"):a.removeClass("showState").addClass("hideState");$(this).dequeue()})})($(h[f]));d&&b.delay(600).queue(function(){d();$(this).dequeue()});c&&(a=b)};UI.closeContextMenu=function(b){b||(b=
a);a===b&&(a=null);b&&c(b,!1,function(){b.remove()})}})();
(function(){UI.showSupportUsOptionsWindow=function(a,d){var c=$("#supporterDialog");c.find(".rateAndReview").clickExcl(function(){Sound.click();ghg4.ghg5("supporter:rate/review clicked");PlatformShim.goToReviewPage()});c.find(".sendFeedback").clickExcl(function(){Sound.click();ghg4.ghg5("supporter:send feedback clicked");Windows.System.Launcher.launchUriAsync(new Windows.Foundation.Uri("mailto:support@greenheartgames.com?Subject=Game%20Dev%20Tycoon")).done()});c.find(".okButton").clickExclOnce(function(){Sound.click();
c.dialog("close")});c.find(".packOptions").hide();DataStore.remoteSettings.supporterPacksEnabled&&SupportPacks.getPacks(function(a){var a=a.productListings,d=0;if(a.hasOwnProperty("1")){var e=a["1"];(function(a){var b=c.find(".pack1");b.text(a.name+" ({0})".format(a.formattedPrice)).clickExcl(function(){Sound.click();ghg4.ghg5("supporter:pack 1 clicked");SupportPacks.buy(a.name,function(){b.text(a.name+" ({0}) - purchased!".localize().format(a.formattedPrice)).effect("pulsate",{times:2})})})})(e);
d++}a.hasOwnProperty("2")&&(e=a["2"],function(a){var b=c.find(".pack2");b.text(a.name+" ({0})".format(a.formattedPrice));b.clickExcl(function(){Sound.click();ghg4.ghg5("supporter:pack 2 clicked");SupportPacks.buy(a.name,function(){b.text(a.name+" ({0}) - purchased!".localize().format(a.formattedPrice)).effect("pulsate",{times:2})})})}(e),d++);(2==d||GameFlags.ghg6)&&c.find(".packOptions").fadeIn()});c.gdDialog({popout:!0,close:!0,onClose:function(){a&&GameManager.company.activeNotifications.remove(a);
GameManager.resume(!0);d&&d()}})}})();
(function(a){var d=[],c;GameManager.addTickListener(function(a){if(0!=d.length){if(isNaN(c)||0===c)c=1;a*=c;if(0!==a)for(var g=0;g<d.length;g++)d[g].tick(a,!1)}},!1);a.fn.typewrite=function(b){b||(b={});var g={selector:this,delay:100,speedUpOnClick:!1,callback:null,animateScroll:!0,scrollPadding:25,scrollPollIntervalInChars:50};b&&a.extend(g,b);c=1;var e=function(){c=(c+2.5).clamp(1,10)};if(b.speedUpOnClick){var h=g.callback;g.callback=function(){a(window).off("click",e);h()}}for(var f=a(g.selector),
j=f.text().replaceAll("<br />","\n"),l=a("<span></span>"),m={},k=0;k<j.length;k++){var n=j[k];"["==n?(n=j.substr(k),n.startsWith("[pause:")?(n=k+7,k=j.indexOf("]",n),n=j.substr(n,k-n),m[l.children().length]={type:"pause",value:parseFloat(n)}):n.startsWith("[delay:")&&(n=k+7,k=j.indexOf("]",n),n=j.substr(n,k-n),m[l.children().length]={type:"delay",value:n})):"\n"==n?l.append(a("<br />")):l.append(a("<span></span>").text(n))}var p=[];l.children().each(function(){a(this).css({opacity:0})});f.empty();
f.append(l);var q=0,o=0,s=0,x=l.children().length,r=f.parent();l.children().each(function(b){(function(a,b){p.push(function(){b.css({opacity:1});if(g.animateScroll&&(s++>=g.scrollPollIntervalInChars-1||a==x-1)){s=0;0==o&&(o=f.height());var c=g.scrollPadding+b.position().top-f.position().top-o;0<c&&q<c&&(r.stop().animate({scrollTop:c},600),q=c)}})})(b,a(this))});var t=createjs.Tween.get(f);b.wait&&(t=t.wait(b.wait));b.soundLoop&&(t=t.call(function(){Sound.playSoundLoop(b.soundLoop,b.volume)}));j=1;
for(k=0;k<p.length;k++){if(m.hasOwnProperty(k))if("pause"==m[k].type){t=t.call(function(){b.soundLoop&&Sound.stopSound(b.soundLoop)}).wait(m[k].value).call(function(){b.soundLoop&&Sound.playSoundLoop(b.soundLoop,b.volume)}).call(p[k]);continue}else"delay"==m[k].type&&(j="slow"==m[k].value?10:1);t=t.wait(g.delay*j).call(p[k])}t.call(function(){b.soundLoop&&Sound.stopSound(b.soundLoop);"return-tween"!=b.type&&-1!=d.indexOf(t)&&d.remove(t);g.callback&&g.callback()});if("return-tween"===b.type)return t;
setTimeout(function(){d.push(t);if(g.speedUpOnClick)a(window).on("click",e)},g.delay)}})(jQuery);
(function(){UI.showPostMortemComplete=function(d,c){GameManager.company.activeNotifications.remove(d);var b=GameManager.company.getGameById(d.text);if(b){for(var g=a(b),e,h="",f=0,j=0;j<g.length;j++,f++){var l=g[j];e||(e=l.category);e!=l.category&&(h+="{n}"+"We have some additional insights:".localize()+"\n",f=0);0<j&&(h+="[pause:500]");h+="\n{0}. {1}".format(f+1,g[j].msg)}0===g.length&&(h="No new insights".localize());GameManager.company.notifications.push(new Notification("Game Report".localize(),
"Our post-release analysis of {0} is complete and we got the following results:".localize().format(b.title)+"\n"+h))}GameManager.resume(!0);c&&c()};var a=function(a){var c=GameManager.company,b=[],g="1";if(!Knowledge.hasComboKnowledge(c,a)){var e=Knowledge.getComboHintText(a);Knowledge.setComboKnowledge(c,a);b.push({category:g,msg:"{0} and {1} is a {2} combination.".localize().format(a.topic.name,a.getGenreDisplayName(),e)})}var h=a.featureLog.filter(function(a){return"mission"===a.missionType}).filter(function(b){return!Knowledge.hasMissionWeightingKnowledge(c,
b,a,!1)});if(0<h.length){var f=[h.pickRandom()];1<h.length&&0.9<c.getRandom()&&f.push(h.except(f).pickRandom());for(h=0;h<f.length;h++){var j=f[h];General.getGameSizeDurationFactor(a.gameSize);var e=Missions.getGenreWeighting(j,a),l=Missions.getMissionWithId(j.id),e=Knowledge.getMissionWeightingDisplayText(e,!0),e="{0} seems to be {1} for this type of game.".localize().format(l.name,e);b.push({category:g,msg:e});Knowledge.setMissionWeightingKnowledge(c,j,a)}}for(h=0;h<a.platforms.length;h++){var m=
a.platforms[h],k=a.genre;if(!Knowledge.hasPlatformGenreWeightingKnowledge(c,m,k)&&(e=GameGenre.getGenreWeighting(m.genreWeightings,k),f=0.2,0.7>=e?f=1:(j=c.gameLog.count(function(b){return b.platforms.first(function(b){return b.id==m.id&&a.genre.id==k.id})})-1,f+=0.4*j),c.getRandom()<f)){Knowledge.setPlatformGenreWeightingKnowledge(c,m,k);e=Knowledge.getFactorAdj(e,!0);b.push({category:g,msg:"Platform genre-match ({0}/{1}): {2}.".format(k.name,m.name,e)});break}}if(c.canSetTargetAudience()){for(var n=
a.targetAudience,h=0;h<a.platforms.length;h++)if(m=a.platforms[h],!Knowledge.hasPlatformAudienceWeightingKnowledge(c,m,n)&&(e=Platforms.getAudienceWeighting([m],n,!0),f=0.2,0.7>=e?f=1:(j=c.gameLog.count(function(b){return b.platforms.first(function(b){return b.id==m.id&&a.targetAudience==n})})-1,f+=0.4*j),c.getRandom()<f)){Knowledge.setPlatformAudienceWeightingKnowledge(c,m,n);e=Knowledge.getFactorAdj(e,!0);b.push({category:g,msg:"Platform audience-match ({0}/{1}): {2}.".format(General.getAudienceLabel(n),
m.name,e)});break}var p=a.topic;if(!Knowledge.hasTopicAudienceWeightingKnowledge(c,p,n)&&(e=General.getAudienceWeighting(p.audienceWeightings,n),f=0.2,0.7>=e?f=1:(j=c.gameLog.count(function(a){return a.topic.id==p.id&&a.targetAudience==n})-1,f+=0.4*j),c.getRandom()<f))Knowledge.setTopicAudienceWeightingKnowledge(c,p,n),e=Knowledge.getFactorAdj(e,!0),b.push({category:g,msg:"Topic audience-match ({0}/{1}): {2}.".format(General.getAudienceLabel(n),p.name,e)})}g="2";a.flags.sameGenreTopic&&b.push({category:g,
msg:"The market really doesn't like when we publish very similar games too close to each other.".localize()});if(a.flags.newStaffIds&&(f=a.flags.newStaffIds.map(function(a){return GameManager.company.staff.first(function(b){return b.id==a})}).filter(function(a){return a}),0<f.length)){j=f[0].name;for(h=1;h<f.length;h++)j+=", {0}".format(f[h].name);h=1==f.length?"{0} is still new to the team.".localize("{0} is a single name").format(j):"{0} are still new to the team.".localize("{0} is a list of names").format(j);
h+=" "+"A few more games and the team will have higher potential".localize();b.push({category:g,msg:h})}1<c.staff.length&&(a.flags.teamContribution&&0.8>=a.flags.teamContribution)&&b.push({category:g,msg:"We should try to focus our entire team on the development of a game.".localize()});"small"!=a.gameSize&&(a.flags.royaltyRate&&a.flags.fansAtLaunch>Sales.getTargetFans(c,a)?0.2>c.getRandom()&&b.push({category:g,msg:"Our fan base is big enough to make self-publishing {0} games viable. Unless a publishing deal gives us a great royalty rate we are likely better off publishing {0} games ourselves".localize().format(General.getGameSizeLabel(a.gameSize))}):
!a.flags.royaltyRate&&a.flags.fansAtLaunch<Sales.getTargetFans(c,a)&&0.2>c.getRandom()&&b.push({category:g,msg:"Self-publishing {1} games will be most efficient when we have at least {0} fans. Publishing deals can give us great exposure and help us reach more players.".localize().format(UI.getShortNumberString(Sales.getTargetFans(c,a)),General.getGameSizeLabel(a.gameSize))}));return b}})();
(function(){Media.TriggerNotifications=[{id:"mediumFansTargetReached",trigger:function(a){return a.canDevelopMediumGames()&&a.fans>Sales.MediumTargetFans},notification:new Notification("Goal reached".localize("heading"),"You now have more than {0} fans! With such a big fan base you should now be able to self-publish medium games.".localize().format(UI.getLongNumberString(Sales.MediumTargetFans)))},{id:"largeFansTargetReached",trigger:function(a){return a.canDevelopLargeGames()&&a.fans>Sales.LargeTargetFans},
notification:new Notification("Goal reached".localize("heading"),"You now have more than {0} fans! With such a big fan base you should now be able to self-publish large games.".localize().format(UI.getLongNumberString(Sales.LargeTargetFans)))},{id:"gameConvention",trigger:function(a){return 1<a.currentLevel&&a.isLaterOrEqualThan(8,2,1)},getNotification:function(a){return new Notification("Game Convention".localize(),"Dear {0},\nWe have followed your progress in recent years and would like to extend this formal invitation to participate in the biggest game convention on the planet 'Games, Games, Games' also known as G3.{n}By having your own company booth at G3 you can gain a lot of fans and hype for your games and we think our audience would love to see you there.\nWe will contact you yearly with booth options. Hope to see you at G3.\nThe G3 committee.".localize().format(a.name))}},
{id:"level2Guide",notification:new Notification("Goal Hint".localize("heading"),"If you have more than 1M in cash you will be able to move to the next level. This might sound a lot but don't worry. Once you release a hit game you will get to this amount easily.".localize()),trigger:function(a){return 1===a.currentLevel&&1E6>a.cash&&a.isLaterOrEqualThan(4,7,2)}},{id:"engineHint",trigger:function(a){return a.isLaterOrEqualThan(3,1,2)&&0===a.engines.length},notification:new Notification("Engine Reminder".localize("heading"),
"Don't forget creating custom game engines. This will improve your games a lot! You can create your custom engine through the action menu once you have researched the Custom Engine.".localize())},{id:"thankYou",trigger:function(a){return!PlatformShim.ISWIN8&&!GameManager.ghg2()&&a.isLaterOrEqualThan(1,12,3)&&!DataStore.getValue("thankYouMessageShown")},getNotification:function(a){DataStore.setValue("thankYouMessageShown",!0);return UI.getThanksForPurchasingNotification(a.staff[0].name)}},{id:"publisherUnlock",
trigger:function(a){return a.canDevelopMediumGames()},getNotification:function(a){a="Hi {0},\nI have followed the progress of {1} for a while and it seem that with your recent expansion you have started developing larger games.\nLarger games deserve to be seen by more people and this is where a publisher can come in handy.{n}A publisher will market and publish your game around the world. They will also help fund development. In return they keep most of the profits but since the game will sell a lot more it is usually still worth it.{n}I can put you in touch with some publishers so you can look at some of the available contracts. Just let me know.\nJasmine Droke{n}Find Publishing Contract has been unlocked. It is accessible in the action menu.".localize().format(a.staff[0].name,
a.name);a=new Notification({header:"Publishing Contracts".localize("heading"),text:a});a.setFlag("publishersEnabled",!0);return a}},{id:"multiplatformOptimizationUnlock",trigger:function(a){return a.canDevelopMultiPlatform()&&1<a.gameLog.count(function(d){return 1<d.platforms.length&&(d.flags.postMortemCompleted||a.isLaterOrEqualThan(24,2))})},getNotification:function(){var a="Looking at our past multi-platform games it becomes clear that we should be able to drastically reduce the cost of developing a single game for multiple platforms if we could better optimize our game engines for multi-platform development.".localize(),
a=new Notification({header:"New Insight".localize("heading"),text:a,weeksUntilFired:2});a.setFlag("multiPlatformOptimizeResearchAvailable",!0);return a}}]})();var DESIGN_POINTS_COLOR="orange",TECHNOLOGY_POINTS_COLOR="#00BFFF",RESEARCH_POINTS_COLOR="#006AFF",BUGS_COLOR="#FF6A00",VisualsManager={};
(function(){var a=VisualsManager,d=CanvasManager;a.Divisor=1;PlatformShim.ISLOWRES&&(a.Divisor=1.874084919472914);a.toScreenCoordinates=function(b,c){var d=isNaN(c)?1:c;return Math.round(b/a.Divisor*d)};a.gameStatusBar=void 0;a.researchPoints=void 0;a.reset=function(){if(GameManager.company.hwCrew)for(var b=0;b<GameManager.company.hwCrew.length;b++)GameManager.company.hwCrew[b].load();if(GameManager.company.rndCrew)for(b=0;b<GameManager.company.rndCrew.length;b++)GameManager.company.rndCrew[b].load();
a.computerImages=[void 0,void 0,void 0,void 0,void 0];a.loadStage(true);if(!a.gameStatusBar){a.gameStatusBar=new GameStatusBar;d.foregroundStage.addChild(a.gameStatusBar)}a.gameStatusBar.x=d.foregroundStage.canvas.width/2-a.gameStatusBar.width/2;a.gameStatusBar.y=15;a.gameStatusBar.reset();if(!a.researchPoints){a.researchPoints=new PointsDisplayVisual(RESEARCH_POINTS_COLOR,"white","Research".localize());d.foregroundStage.addChild(a.researchPoints)}a.researchPoints.y=15;a.researchPoints.size=100;a.researchPoints.x=
a.gameStatusBar.x+a.gameStatusBar.width+70;a.resetAllCharacters();a.refreshLabCrew();a.updatePoints();a.gameStatusBar.updateGameName();UI.clearSalesCards();UI.clearMaintenanceCards();GameManager.company.licencedPlatforms.forEach(function(a){if(a.isCustom===true&&(a.nextSalesCash>0||a.currentSalesCash===0)){UI.addSalesCard(a.id,a.name,a.currentSalesCash,a.unitsSold,a.currentUnitsSold,-1,a.salesCashLog,a.nextSalesCash,Sales.consoleUnitPrice);a.currentSalesCash>0&&UI.updateMaintenanceCard(a)}});GameManager.company.gameLog.forEach(function(a){a.currentSalesCash<
a.totalSalesCash&&UI.addSalesCard(a.id,a.title,a.currentSalesCash,a.totalSalesCash,a.unitsSold,a.currentSalesRank,a.salesCashLog,a.nextSalesCash,a.unitPrice,a.nextMaintenance,a.maintenanceLog)});CanvasManager.update(true);a.updateReleaseReadyButton();UI.reset()};a.resetAllCharacters=function(){for(var b=d.characterStage.children.slice(),c=0;c<b.length;c++)d.characterStage.children.remove(b[c]);a.characterOverlays=[];a.reloadAllCharacters();a.refreshTrainingOverlays();a.refreshHiringButtons()};a.removeStaff=
function(b){var c=a.characterOverlays.first(function(a){return a.character===b});a.characterOverlays.remove(c);d.characterStage.removeChild(c);a.removeComputer(b);a.refreshTrainingOverlays();a.refreshHiringButtons();UI._resetBoostUI()};a.backgroundImage=void 0;a.computerImages=[void 0,void 0,void 0,void 0,void 0];a.nextLevel=function(){var b=GameManager.company.currentLevel;GameManager.pause(true);var c=ResourceKeys.getLevelResources.apply(ResourceKeys,[1,2,3,4].except([b]));GameDev.ResourceManager.removeResources(c);
UI.fadeInTransitionOverlay();var d=Date.now(),e=function(){a.loadStage(true);for(var b=0;b<a.characterOverlays.length;b++){var c=a.characterOverlays[b];c.character.visualData=c.saveState();c.parent.removeChild(c)}a.characterOverlays=[];a.reloadAllCharacters();a.refreshTrainingOverlays();a.refreshHiringButtons();if(GameManager.currentResearches.length>0)for(b=0;b<GameManager.company.staff.length;b++)GameManager.company.staff[b].state===CharacterState.Researching&&VisualsManager.getCharacterOverlay(GameManager.company.staff[b]).startResearching();
UI._resetBoostUI();CanvasManager.update();UI.fadeOutTransitionOverlay();GameManager.resume(true)};FlippingCounter.init();GameDev.ResourceManager.ensureResources(ResourceKeys.getLevelResources(b),function(){var a=Date.now()-d;a<2E3?setTimeout(function(){e()},2E3-a):e()})};a.addComputer=function(b){if(b.slot>0){var b=b.slot,c=void 0,d=1,e=GameManager.company.currentLevel,g=0,k=0,n=CanvasManager.globalScale;if(e===2)if(b===1){c=GameDev.ResourceManager.resources[ResourceKeys.Level2C1];g=1005;k=707;d=
4}else if(b===2){c=GameDev.ResourceManager.resources[ResourceKeys.Level2C2];g=880;k=698}else if(b===3){c=GameDev.ResourceManager.resources[ResourceKeys.Level2C3];g=1164;k=576}else{if(b===4){c=GameDev.ResourceManager.resources[ResourceKeys.Level2C4];g=1114;k=511}}else if(e===3)if(b===1){c=GameDev.ResourceManager.resources[ResourceKeys.Level3C1];g=1005;k=723;d=4}else if(b===2){c=GameDev.ResourceManager.resources[ResourceKeys.Level3C2];g=878;k=703}else if(b===3){c=GameDev.ResourceManager.resources[ResourceKeys.Level3C3];
g=1159;k=593}else{if(b===4){c=GameDev.ResourceManager.resources[ResourceKeys.Level3C4];g=1109;k=511}}else if(e===4)if(b===1){c=GameDev.ResourceManager.resources[ResourceKeys.Level4C1];g=463;k=978;d=4}else if(b===2){c=GameDev.ResourceManager.resources[ResourceKeys.Level4C2];g=428;k=756}else if(b===3){c=GameDev.ResourceManager.resources[ResourceKeys.Level4C1];g=745;k=812}else if(b===4){c=GameDev.ResourceManager.resources[ResourceKeys.Level4C2];g=711;k=591}else if(b===5){c=GameDev.ResourceManager.resources[ResourceKeys.Level4C1];
g=1014;k=649}else if(b===6){c=GameDev.ResourceManager.resources[ResourceKeys.Level4C2];g=981;k=426}g=a.toScreenCoordinates(g,n);k=a.toScreenCoordinates(k,n);if(c){var e=CanvasManager.backgroundStage,p=e.canvas.width,q=e.canvas.height,o=1366/768,s=0;if(Math.abs(p/q-o)>0.1){o=q*o;s=-(o-p)/2;p=o}a.currentXOffset=s;o=document.createElement("canvas");o.width=p;o.height=q;o.getContext("2d").drawImage(c,0,0,c.width,c.height,s+g,k,Math.floor(c.width*n),Math.floor(c.height*n));c=new createjs.Bitmap(o);c.width=
p;c.height=q;a.computerImages[b]=c;e.children.length>=d-1?e.addChildAt(c,d):e.addChild(c);CanvasManager.invalidateBackground()}}};a.removeComputer=function(b){var c=CanvasManager.backgroundStage;if(a.computerImages[b.slot]){c.removeChild(a.computerImages[b.slot]);a.computerImages[b.slot]=void 0;CanvasManager.invalidateBackground()}};a.getLabSign=function(a,b,c,d,e){var g=new createjs.Container;g.x=d;g.y=e;d=32;do{e="bold {0}pt {1}".format(d,"Segoe UI");e=new createjs.Text(a,e,"black");d=d-1}while((e.getMeasuredWidth()>
b||e.getMeasuredLineHeight()>c)&&d>1);b=d/32;c=createjs.Graphics.getHSL(0,0,24);e=new createjs.Text(a,"bold 32pt {0}".format("Segoe UI"),c);e.textAlign="center";e.textBaseline="middle";g.scaleX=b;g.scaleY=b;g.addChild(e);return g};a.loadStage=function(c){var d=GameManager.company,e=CanvasManager.backgroundStage,l=CanvasManager.backgroundOverlayStage,m=CanvasManager.globalScale,k=e.canvas.width,n=e.canvas.height,p=1366/768,q=0;if(Math.abs(k/n-p)>0.1){p=n*p;q=-(p-k)/2;k=p}var o=d.currentLevel,s;a.toScreenCoordinates(2921);
var x=a.toScreenCoordinates(39),r;a.toScreenCoordinates(4156);var p=a.toScreenCoordinates(47),t=GameDev.ResourceManager.resources[ResourceKeys.Level1],w=a.toScreenCoordinates(563),v=a.toScreenCoordinates(217);if(o===2){t=GameDev.ResourceManager.resources[ResourceKeys.Level2];w=a.toScreenCoordinates(83);v=a.toScreenCoordinates(54)}else if(o===3){t=GameDev.ResourceManager.resources[ResourceKeys.Level3];w=a.toScreenCoordinates(83);v=a.toScreenCoordinates(54)}else if(o===4){t=GameDev.ResourceManager.resources[ResourceKeys.Level4];
w=a.toScreenCoordinates(367);v=a.toScreenCoordinates(39);GameManager.company.flags.rndLabUnlocked||(r=GameDev.ResourceManager.resources[ResourceKeys.Level4LockedRight]);GameManager.company.flags.hwLabUnlocked||(s=GameDev.ResourceManager.resources[ResourceKeys.Level4LockedLeft]);a.toScreenCoordinates(2560)}if(!a.backgroundImage||a.backgroundImage.width!=k||a.backgroundImage.height!=n||a.currentXOffset!=q||c){e.removeAllChildren();l.removeAllChildren();g=void 0;a.currentXOffset=q;c=document.createElement("canvas");
c.width=k;c.height=n;var y=c.getContext("2d");o===4?y.drawImage(t,a.toScreenCoordinates(2193),0,a.toScreenCoordinates(2560),a.toScreenCoordinates(1384),0,Math.floor(v*m),Math.floor(a.toScreenCoordinates(2560)*m),Math.floor(a.toScreenCoordinates(1384)*m)):y.drawImage(t,0,0,t.width,t.height,Math.floor(w*m),Math.floor(v*m),Math.floor(t.width*m),Math.floor(t.height*m));if(s){y.clearRect(q,x*m,(s.width-5)*m,s.height*m);y.drawImage(s,0,0,s.width,s.height,q,x*m,(s.width-4)*m,s.height*m)}if(r){y.clearRect(Math.floor((a.toScreenCoordinates(2590)-
r.width)*m),Math.floor((p-1)*m),Math.floor(r.width*m),Math.floor(r.height*m));y.drawImage(r,0,0,r.width,r.height,Math.floor((a.toScreenCoordinates(2588)-r.width)*m),Math.floor(p*m),Math.floor(r.width*m),Math.floor(r.height*m))}q=new createjs.Bitmap(c);q.width=k;q.height=n;a.backgroundImage=q;e.addChildAt(q,0);a.updateComputers();CanvasManager.leftScreen.backgroundStage.removeAllChildren();CanvasManager.leftScreen.backgroundOverlayStage.removeAllChildren();CanvasManager.leftScreen.invalidateBackground();
CanvasManager.rightScreen.backgroundStage.removeAllChildren();CanvasManager.rightScreen.backgroundOverlayStage.removeAllChildren();CanvasManager.rightScreen.invalidateBackground();a.levelOverlay=new LevelOverlay(d);if(o===4){d=document.createElement("canvas");d.width=k;d.height=n;var e=d.getContext("2d"),z;if(!s){e.drawImage(t,0,0,2560/a.Divisor-w,1384/a.Divisor,w*m,v*m,(2560/a.Divisor-w)*m,1384/a.Divisor*m);z=a.getLabSign("Hardware lab".localize(),a.toScreenCoordinates(264,m),a.toScreenCoordinates(54,
m),a.toScreenCoordinates(1878,m),a.toScreenCoordinates(145,m))}s=new createjs.Bitmap(d);s.width=k;s.heigth=n;CanvasManager.leftScreen.backgroundStage.addChildAt(s,0);CanvasManager.leftScreen.backgroundOverlayStage.addChild(a.levelOverlay.leftOverlay);z&&CanvasManager.leftScreen.backgroundOverlayStage.addChild(z);z=document.createElement("canvas");z.width=k;z.height=n;s=z.getContext("2d");var u;if(r)s.drawImage(r,a.toScreenCoordinates(596),0,a.toScreenCoordinates(29),r.height,0,p*m,a.toScreenCoordinates(29,
m),r.height*m);else{s.drawImage(t,a.toScreenCoordinates(2560,2)-w,0,t.width-(a.toScreenCoordinates(2560,2)-w),t.height,0,v*m,(t.width-(2560/a.Divisor*2-w))*m,t.height*m);u=a.getLabSign("R&D lab".localize(),a.toScreenCoordinates(264,m),a.toScreenCoordinates(54,m),a.toScreenCoordinates(690,m),a.toScreenCoordinates(138,m))}m=new createjs.Bitmap(z);m.width=k;m.heigth=n;CanvasManager.rightScreen.backgroundStage.addChildAt(m,0);CanvasManager.rightScreen.backgroundOverlayStage.addChild(a.levelOverlay.rightOverlay);
u&&CanvasManager.rightScreen.backgroundOverlayStage.addChild(u)}l.addChild(a.levelOverlay.centerOverlay)}a.updateCompanyNameInOffice();CanvasManager.invalidateBackground();a.scrollToZone(GameManager.company.flags.currentZone);b()};a.installAirCon=function(){a.levelOverlay.startAirCon1();a.levelOverlay.startAirCon2()};var c=!1,b=function(){if(!c){c=true;$("#gameContainerWrapper").wipetouch({tapToClick:false,wipeLeft:function(){VisualsManager.scrollToNextZone(1)},wipeRight:function(){VisualsManager.scrollToNextZone(-1)},
wipeMove:function(b){if(b.dX){a.lastMove=Date.now();var c=$("#canvasScrollContainer").width(),d=CanvasManager.backgroundStage.canvas.width,e=GameManager.company;if(e&&e.currentLevel==4||c<d){diff=c-d;c=$("#innerCanvasContainer").offset().left;c=c+b.dX;CanvasManager.zone0Activ=c>-d;CanvasManager.zone1Activ=c>-2*d&&c<=diff;CanvasManager.zone2Activ=c>-3*d&&c<=diff-d;$("#innerCanvasContainer").css("left",c+"px")}}}});$("a").live("touchend",function(){location.href=$(this).attr("href")})}};a.scrollToNextZone=
function(b){if(GameManager.company){var c=GameManager.company.flags.currentZone;c===void 0&&(c=1);c=(c+b).clamp(0,2);if(GameManager.company.currentLevel!=4)c=1;else{GameManager.company.flags.hwLabUnlocked||(c=c.clamp(1,2));GameManager.company.flags.rndLabUnlocked||(c=c.clamp(0,1))}a.scrollToZone(c,true)}};a.scrollToZone=function(b,c){var d=CanvasManager.backgroundStage.canvas.width;b===void 0&&(b=1);var e=b==0?a.toScreenCoordinates(270):b==1?a.toScreenCoordinates(2560):a.toScreenCoordinates(4760),
e=e*CanvasManager.globalScale,g=$("#canvasScrollContainer").width(),d=Math.abs(g-d)/2,d=e+d*b;if($("#innerCanvasContainer").offset().left!=d){e=c?a.toScreenCoordinates(600):0;a.isAnimatingScroll=true;$("#innerCanvasContainer").transition({left:-d},e);setTimeout(function(){a.isAnimatingScroll=false},e)}a._zoneChanged(b,c);GameManager.company.flags.currentZone=b};a.updateComputers=function(){GameManager.company.staff.slice().sort(function(a,b){return a.slot-b.slot}).forEach(function(b){a.addComputer(b)})};
var g;a.updateCompanyNameInOffice=function(){var b=GameManager.company.currentLevel;if(b!=1){if(!g){g=new IsometricCompanyNameVisual;CanvasManager.backgroundStage.addChild(g)}g.updateVisual(b==2);if(b===2||b==3){g.x=a.toScreenCoordinates(690,CanvasManager.globalScale);g.y=a.toScreenCoordinates(1100,CanvasManager.globalScale)}else if(b==4){g.x=a.toScreenCoordinates(1410,CanvasManager.globalScale);g.y=a.toScreenCoordinates(300,CanvasManager.globalScale);g.scaleX=g.scaleX*0.8;g.scaleY=g.scaleY*0.8}g.x=
g.x+a.currentXOffset}};a.startCreateEngine=function(){a.gameStatusBar.startEngine();a.updatePoints()};a.startContract=function(){a.gameStatusBar.startContract();a.updatePoints()};a.updateEngineStatus=function(){var b=GameManager.currentEngineDev;a.gameStatusBar.updateProgress(b.progress,true,100);a.gameStatusBar.updateStatusMessage(b.currentPart.name)};a.finishEngine=function(){a.gameStatusBar.finishEngine();GameManager.spawnedPoints=0};a.updatePoints=function(){a.gameStatusBar.updatePoints();a.researchPoints.updatePoints(GameManager.company.researchPoints)};
a.pulsePointsDisplay=function(b,c){b==="r"?a.researchPoints.pulse(c):a.gameStatusBar.pulsePointsDisplay(b,c)};a.getGlobalLocationOfPointsDisplay=function(b){return b==="r"?{x:a.researchPoints.x+a.researchPoints.size/2,y:a.researchPoints.y+a.researchPoints.size/2}:a.gameStatusBar.getGlobalLocationOfPointsDisplay(b)};a.reloadAllCharacters=function(){if(GameManager.company&&GameManager.company.staff)for(var b=GameManager.company.staff,c=0;c<b.length;c++){var d=b[c];a.getCharacterOverlay(d);d.refreshPoints()}};
a.characterOverlays=[];a.getCharacterOverlay=function(b,c){var d=a.characterOverlays.first(function(a){return a.character===b});return!d&&!c?a.createCharacterOverlay(b):d};a.getCurrentPosition=function(b,c){var d={};if(b===1){d.x=998*CanvasManager.globalScale;d.y=599*CanvasManager.globalScale}if(b===2||b===3)if(c===0){d.x=1515*CanvasManager.globalScale;d.y=995*CanvasManager.globalScale}else if(c===1){d.x=1055*CanvasManager.globalScale;d.y=790*CanvasManager.globalScale}else if(c===2){d.x=803*CanvasManager.globalScale;
d.y=589*CanvasManager.globalScale}else if(c===3){d.x=1283*CanvasManager.globalScale;d.y=658*CanvasManager.globalScale}else{if(c===4){d.x=1036*CanvasManager.globalScale;d.y=451*CanvasManager.globalScale}}else if(b===4)if(c===0){d.x=1565*CanvasManager.globalScale;d.y=915*CanvasManager.globalScale}else if(c===1){d.x=516*CanvasManager.globalScale;d.y=1023*CanvasManager.globalScale}else if(c===2){d.x=436*CanvasManager.globalScale;d.y=711*CanvasManager.globalScale}else if(c===3){d.x=798*CanvasManager.globalScale;
d.y=857*CanvasManager.globalScale}else if(c===4){d.x=719*CanvasManager.globalScale;d.y=547*CanvasManager.globalScale}else if(c===5){d.x=1067*CanvasManager.globalScale;d.y=694*CanvasManager.globalScale}else if(c===6){d.x=989*CanvasManager.globalScale;d.y=382*CanvasManager.globalScale}d.x=a.toScreenCoordinates(d.x);d.y=a.toScreenCoordinates(d.y);d.x=d.x+a.currentXOffset;return d};a.positionCharacterOverlay=function(b,c,d){var e=a.getCurrentPosition(c,d);b.x=e.x;b.y=e.y;a.updateImages(b,c,d)};a.updateImages=
function(b,c,d){var e=200;PlatformShim.ISLOWRES&&(e=107);var g=CanvasManager.globalScale;if(d===2||d===4||d==6)if(c===2){b.deskImage=a.getSubImage(b.x-807/a.Divisor*g,b.y-527/a.Divisor*g,e,e,ResourceKeys.Level2Desk);if(d===2){b.keyBoardImage=a.getSubImage(b.x-889/a.Divisor*g,b.y-716/a.Divisor*g,e,e,ResourceKeys.Level2C2Keyboard);b.pcImage=a.getSubImage(b.x-880/a.Divisor*g,b.y-698/a.Divisor*g,e,e,ResourceKeys.Level2C2)}else{b.keyBoardImage=a.getSubImage(b.x-1117/a.Divisor*g,b.y-582/a.Divisor*g,e,e,
ResourceKeys.Level2C2Keyboard);b.pcImage=a.getSubImage(b.x-1114/a.Divisor*g,b.y-511/a.Divisor*g,e,e,ResourceKeys.Level2C4)}}else if(c===3){b.deskImage=a.getSubImage(b.x-807/a.Divisor*g,b.y-527/a.Divisor*g,e,e,ResourceKeys.Level3Desk);if(d===2){b.keyBoardImage=a.getSubImage(b.x-893/a.Divisor*g,b.y-713/a.Divisor*g,e,e,ResourceKeys.Level3C2Keyboard);b.pcImage=a.getSubImage(b.x-878/a.Divisor*g,b.y-703/a.Divisor*g,e,e,ResourceKeys.Level3C2)}else{b.keyBoardImage=a.getSubImage(b.x-1130/a.Divisor*g,b.y-578/
a.Divisor*g,e,e,ResourceKeys.Level3C2Keyboard);b.pcImage=a.getSubImage(b.x-1109/a.Divisor*g,b.y-511/a.Divisor*g,e,e,ResourceKeys.Level3C4)}}else if(c===4){b.deskImage=a.getSubImage(b.x-427/a.Divisor*g,b.y-460/a.Divisor*g,e,e,ResourceKeys.Level4Desk);if(d===2){b.keyBoardImage=a.getSubImage(b.x-541/a.Divisor*g,b.y-840/a.Divisor*g,e,e,ResourceKeys.Level4C2Keyboard);b.pcImage=a.getSubImage(b.x-428/a.Divisor*g,b.y-756/a.Divisor*g,e,e,ResourceKeys.Level4C2)}else if(d===4){b.keyBoardImage=a.getSubImage(b.x-
824/a.Divisor*g,b.y-676/a.Divisor*g,e,e,ResourceKeys.Level4C2Keyboard);b.pcImage=a.getSubImage(b.x-711/a.Divisor*g,b.y-591/a.Divisor*g,e,e,ResourceKeys.Level4C2)}else if(d===6){b.keyBoardImage=a.getSubImage(b.x-1094/a.Divisor*g,b.y-511/a.Divisor*g,e,e,ResourceKeys.Level4C2Keyboard);b.pcImage=a.getSubImage(b.x-981/a.Divisor*g,b.y-426/a.Divisor*g,e,e,ResourceKeys.Level4C2)}}};a.getSubImage=function(b,c,d,e,g){var k=document.createElement("canvas");k.width=d;k.height=e;k.getContext("2d").drawImage(GameDev.ResourceManager.resources[g],
-((b-a.currentXOffset)/CanvasManager.globalScale),-c/CanvasManager.globalScale);b=new Image;b.src=k.toDataURL("image/png");return b};a.refreshHiringButtons=function(){var b=$("#canvasContainer");b.find(".hireStaffButtonBase").remove();var c=GameManager.company.currentLevel,d=GameManager.company.staff;if(c>1&&!((c==2||c==3)&&d.length==5)&&!(c>3&&d.length==7)){var e=[1,2,3,4,5,6].first(function(a){return!d.some(function(b){return b.slot==a})}),c=a.createHireButton(c,e);b.append(c);UI.maxFont(b.find(".hireButtonLabel"),
12,40)}};var e;a.updateReleaseReadyButton=function(){if(!e){e=$('<div id="releaseButton" class="selectorButton greenButton windowStyleHideState" style="position:absolute; opacity=0;">'+"Finish".localize("button")+"</div>");e.gdIsActive=false;$("#canvasContainer").append(e)}var a=e.parent().width();e.css({left:a/2-e.width()/2+"px"});a=GameManager.company&&GameManager.company.currentGame&&!GameManager.company.currentGame.flags.devCompleted&&GameManager.company.currentGame.flags.releaseReady;if(a!=e.gdIsActive){e.gdIsActive=
a;var b=function(){e.transition({opacity:0},200);e.removeClass("windowStyleShowState").addClass("windowStyleHideState");e.gdIsActive=false};if(a){e.transition({opacity:1},200);e.removeClass("windowStyleHideState");Sound.playSoundOnce("gameReady",0.2);e.clickExclOnce(function(){Sound.click();b();if(GameManager.currentFeature)GameManager.currentFeature.progress=1;if(GameManager.company.currentGame)GameManager.company.currentGame.flags.finished=true;return false})}else b()}};a.createHireButton=function(b,
c){var d=$(PlatformShim.toStaticHtml('<div class="hireStaffButtonBase hireStaffButton"><div class="hireButtonLabel">'+"Fill Position".localize()+'</div><div class="hireStaffProgress"></div></div>')),e=0,g=0;if(b===2||b===3)switch(c){case 1:e=1060;g=840;break;case 2:e=880;g=720;break;case 3:e=1290;g=720;break;case 4:e=1130;g=580}if(b===4)switch(c){case 1:e=480;g=1040;break;case 2:e=480;g=850;break;case 3:e=750;g=920;break;case 4:e=780;g=680;break;case 5:e=1050;g=730;break;case 6:e=1E3;g=500}e=a.toScreenCoordinates(e,
CanvasManager.globalScale);g=a.toScreenCoordinates(g,CanvasManager.globalScale);e=e+a.currentXOffset;d.css({position:"absolute",top:g+"px",left:e+"px"});d.on("mousedown mouseup mouseleave",function(a){$(this).toggleClass("active",a.type==="mousedown")});d.clickExcl(function(){Sound.click();if(GameManager.company.maxStaff==1){GameManager.company.activeNotifications.insertAt(0,new Notification("Hint".localize(),"You have to complete the Staff Management training before you can hire someone. Simply {0} on your player character to access the training menu.".localize().format(Tutorial.getClickVerb())));
GameManager.showPendingNotifications()}else if(!UI.isStaffSearchInProgress()){GameManager.company.staff.length>1?Tutorial.hireMoreStaff():Tutorial.findStaff();UI.showFindStaffWindow(c)}window.event.cancelBubble=true});return d};a.createCharacterOverlay=function(b){var c=d.characterStage,e=new CharacterOverlay(b);a.positionCharacterOverlay(e,GameManager.company.currentLevel,b.slot);a.characterOverlays.push(e);a.addCharacterOverlayToStage(c,e);return e};a.addCharacterOverlayToStage=function(a,b){var c=
b.character.slot;if(c===0)a.addChild(b);else for(var d=0;d<a.children.length;d++)if(a.children[d].character)if(c===4||c===6||c===3||c===5){a.addChildAt(b,0);break}else if(c===1&&a.children[d].character.slot<1||c===2&&a.children[d].character.slot<4||c===3&&a.children[d].character.slot<2){a.addChildAt(b,d);break}else if(c>4){a.addChild(b);break}};a.refreshTrainingOverlays=function(){var b=$("#canvasContainer");b.find(".trainingOverlayTemplate").remove();for(var c=0;c<a.characterOverlays.length;c++){var d=
a.characterOverlays[c],e=$("#trainingOverlayTemplate").clone();e.removeAttr("id");var g=GameFlags.IS_LOW_RES?-30:0;e.css({position:"absolute",top:d.y-VisualsManager.toScreenCoordinates(120,CanvasManager.globalScale)+"px",left:d.x-VisualsManager.toScreenCoordinates(60,CanvasManager.globalScale)+g+"px",transform:"scale({0},{0})".format(CanvasManager.globalScaleIgnoringLowResBackground)});d.trainingOverlay=e;b.append(e);e.hide();d.resumeTraining()}}})();
(function(){var a=VisualsManager,d=[];a.refreshLabCrew=function(){d&&(d.forEach(function(a){a.parent.removeChild(a)}),d=[]);g();f();4==GameManager.company.currentLevel&&a._zoneChanged(GameManager.company.flags.currentZone,!1)};var c=function(a){var b=$("#projectStatusCardTemplate").clone();b[0].id=void 0;b.find(".projectBudgetSlider").slider({orientation:"horizontal",range:"min",min:0,max:100,value:a,animate:"fast",slide:function(a,c){var d=$(c.handle).closest(".projectBudgetSlider");if(!d.hasClass("projectBudgetSlider"))throw"couldn't find target slider";
b._gd_sliderValue=c.value;d.slider("value",c.value);d=c.value;b.hasClass("rndCard")?GameManager.company.flags.rndBudget=d/100:GameManager.company.flags.hwBudget=d/100;l(b)}});return b},b,g=function(){var g=GameManager.company;if(!b){var f=g.flags.hwBudget;void 0==f&&(f=0);b=c(100*f);b.addClass("projectCardLeft").addClass("hwCard");b.find(".projectCardLabel").text("Hardware lab".localize());b.clickExcl(function(){a.scrollToZone(0,!0)});b.insertBefore("#consoleMaintenanceContainer");b._gd_projectVisible=
!0}if(4>g.currentLevel||!g.flags.hwLabUnlocked)b.hide();else{b.show();l(b,GameManager.currentHwProject);g.hwCrew||(g.hwCrew=[]);for(var h=g.hwCrew,j=GameManager.getMaxHwBudget(),f=CanvasManager.leftScreen.characterStage,q=[],o=0;12>=o;o++){h.length<o+1&&(h.push(new ProjectWorkerVisual),h[o].zone=0,h[o].setPosition(o),h[o].loadAnimations());var s=h[o];s.getCurrentProject=function(){return GameManager.currentHwProject};(function(a,b){a.getAffordanceFactor=function(){return e(j*g.flags.hwBudget,b)}})(s,
j/12*(o+1));3==o||7==o?q.push(s):(f.addChild(s),d.push(s))}o=0;for(h=q.length;o<h;o++)f.addChild(q[o]),d.push(q[o]);a.putConsoleToPedestal()}};a.putConsoleToPedestal=function(){var b=GameManager.company;if(4===b.currentLevel&&b.flags.hwLabUnlocked){a.consoleContainer&&CanvasManager.leftScreen.backgroundOverlayStage.contains(a.consoleContainer)&&CanvasManager.leftScreen.backgroundOverlayStage.removeChild(a.consoleContainer);var c=void 0,d=void 0;if(GameManager.currentHwProject&&"custom console"===
GameManager.currentHwProject.id)c={iconUri:GameManager.currentHwProject.iconUri};else if(d=b.licencedPlatforms.filter(function(a){return a.isCustom}),d.length)c=d.last();else if((d=b.currentGame)&&0<d.platforms.length&&"PC"!=d.platforms[0].id&&"G64"!=d.platforms[0].id&&"Gameling"!=d.platforms[0].id&&"Vena Gear"!=d.platforms[0].id&&"PPS"!=d.platforms[0].id&&"GS"!=d.platforms[0].id&&"grPhone"!=d.platforms[0].id)c=b.currentGame.platforms[0];else for(d=b.gameLog.length-1;0<d;d--){var e=b.gameLog[d].platforms;
if("PC"!=e[0].id&&"G64"!=e[0].id&&"Gameling"!=e[0].id&&"Vena Gear"!=e[0].id&&"PPS"!=e[0].id&&"GS"!=e[0].id&&"grPhone"!=e[0].id){c=e[0];break}}c&&(d=Platforms.getPlatformImage(c,b.currentWeek),b=new createjs.Bitmap(d),c=new createjs.Container,d=CanvasManager.globalScale,c.scaleX=0.45*d,c.scaleY=0.45*d,c.x=2230*d,c.y=1104*d,c.addChild(b),a.consoleContainer=c,CanvasManager.leftScreen.backgroundOverlayStage.addChild(a.consoleContainer))}};var e=function(a,b){if(0===a)return-4;var c=a/b;1>c&&(c=-1+c);
return c},h,f=function(){var b=GameManager.company;if(!h){var g=b.flags.rndBudget;void 0==g&&(g=0);h=c(100*g);h.addClass("projectCardRight").addClass("rndCard");h.find(".projectCardLabel").text("R&D lab".localize());h.clickExcl(function(){a.scrollToZone(2,!0)});$("#gameUIContainer").append(h);h._gd_projectVisible=!0}if(4>GameManager.company.currentLevel||!b.flags.rndLabUnlocked)h.hide();else{h.show();l(h,GameManager.currentRnDProject);b.rndCrew||(b.rndCrew=[]);for(var f=b.rndCrew,j=GameManager.getMaxRndBudget(),
g=CanvasManager.rightScreen.characterStage,q=[],o=0;12>=o;o++){f.length<o+1&&(f.push(new ProjectWorkerVisual),f[o].zone=2,f[o].setPosition(o),f[o].loadAnimations());var s=f[o];s.getCurrentProject=function(){return GameManager.currentRnDProject};(function(a,c){a.getAffordanceFactor=function(){return e(j*b.flags.rndBudget,c)}})(s,j/12*(o+1));5===o||7===o?q.push(s):(g.addChild(s),d.push(s))}o=0;for(f=q.length;o<f;o++)g.addChild(q[o]),d.push(q[o])}};a._zoneChanged=function(a,c){var d=c?"normal":0;CanvasManager.zone0Activ=
0===a;CanvasManager.zone1Activ=1===a;CanvasManager.zone2Activ=2===a;2!=a&&h&&(h.find(".projectBudgetSlider").slideUp(d),h.find(".projectCardLabel").slideDown(d));2==a&&h&&(h.find(".projectBudgetSlider").slideDown(d),h.find(".projectCardLabel").slideUp(d));0!=a&&b&&(b.find(".projectBudgetSlider").slideUp(d),b.find(".projectCardLabel").slideDown(d));0==a&&b&&(b.find(".projectBudgetSlider").slideDown(d),b.find(".projectCardLabel").slideUp(d));j();2==a?Media.enterRndLab(GameManager.company):0==a&&Media.enterHwLab(GameManager.company)};
var j=function(){var a=CanvasManager.isSmallScreen;if(h){var c=a&&GameManager.currentRnDProject;c&&!h.hasClass("small")?h.addClass("small"):!c&&h.hasClass("small")&&h.removeClass("small")}b&&((c=a&&GameManager.currentHwProject)&&!b.hasClass("small")?b.addClass("small"):!c&&b.hasClass("small")&&b.removeClass("small"))},l=function(a){if(a){var b=GameManager.company;if(b){var c=100*b.flags.hwBudget,d=GameManager.getLabCostPerMonth(0),e=GameManager.currentHwProject;a.hasClass("rndCard")&&(e=GameManager.currentRnDProject,
d=GameManager.getLabCostPerMonth(2),c=100*b.flags.rndBudget);if(!e&&a._gd_projectVisible)a.find(".projectStatusContainer").slideUp(),a._gd_projectVisible=!1;else if(e&&(a._gd_projectVisible||(a.find(".projectStatusContainer").slideDown(),a._gd_projectVisible=!0),a._gd_iconUrl!=e.iconUri&&(a.find(".projectIcon").attr("src",e.iconUri),a._gd_iconUrl=e.iconUri),a._gd_title!=e.name&&(a.find(".projectTitle").empty().append($("<span>{0}</span>".format(e.name))).textfill(),a._gd_title=e.name),a._gd_progress!=
e.progress&&(a.find(".projectProgress").stop().transit({width:100*e.progress+"%"}),a._gd_progress=e.progress),a._gd_pointsRemaining!=e.remainingPoints))a.find(".projectPointsRemaining").text(e.startPoints-e.remainingPoints),a._gd_pointsRemaining=e.remainingPoints;a._gd_budget!==d&&(a.find(".projectBudgetValue").text("{0} per month".localize().format(UI.getShortNumberString(d))),a._gd_budget=d);Math.round(a._gd_sliderValue)!=Math.round(c)&&(a.find(".projectBudgetSlider").slider({value:c}),a._gd_sliderValue=
c);j()}}};a.updateProjectStatusCards=function(){GameManager.company.flags.hwLabUnlocked&&l(b);GameManager.company.flags.rndLabUnlocked&&l(h)}})();var WindowsIntegration={};
(function(){if(PlatformShim.ISWIN8){var a=WindowsIntegration,d=Windows.UI.Notifications.BadgeUpdateManager.createBadgeUpdaterForApplication(),c="Player";Windows.System.UserProfile.UserInformation.getDisplayNameAsync().then(function(a){c=a});a.goToReviewPage=function(){var a=new Windows.Foundation.Uri("ms-windows-store:REVIEW?PFN={0}".format(Windows.ApplicationModel.Package.current.id.familyName));Windows.System.Launcher.launchUriAsync(a).done()};a.getUserName=function(){return c};$(document).ready(function(){$(document).find("#resumeCommandButton").hide();
$(document).find("#gamePausedOverlay").hide()});a.onPause=function(){d.clear();var a=new Windows.Data.Xml.Dom.XmlDocument;a.loadXml('<badge version="1" value="paused"/>');d.update(new Windows.UI.Notifications.BadgeNotification(a));$(document).find("#pauseCommandButton").hide();$(document).find("#gamePausedOverlay").css({opacity:0}).show().transit({opacity:1});$(document).find("#resumeCommandButton").show()};a.onResume=function(){var a=new Windows.Data.Xml.Dom.XmlDocument;a.loadXml('<badge version="1" value="none"/>');
d.update(new Windows.UI.Notifications.BadgeNotification(a));$(document).find("#pauseCommandButton").show();$(document).find("#gamePausedOverlay").transit({opacity:0});$(document).find("#resumeCommandButton").hide()};var b=new Windows.Devices.Input.TouchCapabilities;a.isTouchCapable=b.touchPresent;var g=Windows.UI.Notifications.TileUpdateManager.createTileUpdaterForApplication();a.updateTile=function(){var a=Windows.UI.Notifications.TileUpdateManager.getTemplateContent(Windows.UI.Notifications.TileTemplateType.tileWideText01);
if(!GameManager.company||0>=GameManager.company.gameLog.length)g.clear();else{var b=GameManager.company,c=b.getBestSeller();c&&(c=c.title);for(var d=a.getElementsByTagName("text"),b=[b.name,UI.getShortNumberString(b.cash)+" cash",UI.getShortNumberString(b.fans)+" fans","Bestseller: "+c.title],c=0;c<d.length;c++)d[c].appendChild(a.createTextNode(b[c]));a=new Windows.UI.Notifications.TileNotification(a);g.update(a)}};var e=function(a,b,c,d,e){e||(e=10);do{var g=b.format(c),g=new createjs.Text(a,g,"black");
c--}while(g.getMeasuredWidth()>d&&c>e);return c},h,f,j=function(a){var b=GameManager.company;if(b&&0!==b.gameLog.length){var c=document.createElement("canvas");c.width=558;c.height=270;h||(h=$('<img src="/images/active-tile.png" />'));var d=function(){var d=c.getContext("2d");d.drawImage(h[0],0,0);d.textAlign="center";var g=e(b.name,"bold {0}pt Segoe UI",40,300);d.fillStyle="black";d.font="bold {0}pt Segoe UI".format(g);d.fillText(b.name,370,50);var f=b.gameLog.slice().sort(function(a,b){return b.unitsSold-
a.unitsSold}).first().title,g=e(f,"bold {0}pt Segoe UI",22,250);d.font="bold {0}pt Segoe UI".format(g);d.fillText(f,370,90);f=UI.getShortNumberString(b.fans)+" fans";g=e(f,"bold {0}pt Segoe UI",40,290);d.font="bold {0}pt Segoe UI".format(g);d.fillText(f,370,160);f=UI.getShortNumberString(b.cash)+" cash";g=e(f,"bold {0}pt Segoe UI",32,250);d.font="bold {0}pt Segoe UI".format(g);d.fillText(f,370,210);f="{0} Achievements unlocked!".format(Achievements.getAllItems().count(function(a){return Achievements.hasAchieved(a)}));
g=e(f,"bold {0}pt Segoe UI",17,250);d.font="bold {0}pt Segoe UI".format(g);d.fillText(f,370,250);DataStore.saveCanvasToFile(c,"active-tile.png",a)};h.complete?d():h.load(function(){h.complete=!0;d()})}};a.updateImageTile=function(){if(!f){f=!0;try{j(function(){try{var a=Windows.UI.Notifications.TileUpdateManager.getTemplateContent(Windows.UI.Notifications.TileTemplateType.tileWideImage),b=a.getElementsByTagName("image");b[0].setAttribute("src","ms-appdata:///images/logo-wide.png");var c=new Windows.UI.Notifications.TileNotification(a);
l.update(c);b[0].setAttribute("src","ms-appdata:///local/active-tile.png");c=new Windows.UI.Notifications.TileNotification(a);l.update(c)}catch(d){Logger.LogInfo("game tile update failed",d)}f=!1})}catch(a){Logger.LogInfo("game tile update failed",a)}}};var l=Windows.UI.Notifications.TileUpdateManager.createTileUpdaterForApplication();a.showGetSteamKey=function(){var a=document.getElementById("steamkey");a.lastElementChild.innerText="Get Steam Key".localize();a.disabled=!1};a.getSteamkey=function(){Windows.ApplicationModel.Store.CurrentApp.getAppReceiptAsync().done(function(a){a=
encodeURIComponent(a);PlatformShim.xhr({type:"POST",url:"http://customers.greenheartgames.com/winstore",headers:{"Content-type":"application/x-www-form-urlencoded"},data:"data="+a},function(a){if(!a||!a.responseText)WindowsIntegration.showGetSteamKey(),Logger.LogError("No response from server.",null,"No response from server. Please try again later.".localize());else if("INVALID"==a.responseText)WindowsIntegration.showGetSteamKey(),Logger.LogError("Could not verify app receipt",null,"Could not verify app receipt from Windows Store.".localize());
else try{try{var b=new Windows.Foundation.Uri(a.responseText)}catch(c){WindowsIntegration.showGetSteamKey();PlatformShim.alert(a.responseText,"Response");return}Windows.System.Launcher.launchUriAsync(b).done();WindowsIntegration.showGetSteamKey()}catch(d){WindowsIntegration.showGetSteamKey(),Logger.LogError("Invalid response: "+a.responseText,d,"Could not verify app receipt from Windows Store.".localize())}},function(a){WindowsIntegration.showGetSteamKey();Logger.LogError("Could not verify app receipt",
null,"Could not verify app receipt from Windows Store.".localize()+"\n"+a.statusText)})},function(a){WindowsIntegration.showGetSteamKey();Logger.LogError("Could not get app receipt",null,"Could not get app receipt from Windows Store.".localize()+"\n"+a.statusText)})}}})();var Tutorial={};
(function(){var a=DataStore.settings.tutorialSettings;a||(a={"tutorials-shown":[]},DataStore.settings.tutorialSettings=a);var d=function(b){if(GameFlags.TUTORIAL_DISABLED)return false;if(GameManager.company.flags.skipTutorials&&a["tutorials-shown"].indexOf(b)!=-1){c(b);return false}return GameManager.company.tutorialMessagesShown.indexOf(b)==-1},c=function(b){GameManager.company.tutorialMessagesShown.indexOf(b)==-1&&GameManager.company.tutorialMessagesShown.push(b);a["tutorials-shown"].indexOf(b)==
-1&&a["tutorials-shown"].push(b)};Tutorial.canSkipStartTutorial=function(){var b=a["tutorials-shown"];if(b.length==0){var b=[],c=DataStore.getValue("tutorials-stage1-count");c==void 0&&(c=0);if(c>=1){b=["createdCompany","createGame","gamePoints","firstGameFinished","devPhases","gameReleased","gameDevCompleted","firstSales"];a["tutorials-shown"]=b}}return b!=void 0&&b.length>0};Tutorial.skipShownTutorials=function(){GameManager.company.flags.skipTutorials=true};var b=function(a,b,e){var g=a.id,a=a.msg;
if(d(g)){b||(b=0);b=new Notification("Tutorial".localize(),a,"OK".localize(),b);if(e)b.image=e;GameManager.company.notifications.push(b);c(g)}},g=WindowsIntegration.isTouchCapable?"tap".localize("verb"):"click".localize("verb");Tutorial.getClickVerb=function(){return g};Tutorial.messages={};var e=Tutorial.messages,h=function(a,b,c){this.id=a;this.heading=b;this.msg=c};Tutorial.getAllShownMessages=function(a){for(var b=[],c=0;c<a.tutorialMessagesShown.length;c++){var d=a.tutorialMessagesShown[c];e.hasOwnProperty(d)&&
b.push(e[d])}return b};e.createdCompany=new h("createdCompany","Create a company".localize("heading"),"Congratulations!\nYou've just started your very own game development company!\nAt the moment your office is in a garage and you are the only employee but don't worry, many successful businesses have started out this way!{n}Let's start developing your first game.\nClose this message and then {0} anywhere on the screen to bring up the action menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));
Tutorial.createdCompany=function(){b(e.createdCompany)};e.createGame=new h("createGame","Create a game".localize("heading"),"Before development can begin you have to decide what kind of game you want to create and give your game a name.\nYou can also select which graphic technology your game should use.{n}Your options are initially limited but once you have a bit of experience you will be able to unlock new options.".localize());Tutorial.createGame=function(){b(e.createGame)};Tutorial.createSequel=
function(){};e.gamePoints=new h("gamePoints","Game points".localize("heading"),"Game development has now started.{n}While developing your game you will generate game points which you can see bubbling up.\nGame points are divided into design points and technology points. The more points you generate the better the game will be.{n}From time to time there will also be bug points generated. These points become less likely once you gain experience. Bugs should be fixed before the game is released and increase development time and cost.".localize());
Tutorial.gamePoints=function(){b(e.gamePoints)};e.firstGameFinished=new h("firstGameFinished","First game finished".localize("heading"),"After publishing a game you can invest a little bit of time to analyze your creation and generate a game report. Game reports are a great way to gain research points as well as valuable insights into what works and what doesn't work when developing a game.{n}To generate a game report close this message and then {0} anywhere on the screen to bring up the action menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));
Tutorial.firstGameFinished=function(a){b(e.firstGameFinished,a)};var f=WindowsIntegration.isTouchCapable?"swipe from the edge of the screen to bring up the app bar".localize("appbar fragment"):"right click to bring up the app bar".localize("appbar fragment"),j=WindowsIntegration.isTouchCapable?"swipe from the right edge of the screen".localize("charmsbar fragment"):"bring your cursor to the top right corner of the screen and then move down.".localize("charmsbar fragment");e.appbarAndHelpWin8=new h("appbarAndHelp",
"Appbar and help menu".localize("heading"),"If you ever want to review the tutorial messages then you can do so in the Help menu. To access the Help menu and other features such as saving, loading and creating a game simply {0}.{n}You can also change game settings by using the Settings charm. To show the charms bar simply {1} You can then {2} on Settings.".localize("{0} is appbar fragment, {1} is charmsbar fragment, {2} is click/tap verb").format(f,j,Tutorial.getClickVerb()));e.mainMenu=new h("mainMenu",
"Main Menu".localize("heading"),"If you ever want to review the tutorial messages then you can do so in the Help menu. To access the Help menu and other features such as saving, loading and creating a game simply press ESC to access the main menu.");Tutorial.AppbarAndHelp=function(){PlatformShim.ISWIN8?b(e.appbarAndHelpWin8):b(e.mainMenu)};e.contractsUnlocked=new h("contractsUnlocked","Contracts unlocked".localize("heading"),"Contracts have now been unlocked.\nTo see available contracts close this message and then {0} anywhere on the screen to bring up the action menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));
Tutorial.contractsUnlocked=function(a){b(e.contractsUnlocked,a)};e.contracts=new h("contracts","Contracts".localize(),"Contracts are a useful tool to earn some extra cash when your balance is low and can also be useful to generate a small number of research points.\nContracts require you to generate a certain amount of design and technology points before the time runs out.{n}Decide carefully what contract you accept. If you miss the deadline for a contract you will have to pay a penalty so it's better to start out with smaller contracts and see how much you can handle.".localize());
Tutorial.contracts=function(){b(e.contracts)};e.gameReleased=new h("gameReleased","Game released".localize("heading"),"Your game is now complete and will be handed off to publishing.\nWe should see reviews and sales coming in for the game soon!".localize());Tutorial.gameReleased=function(){b(e.gameReleased)};e.gameDevCompleted=new h("gameDevCompleted","Game development completed".localize("heading"),"The development of your game has now finished. While developing games you gain experience and improve your skills.\nWhen development is completed you will be presented with a summary of the experience gained.".localize());
Tutorial.gameDevCompleted=function(a){b(e.gameDevCompleted,a)};e.firstSales=new h("firstSales","First sales".localize("heading"),"Now that your game is on sale you will receive the income from the game every week.\nYou can see how well your game is doing by looking at the sales graph in the top right of the screen.".localize());Tutorial.firstSales=function(){b(e.firstSales,0.1)};e.researchMenu=new h("researchMenu","Research".localize("heading"),"Research is important to unlock new options and make better games.\nYou should try to save enough research points to be able to create your own game engine.\nThis will greatly improve your games.{n}Hint: Try to develop games with different topic and genre combinations for a slight research boost.".localize());
Tutorial.researchMenu=function(){b(e.researchMenu)};e.devPhases=new h("devPhases","Development phases".localize("heading"),"Game development runs through three stages. At the beginning of each stage you can decide what areas of the game you want to focus on.\nPicking the right focus for your game greatly increases the points you generate.{n}Think about what areas are important for your game and decrease the focus on areas you think are less important. If you want to read a brief description of the different areas please refer to the Help menu.".localize());
Tutorial.devPhases=function(a){b(e.devPhases,a)};e.researchedCustomEngine=new h("researchedCustomEngine","Research custom engine".localize("heading"),"Now you can create your own game engines.\nTo get started close this message and {0} anywhere to bring up the action menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));Tutorial.researchedCustomEngine=function(){b(e.researchedCustomEngine)};e.researchedEnginePart=new h("researchedEnginePart","Research engine part".localize("heading"),
"You have just researched your first engine part.\nTo be able to use this in your games you need to create a new engine which includes this part.".localize());Tutorial.researchedEnginePart=function(){b(e.researchedEnginePart)};e.creatingEngine=new h("creatingEngine","Creating engine".localize("heading"),"You are now creating your own custom game engine.\n\nOnce the engine is finished you will be able to use it when creating new games.".localize());Tutorial.creatingEngine=function(){b(e.creatingEngine,
0.5)};e.targetAudience=new h("targetAudience","Target audience".localize("heading"),"You can now specify what your main target audience is for your game. Games can be targeted at young people, at everyone or at more mature audiences.{n}Picking the right target audience for your game is important. Your target platform can also play a role. Some platforms are especially popular with a specific audience.".localize());Tutorial.targetAudience=function(){b(e.targetAudience)};e.marketingUnlocked=new h("marketingUnlocked",
"Marketing Unlocked".localize("heading"),"You've successfully unlocked marketing. You can access marketing options in the action menu but only while a game is in development.".localize());Tutorial.marketingUnlocked=function(){b(e.marketingUnlocked)};e.marketing=new h("marketing","Marketing".localize(),"Marketing can be very effective to reach more potential customers but it can be very expensive too. It is best to experiment carefully with marketing to get a feel for what works best. Don't invest too much and remember that timing is important. Don't invest in your marketing efforts too early in development or too late.{n}It is also important to know that no matter how much money you pump into marketing, it will not make a bad game successful. To the contrary, it can even hurt to market bad games too much as it can upset your existing fans.".localize());
Tutorial.marketing=function(a){b(e.marketing,a)};e.hypePoints=new h("hypePoints","Hype points".localize("heading"),"Developing a great game is not the only recipe for success. It is essential to build hype to ensure that players are excited about your game.{n}In the beginning of your career, hype is mostly generated through random events but once you gain more experience you can use marketing and other strategies to generate hype.".localize());Tutorial.hypePoints=function(){b(e.hypePoints)};e.level2=
new h("level2","Level 2".localize("heading"),"You now may also train yourself and your staff to improve skills.\nLet's try this by completing a management course which is required before you can hire your first employee.{n}To get started close this message and then {0} on your character to bring up the training menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));Tutorial.level2=function(){b(e.level2,0.3)};e.firstEngine=new h("firstEngine","First engine".localize("heading"),"Congratulations! Your first custom game engine is now ready.\nYou should try using it in your next game.".localize());
Tutorial.firstEngine=function(){b(e.firstEngine)};e.findStaff=new h("findStaff","Finding staff".localize("heading"),"Before you can hire someone you have to advertise the open position, set an advertising budget and decide how you want to test your applicants.{n}A high budget will increase the number of applicants and the different tests will help find people with the right balance of design and technology skills.".localize());Tutorial.findStaff=function(){b(e.findStaff)};e.needsAHoliday=new h("needsAHoliday",
"Staff vacation".localize("heading"),"From time to time your employees need to recharge their batteries and go on vacation. You can tell that an employee is in need of rest when their efficiency steadily decreases.{n}To give them a holiday just {0} on them and select Send on Vacation".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));Tutorial.needsAHoliday=function(){b(e.needsAHoliday,0.3)};e.hireStaff=new h("hireStaff","Hiring staff".localize("heading"),"The search for the open position is complete!\nYou can now review the list of applicants and hire someone for this position.{n}Don't forget that you can always train your employees to improve their skills.".localize());
Tutorial.hiringStaff=function(a){if(d("hireStaff")){b(e.hireStaff,a);Media.createLevel2OfficeStory()}};e.staffHired=new h("staffHired","Staff hired".localize("heading"),"Congratulations on your first hire!\nNew employees have to settle in before they become fully effective.\nWhen a character is not fully efficient you can see an efficiency bar next to them. This bar will fill up slowly over time.{n}It is usually a good idea to give your new staff a Welcome training to get them up to speed quickly.\nThis will maximize their efficiency way faster than normally.\nTo do this close this message and then {0} on the character to bring up the action menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));
Tutorial.staffHired=function(){d("staffHired")&&b(e.staffHired)};e.hireMoreStaff=new h("hireMoreStaff","Hiring more staff".localize("heading"),"You can hire up to four employees in this office. Don't try to hire everyone at once as staff are expensive.\nMany rookies hire too early and go bankrupt.\nIt is best to take it slow.".localize());Tutorial.hireMoreStaff=function(){b(e.hireMoreStaff)};e.boosts=new h("boosts","Boosts".localize("heading"),"Boosts are a powerful tool that allow you to temporarily increase the output of your staff.\nThey are most effective when timed strategically during the development of a game or during training.{n}Boosts need to recharge before you can use them. You can activate a boost as soon as the recharge progress is complete but you can also wait a little longer to further increase the effectiveness of the boost.".localize());
Tutorial.boosts=function(){b(e.boosts,0.3,"./images/misc/boost.png")};e.additionalFeatures=new h("additionalFeatures","Additional game features".localize("heading"),"During development you can also select additional features for your game. Right now you can only pick 'Basic Sounds' but your options will increase quickly. Selecting additional features makes the game generally better but also increases its cost.{n}You will also see the graphic type you selected when you defined the game. This is just to remind you of your choice. You cannot change the type of graphics mid-game.".localize());
Tutorial.additionalFeatures=function(a){b(e.additionalFeatures,a)};e.finishingPhase=new h("finishingPhase","Finishing phase".localize("heading"),"The development of your first game is now complete. You can press the 'Finish' button to publish your game but you should only do that once you fix the majority of bugs.{n}Releasing a game without fixing bugs can severely affect your ratings so you should only ever consider that if you need the cash and you can't afford to wait.".localize());Tutorial.finishingPhase=
function(a){b(e.finishingPhase,a)};e.training=new h("training","Training".localize("heading"),"If you want to create hit-games and have a world class team then training is important.\n For best results train your staff regularly but don't overwhelm them with too many sessions at once.{n}There are different training options available.\nSome options are better to increase certain skills than others. Experimenting is the best way to figure out which training options fit your plans.\nIt is useful to have a mix of 'specialists' and allrounders in your team but aim to have at least one design specialist and technology specialist.".localize());
Tutorial.training=function(){b(e.training)};e.staffReachedLvl5=new h("staffReachedLvl5","Level 5 unlocks".localize("heading"),"Someone on your team has reached experience level 5! This unlocks a special training item called Boost. The training for it is expensive and you can only do it once the character has at least 500 design or technology points but the investment is well worth it.{n}Once trained, the boost allows you to temporarily increase the output of your staff and can really help you to make a hit-game.".localize());
Tutorial.staffReachedLvl5=function(){b(e.staffReachedLvl5)};e.publishers=new h("publishers","Publishers".localize("heading"),"Using a publisher is a great way to get your games in front of a large audience which in turns helps to grow your fan base.\nOnce your fan base is big enough you can self-publish your larger games without the need for a publisher.\nFor medium games you should aim to have at least 100K fans before you publish them yourself.{n}To use a publisher you need to sign a contract. The contract will dictate what game you need to create. Pay attention to all the details, most importantly the minimum score that the contract dictates. If the game you release does not meet the minimum score you will have to pay a penalty, which can be costly.{n}It is also important to pay attention to the royalty rate. The higher the rate the more money you will make from the contract.".localize());
Tutorial.publishers=function(){b(e.publishers)};e.staffResponsibility=new h("staffResponsibility","Staff responsibilities".localize("heading"),"Creating larger games is a significant task and, unlike in small games, one person cannot effectively be responsible for every aspect of a game.\nTo create a good game and to make best use of your team you will have to assign which of your team is responsible for which areas.{n}Pick team members whose skills match the area to get the best result.\nWhen you assign a team member responsibilities you will see their workload. Try not to overload them too much.".localize());
Tutorial.staffResponsibility=function(a){b(e.staffResponsibility,a)};e.designSpecialist=new h("designSpecialist","Design specialist".localize("heading"),"You need a design specialist to open a research and development lab. You can train someone to become a specialist via the training menu but the option is only available once they have a certain design skill level.{n}You can also train technology specialists which come in handy for later options.".localize());Tutorial.designSpecialist=function(a){b(e.designSpecialist,
a)};e.rndLabReady=new h("rndLabReady","R&D lab is ready".localize("heading"),"To visit the lab simply {0} the screen and drag to the left or use the arrow keys on the keyboard. Alternatively, you can also click on the little R&D Lab information card in the bottom right of the screen.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));Tutorial.rndLabReady=function(){b(e.rndLabReady)};e.rndLab=new h("rndLab","R&D lab".localize(),"To start a project simply {0} the screen to bring up the research menu.\nOnce you start a project you can also cancel it using the same menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));
Tutorial.rndLab=function(a){b(e.rndLab,a)};e.hwLabReady=new h("hwLabReady","Hardware lab is ready".localize("heading"),"To visit the hardware lab simply {0} the screen and drag to the right or use the arrow keys on the keyboard. Alternatively, you can also click on the little Hardware Lab information card in the top left of the screen.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));Tutorial.hwLabReady=function(){b(e.hwLabReady)};e.rndProjectStarted=new h("rndProjectStarted","R&D project started".localize("heading"),
"The project is now started and as your researchers work on it you will see the progress in the status card. Don't forget to adjust the budget! If the budget is 0 the project will never progress.".localize());Tutorial.rndProjectStarted=function(){b(e.rndProjectStarted)};e.consoleDev=new h("consoleDev","Console Development".localize(),"Developing your own console is a very costly undertaking. Not only do you have to pay a big chunk of money up front for the project but you will also have to pay your hardware lab crew. Only attempt to create a console if you are confident that you have enough capital.{n}When developing a console you can decide on how your console will look like and decide on the technical features as well as the quality assurance budget. The more sophisticated your technology is the better the console will fare against competing products. The more budget you reserve for QA the better the quality of your console will be.".localize());
Tutorial.devConsole=function(){b(e.consoleDev)};e.consoleReleased=new h("consoleReleased","Console released".localize("heading"),"Your very own game console is now on the market. Game consoles are complex machines and when you sell a lot of them it is only natural that some of them need to be repaired.{n}While your console is on sale your hardware team will have to work off maintenance points. Depending on the quality of the console and how many you sell these points vary from week to week.{n}Try to give your hardware lab enough budget so that they stay on top of the maintenance, otherwise customers will become unhappy when they have to wait too long for their consoles to be repaired. You can see how well your team is doing in the console information card in the top left of the screen.".localize());
Tutorial.consoleReleased=function(a){b(e.consoleReleased,a)};e.mmoOnSale=new h("mmoOnSale","MMO on sale".localize("heading"),"Your MMO is on sale now. MMOs work slightly different than normal games. MMOs not only generate income but also cause maintenance costs as we need to run game servers and provide customer services. You will see the amount of maintenance paid in the sales card.{n}Unlike other games which have a limited sales duration MMOs sell indefinitely. You will have to decide yourself when you want to take an MMO off the market. To take an MMO off the market simply {0} on the sales card to bring up a menu.{n}Since MMOs are so expensive to create you might want to try to expand your current MMO rather than create a new one. To do this you will need to create a expansion pack, which you can start to research now.".localize().format(Tutorial.getClickVerb()));
Tutorial.mmoOnSale=function(a){b(e.mmoOnSale,a)};e.additionalSpecialists=new h("additionalSpecialists","Additional Specialists".localize("heading"),"While you only need one specialist to start running a lab you can train more than one. Additional specialists decrease the overall running cost of your lab.".localize());Tutorial.additionalSpecialists=function(a){b(e.additionalSpecialists,a)};e.missionHints=new h("missionHints","Hints".localize("heading"),"While generating game reports you start to gain insights into the development process and learn about what works well and what doesn't work so well.\nThese insights are shown as hints on the development screen (unless you have turned this option off in the settings).{n}The hints range from '+++' to '--' and indicate how important an area is for this type of game. When hints have a question mark at the end (e.g. '+++?') it means that you have insights from a game in the same genre but that you are not yet sure whether this holds true for this particular genre/topic combination.".localize());
Tutorial.missionHints=function(a){b(e.missionHints,a)};e.gameReportComplete=new h("gameReportComplete","Game Reports".localize("heading"),"Game reports are a great way to gain more research points and new insights. It pays off to generate a report for each game you release.\nNow that you've completed your first game report it's a good idea to look at the research menu.\nTo open the research menu close this message and then {0} anywhere on the screen to bring up the action menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));
Tutorial.gameReportComplete=function(a){b(e.gameReportComplete,a)}})();var Research={};
(function(){var a=Research;a.FACTOR_FOR_NEW_COMBINATIONS=2;a.TOPICS_VISIBLE=4;var d="General",c="General".localize(),b="general";a.ResearchTopicItem={id:"New Topic",name:"New Topic",pointsCost:10,duration:1E4,category:d,categoryDisplayName:c};a.CustomEngine={id:"Custom Engine",name:"Custom Game Engine",pointsCost:50,duration:15E3,category:d,categoryDisplayName:c};a.BasicItems=[a.ResearchTopicItem,a.CustomEngine];a.checkForNewResearch=function(){for(var b=[],c=GameManager.company,d=this.getAllItems().except(Research.StartEngineParts.concat(c.researchCompleted.concat(c.availableResearch).concat(General.getAvailableEngineParts(c)))),
g=0;g<d.length;g++){var l=d[g];void 0!=l.canResearch&&l.canResearch(c)&&(l.v&&c.canDevelopEngine()||!l.v)&&-1==b.indexOf(l)&&b.push(l)}if(0<b.length){d="New research available:".localize();for(g=0;g<b.length;g++)l=b[g],c.availableResearch.push(l),d+="\n"+l.name;b=new Notification("New Research!".localize("heading"),d);b.sound="research";c.notifications.push(b)}a._checkForNewLabResearch&&a._checkForNewLabResearch(c)};d="Graphic";c="Graphic".localize();b="graphic-type";a.textGraphics={id:"Text Based",
name:"Text based".localize(),devCost:2E3,v:1,techLevel:0,category:d,categoryDisplayName:c,group:b};var g="2D Graphics V{0}".localize();a.TwoDGraphicsV1={id:"2D Graphics V1",name:g.format(1),engineCost:1E4,devCost:15E3,v:2,canResearch:function(){return!1},category:d,categoryDisplayName:c,group:b,consolePart:!0,techLevel:1};a.TwoDGraphicsV2={id:"2D Graphics V2",name:g.format(2),v:4,canResearch:function(){return!1},category:d,categoryDisplayName:c,group:b,consolePart:!0,techLevel:2,showXPGain:!0};a.TwoDGraphicsV3=
{id:"2D Graphics V3",name:g.format(3),v:6,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,"2D Graphics V2")},category:d,categoryDisplayName:c,group:b,consolePart:!0,techLevel:2,showXPGain:!0};a.TwoDGraphicsV4={id:"2D Graphics V4",name:g.format(4),v:8,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,"2D Graphics V3")},category:d,categoryDisplayName:c,group:b,consolePart:!0,techLevel:3,showXPGain:!0};a.TwoDGraphicsV5={id:"2D Graphics V5",name:g.format(5),v:10,canResearch:function(a){return 2<
LevelCalculator.getFeatureLevel(a,"2D Graphics V4")},category:d,categoryDisplayName:c,group:b,consolePart:!0,techLevel:3,showXPGain:!0};g="3D Graphics V{0}".localize();a.ThreeDGraphicsV1={id:"3D Graphics V1",name:g.format(1),v:2,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,"2D Graphics V2")},category:d,categoryDisplayName:c,group:b,consolePart:!0,techLevel:1,showXPGain:!0};a.ThreeDGraphicsV2={id:"3D Graphics V2",name:g.format(2),v:4,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,
"3D Graphics V1")},category:d,categoryDisplayName:c,group:b,consolePart:!0,techLevel:2,showXPGain:!0};a.ThreeDGraphicsV3={id:"3D Graphics V3",name:g.format(3),v:6,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,"3D Graphics V2")},category:d,categoryDisplayName:c,group:b,consolePart:!0,techLevel:3,showXPGain:!0};a.ThreeDGraphicsV4={id:"3D Graphics V4",name:g.format(4),v:8,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,"3D Graphics V3")},category:d,categoryDisplayName:c,
group:b,consolePart:!0,techLevel:4,showXPGain:!0};a.ThreeDGraphicsV5={id:"3D Graphics V5",name:g.format(5),v:10,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,"3D Graphics V4")},category:d,categoryDisplayName:c,group:b,consolePart:!0,techLevel:5,showXPGain:!0};a.ThreeDGraphicsV6={id:"3D Graphics V6",name:g.format(6),v:12,canResearch:function(){return!1},category:d,categoryDisplayName:c,group:b,consolePart:!0,techLevel:6,showXPGain:!0};a.ThreeDGraphicsV7={id:"3D Graphics V7",name:g.format(7),
v:14,canResearch:function(){return!1},category:d,categoryDisplayName:c,group:b,consolePart:!0,techLevel:7,showXPGain:!0};a.stereoScopic3D={id:"Stereoscopic 3D",name:"Advanced Stereoscopic 3D".localize(),v:4,canResearch:function(){return 6<LevelCalculator.getMissionLevel("Graphic")},canUse:function(a){if(!a||!a.features)return!1;var b="3D Graphics V3;3D Graphics V4;3D Graphics V4;3D Graphics V5;3D Graphics V6;3D Graphics V7".split(";");return a.features.some(function(a){return-1!=b.indexOf(a.id)})},
category:d,categoryDisplayName:c,consolePart:!0};a.graphicItems=[a.textGraphics,a.TwoDGraphicsV1,a.TwoDGraphicsV2,a.TwoDGraphicsV3,a.TwoDGraphicsV4,a.TwoDGraphicsV5,a.ThreeDGraphicsV1,a.ThreeDGraphicsV2,a.ThreeDGraphicsV3,a.ThreeDGraphicsV4,a.ThreeDGraphicsV5,a.ThreeDGraphicsV6,a.ThreeDGraphicsV7,a.stereoScopic3D];d="Sound";c="Sound".localize();b="Sound";a.simpleSounds={id:"Basic Sound",name:"Basic sounds".localize(),devCost:1E3,v:1,category:d,categoryDisplayName:c,group:b};a.mono={id:"Mono sound",
name:"Mono sound".localize(),v:2,canResearch:function(a){return a.canDevelopEngine()&&1<LevelCalculator.getMissionLevel("Sound")},category:d,categoryDisplayName:c,group:b};a.stereo={id:"Stereo sound",name:"Stereo sound".localize(),v:4,canResearch:function(){return 3<LevelCalculator.getMissionLevel("Sound")},category:d,categoryDisplayName:c,group:b,consolePart:!0};a.soundTrack={id:"Soundtrack",name:"Soundtrack".localize(),v:4,canResearch:function(){return 4<LevelCalculator.getMissionLevel("Sound")},
category:d,categoryDisplayName:c,group:"soundtrack",consolePart:!0};a.surround={id:"Surround sound",name:"Surround sound".localize(),v:6,canResearch:function(){return 5<LevelCalculator.getMissionLevel("Sound")},category:d,categoryDisplayName:c,group:b,consolePart:!0};a.orchestralSoundtrack={id:"Orchestral Soundtrack",name:"Orchestral soundtrack".localize(),v:8,canResearch:function(){return 6<LevelCalculator.getMissionLevel("Sound")},category:d,categoryDisplayName:c,group:"soundtrack"};a.soundItems=
[a.simpleSounds,a.mono,a.stereo,a.soundTrack,a.surround,a.orchestralSoundtrack];d="AI";c="A.I.".localize();a.simpleAI={id:"simpleAI",name:"Simple A.I.".localize(),v:2,canResearch:function(a){return a.canDevelopEngine()&&1<LevelCalculator.getMissionLevel("AI")},category:d,categoryDisplayName:c,group:"ai"};a.AI={id:"AI",name:"Better A.I.".localize(),v:4,canResearch:function(a){return a.canDevelopEngine()&&3<LevelCalculator.getMissionLevel("AI")},category:d,categoryDisplayName:c,group:"ai"};a.AICompanions=
{id:"AI Companions",name:"A.I. Companions".localize(),v:4,canResearch:function(){return 4<LevelCalculator.getMissionLevel("AI")},category:d,categoryDisplayName:c};a.SelfLearningAI={id:"Self learning AI",name:"Self-learning A.I.".localize(),v:10,canResearch:function(){return 8<LevelCalculator.getMissionLevel("AI")},category:d,categoryDisplayName:c};a.aiItems=[a.AI,a.AICompanions,a.SelfLearningAI];d="Gameplay";c="Gameplay".localize();a.GameTutorials={id:"Game Tutorials",name:"Game tutorials".localize(),
v:2,canResearch:function(a){return a.canDevelopEngine()&&1<LevelCalculator.getMissionLevel("Gameplay")},category:d,categoryDisplayName:c};a.BetterUI={id:"BetterUI",name:"Better user experience".localize(),v:2,canResearch:function(a){return a.canDevelopEngine()&&2<LevelCalculator.getMissionLevel("Gameplay")},category:d,categoryDisplayName:c};a.characterProgression={id:"Character progression",name:"Character progression".localize(),v:4,canResearch:function(a){return a.canDevelopEngine()&&3<LevelCalculator.getMissionLevel("Gameplay")},
category:d,categoryDisplayName:c};a.Achievements={id:"Achievements",name:"Achievements".localize(),v:2,canResearch:function(a){return 5<LevelCalculator.getMissionLevel("Gameplay")&&a.isLaterOrEqualThan(13)},category:d,categoryDisplayName:c,consolePart:!0};a.SkillTrees={id:"Skill trees",name:"Skill trees".localize(),v:6,canResearch:function(){return 6<LevelCalculator.getMissionLevel("Gameplay")},category:d,categoryDisplayName:c};a.CoOp={id:"CoOp",name:"Cooperative play".localize(),v:8,canResearch:function(){return 7<
LevelCalculator.getMissionLevel("Gameplay")},category:d,categoryDisplayName:c};a.vrHeadset={id:"vrHeadset",name:"Visorius Support".localize(),v:8,canResearch:function(a){return a.flags.visoriusAnnounced},category:d,categoryDisplayName:c,consolePart:!0};a.gameplayItems=[a.GameTutorials,a.BetterUI,a.Achievements,a.characterProgression,a.SkillTrees,a.CoOp,a.vrHeadset];d="Engine";c="Engine".localize();a.saveGame={id:"Savegame",name:"Savegame".localize(),v:1,canResearch:function(){return!1},category:d,
categoryDisplayName:c,group:"savegame"};a.Multiplayer={id:"Multiplayer",name:"Multiplayer".localize(),v:2,canResearch:function(a){return a.canDevelopEngine()&&3<LevelCalculator.getMissionLevel("Engine")},category:d,categoryDisplayName:c,group:"multiplayer",consolePart:!0};a.VideoPlayback={id:"Video playback",name:"Video playback".localize(),v:4,canResearch:function(a){return a.canDevelopEngine()&&4<LevelCalculator.getMissionLevel("Engine")},category:d,categoryDisplayName:c,consolePart:!0};a.BasicPhysics=
{id:"Basic physics",name:"Basic physics".localize(),v:4,canResearch:function(a){return a.canDevelopEngine()&&5<LevelCalculator.getMissionLevel("Engine")},category:d,categoryDisplayName:c,consolePart:!0};a.ModSupport={id:"Mod support",name:"Mod support".localize(),v:2,canResearch:function(a){return a.canDevelopEngine()&&5<LevelCalculator.getMissionLevel("Engine")},category:d,categoryDisplayName:c};a.OnlinePlay={id:"Online play",name:"Online play".localize(),v:6,canResearch:function(a){return a.canDevelopEngine()&&
6<LevelCalculator.getMissionLevel("Engine")},category:d,categoryDisplayName:c,group:"multiplayer",consolePart:!0};a.AdvancedPhysics={id:"Advanced Physics",name:"Advanced physics".localize(),v:8,canResearch:function(a){return a.canDevelopEngine()&&8<LevelCalculator.getMissionLevel("Engine")},category:d,categoryDisplayName:c,consolePart:!0};a.saveToCloud={id:"Save to cloud",name:"Save to cloud".localize(),v:2,canResearch:function(a){return 5<LevelCalculator.getMissionLevel("Engine")&&a.isLaterOrEqualThan(13)},
category:d,categoryDisplayName:c,consolePart:!0};a.MMOSupport={id:"mmoSupport",name:"MMO Support".localize(),v:10,canResearch:function(a){return a.canDevelopMMOGames()},category:d,categoryDisplayName:c,group:"multiplayer",consolePart:!1,canUse:function(){return!1}};a.sdk={id:"SDK",name:"Software Development Kit".localize(),pointsCost:100,duration:1E4,enginePoints:40,engineCost:1E5,canResearch:function(b){return-1!=b.researchCompleted.indexOf(a.sublicenseEngines)},category:d,categoryDisplayName:c,
canUse:function(){return!1}};a.MultiPlatformOptimized={id:"MultiPlatformOptimized",name:"Multi-Platform optimized".localize(),pointsCost:100,duration:1E4,enginePoints:50,engineCost:2E6,canResearch:function(a){return a.flags.multiPlatformOptimizeResearchAvailable},category:d,categoryDisplayName:c,canUse:function(){return!1}};a.engineItems=[a.saveGame,a.Multiplayer,a.VideoPlayback,a.BasicPhysics,a.OnlinePlay,a.AdvancedPhysics,a.MMOSupport,a.saveToCloud,a.ModSupport,a.sdk,a.MultiPlatformOptimized];d=
"Story/Quests";c="Story/Quests".localize();a.linearStory={id:"Linear story",name:"Linear story".localize(),v:2,canResearch:function(){return!1},category:d,categoryDisplayName:c,group:"story"};a.simpleCutScenes={id:"Simple cutscenes",name:"Simple cutscenes".localize(),v:2,canResearch:function(){return 2<LevelCalculator.getMissionLevel("Story/Quests")},category:d,categoryDisplayName:c,group:"cutscenes"};a.branchedStory={id:"Branching story",name:"Branching story".localize(),v:4,canResearch:function(){return 3<
LevelCalculator.getMissionLevel("Story/Quests")},category:d,categoryDisplayName:c,group:"story"};a.advancedCutScenes={id:"Advanced cutscenes",name:"Advanced cutscenes".localize(),v:4,canResearch:function(){return 4<LevelCalculator.getMissionLevel("Story/Quests")},category:d,categoryDisplayName:c,group:"cutscenes"};a.fullMotionVideo={id:"fmv",name:"Full motion video".localize(),v:6,canResearch:function(){return 5<LevelCalculator.getMissionLevel("Story/Quests")},category:d,categoryDisplayName:c};a.interactiveStory=
{id:"Interactive story",name:"Interactive story".localize(),v:6,canResearch:function(){return 6<LevelCalculator.getMissionLevel("Story/Quests")},category:d,categoryDisplayName:c,group:"story"};a.moralChoices={id:"Moral choices",name:"Moral choices".localize(),v:6,canResearch:function(){return 6<LevelCalculator.getMissionLevel("Story/Quests")},category:d,categoryDisplayName:c};a.immersiveStoryTelling={id:"Immersive story telling",name:"Immersive story telling".localize(),v:8,canResearch:function(){return 7<
LevelCalculator.getMissionLevel("Story/Quests")},category:d,categoryDisplayName:c,group:"story"};a.reactiveQuests={id:"Reactive quests",name:"Reactive quests".localize(),v:10,canResearch:function(){return 8<LevelCalculator.getMissionLevel("Story/Quests")},category:d,categoryDisplayName:c};a.storyItems=[a.linearStory,a.branchedStory,a.simpleCutScenes,a.advancedCutScenes,a.fullMotionVideo,a.interactiveStory,a.moralChoices,a.immersiveStoryTelling,a.reactiveQuests];d="Dialogs";c="Dialogues".localize();
a.betterDialogs={id:"Better dialogues",name:"Better dialogues".localize(),v:1,canResearch:function(){return 2<LevelCalculator.getMissionLevel("Dialogs")},category:d,categoryDisplayName:c};a.dialogueTree={id:"Dialogue tree",name:"Dialogue tree".localize(),v:4,canResearch:function(){return 3<LevelCalculator.getMissionLevel("Dialogs")},category:d,categoryDisplayName:c};a.voiceOver={id:"Voice over",name:"Voice over".localize(),v:6,canResearch:function(){return 5<LevelCalculator.getMissionLevel("Dialogs")},
category:d,categoryDisplayName:c,group:"Voice acting"};a.simpleBodyLanguage={id:"Simple body language",name:"Simple body language".localize(),v:6,canResearch:function(){return 5<LevelCalculator.getMissionLevel("Dialogs")},category:d,categoryDisplayName:c,group:"Body language"};a.advancedBodyLanguage={id:"Advanced body language",name:"Advanced body language".localize(),v:8,canResearch:function(){return 6<LevelCalculator.getMissionLevel("Dialogs")},category:d,categoryDisplayName:c,group:"Body language"};
a.celebrityVoiceActing={id:"Celebrity voice acting",name:"Celebrity voice acting".localize(),v:6,canResearch:function(){return 7<LevelCalculator.getMissionLevel("Dialogs")},category:d,categoryDisplayName:c,group:"Voice acting"};a.realisticBodyLanguage={id:"Realistic body language",name:"Realistic body language".localize(),v:10,canResearch:function(){return 8<LevelCalculator.getMissionLevel("Dialogs")},category:d,categoryDisplayName:c,group:"Body language"};a.dialogItems=[a.betterDialogs,a.dialogueTree,
a.voiceOver,a.simpleBodyLanguage,a.advancedBodyLanguage,a.celebrityVoiceActing,a.realisticBodyLanguage];d="World Design";c="World Design".localize();a.openWorld={id:"Open world",name:"Open world".localize(),v:2,canResearch:function(){return 2<LevelCalculator.getMissionLevel("World Design")},category:d,categoryDisplayName:c};a.dayNightCycle={id:"Day/Night Cycle",name:"Day & night cycle".localize(),v:2,canResearch:function(){return 3<LevelCalculator.getMissionLevel("World Design")},category:d,categoryDisplayName:c};
a.richBackStory={id:"Rich Backstory",name:"Rich backstory".localize(),v:2,enginePoints:0,canResearch:function(){return 4<LevelCalculator.getMissionLevel("World Design")},category:d,categoryDisplayName:c};a.virtualEconomy={id:"Virtual economy",name:"Virtual economy".localize(),v:4,canResearch:function(){return 5<LevelCalculator.getMissionLevel("World Design")},category:d,categoryDisplayName:c};a.realisticWeather={id:"Realistic Weather",name:"Realistic weather".localize(),v:6,canResearch:function(){return 6<
LevelCalculator.getMissionLevel("World Design")},category:d,categoryDisplayName:c};a.dynamicWorld={id:"Dynamic World",name:"Dynamic world".localize(),v:8,canResearch:function(){return 7<LevelCalculator.getMissionLevel("World Design")},category:d,categoryDisplayName:c};a.worldDesignItems=[a.openWorld,a.dayNightCycle,a.richBackStory,a.virtualEconomy,a.realisticWeather,a.dynamicWorld];d="Level Design";c="Level Design".localize();a.levelEditor={id:"Level editor",name:"Level editor".localize(),v:1,canResearch:function(){return 2<
LevelCalculator.getMissionLevel("Level Design")},category:d,categoryDisplayName:c};a.easterEggs={id:"Easter Eggs",name:"Easter eggs".localize(),v:2,canResearch:function(){return 4<LevelCalculator.getMissionLevel("Level Design")},category:d,categoryDisplayName:c};a.miniGames={id:"Mini Games",name:"Mini games".localize(),v:4,canResearch:function(){return 5<LevelCalculator.getMissionLevel("Level Design")},category:d,categoryDisplayName:c};a.dynamicEnvironment={id:"Dynamic Environment",name:"Dynamic environment".localize(),
v:6,canResearch:function(){return 6<LevelCalculator.getMissionLevel("Level Design")},category:d,categoryDisplayName:c};a.noLoadingScreens={id:"No loading screens",name:"No loading screens".localize(),v:8,canResearch:function(){return 7<LevelCalculator.getMissionLevel("Level Design")},category:d,categoryDisplayName:c};a.levelDesignItems=[a.levelEditor,a.easterEggs,a.miniGames,a.dynamicEnvironment,a.noLoadingScreens];a.StartEngineParts=[a.textGraphics,a.TwoDGraphicsV1,a.simpleSounds];a.MediumSizeGames=
{id:"MediumSizeGames",name:"Medium Games".localize(),pointsCost:10,duration:1E4,cost:15E4,canResearch:function(a){return 1<a.staff.length},category:"Project Management",categoryDisplayName:"Project Management".localize()};a.LargeSizeGames={id:"LargeGames",name:"Large Games".localize(),pointsCost:40,duration:15E3,cost:3E5,canResearch:function(a){return 14E4<a.fans&&4<a.staff.length},category:"Project Management",categoryDisplayName:"Project Management".localize()};d="Game Design";c="Game Design".localize();
a.TargetAudience={id:"TargetAudience",name:"Target Audience".localize(),pointsCost:15,duration:1E4,cost:3E4,canResearch:function(a){return-1!=a.scheduledStoriesShown.indexOf("TargetAudiences")},category:d,categoryDisplayName:c};a.Sequels={id:"Sequels",name:"Sequels".localize(),pointsCost:20,duration:13E3,cost:8E4,devCost:2E4,canResearch:function(a){return a.isLaterOrEqualThan(8,6)},category:d,categoryDisplayName:c};a.CasualGames={id:"CasualGames",name:"Casual games".localize(),category:d,categoryDisplayName:c,
pointsCost:20,duration:1E4,cost:25E3,canResearch:function(a){return a.isLaterOrEqualThan(3,10)}};a.Marketing={id:"Marketing",name:"Marketing".localize(),category:"Publishing",categoryDisplayName:"Publishing".localize(),pointsCost:40,duration:1E4,cost:5E4,canResearch:function(a){return-1!=a.scheduledStoriesShown.indexOf("MarketingStory")},complete:function(){Tutorial.marketingUnlocked()}};a.MultiGenre={id:"MultiGenre",name:"Multi genre".localize(),category:d,categoryDisplayName:c,pointsCost:80,duration:1E4,
cost:35E3,canResearch:function(a){return a.isLaterOrEqualThan(12,8)}};a.expansionPack={id:"expansionPack",name:"Expansion pack".localize(),category:d,categoryDisplayName:c,pointsCost:150,duration:1E4,cost:1E5,canResearch:function(a){return a.canDevelopMMOGames()&&a.isMMOInSale()}};a.MultiPlatform={id:"MultiPlatform",name:"Multi-Platform".localize(),category:"Technology",categoryDisplayName:"Technology".localize(),pointsCost:100,duration:15E3,cost:5E5,canResearch:function(a){return a.isLaterOrEqualThan(17,
2)}};a.SpecialItems=[a.TargetAudience,a.MediumSizeGames,a.LargeSizeGames,a.Sequels,a.CasualGames,a.Marketing,a.MultiGenre,a.expansionPack,a.MultiPlatform];a.getAllItems=function(){return a.BasicItems.concat(a.engineItems).concat(a.gameplayItems).concat(a.storyItems).concat(a.dialogItems).concat(a.levelDesignItems).concat(a.aiItems).concat(a.worldDesignItems).concat(a.graphicItems).concat(a.soundItems).concat(a.SpecialItems).concat(a.ProductPlacement1)};a.getUsableFeatureList=function(a,b){for(var c=
[],d=0;d<b.length;d++){var g=b[d];(void 0===g.canUse||g.canUse(a))&&c.push(g)}return c};a.ProductPlacement1={id:"ProductPlacement1",name:"Red Exploding Barrels".localize(),cost:5E3,d:0,t:0,category:"Special Items",categoryDisplayName:"Special Items".localize()};a.OneTimeItems=[a.ProductPlacement1];Research.getPointsCost=function(a){if(!a.v)return a.pointsCost;var b=[1,2,4,6,8,10,12,14].indexOf(a.v);if(-1==b)throw"invalid v";b=[10,15,40,80,100,150,250,300][b];a.pointsCostAdjustment&&(b+=a.pointsCostAdjustment);
return b};Research.getDuration=function(a){if(!a.v)return a.duration;a=[1,2,4,6,8,10,12,14].indexOf(a.v);if(-1==a)throw"invalid v";return 1E3*[8,10,12,14,16,20,25,30][a]};Research.getDevCost=function(a,b){if(!a.v)return a.cost;var c=[1,2,4,6,8,10,12,14].indexOf(a.v);if(-1==c)throw"invalid v";c=1E3*[5,10,30,60,100,150,300,400][c];b&&(c*=General.getGameSizeDurationFactor(b.gameSize)*General.getMultiPlatformCostFactor(b),c=1E3*Math.floor(c/1E3));return c};Research.getResearchCost=function(a){return a.cost?
a.cost:4*Research.getDevCost(a)};Research.getEnginePoints=function(a){if(a.enginePoints)return a.enginePoints;if(!a.v)return 0;a=[1,2,4,6,8,10,12,14].indexOf(a.v);if(-1==a)throw"invalid v";return[10,15,30,40,80,120,200,300][a]};Research.getEngineCost=function(a){if(0===a.enginePoints)return 0;if(a.engineCost)return a.engineCost;if(!a.v)return 0;a=[1,2,4,6,8,10,12,14].indexOf(a.v);if(-1==a)throw"invalid v";return 1E3*[10,30,50,100,140,180,350,500][a]}})();(function(){Research.consoleItems=[]})();
(function(){var a=Research;a._checkForNewLabResearch=function(b){if(b.flags.rndLabUnlocked){var c="";b.flags.bigProjectsResearchActiveShown||(b.flags.bigProjectsResearchActiveShown=[]);for(var d=0;d<a.bigProjects.length;d++){var h=a.bigProjects[d];h.canResearch(b)&&-1==b.flags.bigProjectsResearchActiveShown.indexOf(h.id)&&(b.flags.bigProjectsResearchActiveShown.push(h.id),c+="\n"+h.name)}0<c.length&&(c=new Notification("R&D lab".localize(),"New research available:".localize()+" \n"+c),b.notifications.push(c))}};
var d=2,c="Lab report".localize();a.opportunityInternet={id:"opportunityInternet",name:"Internet Opportunities".localize(),pointsCost:500,canResearch:function(b){return-1==b.researchCompleted.indexOf(a.opportunityInternet)},iconUri:"./images/projectIcons/superb/internet.png",description:"The internet will change our lives forever. This project will investigate how we can use the internet to make better games and deliver better experiences. Completing this project should unlock new options for research.".localize(),
targetZone:d,complete:function(b){b.researchCompleted.push(a.opportunityInternet);var d="After careful examination we come to the conclusion that the internet is a huge opportunity in the gaming industry. We already see some small signs how successful multiplayer games can be but multiplayer is usually an additional feature to a game and not the main focus.{n}We think we could develop technologies to create a massively multiplayer online game (short MMO), a game where tens of thousands of players can play together. To create such an MMO more research is necessary.{n}The second discovery is that we could start developing an online distribution platform. Instead of players buying games in local stores they could download games directly from our servers. This would cut out the middle man and we could gain a large share of the market and additional income to fund our developments.".localize(),
d=new Notification(c,d);b.notifications.push(d)}};a.grid={id:"Grid",name:"Codename: Grid".localize(),pointsCost:1200,canResearch:function(b){return!b.flags.grid&&-1!=b.researchCompleted.indexOf(a.opportunityInternet)&&b.researchCompleted.indexOf(a.grid)},iconUri:"./images/projectIcons/superb/grid.png",description:"A bold plan to develop an internet-based distribution platform for games. Rather than buying games through retailers players worldwide can simply download them. The platform features digital rights management to combat piracy and also enables a new market for smaller developers to show off their products.".localize(),
targetZone:d,complete:function(b){b.researchCompleted.push(a.grid);var d=b.licencedPlatforms.some(function(a){return a.isCustom}),e="Boss, it is done and it is live! Grid is the name of our very own internet-based distribution platform.".localize()+" ",e=d?e+"Since we already have our own console we have integrated this service into our console. This should boost our market share considerably.".localize():e+"This system should boost the market share of the PC considerably and if we ever have our own console it will also be of great benefit.".localize(),
e=e+("{n}"+"Grid will generate income every month which should boost our ability to create new games and develop new projects.".localize());b.flags.grid=!0;b.notifications.push(new Notification(c,e))}};a.ownConvention={id:"ownConvention",name:"Own Convention".localize(),pointsCost:500,canResearch:function(a){return 1E6<=a.fans&&!a.flags.customConference||a.isLaterOrEqualThan(23)},iconUri:"./images/projectIcons/superb/convention.png",description:"It's all well and good to have a booth at the yearly game convention and show of our products but with our large fan base we should consider staging our very own convention instead!".localize(),
targetZone:d,complete:function(a){a.flags.customConference=!0;var d="Boss, we have completed the organization of our own convention.".localize(),d=new Notification(c,d);a.notifications.push(d)}};a.ThreeDGraphicsV6Project={id:"3D Graphics V6 Project",name:"3D Graphics V6".localize(),pointsCost:1200,canResearch:function(a){return!a.flags.graphicsV6&&3<LevelCalculator.getEnginePartLevel(a,"3D Graphics V5")},iconUri:"./images/projectIcons/superb/graphics-v6.png",description:"Pushing the boundaries of photorealism this revolutionary graphics engine will blow away everything that has come before. Near infinite draw distance, ultra-high polygon counts and realistic particle and volumetric effects.".localize(),
targetZone:d,complete:function(b){b.flags.graphicsV6=!0;b.researchCompleted.push(a.ThreeDGraphicsV6);b.notifications.push(new Notification({header:c,text:"We have successfully completed the research on our next generation graphics technology and we can now start building a game engine to make use of this research.".localize(),image:"./images/projectIcons/superb/graphics-v6.png"}))}};a.ThreeDGraphicsV7PRoject={id:"3D Graphics V7 Project",name:"3D Graphics V7".localize(),pointsCost:1600,canResearch:function(a){return!a.flags.graphicsV7&&
3<LevelCalculator.getEnginePartLevel(a,"3D Graphics V6")},iconUri:"./images/projectIcons/superb/graphics-v7.png",description:"The ultimate in graphics technology. This will look better than reality. If anyone ever builds a holodeck then this is the graphics engine it would run on.".localize(),targetZone:d,complete:function(b){b.flags.graphicsV7=!0;b.researchCompleted.push(a.ThreeDGraphicsV7);b.notifications.push(new Notification({header:c,text:"We have done it! Our research was successful and we should be able to support our concepts for the ultimate graphics technology in our next game engine. This will be a revolution for the gaming industry!".localize(),
image:"./images/projectIcons/superb/graphics-v7.png"}))}};a.sublicenseEngines={id:"sublicenseEngines",name:"License Game Engines".localize(),pointsCost:1500,canResearch:function(b){return 10<=b.engines.length&&-1==b.researchCompleted.indexOf(a.sublicenseEngines)},iconUri:"./images/projectIcons/superb/license-engine.png",description:"We have a lot of experience in creating custom game engines. Why not sub-license our engines to other developers? Not only will this cement our market position as a technology leader but it will also help offset the growing costs of developing engines.".localize(),
targetZone:d,complete:function(b){b.researchCompleted.push(a.sublicenseEngines)}};a.hardware={id:"hardware",name:"Hardware",pointsCost:800,canResearch:function(a){return!a.flags.customHardwareResearched},iconUri:"./images/projectIcons/superb/hw-lab.png",description:"Software doesn't run without hardware. We are experts in creating software but why not also investigate whether we can create our own hardware?".localize(),targetZone:d,complete:function(a){a.flags.customHardwareResearched=!0;var d=a.staff.some(function(a){return a.flags.technologySpecialist}),
e="Our research is complete. There is definitely a big opportunity ahead of us. If we create our own hardware lab and have the appropriate technology specialists to run it then we could even create our very own gaming console!{n}It would not be cheap and it will probably take us a few years but maybe we could even trump the likes of an mBox or the Playsystem!".localize();d||(e+="{n}"+"Before we can think about creating this lab we need at least one technology specialist on our team so this should be our priority.".localize());
d=new Notification(c,e);a.notifications.push(d)}};a.MMO={id:"MMO",name:"MMO".localize(),pointsCost:1700,canResearch:function(b){return-1==b.researchCompleted.indexOf(a.MMO)&&-1!=b.researchCompleted.indexOf(a.opportunityInternet)},iconUri:"./images/projectIcons/superb/mmo.png",description:"Massively Multiplayer Online games! We know how much fun it is to play multiplayer games but imagine that instead of playing with a handful of players you could play with thousands! This project will unlock a brand new genre to allow you to create MMO games.".localize(),
targetZone:d,complete:function(b){b.researchCompleted.push(a.MMO);var d="Boss, our research into massively multiplayer online (MMO) games is complete. The possibilities of MMOs are big but they are also risky. In our research we realized that before we can begin to develop an MMO we will need to create a special game engine for it.{n}You will need to complete the research for the MMO support feature with one of your staff. Once it is integrated into a game engine you can start building an MMO but be careful. It seems that MMOs only work with the best theme/genre combinations and you will also need to have specialists on your team to make an MMO successful.".localize(),
d=new Notification(c,d);b.notifications.push(d)}};a.AAA={id:"AAA",name:"AAA Games".localize(),pointsCost:2E3,canResearch:function(b){return-1==b.researchCompleted.indexOf(a.AAA)&&b.gameLog.some(function(a){return 10===a.score&&"large"===a.gameSize})},iconUri:"./images/projectIcons/superb/aaa.png",description:"We have proven that we can make large games work. How about we see how we can make games that are so massive in scope and of such high quality that they will create an entire new label. To borrow a term from the finance sector they will be triple A rated games or to borrow from the movie industry, true blockbusters.".localize(),
targetZone:d,complete:function(b){b.researchCompleted.push(a.AAA);var d="Boss, our research into AAA games is complete and we can now begin to create AAA games. A triple A game requires well-trained staff and it is best to have specialists in the different areas to make sure the team does their best work.{n}When creating a AAA game we can also use the R&D lab to develop a special marketing campaign which greatly enhances the hype around the game.".localize();b.flags.hwLabUnlocked&&(d+="\n"+"The hardware lab can also be used to develop special hardware products such as keyboard, mice and headsets that are sold with the game.".localize());
d=new Notification(c,d);b.notifications.push(d)}};a.AAAMarketingCampaign={id:"AAAMarketingCampaign",name:"Marketing Campaign".localize(),pointsCost:1E3,canResearch:function(a){return a.currentGame&&"aaa"==a.currentGame.gameSize&&!a.currentGame.flags.AAAMarketingCompleted},iconUri:"./images/projectIcons/superb/aaa-marketing.png",description:"Let's use our in-house skills to design a special marketing campaign for our AAA title.".localize(),targetZone:d,complete:function(a){a.currentGame&&(a.currentGame.flags.AAAMarketingCompleted=
!0)},cancel:function(a){a.currentGame&&(a.currentGame.flags.AAAMarketingCompleted=!0)},isRepeatable:!0};d=0;a.AAACustomHardware={id:"AAACustomHardware",name:"Custom Hardware".localize(),pointsCost:1E3,canResearch:function(a){return a.flags.hwLabUnlocked&&a.currentGame&&"aaa"==a.currentGame.gameSize&&!a.currentGame.flags.AAACustomHardwareCompleted},iconUri:"./images/projectIcons/superb/aaa-hardware.png",description:"Let's use our in-house hardware lab to design and develop special hardware products to coincide with the release of our AAA title.".localize(),
targetZone:d,complete:function(a){a.currentGame&&(a.currentGame.flags.AAACustomHardwareCompleted=!0)},cancel:function(a){a.currentGame&&(a.currentGame.flags.AAACustomHardwareCompleted=!0)},isRepeatable:!0};a.bigProjects=[a.AAAMarketingCampaign,a.AAACustomHardware,a.ownConvention,a.opportunityInternet,a.grid,a.ThreeDGraphicsV6Project,a.ThreeDGraphicsV7PRoject,a.sublicenseEngines,a.hardware,a.MMO,a.AAA]})();var Training={};
(function(){var a=Training;a.getAvailableTraining=function(c){for(var b=[],d=a.getAllTrainings(),e=0;e<d.length;e++){var h=d[e];h.canSee&&h.canSee(c,GameManager.company)||void 0===h.canUse?b.push(h):!h.canSee&&h.canUse(c,GameManager.company)&&b.push(h)}return b};a.getAllTrainings=function(){var c=[];c.addRange(d());for(var b in a)if(a.hasOwnProperty(b)){var g=a[b];void 0!=g.id&&(void 0!=g.pointsCost&&void 0!=g.duration)&&(g.isTraining=!0,c.push(g))}return c};category="Management";categoryDisplayName=
"Management".localize();a.managementL1={id:"Management1",name:"Staff Management".localize(),cost:25E3,pointsCost:0,duration:12E3,canUse:function(a,b){return 0===a.id&&2<=b.currentLevel&&1===b.maxStaff},complete:function(){var a="Well done!\nYou've successfully completed your management course and you are now able to hire your very first employee!\n To get started close this message and then {0} the 'Fill Position...' button which is visible near the big desk.".localize(),a=a.format(Tutorial.getClickVerb());
GameManager.company.maxStaff=5;GameManager.company.notifications.push(new Notification("Training Complete".localize(),a,"OK".localize()));VisualsManager.refreshHiringButtons()},category:category,categoryDisplayName:categoryDisplayName};a.WelcomeTraining={id:"WelcomeTraining",name:"Staff Welcome Training".localize(),pointsCost:0,cost:1E4,duration:5E3,canUse:function(a){return!a.flags.didWelcomeTraining&&a.flags.hiredTimestamp&&a.flags.hiredTimestamp>GameManager.gameTime-3E4},tick:function(a,b){a.adjustEfficiency(0.2*
(b/5E3))},complete:function(a){a.flags.didWelcomeTraining=!0},category:"Special",categoryDisplayName:"Special".localize()};a.patchGame={id:"PatchGame",name:"Develop patch".localize(),duration:8E3,pointsCost:0,isTraining:!0,canUse:function(){return!1},complete:function(a){VisualsManager.getCharacterOverlay(a).saySomething("patch complete",1500);var a=GameManager.company,b=a.flags.patchData.fansChange,d=a.flags.patchData.gameName,e=a.notifications.first(function(a){return a.flags&&a.flags.isPatchNotification});
e?(e.text="{0} has recently released a much needed patch for {1}.\nOne fan said: 'I love companies like {0}. They don't just milk their customers for more money but also understand our concerns and make sure that we can enjoy our games!'.".localize().format(a.name,d),e.adjustFans(b)):(a.notifications.push(new Notification("News","It seems that {0} has finally released their patch for {1}. One fan said: 'I can't believe it took them so long to release a patch! I surely hope that they are more efficient next time!'".localize().format(a.name,
d),"OK".localize())),a.adjustFans(Math.floor(b/2)))}};a.postMortem={id:"postMortem",name:void 0,baseDuration:7E3,duration:7E3,pointsCost:0,isTraining:!0,progressColor:"purple",canUse:function(){return!1},tick:function(c){var b=c.currentResearch;if(void 0===b.lastSpawnTick)b.lastSpawnTick=0,b.targetRPoints=10*c.researchFactor*(b.duration/a.postMortem.baseDuration),b.targetRPoints+=0.25*b.targetRPoints*GameManager.company.getRandom(),b.currentRPoints=0,b.nextCheck=200+250*GameManager.company.getRandom();
else{var d=b.duration*b.progress;if(d-b.lastSpawnTick>=b.nextCheck){b.lastSpawnTick=d;var e=b.targetRPoints*b.progress;if(Math.floor(e)>Math.floor(b.currentRPoints)){for(var e=Math.floor(e-b.currentRPoints),h=0;h<e;h++)c.spawnPoints(1,"r",50*h);b.currentRPoints+=e}b.nextCheck=Math.min(b.duration-d-50,350+3E3*GameManager.company.getRandom())}}},complete:function(a){var b=a.flags.postMortemGameId,d=GameManager.company.getGameById(b);d&&(d.flags.postMortemCompleted=!0,b=new Notification("{PostMortemComplete}",
b),a.flags.postMortemGameId=null,GameManager.company.notifications.push(b),Tutorial.gameReportComplete(0.3))}};category="Specialists";categoryDisplayName="Specialists".localize();a.designSpecialist={id:"designSpecialist",name:"Design Specialist (Req. 700 D)".localize(),category:category,categoryDisplayName:categoryDisplayName,cost:5E6,pointsCost:100,duration:2E4,canSee:function(a,b){return 4==b.currentLevel&&b.flags.dTSpecialistTrainingEnabled&&!a.flags.designSpecialist&&!a.flags.technologySpecialist},
canUse:function(a){return 700<=a.getDesignSkillPoints()},complete:function(a){a.flags.designSpecialist=!0;Tutorial.additionalSpecialists(10)},style:"trainingItemSmall"};a.techSpecialist={id:"techSpecialist",name:"Technology Specialist (Req. 700 T)".localize(),category:category,categoryDisplayName:categoryDisplayName,cost:5E6,pointsCost:100,duration:2E4,canSee:function(a,b){return 4==b.currentLevel&&b.flags.dTSpecialistTrainingEnabled&&!a.flags.designSpecialist&&!a.flags.technologySpecialist},canUse:function(a){return 700<=
a.getTechnologySkillPoints()},complete:function(a){a.flags.technologySpecialist=!0},style:"trainingItemSmall"};a.boostL1={id:"BoostL1",name:"Boost (Req. D:500 or T:500)".localize(),cost:1E6,pointsCost:20,duration:15E3,canSee:function(a){return 0==a.maxBoostLevel&&5<=a.getLevel()},canUse:function(a){return 500<=a.getDesignSkillPoints()||500<=a.getTechnologySkillPoints()},complete:function(a){a.maxBoostLevel=2;a.boostLevel=0;a.boostRechargeProgress=0;UI._resetBoostUI();Tutorial.boosts()},category:"Special",
categoryDisplayName:"Special".localize()};a.boostL2={id:"BoostL2",name:"Boost Max. Level 3 (Req. D:700 or T:700)".localize(),cost:2E6,pointsCost:50,duration:15E3,canSee:function(a){return 2==a.maxBoostLevel&&6<=a.getLevel()},canUse:function(a){return 700<=a.getDesignSkillPoints()||700<=a.getTechnologySkillPoints()},complete:function(a){a.maxBoostLevel=3},category:"Special",categoryDisplayName:"Special".localize(),style:"trainingItemSmall"};var d=function(){for(var a=[],b=Missions.getAllMissions().filter(function(a){return"dev"===
a.missionType}),d=0;d<b.length;d++){var e=b[d],h=Math.round(900*e.designFactor),f=Math.round(900*e.technologyFactor);(function(b,d,e){var g={id:"specialization_"+e.id,category:"Specialization",categoryDisplayName:"Specialization".localize(),name:"{0} [Req. {1}D/{2}T]".localize().format(e.name,b,d),cost:5E6,pointsCost:200,duration:2E4,canSee:function(a){return 7<=a.getLevel()&&!a.flags.expert},canUse:function(a){return 500*a.technologyFactor>d&&500*a.designFactor>b},complete:function(a){a.flags.expert=
e.id;VisualsManager.getCharacterOverlay(a).refreshName()},isTraining:!0,style:"trainingItemSmall"};a.push(g)})(h,f,e)}return a};a.codingContest={id:"codingContest",name:"Coding contest".localize(),duration:3E4,pointsCost:0,basePoints:12,isTraining:!0,isSkillTraining:!0,tF:0.2,dF:0.2,rF:1,sF:0.3,qF:0,maxP:900,canUse:function(){return!1},complete:function(a){VisualsManager.getCharacterOverlay(a).saySomething("done",1500);a.flags.codingContestDone=GameManager.gameTime;DecisionNotifications.codingContestParticipationFinished()},
category:"Skills"};category="Teach and learn";categoryDisplayName="Teach and learn".localize();a.designTraining3={id:"designTraining3",name:"Game Design Course".localize(),cost:14E4,pointsCost:30,duration:2E4,basePoints:13,tF:0.2,dF:1,rF:0.1,sF:0,qF:0,maxP:900,canUse:function(a,b){return b.flags.trainingV3Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.techTraining3={id:"techTraining3",name:"Programming Course".localize(),cost:14E4,pointsCost:30,duration:2E4,
basePoints:13,tF:1,dF:0.2,rF:0.1,sF:0,qF:0,maxP:900,canUse:function(a,b){return b.flags.trainingV3Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.speedTraining3={id:"speedTraining3",name:"Product Management Course".localize(),cost:14E4,pointsCost:30,duration:2E4,basePoints:13,tF:0.1,dF:0.1,rF:0.2,sF:1,qF:0,maxP:900,canUse:function(a,b){return b.flags.trainingV3Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.researchTraining3=
{id:"researchTraining3",name:"R&D Course".localize(),cost:14E4,pointsCost:30,duration:2E4,basePoints:13,tF:0.1,dF:0.1,rF:1,sF:0.1,qF:0,maxP:900,canUse:function(a,b){return b.flags.trainingV3Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};category="Practice, Practice, Practice";categoryDisplayName="Practice, Practice, Practice".localize();a.designTraining2={id:"designTraining2",name:"G3 Pixel Cup".localize(),cost:7E4,pointsCost:10,duration:2E4,basePoints:12,tF:0.2,
dF:1,rF:0.1,sF:0,qF:0,maxP:700,canUse:function(a,b){return b.flags.trainingV2Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.techTraining2={id:"techTraining2",name:"G3 Code Jam".localize(),cost:7E4,pointsCost:10,duration:2E4,basePoints:12,tF:1,dF:0.2,rF:0.1,sF:0,qF:0,maxP:700,canUse:function(a,b){return b.flags.trainingV2Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.holisticTraining2={id:"holisticTraining2",name:"G3 Game Jam".localize(),
cost:7E4,pointsCost:10,duration:2E4,basePoints:12,tF:0.5,dF:0.5,rF:0.1,sF:0,qF:0,maxP:700,canUse:function(a,b){return b.flags.trainingV2Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.speedTraining2={id:"speedTraining2",name:"G3 Time Trials".localize(),cost:7E4,pointsCost:10,duration:2E4,basePoints:12,tF:0.1,dF:0.1,rF:0.2,sF:1,qF:0,maxP:700,canUse:function(a,b){return b.flags.trainingV2Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};
a.researchTraining2={id:"researchTraining2",name:"G3 Innovation Challenge".localize(),cost:7E4,pointsCost:10,duration:2E4,basePoints:12,tF:0.1,dF:0.1,rF:1,sF:0.1,qF:0,maxP:700,canUse:function(a,b){return b.flags.trainingV2Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};category="Book studies";categoryDisplayName="Book studies".localize();a.holisticTraining={id:"holisticTraining",name:"Game dev gems",cost:15E3,pointsCost:5,duration:2E4,basePoints:8,tF:0.5,dF:0.5,
rF:0.1,sF:0.1,qF:0,maxP:500,canUse:function(){return!0},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.researchTraining={id:"researchTraining",name:"Make me think!",cost:15E3,pointsCost:5,duration:2E4,basePoints:8,tF:0.1,dF:0.1,rF:1,sF:0.1,qF:0,maxP:500,canUse:function(){return!0},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.designTraining={id:"designTraining",name:"Game design for pirates",cost:15E3,pointsCost:5,duration:2E4,basePoints:8,
tF:0.2,dF:1,rF:0.1,sF:0,qF:0,maxP:500,canUse:function(){return!0},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.speedTraining={id:"speedTraining",name:"Don't repeat yourself",cost:15E3,pointsCost:5,duration:2E4,basePoints:8,tF:0.1,dF:0.1,rF:0.2,sF:1,qF:0,maxP:500,canUse:function(){return!0},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.techTraining={id:"techTraining",name:"Code incomplete",cost:15E3,pointsCost:5,duration:2E4,basePoints:8,
tF:1,dF:0.2,rF:0.1,sF:0,qF:0,maxP:500,canUse:function(){return!0},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0}})();var Achievements={};
(function(){var a=Achievements;DataStore.settings.achievements||(DataStore.settings.achievements={});var d=DataStore.settings.achievements;d.achieved||(d.achieved=[]);var c=[];a.resetAchievements=function(){var b=a.hasAchieved(a.supporter);d.achieved=[];b&&a.activate(a.supporter);c=[]};a.complete=function(a){d.achieved.push({id:a.id,time:Date.now()});a.completed&&a.completed();Steam&&Steam.activateAchievement(a.id,function(){Achievements.achievedOnSteam(a.id)});DataStore.saveSettings()};a.activate=
function(a){if(c.indexOf(a.id)==-1){try{ghg4.ghg5("achievement activated",{id:a.id})}catch(b){Logger.LogInfo("tagEvent failed",b)}c.push(a.id)}};a.hasAchieved=function(a){return d.achieved.first(function(b){return b.id===a.id})!=void 0};a.achievedOnSteam=function(a){var b=d.achieved.first(function(b){return b.id==a});if(b!=void 0)b.s=true;DataStore.saveSettings()};a.checkForAchievmentsNotCompletedOnSteam=function(){try{if(GameFlags.IS_STEAM&&Steam&&Steam.isAvailable()){for(var b=a.getAllItems(),c=
d.achieved.map(function(a){return a.id}),g=0;g<b.length;g++){var j=b[g];if(c.indexOf(j.id)!=-1){var l=d.achieved.map(function(a){return a})[c.indexOf(j.id)];l.s||Steam.activateAchievement(l.id,function(){Achievements.achievedOnSteam(l.id)})}}return[]}}catch(m){}};a.checkForNew=function(b){if(!b)return[];for(var g=[],f=a.getAllItems(),j=d.achieved.map(function(a){return a.id}),l=0;l<f.length;l++){var m=f[l];j.indexOf(m.id)==-1&&(m.isAchieved&&m.isAchieved(b)?g.push(m):c.indexOf(m.id)!=-1&&g.push(m))}return g};
a.getAllItems=function(){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];d.id!=void 0&&b.push(d)}return b};a.getWidthId=function(b){return a.getAllItems().first(function(a){return a.id===b})};var b="#78BA00",g=10;a.goodCombo={id:"goodCombo",title:"Good Judgement".localize("achievement title"),description:"Create a game with a good topic/genre combination.".localize("achievement"),isAchieved:function(a){return(a=a.gameLog.last())?GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre,
a.secondGenre)===1:false},tint:b,value:g};a.cult={id:"cult",title:"Cult Status".localize("achievement title"),description:"Set a new standard for the early gaming industry.".localize("achievement"),isAchieved:function(a){var b=a.gameLog.last();return b&&a.topScoreAchievements===3&&b.flags.topScore&&b.isOnSale()?true:false},tint:b,value:g};a.engine100K={id:"engine100K",title:"100K Engine".localize("achievement title"),description:"Invest over 100K in a new game engine.".localize("achievement"),isAchieved:function(a){return a.engines.some(function(a){return a.costs>
1E5})},tint:b,value:g};a.engine500K={id:"engine500K",title:"500K Engine".localize("achievement title"),description:"Invest over 500K in a new game engine.".localize("achievement"),isAchieved:function(a){return a.engines.some(function(a){return a.costs>5E5})},tint:b,value:g};a.engine1M={id:"engine1M",title:"1M Engine".localize("achievement title"),description:"Invest over one million in a new game engine.".localize("achievement"),isAchieved:function(a){return a.engines.some(function(a){return a.costs>
1E6})},tint:b,value:g};b="#FDD017";g=50;a.gold={id:"gold",title:"Gold".localize("achievement title"),description:"Sell half a million copies of a game without the help of a publisher.".localize("achievement"),isAchieved:function(a){return(a=a.gameLog.last())&&!a.flags.royaltyRate&&a.unitsSold>=5E5?true:false},tint:b,value:g};a.platinum={id:"platinum",title:"Platinum".localize("achievement title"),description:"Sell one million copies of a game without the help of a publisher.".localize("achievement"),
isAchieved:function(a){return(a=a.gameLog.last())&&!a.flags.royaltyRate&&a.unitsSold>=1E6?true:false},tint:"#E5E4E2",value:80};a.diamond={id:"diamond",title:"Diamond".localize("achievement title"),description:"Sell ten million copies of a game without the help of a publisher.".localize("achievement"),isAchieved:function(a){return(a=a.gameLog.last())&&!a.flags.royaltyRate&&a.unitsSold>=1E7?true:false},tint:"white",value:100};a.unobtainium={id:"unobtainium",title:"Unobtainium (seriously?)".localize("achievement title, refers to unobtanium, mocks the name of the rare mineral in the movie Avatar"),
description:"Sell one hundred million copies of a game without the help of a publisher.".localize("achievement"),isAchieved:function(a){return(a=a.gameLog.last())&&!a.flags.royaltyRate&&a.unitsSold>=1E8?true:false},tint:"#F4F4F4",value:250,hidden:!0};a.professional={id:"professional",title:"Professional".localize("achievement title"),description:"Reach level 5 with a character.".localize("achievement"),isAchieved:function(a){return a.staff.some(function(a){return a.qualityFactor==1})},tint:b,value:g};
a.legend={id:"legend",title:"Legend".localize("achievement title"),description:"Reach level 10 with a character.".localize("achievement"),isAchieved:function(a){return a.staff.some(function(a){return a.qualityFactor==2})},tint:b,value:100};a.diversity={id:"diversity",title:"Diversity".localize("achievement title"),description:"Have male and female staff.".localize("achievement"),isAchieved:function(a){for(var b,c=1;c<a.staff.length;c++){var d=a.staff[c].sex;b===void 0&&(b=d);if(d!=b)return true}return false},
tint:b,value:g};a.hireSomeoneFamous={id:"hireSomeoneFamous",title:"Famous".localize("achievement title"),description:"Hire someone famous.".localize("achievement"),tint:b,value:g};a.fullHouse={id:"fullHouse",title:"Full House".localize("achievement title"),description:"Have the maximum number of employees.".localize("achievement"),isAchieved:function(a){return a.staff.length===7},tint:b,value:g};a.finishedGame={id:"finishedGame",title:"Game Dev Tycoon".localize(),description:"Finish Game Dev Tycoon.".localize("achievement"),
tint:b,value:200};b="#4E0000";a.perfectGame={id:"perfectGame",title:"Perfect Game".localize("achievement title"),description:"Release a game with a clean score of 10.".localize("achievement"),isAchieved:function(a){if((a=a.gameLog.last())&&a.reviews.average(function(a){return a.score})===10&&a.isOnSale()&&!a.flags.pGAEarned)return a.flags.pGAEarned=true;return false},tint:b,value:100,canEarnMultiple:!0};a.perfectGame11={id:"perfectGame11",title:"Turn it up to 11".localize("achievement title"),description:"Get a reviewer to give you a 11/10 rating.".localize("achievement"),
isAchieved:function(a){if((a=a.gameLog.last())&&a.reviews.average(function(a){return a.score})>10&&a.isOnSale()&&!a.flags.pGAEarned)return a.flags.pGAEarned=true;return false},tint:b,value:100,canEarnMultiple:!0};b="#F4B300";g=150;a.easterEggs={id:"easterEggs",title:"Detective".localize("achievement title"),description:"Find at least one of the easter eggs in the game.".localize("achievement"),isAchieved:function(){return false},tint:b,value:g};a.lvl1EasterEgg={id:"lvl1EasterEgg",title:"Treasure Hunter".localize("achievement title"),
description:"Activate the hidden treasure in the garage.".localize("achievement"),isAchieved:function(){return false},tint:b,value:g,hidden:!0,completed:function(){a.activate(a.easterEggs)}};a.lvl2Poster1={id:"lvl2Poster1",title:"Bluehair reporting for space duty".localize("achievement refers to Wing Commander, leave 'Bluehair'"),description:"Little known fact: Cats go all aggro in space.".localize("achievement refers to Wing Commander"),isAchieved:function(a){if(a.currentLevel!=2)return false;return(a=
a.gameLog.last())&&(a.title==="Wing Commander"||a.title==="wing commander")},tint:b,value:g,hidden:!0,completed:function(){a.activate(a.easterEggs)}};a.lvl2Poster2={id:"lvl2Poster2",title:"Welcome to Mars".localize("achievement title, refers to Doom"),description:"How did I get here? Why is there a chainsaw? Who cares!".localize("achievement refers to Doom"),isAchieved:function(a){if(a.currentLevel!=2)return false;return(a=a.gameLog.last())&&(a.title==="doom"||a.title==="DOOM"||a.title==="Doom")},
tint:b,value:g,hidden:!0,completed:function(){a.activate(a.easterEggs)}};a.lvl3Poster1={id:"lvl3Poster1",title:"Best ride to work ever".localize("achievement title, referes to half life"),description:"Workplace safety anyone?".localize("achievement referes to half life"),isAchieved:function(a){if(a.currentLevel!=3)return false;if(a=a.gameLog.last()){a=a.title.toLowerCase();return a==="half life"||a==="half-life"}return false},tint:b,value:g,hidden:!0,completed:function(){a.activate(a.easterEggs)}};
a.lvl3Poster2={id:"lvl3Poster2",title:"Welcome to your hospital".localize("achievement title, refers to Theme Hospital"),description:"Patients are reminded not to die in the corridors.".localize("achievement refers to Theme Hospital, use official translation for this."),isAchieved:function(a){if(a.currentLevel!=3)return false;return(a=a.gameLog.last())&&a.title==="Theme Hospital"||a.title==="theme hospital"},tint:b,value:g,hidden:!0,completed:function(){a.activate(a.easterEggs)}};a.lvl4Poster1={id:"lvl4Poster1",
title:"Welcome Chief".localize("achievement title, refers to Halo"),description:"This world is round but different.".localize("achievement refers to Halo"),isAchieved:function(a){if(a.currentLevel!=4||!a.flags.rndLabUnlocked)return false;return(a=a.gameLog.last())&&a.title.toLowerCase().indexOf("halo")===0},tint:b,value:g,hidden:!0,completed:function(){a.activate(a.easterEggs)}};a.lvl4Poster2={id:"lvl4Poster2",title:"The sky is not the limit.".localize("achievement title, refers to Star Citizen"),
description:"Welcome back Chris. We've missed you.".localize("achievement refers to Chris Roberts"),isAchieved:function(a){if(a.currentLevel!=4||!a.flags.rndLabUnlocked)return false;return(a=a.gameLog.last())&&a.title.toLowerCase()==="star citizen"},tint:b,value:g,hidden:!0,completed:function(){a.activate(a.easterEggs)}};a.lvl4Poster3={id:"lvl4Poster3",title:"Painting with nature.".localize("achievement title, refers to Okami"),description:"Pay homage to a specific Japanese video game.".localize("achievement refers to Okami"),
isAchieved:function(a){if(a.currentLevel!=4||!a.flags.rndLabUnlocked)return false;return(a=a.gameLog.last())&&a.title.toLowerCase()==="okami"||a.title==="\u014ckami"||a.title==="\u5927\u795e"},tint:b,value:g,hidden:!0,completed:function(){a.activate(a.easterEggs)}};a.inception={id:"inception",title:"Inception".localize("achievement title"),description:"Develop the game within the game.".localize("achievement, inception"),isAchieved:function(a){return(a=a.gameLog.last())&&a.isOnSale()&&a.genre.id===
GameGenre.Simulation.id&&a.topic.id==="Game Dev"&&a.title==="Game Dev Tycoon"?true:false},tint:b,value:g};a.fanBoy={id:"fanboy",title:"Fan".localize(),description:"Pick an inspired company name.".localize("achievement"),tint:b,value:50};g=70;b="#00AAAA";a.versatile={id:"versatile",title:"Versatile".localize("achievement title"),description:"Release a successful game in each of the five main genres.".localize("achievement"),isAchieved:function(a){for(var b=GameGenre.getAll().slice(0,5),c=0;c<a.gameLog.length;c++){if(b.length==
0)return true;var d=a.gameLog[c];d.score>=7&&b.indexOf(d.genre)!=-1&&b.remove(d.genre)}return false},tint:b,value:g};a.cake={id:"cake",title:"Eat Cake".localize("achievement title"),description:"Show them red barrels some action.".localize("achievement"),tint:b,value:100};a.supporter={id:"supporter",title:"Supporter".localize("achievement title"),description:"Support a young start-up. Buy the game.".localize("achievement"),tint:"green",value:1E3,isAchieved:function(){return!GameManager.ghg2()}};a.supporter2=
{id:"supporter2",title:"Greenheart",description:"Support Greenheart Games by buying an optional supporter pack.".localize("achievement"),tint:"green",value:1E3,hidden:!0,canEarnMultiple:!0};b="#FF981D";g=100;a.admirer={id:"admirer",title:"Admirer".localize("achievement title"),description:"Fun fact: We almost named our company Megaflop Productions!".localize("achievement, leave 'Megaflop Productions'"),tint:"green",hidden:!0,value:g};a.writersBlock={id:"writersBlock",title:"Writer's Block".localize("achievement title"),
description:"Naming games is sometimes difficult.".localize("achievement"),isAchieved:function(){return false},tint:b,value:20,hidden:!0}})();var SpriteSheetX=function(a){createjs.SpriteSheet.apply(this,arguments);this.targetFPS=a.targetFPS;this.baseImage=a.baseImage};(function(){SpriteSheetX.prototype=new createjs.SpriteSheet})();var AnimationSpriteSheets={};
(function(){var a=AnimationSpriteSheets;a.getAllImages=function(){return[]};PlatformShim.ISLOWRES?(a.typingScreenL1={images:["./animations1366/typingScreenL1.png"],frames:{regY:0,height:32,regX:0,width:23.4782,count:46},animations:{loop:[0,45]},targetFPS:{loop:7}},a.typingScreenL2={images:["./animations1366/superb/typingScreenL2.png"],frames:{regY:-14,height:25,regX:-9,width:22,count:18},animations:{loop:[0,17]},targetFPS:{loop:10},baseImage:"./animations1366/superb/typingScreenL2_base.png"},a.typingScreenL3=
{images:["./animations1366/superb/typingScreenL3.png"],frames:{regY:-10,height:34,regX:-18,width:28,count:19},animations:{loop:[0,18]},targetFPS:{loop:5},baseImage:"./animations1366/superb/typingScreenL3_base.png"},a.typingScreenL4={images:["./animations1366/superb/typingScreenL4.png"],frames:{height:48,width:39,count:84,regX:0,regY:0},animations:{loop:[0,83]},targetFPS:{loop:5},baseImage:"./animations1366/superb/typingScreenL4_base.png"},a.hwLabScreenWall={images:["./animations1366/superb/hwLabScreenWall.png"],
frames:{height:217,width:292,count:30,regX:-11,regY:-66},animations:{loop:[0,29]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwLabScreenWall_base.png"},a.hwTV={images:["./animations1366/superb/hwTV.png"],frames:{height:184,width:155,count:61,regX:-10,regY:-18},animations:{loop:[0,60]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwTV_base.png"},a.hwFrontFemale1={images:["./animations1366/superb/hwFrontFemale1.png"],frames:{height:61,width:40,count:31,regX:-24,regY:-7},animations:{loop:[0,
30]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwFrontFemale1_base.png"},a.hwFrontFemale2={images:["./animations1366/superb/hwFrontFemale2.png"],frames:{height:98,width:40,count:31,regX:-24,regY:-10},animations:{loop:[0,30]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwFrontFemale2_base.png"},a.hwFrontFemale4={images:["./animations1366/superb/hwFrontFemale4.png"],frames:{height:64,width:45,count:11,regX:-18,regY:-42},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwFrontFemale4_base.png"},
a.hwBackFemale1={images:["./animations1366/superb/hwBackFemale1.png"],frames:{height:59,width:36,count:11,regX:-22,regY:-10},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwBackFemale1_base.png"},a.hwBackFemale2={images:["./animations1366/superb/hwBackFemale2.png"],frames:{height:57,width:36,count:11,regX:-22,regY:-11},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwBackFemale2_base.png"},a.hwBackFemale3={images:["./animations1366/superb/hwBackFemale3.png"],
frames:{height:59,width:48,count:11,regX:-22,regY:-10},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwBackFemale3_base.png"},a.hwBackFemale4={images:["./animations1366/superb/hwBackFemale4.png"],frames:{height:57,width:48,count:11,regX:-22,regY:-11},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwBackFemale4_base.png"},a.hwFrontMale2={images:["./animations1366/superb/hwFrontMale2.png"],frames:{height:58,width:43,count:31,regX:-24,
regY:-10},animations:{loop:[0,30]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwFrontMale2_base.png"},a.hwFrontMale3={images:["./animations1366/superb/hwFrontMale3.png"],frames:{height:65,width:50,count:11,regX:-15,regY:-41},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwFrontMale3_base.png"},a.hwFrontMale4={images:["./animations1366/superb/hwFrontMale4.png"],frames:{height:66,width:50,count:11,regX:-15,regY:-41},animations:{loop:[0,10]},targetFPS:{loop:10},
baseImage:"./animations1366/superb/hwFrontMale4_base.png"},a.hwBackMale1={images:["./animations1366/superb/hwBackMale1.png"],frames:{height:58,width:42,count:11,regX:-20,regY:-11},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwBackMale1_base.png"},a.hwBackMale2={images:["./animations1366/superb/hwBackMale2.png"],frames:{height:58,width:53,count:11,regX:-20,regY:-11},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwBackMale2_base.png"},
a.rndActor1={images:["./animations1366/superb/rndActor1.png"],frames:{height:68,width:69,count:11,regX:-6,regY:-13},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndActor1_base.png"},a.rndFemaleBoardBack1={images:["./animations1366/superb/rndFemaleBoardBack1.png"],frames:{height:62,width:48,count:11,regX:-22,regY:-11},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndFemaleBoardBack1_base.png"},a.rndMaleBoardFront1={images:["./animations1366/superb/rndMaleBoardFront1.png"],
frames:{height:86,width:67,count:16,regX:-10,regY:-7},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndMaleBoardFront1_base.png"},a.rndFemaleTypingBack1={images:["./animations1366/superb/rndFemaleTypingBack1.png"],frames:{height:57,width:51,count:18,regX:-17,regY:-14},animations:{loop:[0,17]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndFemaleTypingBack1_base.png"},a.rndMaleTypingBack1={images:["./animations1366/superb/rndMaleTypingBack1.png"],frames:{height:63,
width:52,count:18,regX:-13,regY:-9},animations:{loop:[0,17]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndMaleTypingBack1_base.png"},a.rndOperator1={images:["./animations1366/superb/rndOperator1.png"],frames:{height:116,width:53,count:11,regX:-13,regY:-14},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndOperator1_base.png"},a.rndFemaleTableBack1={images:["./animations1366/superb/rndFemaleTableBack1.png"],frames:{height:63,width:54,count:16,regX:-38,
regY:-4},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndFemaleTableBack1_base.png"},a.rndFemaleTableFront1_body={images:["./animations1366/superb/rndFemaleTableFront1_body.png"],frames:{height:77,width:52,count:16,regX:-27,regY:-17},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndFemaleTableFront1_body_base.png"},a.rndFemaleTableFront1_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:16,regX:0,
regY:0},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndFemaleTableFront1_pants_base.png"},a.rndMaleFrontTable1_body={images:["./animations1366/superb/rndMaleFrontTable1_body.png"],frames:{height:79,width:48,count:16,regX:-28,regY:-11},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndMaleFrontTable1_body_base.png"},a.rndMaleFrontTable1_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:16,regX:0,regY:0},
animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndMaleFrontTable1_pants_base.png"},a.rndMaleFrontTable2_body={images:["./animations1366/superb/rndMaleFrontTable2_body.png"],frames:{height:62,width:55,count:16,regX:-28,regY:-14},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndMaleFrontTable2_body_base.png"},a.rndMaleFrontTable2_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:16,regX:0,regY:0},animations:{loop:[0,
15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndMaleFrontTable2_pants_base.png"},a.rndMaleTableBack1={images:["./animations1366/superb/rndMaleTableBack1.png"],frames:{height:67,width:52,count:16,regX:-37,regY:-5},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndMaleTableBack1_base.png"},a.rndMaleTableBack2={images:["./animations1366/superb/rndMaleTableBack2.png"],frames:{height:73,width:53,count:16,regX:-37,regY:0},animations:{loop:[0,15]},targetFPS:{loop:10},
baseImage:"./animations1366/superb/rndMaleTableBack2_base.png"},a.notepadBackC1_body={images:["./animations1366/notepadBackC1_body.png"],frames:{height:41,width:59,count:38,regX:-21,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC1_body_base.png"},a.notepadBackC2_body={images:["./animations1366/notepadBackC2_body.png"],frames:{height:41,width:59,count:38,regX:-21,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,
37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC2_body_base.png"},a.notepadBackC3_body={images:["./animations1366/notepadBackC3_body.png"],frames:{height:41,width:59,count:38,regX:-21,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC3_body_base.png"},a.notepadBackC4_body={images:["./animations1366/notepadBackC4_body.png"],frames:{height:41,width:59,count:38,regX:-21,regY:-28},animations:{start:[0,
0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC4_body_base.png"},a.notepadBackC5_body={images:["./animations1366/notepadBackC5_body.png"],frames:{height:41,width:59,count:38,regX:-21,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC5_body_base.png"},a.notepadBackC6_body={images:["./animations1366/notepadBackC6_body.png"],frames:{height:41,width:59,count:38,
regX:-21,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC6_body_base.png"},a.notepadBackC7_body={images:["./animations1366/notepadBackC7_body.png"],frames:{height:41,width:59,count:38,regX:-21,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC7_body_base.png"},a.notepadBackC8_body={images:["./animations1366/notepadBackC8_body.png"],
frames:{height:41,width:59,count:38,regX:-21,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC8_body_base.png"},a.notepadBackC9_body={images:["./animations1366/notepadBackC9_body.png"],frames:{height:38,width:36,count:38,regX:-42,regY:-31},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC9_body_base.png"},a.notepadBackC10_body={images:["./animations1366/notepadBackC10_body.png"],
frames:{height:38,width:37,count:38,regX:-41,regY:-31},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC10_body_base.png"},a.notepadBackC11_body={images:["./animations1366/notepadBackC11_body.png"],frames:{height:38,width:36,count:38,regX:-41,regY:-31},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC11_body_base.png"},a.notepadBackC12_body={images:["./animations1366/notepadBackC12_body.png"],
frames:{height:41,width:59,count:38,regX:-19,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC12_body_base.png"},a.notepadBackC1_chair={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:38,regX:0,regY:0},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC1_chair_base.png"},a.notepadBackC1_hand={images:["./animations1366/notepadBackC1_hands.png"],
frames:{height:44,width:56,count:38,regX:-6,regY:-22},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10}},a.notepadBackC4_hand={images:["./animations1366/notepadBackC4_hands.png"],frames:{height:44,width:56,count:38,regX:-6,regY:-22},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10}},a.notepadBackC5_hand={images:["./animations1366/notepadBackC5_hands.png"],frames:{height:44,width:56,count:38,regX:-6,regY:-22},animations:{start:[0,
0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10}},a.notepadBackC9_hand={images:["./animations1366/notepadBackC9_hands.png"],frames:{height:48,width:63,count:38,regX:-5,regY:-22},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC9_hands_base.png"},a.notepadBackC10_hand={images:["./animations1366/notepadBackC10_hands.png"],frames:{height:48,width:63,count:38,regX:-5,regY:-22},animations:{start:[0,0],loop:[0,37],
end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC10_hands_base.png"},a.notepadBackC12_hand={images:["./animations1366/notepadBackC12_hands.png"],frames:{height:48,width:63,count:38,regX:-5,regY:-22},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC12_hands_base.png"},a.notepadBackC1_head={images:["./animations1366/notepadBackC1_head.png"],frames:{height:43,width:46,count:38,regX:-32,
regY:-5},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC1_head_base.png"},a.notepadBackC2_head={images:["./animations1366/notepadBackC2_head.png"],frames:{height:46,width:45,count:38,regX:-33,regY:0},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC2_head_base.png"},a.notepadBackC3_head={images:["./animations1366/notepadBackC3_head.png"],frames:{height:45,
width:47,count:38,regX:-31,regY:-2},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC3_head_base.png"},a.notepadBackC4_head={images:["./animations1366/notepadBackC4_head.png"],frames:{height:45,width:48,count:38,regX:-31,regY:0},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC4_head_base.png"},a.notepadBackC5_head={images:["./animations1366/notepadBackC5_head.png"],
frames:{height:44,width:45,count:38,regX:-33,regY:-5},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC5_head_base.png"},a.notepadBackC6_head={images:["./animations1366/notepadBackC6_head.png"],frames:{height:43,width:48,count:38,regX:-32,regY:-3},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC6_head_base.png"},a.notepadBackC7_head={images:["./animations1366/notepadBackC7_head.png"],
frames:{height:45,width:48,count:38,regX:-31,regY:0},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC7_head_base.png"},a.notepadBackC8_head={images:["./animations1366/notepadBackC8_head.png"],frames:{height:40,width:47,count:38,regX:-31,regY:-5},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC8_head_base.png"},a.notepadBackC9_head={images:["./animations1366/notepadBackC9_head.png"],
frames:{height:51,width:52,count:38,regX:-33,regY:-5},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC9_head_base.png"},a.notepadBackC10_head={images:["./animations1366/notepadBackC10_head.png"],frames:{height:51,width:52,count:38,regX:-33,regY:-5},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC10_head_base.png"},a.notepadBackC11_head={images:["./animations1366/notepadBackC11_head.png"],
frames:{height:51,width:48,count:38,regX:-33,regY:-5},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC11_head_base.png"},a.notepadBackC12_head={images:["./animations1366/notepadBackC12_head.png"],frames:{height:51,width:50,count:38,regX:-31,regY:-5},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC12_head_base.png"},a.notepadBackC1_pants={images:["./animations1366/empty_sheet.png"],
frames:{height:1,width:1,count:38,regX:0,regY:0},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC1_pants_base.png"},a.notepadBackC9_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:38,regX:0,regY:0},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC9_pants_base.png"},a.notepadImage={images:["./animations1366/notepadImage.png"],
frames:{regY:0,height:107,regX:0,width:107,count:1},animations:{all:[0,0]},targetFPS:{all:7}},a.notepadFrontC1_body={images:["./animations1366/superb/notepadFrontC1_body.png"],frames:{height:48,width:60,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC1_body_base.png"},a.notepadFrontC2_body={images:["./animations1366/superb/notepadFrontC2_body.png"],frames:{height:48,width:60,count:39,regX:-29,
regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC2_body_base.png"},a.notepadFrontC3_body={images:["./animations1366/superb/notepadFrontC3_body.png"],frames:{height:48,width:60,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC3_body_base.png"},a.notepadFrontC4_body={images:["./animations1366/superb/notepadFrontC4_body.png"],
frames:{height:48,width:60,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC4_body_base.png"},a.notepadFrontC5_body={images:["./animations1366/superb/notepadFrontC5_body.png"],frames:{height:48,width:62,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC5_body_base.png"},a.notepadFrontC6_body=
{images:["./animations1366/superb/notepadFrontC6_body.png"],frames:{height:48,width:62,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC6_body_base.png"},a.notepadFrontC7_body={images:["./animations1366/superb/notepadFrontC7_body.png"],frames:{height:48,width:62,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC7_body_base.png"},
a.notepadFrontC8_body={images:["./animations1366/superb/notepadFrontC8_body.png"],frames:{height:48,width:62,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC8_body_base.png"},a.notepadFrontC9_body={images:["./animations1366/superb/notepadFrontC9_body.png"],frames:{height:48,width:60,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,
end:10},baseImage:"./animations1366/superb/notepadFrontC9_body_base.png"},a.notepadFrontC10_body={images:["./animations1366/superb/notepadFrontC10_body.png"],frames:{height:48,width:60,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC10_body_base.png"},a.notepadFrontC11_body={images:["./animations1366/superb/notepadFrontC11_body.png"],frames:{height:44,width:45,count:39,regX:-28,regY:-38},
animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC11_body_base.png"},a.notepadFrontC12_body={images:["./animations1366/superb/notepadFrontC12_body.png"],frames:{height:44,width:44,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC12_body_base.png"},a.notepadFrontC1_chair={images:["./animations1366/superb/notepadFrontC1_chair.png"],
frames:{height:55,width:67,count:39,regX:-11,regY:-47},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC1_chair_base.png"},a.notepadFrontC1_hand={images:["./animations1366/superb/notepadFrontC1_hands.png"],frames:{height:57,width:66,count:39,regX:-41,regY:-37},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC1_hands_base.png"},a.notepadFrontC4_hand=
{images:["./animations1366/superb/notepadFrontC4_hands.png"],frames:{height:57,width:66,count:39,regX:-41,regY:-37},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC4_hands_base.png"},a.notepadFrontC5_hand={images:["./animations1366/superb/notepadFrontC5_hands.png"],frames:{height:57,width:66,count:39,regX:-41,regY:-37},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC5_hands_base.png"},
a.notepadFrontC9_hand={images:["./animations1366/superb/notepadFrontC9_hands.png"],frames:{height:55,width:76,count:39,regX:-31,regY:-37},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC9_hands_base.png"},a.notepadFrontC10_hand={images:["./animations1366/superb/notepadFrontC10_hands.png"],frames:{height:55,width:76,count:39,regX:-31,regY:-37},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,
end:10},baseImage:"./animations1366/superb/notepadFrontC10_hands_base.png"},a.notepadFrontC12_hand={images:["./animations1366/superb/notepadFrontC12_hands.png"],frames:{height:55,width:76,count:39,regX:-31,regY:-37},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC12_hands_base.png"},a.notepadFrontC1_head={images:["./animations1366/superb/notepadFrontC1_head.png"],frames:{height:42,width:45,count:39,regX:-29,regY:-8},
animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC1_head_base.png"},a.notepadFrontC2_head={images:["./animations1366/superb/notepadFrontC2_head.png"],frames:{height:43,width:47,count:39,regX:-28,regY:-7},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC2_head_base.png"},a.notepadFrontC3_head={images:["./animations1366/superb/notepadFrontC3_head.png"],
frames:{height:41,width:43,count:39,regX:-29,regY:-9},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC3_head_base.png"},a.notepadFrontC5_head={images:["./animations1366/superb/notepadFrontC4_head.png"],frames:{height:42,width:44,count:39,regX:-29,regY:-8},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC4_head_base.png"},a.notepadFrontC4_head=
{images:["./animations1366/superb/notepadFrontC5_head.png"],frames:{height:41,width:45,count:39,regX:-31,regY:-9},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC5_head_base.png"},a.notepadFrontC6_head={images:["./animations1366/superb/notepadFrontC6_head.png"],frames:{height:45,width:43,count:39,regX:-31,regY:-4},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC6_head_base.png"},
a.notepadFrontC8_head={images:["./animations1366/superb/notepadFrontC7_head.png"],frames:{height:42,width:45,count:39,regX:-29,regY:-8},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC7_head_base.png"},a.notepadFrontC7_head={images:["./animations1366/superb/notepadFrontC8_head.png"],frames:{height:43,width:47,count:39,regX:-30,regY:-7},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},
baseImage:"./animations1366/superb/notepadFrontC8_head_base.png"},a.notepadFrontC9_head={images:["./animations1366/superb/notepadFrontC9_head.png"],frames:{height:46,width:47,count:39,regX:-25,regY:-7},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC9_head_base.png"},a.notepadFrontC10_head={images:["./animations1366/superb/notepadFrontC10_head.png"],frames:{height:44,width:43,count:39,regX:-31,regY:-8},animations:{start:[0,
0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC10_head_base.png"},a.notepadFrontC11_head={images:["./animations1366/superb/notepadFrontC11_head.png"],frames:{height:42,width:41,count:39,regX:-31,regY:-10},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC11_head_base.png"},a.notepadFrontC12_head={images:["./animations1366/superb/notepadFrontC12_head.png"],
frames:{height:43,width:43,count:39,regX:-30,regY:-10},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC12_head_base.png"},a.notepadFrontC1_pants={images:["./animations1366/superb/notepadFrontC1_pants.png"],frames:{height:31,width:46,count:39,regX:-31,regY:-71},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC1_pants_base.png"},a.notepadFrontC9_pants=
{images:["./animations1366/superb/notepadFrontC9_pants.png"],frames:{height:27,width:39,count:39,regX:-31,regY:-74},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC9_pants_base.png"},a.teaCupImage={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:1,regX:0,regY:0},animations:{all:[0,0]},targetFPS:{all:7},baseImage:"./animations1366/superb/teacup.png"},a.teaCupImageLevel2={images:["./animations1366/empty_sheet.png"],
frames:{height:1,width:1,count:1,regX:0,regY:0},animations:{all:[0,0]},targetFPS:{all:7},baseImage:"./animations1366/superb/teacupLevel2.png"},a.pong={images:["./animations1366/pong.png"],frames:{height:77,regX:-16,count:60,regY:-14,width:77},animations:{all:[0,59]},targetFPS:{all:10},baseImage:"./animations1366/pong_base.png"},a.idleBackC1_body={images:["./animations1366/idleBackC1_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,
loop:5,end:20},baseImage:"./animations1366/idleBackC1_body_base.png"},a.idleBackC2_body={images:["./animations1366/idleBackC2_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC2_body_base.png"},a.idleBackC3_body={images:["./animations1366/idleBackC3_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,
loop:5,end:20},baseImage:"./animations1366/idleBackC3_body_base.png"},a.idleBackC4_body={images:["./animations1366/idleBackC4_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC4_body_base.png"},a.idleBackC5_body={images:["./animations1366/idleBackC5_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,
loop:5,end:20},baseImage:"./animations1366/idleBackC5_body_base.png"},a.idleBackC6_body={images:["./animations1366/idleBackC6_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC6_body_base.png"},a.idleBackC7_body={images:["./animations1366/idleBackC7_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,
loop:5,end:20},baseImage:"./animations1366/idleBackC7_body_base.png"},a.idleBackC8_body={images:["./animations1366/idleBackC8_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC8_body_base.png"},a.idleBackC9_body={images:["./animations1366/idleBackC9_body.png"],frames:{height:39,width:36,count:11,regX:-47,regY:-31},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,
loop:5,end:20},baseImage:"./animations1366/idleBackC9_body_base.png"},a.idleBackC10_body={images:["./animations1366/idleBackC10_body.png"],frames:{height:39,width:36,count:11,regX:-47,regY:-31},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC10_body_base.png"},a.idleBackC11_body={images:["./animations1366/idleBackC11_body.png"],frames:{height:39,width:36,count:11,regX:-47,regY:-31},animations:{start:[0,9],loop:[10,10],end:[9,
0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC11_body_base.png"},a.idleBackC12_body={images:["./animations1366/idleBackC12_body.png"],frames:{height:39,width:50,count:11,regX:-33,regY:-31},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC12_body_base.png"},a.idleBackC1_chair={images:["./animations1366/idleBackC1_chair.png"],frames:{height:44,width:59,count:11,regX:-35,regY:-44},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC1_chair_base.png"},a.idleBackC1_hand={images:["./animations1366/idleBackC1_hands.png"],frames:{height:25,width:36,count:11,regX:-26,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleBackC4_hand={images:["./animations1366/idleBackC4_hands.png"],frames:{height:25,width:36,count:11,regX:-26,regY:-33},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleBackC5_hand={images:["./animations1366/idleBackC5_hands.png"],frames:{height:25,width:36,count:11,regX:-26,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC5_hands_base.png"},a.idleBackC9_hand={images:["./animations1366/idleBackC9_hands.png"],frames:{height:33,width:43,count:11,regX:-28,regY:-33},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleBackC10_hand={images:["./animations1366/idleBackC10_hands.png"],frames:{height:33,width:43,count:11,regX:-28,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleBackC12_hand={images:["./animations1366/idleBackC12_hands.png"],frames:{height:33,width:43,count:11,regX:-28,regY:-33},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleBackC1_head={images:["./animations1366/idleBackC1_head.png"],frames:{height:41,width:44,count:11,regX:-44,regY:-5},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC1_head_base.png"},a.idleBackC2_head={images:["./animations1366/idleBackC2_head.png"],frames:{height:46,width:44,count:11,regX:-44,regY:0},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC2_head_base.png"},a.idleBackC3_head={images:["./animations1366/idleBackC3_head.png"],frames:{height:44,width:45,count:11,regX:-44,regY:-2},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC3_head_base.png"},a.idleBackC4_head={images:["./animations1366/idleBackC4_head.png"],frames:{height:44,width:47,count:11,regX:-44,regY:0},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC4_head_base.png"},a.idleBackC5_head={images:["./animations1366/idleBackC5_head.png"],frames:{height:44,width:44,count:11,regX:-44,regY:-4},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC5_head_base.png"},a.idleBackC6_head={images:["./animations1366/idleBackC6_head.png"],frames:{height:43,width:47,count:11,regX:-44,regY:-2},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC6_head_base.png"},a.idleBackC7_head={images:["./animations1366/idleBackC7_head.png"],frames:{height:44,width:48,count:11,regX:-44,regY:0},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC7_head_base.png"},a.idleBackC8_head={images:["./animations1366/idleBackC8_head.png"],frames:{height:41,width:45,count:11,regX:-43,regY:-4},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC8_head_base.png"},a.idleBackC9_head={images:["./animations1366/idleBackC9_head.png"],frames:{height:52,width:49,count:11,regX:-43,regY:-5},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC9_head_base.png"},a.idleBackC10_head={images:["./animations1366/idleBackC10_head.png"],frames:{height:53,width:49,count:11,regX:-43,regY:-5},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC10_head_base.png"},a.idleBackC11_head={images:["./animations1366/idleBackC11_head.png"],frames:{height:53,width:47,count:11,regX:-43,regY:-5},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC11_head_base.png"},a.idleBackC12_head={images:["./animations1366/idleBackC12_head.png"],frames:{height:53,width:48,count:11,regX:-42,regY:-4},
animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC12_head_base.png"},a.idleBackC1_pants={images:["./animations1366/idleBackC1_pants.png"],frames:{height:34,width:43,count:11,regX:-23,regY:-58},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC1_pants_base.png"},a.idleBackC9_pants={images:["./animations1366/idleBackC9_pants.png"],frames:{height:32,width:45,count:11,
regX:-21,regY:-64},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC9_pants_base.png"},a.idleFrontC1_body={images:["./animations1366/superb/idleFrontC1_body.png"],frames:{height:48,width:51,count:11,regX:-25,regY:-38},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC1_body_base.png"},a.idleFrontC2_body={images:["./animations1366/superb/idleFrontC2_body.png"],
frames:{height:49,width:52,count:11,regX:-25,regY:-38},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC2_body_base.png"},a.idleFrontC3_body={images:["./animations1366/superb/idleFrontC3_body.png"],frames:{height:48,width:52,count:11,regX:-25,regY:-38},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC3_body_base.png"},a.idleFrontC4_body={images:["./animations1366/superb/idleFrontC4_body.png"],
frames:{height:49,width:51,count:11,regX:-25,regY:-38},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC4_body_base.png"},a.idleFrontC5_body={images:["./animations1366/superb/idleFrontC5_body.png"],frames:{height:48,width:50,count:11,regX:-26,regY:-39},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC5_body_base.png"},a.idleFrontC6_body={images:["./animations1366/superb/idleFrontC6_body.png"],
frames:{height:48,width:50,count:11,regX:-26,regY:-39},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC6_body_base.png"},a.idleFrontC7_body={images:["./animations1366/superb/idleFrontC7_body.png"],frames:{height:48,width:50,count:11,regX:-26,regY:-39},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC7_body_base.png"},a.idleFrontC8_body={images:["./animations1366/superb/idleFrontC8_body.png"],
frames:{height:49,width:50,count:11,regX:-26,regY:-38},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC8_body_base.png"},a.idleFrontC9_body={images:["./animations1366/superb/idleFrontC9_body.png"],frames:{height:46,width:48,count:11,regX:-26,regY:-40},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC9_body_base.png"},a.idleFrontC10_body={images:["./animations1366/superb/idleFrontC10_body.png"],
frames:{height:46,width:48,count:11,regX:-26,regY:-40},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC10_body_base.png"},a.idleFrontC11_body={images:["./animations1366/superb/idleFrontC11_body.png"],frames:{height:42,width:39,count:11,regX:-24,regY:-40},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC11_body_base.png"},a.idleFrontC12_body=
{images:["./animations1366/superb/idleFrontC12_body.png"],frames:{height:42,width:38,count:11,regX:-26,regY:-40},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC12_body_base.png"},a.idleFrontC1_chair={images:["./animations1366/superb/idleFrontC1_chair.png"],frames:{height:42,width:40,count:11,regX:-24,regY:-48},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC1_chair_base.png"},
a.idleFrontC1_hand={images:["./animations1366/superb/idleFrontC1_hands.png"],frames:{height:29,width:38,count:11,regX:-46,regY:-63},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleFrontC4_hand={images:["./animations1366/superb/idleFrontC4_hands.png"],frames:{height:29,width:38,count:11,regX:-46,regY:-63},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},
a.idleFrontC5_hand={images:["./animations1366/superb/idleFrontC5_hands.png"],frames:{height:29,width:38,count:11,regX:-46,regY:-63},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleFrontC9_hand={images:["./animations1366/superb/idleFrontC9_hands.png"],frames:{height:38,width:54,count:11,regX:-28,regY:-52},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},
a.idleFrontC10_hand={images:["./animations1366/superb/idleFrontC10_hands.png"],frames:{height:38,width:54,count:11,regX:-28,regY:-52},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleFrontC12_hand={images:["./animations1366/superb/idleFrontC12_hands.png"],frames:{height:38,width:54,count:11,regX:-28,regY:-52},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},
a.idleFrontC1_head={images:["./animations1366/superb/idleFrontC1_head.png"],frames:{height:40,width:42,count:11,regX:-21,regY:-9},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC1_head_base.png"},a.idleFrontC2_head={images:["./animations1366/superb/idleFrontC2_head.png"],frames:{height:41,width:43,count:11,regX:-21,regY:-8},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC2_head_base.png"},
a.idleFrontC3_head={images:["./animations1366/superb/idleFrontC3_head.png"],frames:{height:39,width:40,count:11,regX:-22,regY:-10},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC3_head_base.png"},a.idleFrontC5_head={images:["./animations1366/superb/idleFrontC4_head.png"],frames:{height:40,width:41,count:11,regX:-22,regY:-9},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC4_head_base.png"},
a.idleFrontC4_head={images:["./animations1366/superb/idleFrontC5_head.png"],frames:{height:40,width:41,count:11,regX:-24,regY:-9},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC5_head_base.png"},a.idleFrontC6_head={images:["./animations1366/superb/idleFrontC6_head.png"],frames:{height:45,width:41,count:11,regX:-23,regY:-4},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC6_head_base.png"},
a.idleFrontC8_head={images:["./animations1366/superb/idleFrontC7_head.png"],frames:{height:40,width:42,count:11,regX:-22,regY:-9},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC7_head_base.png"},a.idleFrontC7_head={images:["./animations1366/superb/idleFrontC8_head.png"],frames:{height:43,width:44,count:11,regX:-22,regY:-6},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC8_head_base.png"},
a.idleFrontC9_head={images:["./animations1366/superb/idleFrontC9_head.png"],frames:{height:45,width:42,count:11,regX:-20,regY:-9},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC9_head_base.png"},a.idleFrontC11_head={images:["./animations1366/superb/idleFrontC10_head.png"],frames:{height:42,width:38,count:11,regX:-24,regY:-10},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC10_head_base.png"},
a.idleFrontC10_head={images:["./animations1366/superb/idleFrontC11_head.png"],frames:{height:43,width:40,count:11,regX:-24,regY:-9},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC11_head_base.png"},a.idleFrontC12_head={images:["./animations1366/superb/idleFrontC12_head.png"],frames:{height:44,width:40,count:11,regX:-23,regY:-10},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC12_head_base.png"},
a.idleFrontC1_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:11,regX:0,regY:0},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC1_pants_base.png"},a.idleFrontC9_pants={images:["./animations1366/superb/idleFrontC9_pants.png"],frames:{height:25,width:35,count:11,regX:-32,regY:-76},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC9_pants_base.png"},
a.typingBackC1_body={images:["./animations1366/typingBackC1_body.png"],frames:{height:34,width:46,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC1_body_base.png"},a.typingBackC2_body={images:["./animations1366/typingBackC2_body.png"],frames:{height:34,width:48,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC2_body_base.png"},
a.typingBackC3_body={images:["./animations1366/typingBackC3_body.png"],frames:{height:34,width:46,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC3_body_base.png"},a.typingBackC4_body={images:["./animations1366/typingBackC4_body.png"],frames:{height:34,width:48,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC4_body_base.png"},
a.typingBackC5_body={images:["./animations1366/typingBackC5_body.png"],frames:{height:34,width:48,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC5_body_base.png"},a.typingBackC6_body={images:["./animations1366/typingBackC6_body.png"],frames:{height:34,width:46,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC6_body_base.png"},
a.typingBackC7_body={images:["./animations1366/typingBackC7_body.png"],frames:{height:34,width:48,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC7_body_base.png"},a.typingBackC8_body={images:["./animations1366/typingBackC8_body.png"],frames:{height:34,width:48,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC8_body_base.png"},
a.typingBackC9_body={images:["./animations1366/typingBackC9_body.png"],frames:{height:17,width:31,count:17,regX:-47,regY:-40},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC9_body_base.png"},a.typingBackC10_body={images:["./animations1366/typingBackC10_body.png"],frames:{height:19,width:31,count:17,regX:-47,regY:-39},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC10_body_base.png"},
a.typingBackC11_body={images:["./animations1366/typingBackC11_body.png"],frames:{height:18,width:31,count:17,regX:-47,regY:-39},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC11_body_base.png"},a.typingBackC12_body={images:["./animations1366/typingBackC12_body.png"],frames:{height:34,width:46,count:17,regX:-32,regY:-32},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC12_body_base.png"},
a.typingBackC1_chair={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:17,regX:0,regY:0},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC1_chair_base.png"},a.typingBackC1_hand={images:["./animations1366/typingBackC1_hands.png"],frames:{height:26,width:29,count:17,regX:-25,regY:-32},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC1_hands_base.png"},
a.typingBackC4_hand={images:["./animations1366/typingBackC4_hands.png"],frames:{height:26,width:29,count:17,regX:-25,regY:-32},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC4_hands_base.png"},a.typingBackC5_hand={images:["./animations1366/typingBackC5_hands.png"],frames:{height:26,width:29,count:17,regX:-25,regY:-32},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC5_hands_base.png"},
a.typingBackC9_hand={images:["./animations1366/typingBackC9_hands.png"],frames:{height:33,width:40,count:17,regX:-26,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC9_hands_base.png"},a.typingBackC10_hand={images:["./animations1366/typingBackC10_hands.png"],frames:{height:33,width:40,count:17,regX:-26,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC10_hands_base.png"},
a.typingBackC12_hand={images:["./animations1366/typingBackC12_hands.png"],frames:{height:33,width:40,count:17,regX:-26,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC12_hands_base.png"},a.typingBackC1_head={images:["./animations1366/typingBackC1_head.png"],frames:{height:40,width:35,count:17,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC1_head_base.png"},
a.typingBackC2_head={images:["./animations1366/typingBackC2_head.png"],frames:{height:45,width:34,count:17,regX:-44,regY:0},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC2_head_base.png"},a.typingBackC3_head={images:["./animations1366/typingBackC3_head.png"],frames:{height:43,width:34,count:17,regX:-44,regY:-2},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC3_head_base.png"},
a.typingBackC4_head={images:["./animations1366/typingBackC4_head.png"],frames:{height:43,width:36,count:17,regX:-43,regY:0},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC4_head_base.png"},a.typingBackC5_head={images:["./animations1366/typingBackC5_head.png"],frames:{height:43,width:35,count:17,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC5_head_base.png"},
a.typingBackC6_head={images:["./animations1366/typingBackC6_head.png"],frames:{height:41,width:36,count:17,regX:-44,regY:-3},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC6_head_base.png"},a.typingBackC7_head={images:["./animations1366/typingBackC7_head.png"],frames:{height:43,width:37,count:17,regX:-43,regY:0},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC7_head_base.png"},
a.typingBackC8_head={images:["./animations1366/typingBackC8_head.png"],frames:{height:39,width:36,count:17,regX:-42,regY:-5},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC8_head_base.png"},a.typingBackC9_head={images:["./animations1366/typingBackC9_head.png"],frames:{height:50,width:41,count:17,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC9_head_base.png"},
a.typingBackC10_head={images:["./animations1366/typingBackC10_head.png"],frames:{height:50,width:41,count:17,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC10_head_base.png"},a.typingBackC11_head={images:["./animations1366/typingBackC11_head.png"],frames:{height:51,width:38,count:17,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC11_head_base.png"},
a.typingBackC12_head={images:["./animations1366/typingBackC12_head.png"],frames:{height:51,width:39,count:17,regX:-42,regY:-4},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC12_head_base.png"},a.typingBackC1_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:17,regX:0,regY:0},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC1_pants_base.png"},
a.typingBackC9_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:17,regX:0,regY:0},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC9_pants_base.png"},a.typingFrontC1_body={images:["./animations1366/superb/typingFrontC1_body.png"],frames:{height:44,width:48,count:10,regX:-29,regY:-41},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC1_body_base.png"},
a.typingFrontC2_body={images:["./animations1366/superb/typingFrontC2_body.png"],frames:{height:43,width:48,count:10,regX:-29,regY:-42},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC2_body_base.png"},a.typingFrontC3_body={images:["./animations1366/superb/typingFrontC3_body.png"],frames:{height:43,width:48,count:10,regX:-29,regY:-42},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC3_body_base.png"},
a.typingFrontC4_body={images:["./animations1366/superb/typingFrontC4_body.png"],frames:{height:44,width:48,count:10,regX:-29,regY:-41},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC4_body_base.png"},a.typingFrontC5_body={images:["./animations1366/superb/typingFrontC5_body.png"],frames:{height:44,width:47,count:10,regX:-29,regY:-41},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC5_body_base.png"},
a.typingFrontC6_body={images:["./animations1366/superb/typingFrontC6_body.png"],frames:{height:43,width:47,count:10,regX:-29,regY:-42},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC6_body_base.png"},a.typingFrontC7_body={images:["./animations1366/superb/typingFrontC7_body.png"],frames:{height:44,width:47,count:10,regX:-29,regY:-41},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC7_body_base.png"},
a.typingFrontC8_body={images:["./animations1366/superb/typingFrontC8_body.png"],frames:{height:43,width:47,count:10,regX:-29,regY:-42},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC8_body_base.png"},a.typingFrontC9_body={images:["./animations1366/superb/typingFrontC9_body.png"],frames:{height:42,width:46,count:10,regX:-29,regY:-43},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC9_body_base.png"},
a.typingFrontC10_body={images:["./animations1366/superb/typingFrontC10_body.png"],frames:{height:41,width:46,count:10,regX:-29,regY:-44},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC10_body_base.png"},a.typingFrontC11_body={images:["./animations1366/superb/typingFrontC11_body.png"],frames:{height:38,width:35,count:10,regX:-28,regY:-44},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},
baseImage:"./animations1366/superb/typingFrontC11_body_base.png"},a.typingFrontC12_body={images:["./animations1366/superb/typingFrontC12_body.png"],frames:{height:38,width:35,count:10,regX:-29,regY:-44},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC12_body_base.png"},a.typingFrontC1_chair={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:10,regX:0,regY:0},animations:{start:[0,0],loop:[0,9],
end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC1_chair_base.png"},a.typingFrontC1_hand={images:["./animations1366/superb/typingFrontC1_hands.png"],frames:{height:28,width:36,count:10,regX:-49,regY:-64},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/empty_base.png"},a.typingFrontC4_hand={images:["./animations1366/superb/typingFrontC4_hands.png"],frames:{height:28,width:36,count:10,regX:-49,
regY:-64},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/empty_base.png"},a.typingFrontC5_hand={images:["./animations1366/superb/typingFrontC5_hands.png"],frames:{height:28,width:36,count:10,regX:-49,regY:-64},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/empty_base.png"},a.typingFrontC9_hand={images:["./animations1366/superb/typingFrontC9_hands.png"],frames:{height:37,width:52,
count:10,regX:-31,regY:-53},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC9_hands_base.png"},a.typingFrontC10_hand={images:["./animations1366/superb/typingFrontC10_hands.png"],frames:{height:37,width:52,count:10,regX:-31,regY:-53},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC10_hands_base.png"},a.typingFrontC12_hand={images:["./animations1366/superb/typingFrontC12_hands.png"],
frames:{height:37,width:52,count:10,regX:-31,regY:-53},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC12_hands_base.png"},a.typingFrontC1_head={images:["./animations1366/superb/typingFrontC1_head.png"],frames:{height:40,width:35,count:10,regX:-29,regY:-9},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC1_head_base.png"},a.typingFrontC2_head=
{images:["./animations1366/superb/typingFrontC2_head.png"],frames:{height:41,width:36,count:10,regX:-29,regY:-8},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC2_head_base.png"},a.typingFrontC3_head={images:["./animations1366/superb/typingFrontC3_head.png"],frames:{height:39,width:32,count:10,regX:-30,regY:-10},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC3_head_base.png"},
a.typingFrontC5_head={images:["./animations1366/superb/typingFrontC4_head.png"],frames:{height:40,width:33,count:10,regX:-30,regY:-9},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC4_head_base.png"},a.typingFrontC4_head={images:["./animations1366/superb/typingFrontC5_head.png"],frames:{height:39,width:34,count:10,regX:-31,regY:-10},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC5_head_base.png"},
a.typingFrontC6_head={images:["./animations1366/superb/typingFrontC6_head.png"],frames:{height:45,width:33,count:10,regX:-31,regY:-4},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC6_head_base.png"},a.typingFrontC8_head={images:["./animations1366/superb/typingFrontC7_head.png"],frames:{height:40,width:34,count:10,regX:-30,regY:-9},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC7_head_base.png"},
a.typingFrontC7_head={images:["./animations1366/superb/typingFrontC8_head.png"],frames:{height:42,width:36,count:10,regX:-30,regY:-7},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC8_head_base.png"},a.typingFrontC9_head={images:["./animations1366/superb/typingFrontC9_head.png"],frames:{height:44,width:36,count:10,regX:-26,regY:-9},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC9_head_base.png"},
a.typingFrontC10_head={images:["./animations1366/superb/typingFrontC10_head.png"],frames:{height:43,width:33,count:10,regX:-31,regY:-9},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC10_head_base.png"},a.typingFrontC11_head={images:["./animations1366/superb/typingFrontC11_head.png"],frames:{height:42,width:32,count:10,regX:-31,regY:-10},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},
baseImage:"./animations1366/superb/typingFrontC11_head_base.png"},a.typingFrontC12_head={images:["./animations1366/superb/typingFrontC12_head.png"],frames:{height:42,width:33,count:10,regX:-30,regY:-11},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC12_head_base.png"},a.typingFrontC1_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:10,regX:0,regY:0},animations:{start:[0,0],loop:[0,9],
end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC1_pants_base.png"},a.typingFrontC9_pants={images:["./animations1366/superb/typingFrontC9_pants.png"],frames:{height:5,width:27,count:10,regX:-33,regY:-77},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC9_pants_base.png"},a.thinkingFrontC1_body={images:["./animations1366/superb/thinkingFrontC1_body.png"],frames:{height:58,width:54,
count:34,regX:-29,regY:-28},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC1_body_base.png"},a.thinkingFrontC2_body={images:["./animations1366/superb/thinkingFrontC2_body.png"],frames:{height:59,width:53,count:34,regX:-29,regY:-27},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC2_body_base.png"},a.thinkingFrontC3_body={images:["./animations1366/superb/thinkingFrontC3_body.png"],
frames:{height:58,width:53,count:34,regX:-29,regY:-28},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC3_body_base.png"},a.thinkingFrontC4_body={images:["./animations1366/superb/thinkingFrontC4_body.png"],frames:{height:59,width:53,count:34,regX:-29,regY:-27},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC4_body_base.png"},a.thinkingFrontC5_body=
{images:["./animations1366/superb/thinkingFrontC5_body.png"],frames:{height:58,width:53,count:34,regX:-29,regY:-28},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC5_body_base.png"},a.thinkingFrontC6_body={images:["./animations1366/superb/thinkingFrontC6_body.png"],frames:{height:59,width:53,count:34,regX:-29,regY:-27},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC6_body_base.png"},
a.thinkingFrontC7_body={images:["./animations1366/superb/thinkingFrontC7_body.png"],frames:{height:58,width:53,count:34,regX:-29,regY:-28},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC7_body_base.png"},a.thinkingFrontC8_body={images:["./animations1366/superb/thinkingFrontC8_body.png"],frames:{height:58,width:53,count:34,regX:-29,regY:-28},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,
end:10},baseImage:"./animations1366/superb/thinkingFrontC8_body_base.png"},a.thinkingFrontC9_body={images:["./animations1366/superb/thinkingFrontC9_body.png"],frames:{height:56,width:52,count:34,regX:-29,regY:-29},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC9_body_base.png"},a.thinkingFrontC10_body={images:["./animations1366/superb/thinkingFrontC10_body.png"],frames:{height:56,width:50,count:34,regX:-31,regY:-29},
animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC10_body_base.png"},a.thinkingFrontC11_body={images:["./animations1366/superb/thinkingFrontC11_body.png"],frames:{height:41,width:40,count:34,regX:-28,regY:-39},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC11_body_base.png"},a.thinkingFrontC12_body={images:["./animations1366/superb/thinkingFrontC12_body.png"],
frames:{height:42,width:39,count:34,regX:-31,regY:-38},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC12_body_base.png"},a.thinkingFrontC1_chair={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:34,regX:0,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC1_chair_base.png"},a.thinkingFrontC1_hand=
{images:["./animations1366/superb/thinkingFrontC1_hands.png"],frames:{height:75,width:51,count:34,regX:-41,regY:-18},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC1_hands_base.png"},a.thinkingFrontC4_hand={images:["./animations1366/superb/thinkingFrontC4_hands.png"],frames:{height:75,width:51,count:34,regX:-41,regY:-18},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC4_hands_base.png"},
a.thinkingFrontC5_hand={images:["./animations1366/superb/thinkingFrontC5_hands.png"],frames:{height:75,width:51,count:34,regX:-41,regY:-18},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC5_hands_base.png"},a.thinkingFrontC9_hand={images:["./animations1366/superb/thinkingFrontC9_hands.png"],frames:{height:70,width:59,count:34,regX:-31,regY:-21},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,
loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC9_hands_base.png"},a.thinkingFrontC10_hand={images:["./animations1366/superb/thinkingFrontC10_hands.png"],frames:{height:70,width:59,count:34,regX:-31,regY:-21},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC10_hands_base.png"},a.thinkingFrontC12_hand={images:["./animations1366/superb/thinkingFrontC12_hands.png"],frames:{height:70,width:59,count:34,
regX:-31,regY:-21},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC12_hands_base.png"},a.thinkingFrontC1_head={images:["./animations1366/superb/thinkingFrontC1_head.png"],frames:{height:40,width:37,count:34,regX:-26,regY:-9},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC1_head_base.png"},a.thinkingFrontC2_head={images:["./animations1366/superb/thinkingFrontC2_head.png"],
frames:{height:41,width:38,count:34,regX:-26,regY:-8},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC2_head_base.png"},a.thinkingFrontC3_head={images:["./animations1366/superb/thinkingFrontC3_head.png"],frames:{height:39,width:35,count:34,regX:-27,regY:-10},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC3_head_base.png"},a.thinkingFrontC5_head=
{images:["./animations1366/superb/thinkingFrontC4_head.png"],frames:{height:40,width:36,count:34,regX:-27,regY:-9},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC4_head_base.png"},a.thinkingFrontC4_head={images:["./animations1366/superb/thinkingFrontC5_head.png"],frames:{height:40,width:36,count:34,regX:-29,regY:-9},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC5_head_base.png"},
a.thinkingFrontC6_head={images:["./animations1366/superb/thinkingFrontC6_head.png"],frames:{height:45,width:36,count:34,regX:-28,regY:-4},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC6_head_base.png"},a.thinkingFrontC8_head={images:["./animations1366/superb/thinkingFrontC7_head.png"],frames:{height:40,width:37,count:34,regX:-27,regY:-9},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,
end:10},baseImage:"./animations1366/superb/thinkingFrontC7_head_base.png"},a.thinkingFrontC7_head={images:["./animations1366/superb/thinkingFrontC8_head.png"],frames:{height:43,width:39,count:34,regX:-27,regY:-6},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC8_head_base.png"},a.thinkingFrontC9_head={images:["./animations1366/superb/thinkingFrontC9_head.png"],frames:{height:45,width:38,count:34,regX:-25,regY:-8},
animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC9_head_base.png"},a.thinkingFrontC10_head={images:["./animations1366/superb/thinkingFrontC10_head.png"],frames:{height:43,width:33,count:34,regX:-31,regY:-9},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC10_head_base.png"},a.thinkingFrontC11_head={images:["./animations1366/superb/thinkingFrontC11_head.png"],
frames:{height:42,width:32,count:34,regX:-31,regY:-10},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC11_head_base.png"},a.thinkingFrontC12_head={images:["./animations1366/superb/thinkingFrontC12_head.png"],frames:{height:42,width:34,count:34,regX:-30,regY:-11},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC12_head_base.png"},
a.thinkingFrontC1_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:34,regX:0,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC1_pants_base.png"},a.thinkingFrontC9_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:34,regX:0,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC9_pants_base.png"},
a.thinkingBackC1_body={images:["./animations1366/thinkingBackC1_body.png"],frames:{height:49,width:49,count:34,regX:-31,regY:-17},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC1_body_base.png"},a.thinkingBackC2_body={images:["./animations1366/thinkingBackC2_body.png"],frames:{height:50,width:49,count:34,regX:-31,regY:-17},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC2_body_base.png"},
a.thinkingBackC3_body={images:["./animations1366/thinkingBackC3_body.png"],frames:{height:50,width:49,count:34,regX:-31,regY:-17},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC3_body_base.png"},a.thinkingBackC4_body={images:["./animations1366/thinkingBackC4_body.png"],frames:{height:50,width:49,count:34,regX:-31,regY:-17},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC4_body_base.png"},
a.thinkingBackC5_body={images:["./animations1366/thinkingBackC5_body.png"],frames:{height:48,width:49,count:34,regX:-31,regY:-18},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC5_body_base.png"},a.thinkingBackC6_body={images:["./animations1366/thinkingBackC6_body.png"],frames:{height:48,width:49,count:34,regX:-31,regY:-18},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC6_body_base.png"},
a.thinkingBackC7_body={images:["./animations1366/thinkingBackC7_body.png"],frames:{height:50,width:49,count:34,regX:-31,regY:-17},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC7_body_base.png"},a.thinkingBackC8_body={images:["./animations1366/thinkingBackC8_body.png"],frames:{height:48,width:49,count:34,regX:-31,regY:-18},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC8_body_base.png"},
a.thinkingBackC9_body={images:["./animations1366/thinkingBackC9_body.png"],frames:{height:27,width:32,count:34,regX:-46,regY:-35},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC9_body_base.png"},a.thinkingBackC10_body={images:["./animations1366/thinkingBackC10_body.png"],frames:{height:22,width:32,count:34,regX:-46,regY:-35},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC10_body_base.png"},
a.thinkingBackC11_body={images:["./animations1366/thinkingBackC11_body.png"],frames:{height:22,width:32,count:34,regX:-46,regY:-35},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC11_body_base.png"},a.thinkingBackC12_body={images:["./animations1366/thinkingBackC12_body.png"],frames:{height:48,width:46,count:34,regX:-32,regY:-18},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC12_body_base.png"},
a.thinkingBackC1_chair={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:34,regX:0,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC1_chair_base.png"},a.thinkingBackC1_hand={images:["./animations1366/thinkingBackC1_hands.png"],frames:{height:46,width:45,count:34,regX:-26,regY:-11},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC1_hands_base.png"},
a.thinkingBackC4_hand={images:["./animations1366/thinkingBackC4_hands.png"],frames:{height:46,width:45,count:34,regX:-26,regY:-11},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC4_hands_base.png"},a.thinkingBackC5_hand={images:["./animations1366/thinkingBackC5_hands.png"],frames:{height:46,width:45,count:34,regX:-26,regY:-11},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC5_hands_base.png"},
a.thinkingBackC9_hand={images:["./animations1366/thinkingBackC9_hands.png"],frames:{height:54,width:41,count:34,regX:-27,regY:-12},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC9_hands_base.png"},a.thinkingBackC10_hand={images:["./animations1366/thinkingBackC10_hands.png"],frames:{height:54,width:41,count:34,regX:-27,regY:-12},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC10_hands_base.png"},
a.thinkingBackC12_hand={images:["./animations1366/thinkingBackC12_hands.png"],frames:{height:54,width:41,count:34,regX:-27,regY:-12},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC12_hands_base.png"},a.thinkingBackC1_head={images:["./animations1366/thinkingBackC1_head.png"],frames:{height:40,width:35,count:34,regX:-44,regY:-5},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC1_head_base.png"},
a.thinkingBackC2_head={images:["./animations1366/thinkingBackC2_head.png"],frames:{height:46,width:35,count:34,regX:-44,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC2_head_base.png"},a.thinkingBackC3_head={images:["./animations1366/thinkingBackC3_head.png"],frames:{height:44,width:37,count:34,regX:-44,regY:-2},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC3_head_base.png"},
a.thinkingBackC4_head={images:["./animations1366/thinkingBackC4_head.png"],frames:{height:43,width:37,count:34,regX:-44,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC4_head_base.png"},a.thinkingBackC5_head={images:["./animations1366/thinkingBackC5_head.png"],frames:{height:44,width:35,count:34,regX:-44,regY:-4},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC5_head_base.png"},
a.thinkingBackC6_head={images:["./animations1366/thinkingBackC6_head.png"],frames:{height:41,width:37,count:34,regX:-44,regY:-3},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC6_head_base.png"},a.thinkingBackC7_head={images:["./animations1366/thinkingBackC7_head.png"],frames:{height:44,width:38,count:34,regX:-44,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC7_head_base.png"},
a.thinkingBackC8_head={images:["./animations1366/thinkingBackC8_head.png"],frames:{height:40,width:36,count:34,regX:-43,regY:-4},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC8_head_base.png"},a.thinkingBackC9_head={images:["./animations1366/thinkingBackC9_head.png"],frames:{height:52,width:42,count:34,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC9_head_base.png"},
a.thinkingBackC10_head={images:["./animations1366/thinkingBackC10_head.png"],frames:{height:53,width:42,count:34,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC10_head_base.png"},a.thinkingBackC11_head={images:["./animations1366/thinkingBackC11_head.png"],frames:{height:53,width:40,count:34,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC11_head_base.png"},
a.thinkingBackC12_head={images:["./animations1366/thinkingBackC12_head.png"],frames:{height:53,width:41,count:34,regX:-42,regY:-4},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC12_head_base.png"},a.thinkingBackC1_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:34,regX:0,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC1_pants_base.png"},
a.thinkingBackC9_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:34,regX:0,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC9_pants_base.png"},a.airCon={images:["./animations1366/superb/airCon.png"],frames:{height:37,width:55,count:21,regX:-210,regY:-218},animations:{loop:[0,20]},targetFPS:{loop:10},baseImage:"./animations1366/superb/airCon_base.png"},a.waterCooler={images:["./animations1366/superb/waterCooler.png"],
frames:{height:20,width:8,count:16,regX:-20,regY:-32},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/waterCooler_base.png"},a.printer={images:["./animations1366/superb/printer.png"],frames:{height:24,width:29,count:41,regX:-32,regY:-48},animations:{loop:[0,40]},targetFPS:{loop:10},baseImage:"./animations1366/superb/printer_base.png"},a.rndPrinterLeftScreen={images:["./animations1366/superb/rndPrinterLeftScreen.png"],frames:{height:72,width:101,count:30,regX:-10,regY:-36},
animations:{loop:[0,29]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndPrinterLeftScreen_base.png"},a.rndPrinterRightScreen={images:["./animations1366/superb/rndPrinterRightScreen.png"],frames:{height:97,width:100,count:30,regX:-22,regY:-9},animations:{loop:[0,29]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndPrinterRightScreen_base.png"}):(a.typingScreenL1={images:["./animations/typingScreenL1.png"],frames:{regY:0,height:60,regX:0,width:44,count:46},animations:{loop:[0,45]},
targetFPS:{loop:7}},a.typingScreenL2={images:["./animations/superb/typingScreenL2.png"],frames:{regY:-6,height:74,regX:-18,width:51,count:54},animations:{loop:[0,53]},targetFPS:{loop:30},baseImage:"./animations/superb/typingScreenL2_base.png"},a.typingScreenL3={images:["./animations/superb/typingScreenL3.png"],frames:{regY:-24,height:55,regX:-39,width:44,count:56},animations:{loop:[0,55]},targetFPS:{loop:15},baseImage:"./animations/superb/typingScreenL3_base.png"},a.typingScreenL4={images:["./animations/superb/typingScreenL4.png"],
frames:{height:92,width:74,count:250,regX:-0.0,regY:-0.0},animations:{loop:[0,249]},targetFPS:{loop:15},baseImage:"./animations/superb/typingScreenL4_base.png"},a.hwLabScreenWall={images:"./animations/superb/hwLabScreenWall_0.png ./animations/superb/hwLabScreenWall_1.png ./animations/superb/hwLabScreenWall_2.png ./animations/superb/hwLabScreenWall_3.png ./animations/superb/hwLabScreenWall_4.png ./animations/superb/hwLabScreenWall_5.png".split(" "),frames:{height:407,width:546,count:90,regX:-22,regY:-123},
animations:{loop:[0,89]},targetFPS:{loop:30},baseImage:"./animations/superb/hwLabScreenWall_base.png"},a.hwTV={images:"./animations/superb/hwTV_0.png ./animations/superb/hwTV_1.png ./animations/superb/hwTV_2.png ./animations/superb/hwTV_3.png ./animations/superb/hwTV_4.png ./animations/superb/hwTV_5.png".split(" "),frames:{height:343,width:289,count:182,regX:-20,regY:-35},animations:{loop:[0,181]},targetFPS:{loop:30},baseImage:"./animations/superb/hwTV_base.png"},a.hwFrontFemale1={images:["./animations/superb/hwFrontFemale1.png"],
frames:{height:232,width:75,count:90,regX:-45,regY:-13},animations:{loop:[0,89]},targetFPS:{loop:30},baseImage:"./animations/superb/hwFrontFemale1_base.png"},a.hwFrontFemale2={images:["./animations/superb/hwFrontFemale2.png"],frames:{height:226,width:75,count:90,regX:-45,regY:-19},animations:{loop:[0,89]},targetFPS:{loop:30},baseImage:"./animations/superb/hwFrontFemale2_base.png"},a.hwFrontFemale4={images:["./animations/superb/hwFrontFemale4.png"],frames:{height:226,width:85,count:31,regX:-34,regY:-19},
animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwFrontFemale4_base.png"},a.hwBackFemale1={images:["./animations/superb/hwBackFemale1.png"],frames:{height:225,width:68,count:31,regX:-40,regY:-19},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwBackFemale1_base.png"},a.hwBackFemale2={images:["./animations/superb/hwBackFemale2.png"],frames:{height:224,width:68,count:31,regX:-40,regY:-20},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwBackFemale2_base.png"},
a.hwBackFemale3={images:["./animations/superb/hwBackFemale3.png"],frames:{height:110,width:90,count:31,regX:-41,regY:-18},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwBackFemale3_base.png"},a.hwBackFemale4={images:["./animations/superb/hwBackFemale4.png"],frames:{height:108,width:92,count:31,regX:-40,regY:-20},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwBackFemale4_base.png"},a.hwFrontMale2={images:["./animations/superb/hwFrontMale2.png"],
frames:{height:227,width:81,count:90,regX:-46,regY:-19},animations:{loop:[0,89]},targetFPS:{loop:30},baseImage:"./animations/superb/hwFrontMale2_base.png"},a.hwFrontMale3={images:["./animations/superb/hwFrontMale3.png"],frames:{height:220,width:93,count:31,regX:-28,regY:-26},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwFrontMale3_base.png"},a.hwFrontMale4={images:["./animations/superb/hwFrontMale4.png"],frames:{height:227,width:93,count:31,regX:-28,regY:-19},animations:{loop:[0,
30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwFrontMale4_base.png"},a.hwBackMale1={images:["./animations/superb/hwBackMale1.png"],frames:{height:226,width:79,count:31,regX:-37,regY:-21},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwBackMale1_base.png"},a.hwBackMale2={images:["./animations/superb/hwBackMale2.png"],frames:{height:113,width:101,count:31,regX:-37,regY:-21},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwBackMale2_base.png"},
a.rndActor1={images:["./animations/superb/rndActor1.png"],frames:{height:227,width:133,count:31,regX:-9,regY:-23},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/rndActor1_base.png"},a.rndFemaleBoardBack1={images:["./animations/superb/rndFemaleBoardBack1.png"],frames:{height:227,width:89,count:31,regX:-41,regY:-20},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/rndFemaleBoardBack1_base.png"},a.rndMaleBoardFront1={images:["./animations/superb/rndMaleBoardFront1.png"],
frames:{height:235,width:125,count:46,regX:-19,regY:-12},animations:{loop:[0,45]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleBoardFront1_base.png"},a.rndFemaleTypingBack1={images:["./animations/superb/rndFemaleTypingBack1.png"],frames:{height:224,width:96,count:51,regX:-31,regY:-26},animations:{loop:[0,50]},targetFPS:{loop:30},baseImage:"./animations/superb/rndFemaleTypingBack1_base.png"},a.rndMaleTypingBack1={images:["./animations/superb/rndMaleTypingBack1.png"],frames:{height:233,
width:99,count:51,regX:-23,regY:-17},animations:{loop:[0,50]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleTypingBack1_base.png"},a.rndOperator1={images:["./animations/superb/rndOperator1.png"],frames:{height:218,width:100,count:31,regX:-24,regY:-27},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/rndOperator1_base.png"},a.rndFemaleTableBack1={images:["./animations/superb/rndFemaleTableBack1.png"],frames:{height:121,width:101,count:46,regX:-70,regY:-6},animations:{loop:[0,
45]},targetFPS:{loop:30},baseImage:"./animations/superb/rndFemaleTableBack1_base.png"},a.rndFemaleTableFront1_body={images:["./animations/superb/rndFemaleTableFront1_body.png"],frames:{height:143,width:98,count:46,regX:-49,regY:-32},animations:{loop:[0,45]},targetFPS:{loop:30},baseImage:"./animations/superb/rndFemaleTableFront1_body_base.png"},a.rndFemaleTableFront1_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:46,regX:0,regY:0},animations:{loop:[0,45]},targetFPS:{loop:30},
baseImage:"./animations/superb/rndFemaleTableFront1_pants_base.png"},a.rndMaleFrontTable1_body={images:["./animations/superb/rndMaleFrontTable1_body.png"],frames:{height:148,width:90,count:46,regX:-51,regY:-21},animations:{loop:[0,45]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleFrontTable1_body_base.png"},a.rndMaleFrontTable1_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:46,regX:0,regY:0},animations:{loop:[0,45]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleFrontTable1_pants_base.png"},
a.rndMaleFrontTable2_body={images:["./animations/superb/rndMaleFrontTable2_body.png"],frames:{height:117,width:105,count:92,regX:-51,regY:-25},animations:{loop:[0,91]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleFrontTable2_body_base.png"},a.rndMaleFrontTable2_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:92,regX:0,regY:0},animations:{loop:[0,91]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleFrontTable2_pants_base.png"},a.rndMaleTableBack1=
{images:["./animations/superb/rndMaleTableBack1.png"],frames:{height:125,width:96,count:92,regX:-69,regY:-9},animations:{loop:[0,45]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleTableBack1_base.png"},a.rndMaleTableBack2={images:["./animations/superb/rndMaleTableBack2.png"],frames:{height:136,width:101,count:46,regX:-68,regY:0},animations:{loop:[0,45]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleTableBack2_base.png"},a.notepadBackC1_body={images:["./animations/notepadBackC1_body.png"],
frames:{height:70,width:106,count:113,regX:-41,regY:-56},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC1_body_base.png"},a.notepadBackC2_body={images:["./animations/notepadBackC2_body.png"],frames:{height:70,width:106,count:113,regX:-41,regY:-56},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC2_body_base.png"},a.notepadBackC3_body={images:["./animations/notepadBackC3_body.png"],
frames:{height:70,width:106,count:113,regX:-41,regY:-56},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC3_body_base.png"},a.notepadBackC4_body={images:["./animations/notepadBackC4_body.png"],frames:{height:70,width:106,count:113,regX:-41,regY:-56},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC4_body_base.png"},a.notepadBackC5_body={images:["./animations/notepadBackC5_body.png"],
frames:{height:71,width:105,count:113,regX:-42,regY:-55},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC5_body_base.png"},a.notepadBackC6_body={images:["./animations/notepadBackC6_body.png"],frames:{height:71,width:105,count:113,regX:-42,regY:-55},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC6_body_base.png"},a.notepadBackC7_body={images:["./animations/notepadBackC7_body.png"],
frames:{height:70,width:106,count:113,regX:-41,regY:-56},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC7_body_base.png"},a.notepadBackC8_body={images:["./animations/notepadBackC8_body.png"],frames:{height:70,width:105,count:113,regX:-42,regY:-56},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC8_body_base.png"},a.notepadBackC9_body={images:["./animations/notepadBackC9_body.png"],
frames:{height:67,width:61,count:113,regX:-81,regY:-61},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC9_body_base.png"},a.notepadBackC10_body={images:["./animations/notepadBackC10_body.png"],frames:{height:67,width:61,count:113,regX:-81,regY:-61},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC10_body_base.png"},a.notepadBackC11_body={images:["./animations/notepadBackC11_body.png"],
frames:{height:67,width:60,count:113,regX:-81,regY:-61},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC11_body_base.png"},a.notepadBackC12_body={images:["./animations/notepadBackC12_body.png"],frames:{height:72,width:105,count:113,regX:-37,regY:-56},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC12_body_base.png"},a.notepadBackC1_chair={images:["./animations/empty_sheet.png"],
frames:{height:1,width:1,count:113,regX:0,regY:0},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC1_chair_base.png"},a.notepadBackC1_hand={images:["./animations/notepadBackC1_hands.png"],frames:{height:77,width:100,count:113,regX:-14,regY:-44},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30}},a.notepadBackC4_hand={images:["./animations/notepadBackC4_hands.png"],frames:{height:77,width:100,
count:113,regX:-14,regY:-44},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30}},a.notepadBackC5_hand={images:["./animations/notepadBackC5_hands.png"],frames:{height:77,width:100,count:113,regX:-14,regY:-44},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30}},a.notepadBackC9_hand={images:["./animations/notepadBackC9_hands.png"],frames:{height:84,width:114,count:113,regX:-11,regY:-44},animations:{start:[0,0],loop:[0,112],end:[112,
112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC9_hands_base.png"},a.notepadBackC10_hand={images:["./animations/notepadBackC10_hands.png"],frames:{height:84,width:115,count:113,regX:-10,regY:-44},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC10_hands_base.png"},a.notepadBackC12_hand={images:["./animations/notepadBackC12_hands.png"],frames:{height:84,width:114,count:113,regX:-11,regY:-44},animations:{start:[0,
0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC12_hands_base.png"},a.notepadBackC1_head={images:["./animations/notepadBackC1_head.png"],frames:{height:76,width:80,count:113,regX:-63,regY:-11},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC1_head_base.png"},a.notepadBackC2_head={images:["./animations/notepadBackC2_head.png"],frames:{height:81,width:78,count:113,regX:-64,
regY:-2},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC2_head_base.png"},a.notepadBackC3_head={images:["./animations/notepadBackC3_head.png"],frames:{height:78,width:81,count:113,regX:-62,regY:-7},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC3_head_base.png"},a.notepadBackC4_head={images:["./animations/notepadBackC4_head.png"],frames:{height:78,
width:83,count:113,regX:-62,regY:-3},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC4_head_base.png"},a.notepadBackC5_head={images:["./animations/notepadBackC5_head.png"],frames:{height:76,width:78,count:113,regX:-64,regY:-12},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC5_head_base.png"},a.notepadBackC6_head={images:["./animations/notepadBackC6_head.png"],
frames:{height:75,width:82,count:113,regX:-63,regY:-8},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC6_head_base.png"},a.notepadBackC7_head={images:["./animations/notepadBackC7_head.png"],frames:{height:78,width:84,count:113,regX:-62,regY:-3},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC7_head_base.png"},a.notepadBackC8_head={images:["./animations/notepadBackC8_head.png"],
frames:{height:75,width:81,count:113,regX:-62,regY:-12},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC8_head_base.png"},a.notepadBackC9_head={images:["./animations/notepadBackC9_head.png"],frames:{height:92,width:91,count:113,regX:-65,regY:-12},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC9_head_base.png"},a.notepadBackC10_head={images:["./animations/notepadBackC10_head.png"],
frames:{height:91,width:91,count:113,regX:-65,regY:-13},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC10_head_base.png"},a.notepadBackC11_head={images:["./animations/notepadBackC11_head.png"],frames:{height:91,width:84,count:113,regX:-64,regY:-13},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC11_head_base.png"},a.notepadBackC12_head={images:["./animations/notepadBackC12_head.png"],
frames:{height:91,width:87,count:113,regX:-61,regY:-12},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC12_head_base.png"},a.notepadBackC1_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:113,regX:0,regY:0},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC1_pants_base.png"},a.notepadBackC9_pants={images:["./animations/empty_sheet.png"],
frames:{height:1,width:1,count:113,regX:0,regY:0},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC9_pants_base.png"},a.notepadImage={images:["./animations/notepadImage.png"],frames:{regY:0,height:200,regX:0,width:200,count:1},animations:{all:[0,0]},targetFPS:{all:7}},a.notepadFrontC1_body={images:["./animations/superb/notepadFrontC1_body.png"],frames:{height:84,width:109,count:113,regX:-57,regY:-74},animations:{start:[0,0],
loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC1_body_base.png"},a.notepadFrontC2_body={images:["./animations/superb/notepadFrontC2_body.png"],frames:{height:85,width:110,count:113,regX:-57,regY:-74},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC2_body_base.png"},a.notepadFrontC3_body={images:["./animations/superb/notepadFrontC3_body.png"],frames:{height:84,
width:110,count:113,regX:-57,regY:-74},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC3_body_base.png"},a.notepadFrontC4_body={images:["./animations/superb/notepadFrontC4_body.png"],frames:{height:85,width:110,count:113,regX:-57,regY:-74},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC4_body_base.png"},a.notepadFrontC5_body={images:["./animations/superb/notepadFrontC5_body.png"],
frames:{height:84,width:110,count:113,regX:-57,regY:-75},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC5_body_base.png"},a.notepadFrontC6_body={images:["./animations/superb/notepadFrontC6_body.png"],frames:{height:84,width:110,count:113,regX:-57,regY:-75},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC6_body_base.png"},a.notepadFrontC7_body=
{images:["./animations/superb/notepadFrontC7_body.png"],frames:{height:84,width:110,count:113,regX:-57,regY:-75},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC7_body_base.png"},a.notepadFrontC8_body={images:["./animations/superb/notepadFrontC8_body.png"],frames:{height:85,width:110,count:113,regX:-57,regY:-74},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC8_body_base.png"},
a.notepadFrontC9_body={images:["./animations/superb/notepadFrontC9_body.png"],frames:{height:84,width:107,count:113,regX:-57,regY:-74},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC9_body_base.png"},a.notepadFrontC10_body={images:["./animations/superb/notepadFrontC10_body.png"],frames:{height:84,width:107,count:113,regX:-57,regY:-74},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,
end:30},baseImage:"./animations/superb/notepadFrontC10_body_base.png"},a.notepadFrontC11_body={images:["./animations/superb/notepadFrontC11_body.png"],frames:{height:77,width:79,count:113,regX:-55,regY:-74},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC11_body_base.png"},a.notepadFrontC12_body={images:["./animations/superb/notepadFrontC12_body.png"],frames:{height:76,width:77,count:113,regX:-58,regY:-74},animations:{start:[0,
0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC12_body_base.png"},a.notepadFrontC1_chair={images:["./animations/superb/notepadFrontC1_chair.png"],frames:{height:96,width:121,count:113,regX:-21,regY:-91},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC1_chair_base.png"},a.notepadFrontC1_hand={images:["./animations/superb/notepadFrontC1_hands.png"],frames:{height:100,
width:118,count:113,regX:-81,regY:-72},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30}},a.notepadFrontC4_hand={images:["./animations/superb/notepadFrontC4_hands.png"],frames:{height:100,width:118,count:113,regX:-81,regY:-72},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30}},a.notepadFrontC5_hand={images:["./animations/superb/notepadFrontC5_hands.png"],frames:{height:100,width:118,count:113,regX:-81,regY:-72},animations:{start:[0,
0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30}},a.notepadFrontC9_hand={images:["./animations/superb/notepadFrontC9_hands.png"],frames:{height:97,width:139,count:113,regX:-60,regY:-72},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC9_hands_base.png"},a.notepadFrontC10_hand={images:["./animations/superb/notepadFrontC10_hands.png"],frames:{height:97,width:139,count:113,regX:-60,regY:-72},animations:{start:[0,
0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC10_hands_base.png"},a.notepadFrontC12_hand={images:["./animations/superb/notepadFrontC12_hands.png"],frames:{height:97,width:139,count:113,regX:-60,regY:-72},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC12_hands_base.png"},a.notepadFrontC1_head={images:["./animations/superb/notepadFrontC1_head.png"],frames:{height:71,
width:79,count:113,regX:-56,regY:-18},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC1_head_base.png"},a.notepadFrontC2_head={images:["./animations/superb/notepadFrontC2_head.png"],frames:{height:73,width:83,count:113,regX:-55,regY:-16},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC2_head_base.png"},a.notepadFrontC3_head={images:["./animations/superb/notepadFrontC3_head.png"],
frames:{height:68,width:74,count:113,regX:-58,regY:-21},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC3_head_base.png"},a.notepadFrontC4_head={images:["./animations/superb/notepadFrontC4_head.png"],frames:{height:70,width:77,count:113,regX:-61,regY:-20},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC4_head_base.png"},a.notepadFrontC5_head=
{images:["./animations/superb/notepadFrontC5_head.png"],frames:{height:72,width:75,count:113,regX:-58,regY:-18},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC5_head_base.png"},a.notepadFrontC6_head={images:["./animations/superb/notepadFrontC6_head.png"],frames:{height:78,width:76,count:113,regX:-60,regY:-11},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC6_head_base.png"},
a.notepadFrontC7_head={images:["./animations/superb/notepadFrontC7_head.png"],frames:{height:73,width:81,count:113,regX:-59,regY:-16},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC7_head_base.png"},a.notepadFrontC8_head={images:["./animations/superb/notepadFrontC8_head.png"],frames:{height:72,width:77,count:113,regX:-58,regY:-18},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},
baseImage:"./animations/superb/notepadFrontC8_head_base.png"},a.notepadFrontC9_head={images:["./animations/superb/notepadFrontC9_head.png"],frames:{height:78,width:83,count:113,regX:-49,regY:-17},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC9_head_base.png"},a.notepadFrontC10_head={images:["./animations/superb/notepadFrontC10_head.png"],frames:{height:77,width:74,count:113,regX:-61,regY:-18},animations:{start:[0,
0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC10_head_base.png"},a.notepadFrontC11_head={images:["./animations/superb/notepadFrontC11_head.png"],frames:{height:74,width:72,count:113,regX:-60,regY:-21},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC11_head_base.png"},a.notepadFrontC12_head={images:["./animations/superb/notepadFrontC12_head.png"],frames:{height:74,
width:74,count:113,regX:-58,regY:-21},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC12_head_base.png"},a.notepadFrontC1_pants={images:["./animations/superb/notepadFrontC1_pants.png"],frames:{height:51,width:79,count:113,regX:-62,regY:-136},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC1_pants_base.png"},a.notepadFrontC9_pants={images:["./animations/superb/notepadFrontC9_pants.png"],
frames:{height:44,width:66,count:113,regX:-62,regY:-142},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC9_pants_base.png"},a.teaCupImage={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:1,regX:0,regY:0},animations:{all:[0,0]},targetFPS:{all:7},baseImage:"./animations/superb/teacup.png"},a.teaCupImageLevel2={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:1,regX:0,regY:0},
animations:{all:[0,0]},targetFPS:{all:7},baseImage:"./animations/superb/teacupLevel2.png"},a.pong={images:["./animations/pong.png"],frames:{height:146,regX:-29,count:120,regY:-26,width:147},animations:{all:[0,119]},targetFPS:{all:20},baseImage:"./animations/pong_base.png"},a.idleBackC1_body={images:["./animations/idleBackC1_body.png"],frames:{height:61,width:94,count:30,regX:-63,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC1_body_base.png"},
a.idleBackC2_body={images:["./animations/idleBackC2_body.png"],frames:{height:61,width:94,count:30,regX:-63,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC2_body_base.png"},a.idleBackC3_body={images:["./animations/idleBackC3_body.png"],frames:{height:61,width:94,count:30,regX:-63,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC3_body_base.png"},
a.idleBackC4_body={images:["./animations/idleBackC4_body.png"],frames:{height:61,width:94,count:30,regX:-63,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC4_body_base.png"},a.idleBackC5_body={images:["./animations/idleBackC5_body.png"],frames:{height:61,width:93,count:30,regX:-64,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC5_body_base.png"},
a.idleBackC6_body={images:["./animations/idleBackC6_body.png"],frames:{height:61,width:93,count:30,regX:-64,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC6_body_base.png"},a.idleBackC7_body={images:["./animations/idleBackC7_body.png"],frames:{height:61,width:94,count:30,regX:-63,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC7_body_base.png"},
a.idleBackC8_body={images:["./animations/idleBackC8_body.png"],frames:{height:61,width:93,count:30,regX:-64,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC8_body_base.png"},a.idleBackC9_body={images:["./animations/idleBackC9_body.png"],frames:{height:65,width:61,count:30,regX:-91,regY:-62},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC9_body_base.png"},
a.idleBackC10_body={images:["./animations/idleBackC10_body.png"],frames:{height:65,width:61,count:30,regX:-90,regY:-62},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC10_body_base.png"},a.idleBackC11_body={images:["./animations/idleBackC11_body.png"],frames:{height:65,width:61,count:30,regX:-91,regY:-62},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC11_body_base.png"},
a.idleBackC12_body={images:["./animations/idleBackC12_body.png"],frames:{height:65,width:87,count:30,regX:-64,regY:-62},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC12_body_base.png"},a.idleBackC1_chair={images:["./animations/idleBackC1_chair.png"],frames:{height:74,width:104,count:30,regX:-68,regY:-86},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC1_chair_base.png"},
a.idleBackC1_hand={images:["./animations/idleBackC1_hands.png"],frames:{height:39,width:61,count:30,regX:-52,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC1_hands_base.png"},a.idleBackC4_hand={images:["./animations/idleBackC4_hands.png"],frames:{height:39,width:60,count:30,regX:-52,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC4_hands_base.png"},
a.idleBackC5_hand={images:["./animations/idleBackC5_hands.png"],frames:{height:39,width:60,count:30,regX:-52,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC5_hands_base.png"},a.idleBackC9_hand={images:["./animations/idleBackC9_hands.png"],frames:{height:55,width:75,count:30,regX:-54,regY:-64},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC9_hands_base.png"},
a.idleBackC10_hand={images:["./animations/idleBackC10_hands.png"],frames:{height:55,width:75,count:30,regX:-54,regY:-64},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC10_hands_base.png"},a.idleBackC12_hand={images:["./animations/idleBackC12_hands.png"],frames:{height:55,width:75,count:30,regX:-54,regY:-64},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC12_hands_base.png"},
a.idleBackC1_head={images:["./animations/idleBackC1_head.png"],frames:{height:72,width:77,count:30,regX:-85,regY:-12},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC1_head_base.png"},a.idleBackC2_head={images:["./animations/idleBackC2_head.png"],frames:{height:84,width:77,count:30,regX:-85,regY:-1},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC2_head_base.png"},
a.idleBackC3_head={images:["./animations/idleBackC3_head.png"],frames:{height:78,width:81,count:30,regX:-85,regY:-7},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC3_head_base.png"},a.idleBackC4_head={images:["./animations/idleBackC4_head.png"],frames:{height:76,width:83,count:30,regX:-85,regY:-3},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC4_head_base.png"},
a.idleBackC5_head={images:["./animations/idleBackC5_head.png"],frames:{height:76,width:77,count:30,regX:-85,regY:-11},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC5_head_base.png"},a.idleBackC6_head={images:["./animations/idleBackC6_head.png"],frames:{height:74,width:81,count:30,regX:-85,regY:-8},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC6_head_base.png"},
a.idleBackC7_head={images:["./animations/idleBackC7_head.png"],frames:{height:77,width:84,count:30,regX:-85,regY:-3},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC7_head_base.png"},a.idleBackC8_head={images:["./animations/idleBackC8_head.png"],frames:{height:75,width:79,count:30,regX:-83,regY:-11},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC8_head_base.png"},
a.idleBackC9_head={images:["./animations/idleBackC9_head.png"],frames:{height:91,width:84,count:30,regX:-85,regY:-12},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC9_head_base.png"},a.idleBackC10_head={images:["./animations/idleBackC10_head.png"],frames:{height:92,width:84,count:30,regX:-85,regY:-12},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC10_head_base.png"},
a.idleBackC11_head={images:["./animations/idleBackC11_head.png"],frames:{height:92,width:80,count:30,regX:-85,regY:-12},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC11_head_base.png"},a.idleBackC12_head={images:["./animations/idleBackC12_head.png"],frames:{height:92,width:83,count:30,regX:-82,regY:-10},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC12_head_base.png"},
a.idleBackC1_pants={images:["./animations/idleBackC1_pants.png"],frames:{height:59,width:82,count:30,regX:-40,regY:-111},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC1_pants_base.png"},a.idleBackC9_pants={images:["./animations/idleBackC9_pants.png"],frames:{height:56,width:79,count:30,regX:-42,regY:-121},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC9_pants_base.png"},
a.idleFrontC1_body={images:["./animations/superb/idleFrontC1_body.png"],frames:{height:83,width:90,count:30,regX:-50,regY:-75},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC1_body_base.png"},a.idleFrontC2_body={images:["./animations/superb/idleFrontC2_body.png"],frames:{height:85,width:91,count:30,regX:-50,regY:-75},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC2_body_base.png"},
a.idleFrontC3_body={images:["./animations/superb/idleFrontC3_body.png"],frames:{height:84,width:90,count:30,regX:-50,regY:-75},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC3_body_base.png"},a.idleFrontC4_body={images:["./animations/superb/idleFrontC4_body.png"],frames:{height:85,width:91,count:30,regX:-50,regY:-75},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC4_body_base.png"},
a.idleFrontC5_body={images:["./animations/superb/idleFrontC5_body.png"],frames:{height:84,width:91,count:30,regX:-50,regY:-76},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC5_body_base.png"},a.idleFrontC6_body={images:["./animations/superb/idleFrontC6_body.png"],frames:{height:84,width:90,count:30,regX:-51,regY:-76},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC6_body_base.png"},
a.idleFrontC7_body={images:["./animations/superb/idleFrontC7_body.png"],frames:{height:84,width:91,count:30,regX:-50,regY:-76},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC7_body_base.png"},a.idleFrontC8_body={images:["./animations/superb/idleFrontC8_body.png"],frames:{height:85,width:91,count:30,regX:-50,regY:-75},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC8_body_base.png"},
a.idleFrontC9_body={images:["./animations/superb/idleFrontC9_body.png"],frames:{height:80,width:85,count:30,regX:-51,regY:-78},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC9_body_base.png"},a.idleFrontC10_body={images:["./animations/superb/idleFrontC10_body.png"],frames:{height:81,width:85,count:30,regX:-51,regY:-77},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC10_body_base.png"},
a.idleFrontC11_body={images:["./animations/superb/idleFrontC11_body.png"],frames:{height:73,width:67,count:30,regX:-48,regY:-78},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC11_body_base.png"},a.idleFrontC12_body={images:["./animations/superb/idleFrontC12_body.png"],frames:{height:73,width:65,count:30,regX:-51,regY:-78},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC12_body_base.png"},
a.idleFrontC1_chair={images:["./animations/superb/idleFrontC1_chair.png"],frames:{height:71,width:67,count:30,regX:-48,regY:-92},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC1_chair_base.png"},a.idleFrontC1_hand={images:["./animations/superb/idleFrontC1_hands.png"],frames:{height:46,width:64,count:30,regX:-89,regY:-122},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC1_hands_base.png"},
a.idleFrontC4_hand={images:["./animations/superb/idleFrontC4_hands.png"],frames:{height:46,width:64,count:30,regX:-89,regY:-122},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC4_hands_base.png"},a.idleFrontC5_hand={images:["./animations/superb/idleFrontC5_hands.png"],frames:{height:46,width:64,count:30,regX:-89,regY:-122},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC5_hands_base.png"},
a.idleFrontC9_hand={images:["./animations/superb/idleFrontC9_hands.png"],frames:{height:66,width:96,count:30,regX:-54,regY:-100},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC9_hands_base.png"},a.idleFrontC10_hand={images:["./animations/superb/idleFrontC10_hands.png"],frames:{height:66,width:96,count:30,regX:-54,regY:-100},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC10_hands_base.png"},
a.idleFrontC12_hand={images:["./animations/superb/idleFrontC12_hands.png"],frames:{height:66,width:96,count:30,regX:-54,regY:-100},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC12_hands_base.png"},a.idleFrontC1_head={images:["./animations/superb/idleFrontC1_head.png"],frames:{height:69,width:73,count:30,regX:-42,regY:-19},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC1_head_base.png"},
a.idleFrontC2_head={images:["./animations/superb/idleFrontC2_head.png"],frames:{height:70,width:76,count:30,regX:-41,regY:-18},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC2_head_base.png"},a.idleFrontC3_head={images:["./animations/superb/idleFrontC3_head.png"],frames:{height:66,width:68,count:30,regX:-44,regY:-22},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC3_head_base.png"},
a.idleFrontC4_head={images:["./animations/superb/idleFrontC4_head.png"],frames:{height:69,width:71,count:30,regX:-47,regY:-20},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC4_head_base.png"},a.idleFrontC5_head={images:["./animations/superb/idleFrontC5_head.png"],frames:{height:69,width:69,count:30,regX:-45,regY:-20},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC5_head_base.png"},
a.idleFrontC6_head={images:["./animations/superb/idleFrontC6_head.png"],frames:{height:78,width:69,count:30,regX:-46,regY:-10},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC6_head_base.png"},a.idleFrontC7_head={images:["./animations/superb/idleFrontC7_head.png"],frames:{height:73,width:75,count:30,regX:-44,regY:-15},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC7_head_base.png"},
a.idleFrontC8_head={images:["./animations/superb/idleFrontC8_head.png"],frames:{height:70,width:72,count:30,regX:-44,regY:-19},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC8_head_base.png"},a.idleFrontC9_head={images:["./animations/superb/idleFrontC9_head.png"],frames:{height:79,width:73,count:30,regX:-40,regY:-20},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC9_head_base.png"},
a.idleFrontC10_head={images:["./animations/superb/idleFrontC10_head.png"],frames:{height:74,width:69,count:30,regX:-47,regY:-20},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC10_head_base.png"},a.idleFrontC11_head={images:["./animations/superb/idleFrontC11_head.png"],frames:{height:72,width:66,count:30,regX:-47,regY:-22},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC11_head_base.png"},
a.idleFrontC12_head={images:["./animations/superb/idleFrontC12_head.png"],frames:{height:77,width:69,count:30,regX:-46,regY:-22},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC12_head_base.png"},a.idleFrontC1_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:30,regX:0,regY:0},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC1_pants_base.png"},
a.idleFrontC9_pants={images:["./animations/superb/idleFrontC9_pants.png"],frames:{height:41,width:63,count:30,regX:-62,regY:-154},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC9_pants_base.png"},a.typingBackC1_body={images:["./animations/typingBackC1_body.png"],frames:{height:56,width:84,count:51,regX:-63,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC1_body_base.png"},
a.typingBackC2_body={images:["./animations/typingBackC2_body.png"],frames:{height:56,width:85,count:51,regX:-62,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC2_body_base.png"},a.typingBackC3_body={images:["./animations/typingBackC3_body.png"],frames:{height:56,width:85,count:51,regX:-62,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC3_body_base.png"},
a.typingBackC4_body={images:["./animations/typingBackC4_body.png"],frames:{height:56,width:85,count:51,regX:-62,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC4_body_base.png"},a.typingBackC5_body={images:["./animations/typingBackC5_body.png"],frames:{height:56,width:84,count:51,regX:-63,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC5_body_base.png"},
a.typingBackC6_body={images:["./animations/typingBackC6_body.png"],frames:{height:56,width:84,count:51,regX:-63,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC6_body_base.png"},a.typingBackC7_body={images:["./animations/typingBackC7_body.png"],frames:{height:56,width:85,count:51,regX:-62,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC7_body_base.png"},
a.typingBackC8_body={images:["./animations/typingBackC8_body.png"],frames:{height:56,width:84,count:51,regX:-63,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC8_body_base.png"},a.typingBackC9_body={images:["./animations/typingBackC9_body.png"],frames:{height:26,width:51,count:51,regX:-91,regY:-77},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC9_body_base.png"},
a.typingBackC10_body={images:["./animations/typingBackC10_body.png"],frames:{height:26,width:52,count:51,regX:-90,regY:-77},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC10_body_base.png"},a.typingBackC11_body={images:["./animations/typingBackC11_body.png"],frames:{height:27,width:52,count:51,regX:-90,regY:-77},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC11_body_base.png"},
a.typingBackC12_body={images:["./animations/typingBackC12_body.png"],frames:{height:56,width:79,count:51,regX:-63,regY:-64},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC12_body_base.png"},a.typingBackC1_chair={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:51,regX:0,regY:0},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC1_chair_base.png"},
a.typingBackC1_hand={images:["./animations/typingBackC1_hands.png"],frames:{height:41,width:50,count:51,regX:-49,regY:-63},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC1_hands_base.png"},a.typingBackC4_hand={images:["./animations/typingBackC4_hands.png"],frames:{height:41,width:50,count:51,regX:-49,regY:-63},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC4_hands_base.png"},
a.typingBackC5_hand={images:["./animations/typingBackC5_hands.png"],frames:{height:41,width:50,count:51,regX:-49,regY:-63},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC5_hands_base.png"},a.typingBackC9_hand={images:["./animations/typingBackC9_hands.png"],frames:{height:54,width:68,count:51,regX:-52,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC9_hands_base.png"},
a.typingBackC10_hand={images:["./animations/typingBackC10_hands.png"],frames:{height:54,width:68,count:51,regX:-52,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC10_hands_base.png"},a.typingBackC12_hand={images:["./animations/typingBackC12_hands.png"],frames:{height:54,width:68,count:51,regX:-52,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC12_hands_base.png"},
a.typingBackC1_head={images:["./animations/typingBackC1_head.png"],frames:{height:70,width:58,count:51,regX:-85,regY:-13},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC1_head_base.png"},a.typingBackC2_head={images:["./animations/typingBackC2_head.png"],frames:{height:80,width:58,count:51,regX:-85,regY:-2},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC2_head_base.png"},
a.typingBackC3_head={images:["./animations/typingBackC3_head.png"],frames:{height:75,width:59,count:51,regX:-85,regY:-7},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC3_head_base.png"},a.typingBackC4_head={images:["./animations/typingBackC4_head.png"],frames:{height:75,width:61,count:51,regX:-85,regY:-3},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC4_head_base.png"},
a.typingBackC5_head={images:["./animations/typingBackC5_head.png"],frames:{height:74,width:58,count:51,regX:-85,regY:-12},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC5_head_base.png"},a.typingBackC6_head={images:["./animations/typingBackC6_head.png"],frames:{height:71,width:61,count:51,regX:-85,regY:-8},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC6_head_base.png"},
a.typingBackC7_head={images:["./animations/typingBackC7_head.png"],frames:{height:75,width:61,count:51,regX:-85,regY:-3},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC7_head_base.png"},a.typingBackC8_head={images:["./animations/typingBackC8_head.png"],frames:{height:74,width:62,count:51,regX:-82,regY:-11},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC8_head_base.png"},
a.typingBackC9_head={images:["./animations/typingBackC9_head.png"],frames:{height:90,width:70,count:51,regX:-84,regY:-12},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC9_head_base.png"},a.typingBackC10_head={images:["./animations/typingBackC10_head.png"],frames:{height:90,width:70,count:51,regX:-84,regY:-12},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC10_head_base.png"},
a.typingBackC11_head={images:["./animations/typingBackC11_head.png"],frames:{height:88,width:65,count:51,regX:-84,regY:-13},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC11_head_base.png"},a.typingBackC12_head={images:["./animations/typingBackC12_head.png"],frames:{height:89,width:66,count:51,regX:-82,regY:-11},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC12_head_base.png"},
a.typingBackC1_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:51,regX:0,regY:0},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC1_pants_base.png"},a.typingBackC9_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:51,regX:0,regY:0},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC9_pants_base.png"},a.typingFrontC1_body=
{images:["./animations/superb/typingFrontC1_body.png"],frames:{height:75,width:84,count:30,regX:-57,regY:-80},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC1_body_base.png"},a.typingFrontC2_body={images:["./animations/superb/typingFrontC2_body.png"],frames:{height:75,width:85,count:30,regX:-56,regY:-82},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC2_body_base.png"},
a.typingFrontC3_body={images:["./animations/superb/typingFrontC3_body.png"],frames:{height:75,width:85,count:30,regX:-57,regY:-81},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC3_body_base.png"},a.typingFrontC4_body={images:["./animations/superb/typingFrontC4_body.png"],frames:{height:76,width:86,count:30,regX:-56,regY:-81},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC4_body_base.png"},
a.typingFrontC5_body={images:["./animations/superb/typingFrontC5_body.png"],frames:{height:76,width:85,count:30,regX:-57,regY:-81},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC5_body_base.png"},a.typingFrontC6_body={images:["./animations/superb/typingFrontC6_body.png"],frames:{height:76,width:85,count:30,regX:-57,regY:-81},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC6_body_base.png"},
a.typingFrontC7_body={images:["./animations/superb/typingFrontC7_body.png"],frames:{height:76,width:85,count:30,regX:-57,regY:-81},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC7_body_base.png"},a.typingFrontC8_body={images:["./animations/superb/typingFrontC8_body.png"],frames:{height:76,width:85,count:30,regX:-57,regY:-81},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC8_body_base.png"},
a.typingFrontC9_body={images:["./animations/superb/typingFrontC9_body.png"],frames:{height:70,width:80,count:30,regX:-57,regY:-85},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC9_body_base.png"},a.typingFrontC10_body={images:["./animations/superb/typingFrontC10_body.png"],frames:{height:69,width:80,count:30,regX:-57,regY:-86},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC10_body_base.png"},
a.typingFrontC11_body={images:["./animations/superb/typingFrontC11_body.png"],frames:{height:62,width:62,count:30,regX:-54,regY:-87},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC11_body_base.png"},a.typingFrontC12_body={images:["./animations/superb/typingFrontC12_body.png"],frames:{height:65,width:58,count:30,regX:-58,regY:-84},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC12_body_base.png"},
a.typingFrontC1_chair={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:30,regX:0,regY:0},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC1_chair_base.png"},a.typingFrontC1_hand={images:["./animations/superb/typingFrontC1_hands.png"],frames:{height:46,width:62,count:30,regX:-94,regY:-122},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC1_hands_base.png"},
a.typingFrontC4_hand={images:["./animations/superb/typingFrontC4_hands.png"],frames:{height:46,width:62,count:30,regX:-94,regY:-122},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC4_hands_base.png"},a.typingFrontC5_hand={images:["./animations/superb/typingFrontC5_hands.png"],frames:{height:46,width:62,count:30,regX:-94,regY:-122},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC5_hands_base.png"},
a.typingFrontC9_hand={images:["./animations/superb/typingFrontC9_hands.png"],frames:{height:62,width:92,count:30,regX:-60,regY:-103},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC9_hands_base.png"},a.typingFrontC10_hand={images:["./animations/superb/typingFrontC10_hands.png"],frames:{height:62,width:92,count:30,regX:-60,regY:-103},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC10_hands_base.png"},
a.typingFrontC12_hand={images:["./animations/superb/typingFrontC12_hands.png"],frames:{height:62,width:92,count:30,regX:-60,regY:-103},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC12_hands_base.png"},a.typingFrontC1_head={images:["./animations/superb/typingFrontC1_head.png"],frames:{height:69,width:58,count:30,regX:-57,regY:-19},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC1_head_base.png"},
a.typingFrontC2_head={images:["./animations/superb/typingFrontC2_head.png"],frames:{height:70,width:61,count:30,regX:-57,regY:-18},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC2_head_base.png"},a.typingFrontC3_head={images:["./animations/superb/typingFrontC3_head.png"],frames:{height:66,width:53,count:30,regX:-59,regY:-22},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC3_head_base.png"},
a.typingFrontC4_head={images:["./animations/superb/typingFrontC4_head.png"],frames:{height:68,width:57,count:30,regX:-62,regY:-21},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC4_head_base.png"},a.typingFrontC5_head={images:["./animations/superb/typingFrontC5_head.png"],frames:{height:69,width:56,count:30,regX:-59,regY:-20},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC5_head_base.png"},
a.typingFrontC6_head={images:["./animations/superb/typingFrontC6_head.png"],frames:{height:77,width:55,count:30,regX:-61,regY:-11},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC6_head_base.png"},a.typingFrontC7_head={images:["./animations/superb/typingFrontC7_head.png"],frames:{height:72,width:60,count:30,regX:-60,regY:-16},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC7_head_base.png"},
a.typingFrontC8_head={images:["./animations/superb/typingFrontC8_head.png"],frames:{height:69,width:58,count:30,regX:-59,regY:-20},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC8_head_base.png"},a.typingFrontC9_head={images:["./animations/superb/typingFrontC9_head.png"],frames:{height:76,width:65,count:30,regX:-49,regY:-19},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC9_head_base.png"},
a.typingFrontC10_head={images:["./animations/superb/typingFrontC10_head.png"],frames:{height:74,width:54,count:30,regX:-62,regY:-20},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC10_head_base.png"},a.typingFrontC11_head={images:["./animations/superb/typingFrontC11_head.png"],frames:{height:71,width:53,count:30,regX:-61,regY:-23},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC11_head_base.png"},
a.typingFrontC12_head={images:["./animations/superb/typingFrontC12_head.png"],frames:{height:73,width:58,count:30,regX:-58,regY:-22},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC12_head_base.png"},a.typingFrontC1_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:30,regX:0,regY:0},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC1_pants_base.png"},
a.typingFrontC9_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:30,regX:0,regY:0},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC9_pants_base.png"},a.thinkingFrontC1_body={images:["./animations/superb/thinkingFrontC1_body.png"],frames:{height:103,width:97,count:100,regX:-57,regY:-54},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC1_body_base.png"},
a.thinkingFrontC2_body={images:["./animations/superb/thinkingFrontC2_body.png"],frames:{height:105,width:98,count:100,regX:-57,regY:-53},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC2_body_base.png"},a.thinkingFrontC3_body={images:["./animations/superb/thinkingFrontC3_body.png"],frames:{height:105,width:97,count:100,regX:-57,regY:-53},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},
baseImage:"./animations/superb/thinkingFrontC3_body_base.png"},a.thinkingFrontC4_body={images:["./animations/superb/thinkingFrontC4_body.png"],frames:{height:105,width:97,count:100,regX:-57,regY:-53},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC4_body_base.png"},a.thinkingFrontC5_body={images:["./animations/superb/thinkingFrontC5_body.png"],frames:{height:106,width:98,count:100,regX:-57,regY:-53},animations:{start:[0,
0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC5_body_base.png"},a.thinkingFrontC6_body={images:["./animations/superb/thinkingFrontC6_body.png"],frames:{height:106,width:98,count:100,regX:-57,regY:-53},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC6_body_base.png"},a.thinkingFrontC7_body={images:["./animations/superb/thinkingFrontC7_body.png"],frames:{height:105,
width:97,count:100,regX:-57,regY:-53},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC7_body_base.png"},a.thinkingFrontC8_body={images:["./animations/superb/thinkingFrontC8_body.png"],frames:{height:105,width:98,count:100,regX:-57,regY:-53},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC8_body_base.png"},a.thinkingFrontC9_body={images:["./animations/superb/thinkingFrontC9_body.png"],
frames:{height:101,width:94,count:100,regX:-58,regY:-56},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC9_body_base.png"},a.thinkingFrontC10_body={images:["./animations/superb/thinkingFrontC10_body.png"],frames:{height:101,width:94,count:100,regX:-58,regY:-56},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC10_body_base.png"},a.thinkingFrontC11_body=
{images:["./animations/superb/thinkingFrontC11_body.png"],frames:{height:73,width:70,count:100,regX:-55,regY:-76},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC11_body_base.png"},a.thinkingFrontC12_body={images:["./animations/superb/thinkingFrontC12_body.png"],frames:{height:73,width:70,count:100,regX:-58,regY:-75},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC12_body_base.png"},
a.thinkingFrontC1_chair={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:100,regX:0,regY:0},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC1_chair_base.png"},a.thinkingFrontC1_hand={images:["./animations/superb/thinkingFrontC1_hands.png"],frames:{height:136,width:90,count:100,regX:-80,regY:-34},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC1_hands_base.png"},
a.thinkingFrontC4_hand={images:["./animations/superb/thinkingFrontC4_hands.png"],frames:{height:136,width:90,count:100,regX:-80,regY:-34},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC4_hands_base.png"},a.thinkingFrontC5_hand={images:["./animations/superb/thinkingFrontC5_hands.png"],frames:{height:136,width:90,count:100,regX:-80,regY:-34},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,
end:30},baseImage:"./animations/superb/thinkingFrontC5_hands_base.png"},a.thinkingFrontC9_hand={images:["./animations/superb/thinkingFrontC9_hands.png"],frames:{height:129,width:107,count:100,regX:-60,regY:-38},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC9_hands_base.png"},a.thinkingFrontC10_hand={images:["./animations/superb/thinkingFrontC10_hands.png"],frames:{height:129,width:107,count:100,regX:-60,regY:-38},
animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC10_hands_base.png"},a.thinkingFrontC12_hand={images:["./animations/superb/thinkingFrontC12_hands.png"],frames:{height:129,width:106,count:100,regX:-61,regY:-38},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC12_hands_base.png"},a.thinkingFrontC1_head={images:["./animations/superb/thinkingFrontC1_head.png"],
frames:{height:68,width:63,count:100,regX:-52,regY:-20},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC1_head_base.png"},a.thinkingFrontC2_head={images:["./animations/superb/thinkingFrontC2_head.png"],frames:{height:70,width:67,count:100,regX:-50,regY:-18},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC2_head_base.png"},a.thinkingFrontC3_head=
{images:["./animations/superb/thinkingFrontC3_head.png"],frames:{height:66,width:59,count:100,regX:-53,regY:-22},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC3_head_base.png"},a.thinkingFrontC4_head={images:["./animations/superb/thinkingFrontC4_head.png"],frames:{height:69,width:61,count:100,regX:-57,regY:-20},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC4_head_base.png"},
a.thinkingFrontC5_head={images:["./animations/superb/thinkingFrontC5_head.png"],frames:{height:69,width:60,count:100,regX:-54,regY:-20},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC5_head_base.png"},a.thinkingFrontC6_head={images:["./animations/superb/thinkingFrontC6_head.png"],frames:{height:78,width:60,count:100,regX:-55,regY:-10},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},
baseImage:"./animations/superb/thinkingFrontC6_head_base.png"},a.thinkingFrontC7_head={images:["./animations/superb/thinkingFrontC7_head.png"],frames:{height:73,width:66,count:100,regX:-53,regY:-15},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC7_head_base.png"},a.thinkingFrontC8_head={images:["./animations/superb/thinkingFrontC8_head.png"],frames:{height:69,width:63,count:100,regX:-53,regY:-20},animations:{start:[0,
0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC8_head_base.png"},a.thinkingFrontC9_head={images:["./animations/superb/thinkingFrontC9_head.png"],frames:{height:76,width:66,count:100,regX:-49,regY:-19},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC9_head_base.png"},a.thinkingFrontC10_head={images:["./animations/superb/thinkingFrontC10_head.png"],frames:{height:74,
width:56,count:100,regX:-61,regY:-20},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC10_head_base.png"},a.thinkingFrontC11_head={images:["./animations/superb/thinkingFrontC11_head.png"],frames:{height:72,width:55,count:100,regX:-60,regY:-22},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC11_head_base.png"},a.thinkingFrontC12_head={images:["./animations/superb/thinkingFrontC12_head.png"],
frames:{height:73,width:58,count:100,regX:-58,regY:-22},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC12_head_base.png"},a.thinkingFrontC1_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:100,regX:0,regY:0},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC1_pants_base.png"},a.thinkingFrontC9_pants={images:["./animations/empty_sheet.png"],
frames:{height:1,width:1,count:100,regX:0,regY:0},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC9_pants_base.png"},a.thinkingBackC1_body={images:["./animations/thinkingBackC1_body.png"],frames:{height:86,width:87,count:100,regX:-60,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC1_body_base.png"},a.thinkingBackC2_body={images:["./animations/thinkingBackC2_body.png"],
frames:{height:86,width:89,count:100,regX:-58,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC2_body_base.png"},a.thinkingBackC3_body={images:["./animations/thinkingBackC3_body.png"],frames:{height:86,width:88,count:100,regX:-59,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC3_body_base.png"},a.thinkingBackC4_body={images:["./animations/thinkingBackC4_body.png"],
frames:{height:86,width:88,count:100,regX:-59,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC4_body_base.png"},a.thinkingBackC5_body={images:["./animations/thinkingBackC5_body.png"],frames:{height:86,width:87,count:100,regX:-60,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC5_body_base.png"},a.thinkingBackC6_body={images:["./animations/thinkingBackC6_body.png"],
frames:{height:86,width:87,count:100,regX:-60,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC6_body_base.png"},a.thinkingBackC7_body={images:["./animations/thinkingBackC7_body.png"],frames:{height:86,width:87,count:100,regX:-59,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC7_body_base.png"},a.thinkingBackC8_body={images:["./animations/thinkingBackC8_body.png"],
frames:{height:86,width:87,count:100,regX:-60,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC8_body_base.png"},a.thinkingBackC9_body={images:["./animations/thinkingBackC9_body.png"],frames:{height:74,width:90,count:100,regX:-52,regY:-69},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC9_body_base.png"},a.thinkingBackC10_body={images:["./animations/thinkingBackC10_body.png"],
frames:{height:35,width:52,count:100,regX:-90,regY:-69},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC10_body_base.png"},a.thinkingBackC11_body={images:["./animations/thinkingBackC11_body.png"],frames:{height:35,width:52,count:100,regX:-90,regY:-69},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC11_body_base.png"},a.thinkingBackC12_body={images:["./animations/thinkingBackC12_body.png"],
frames:{height:83,width:80,count:100,regX:-62,regY:-36},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC12_body_base.png"},a.thinkingBackC1_chair={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:100,regX:0,regY:0},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC1_chair_base.png"},a.thinkingBackC1_hand={images:["./animations/thinkingBackC1_hands.png"],
frames:{height:80,width:77,count:100,regX:-52,regY:-22},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC1_hands_base.png"},a.thinkingBackC4_hand={images:["./animations/thinkingBackC4_hands.png"],frames:{height:80,width:77,count:100,regX:-52,regY:-22},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC4_hands_base.png"},a.thinkingBackC5_hand={images:["./animations/thinkingBackC5_hands.png"],
frames:{height:80,width:77,count:100,regX:-52,regY:-22},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC5_hands_base.png"},a.thinkingBackC9_hand={images:["./animations/thinkingBackC9_hands.png"],frames:{height:95,width:72,count:100,regX:-54,regY:-24},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC9_hands_base.png"},a.thinkingBackC10_hand={images:["./animations/thinkingBackC10_hands.png"],
frames:{height:95,width:72,count:100,regX:-54,regY:-24},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC10_hands_base.png"},a.thinkingBackC12_hand={images:["./animations/thinkingBackC12_hands.png"],frames:{height:95,width:72,count:100,regX:-54,regY:-24},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC12_hands_base.png"},a.thinkingBackC1_head={images:["./animations/thinkingBackC1_head.png"],
frames:{height:71,width:60,count:100,regX:-85,regY:-13},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC1_head_base.png"},a.thinkingBackC2_head={images:["./animations/thinkingBackC2_head.png"],frames:{height:82,width:60,count:100,regX:-85,regY:-1},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC2_head_base.png"},a.thinkingBackC3_head={images:["./animations/thinkingBackC3_head.png"],
frames:{height:76,width:63,count:100,regX:-85,regY:-7},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC3_head_base.png"},a.thinkingBackC4_head={images:["./animations/thinkingBackC4_head.png"],frames:{height:75,width:65,count:100,regX:-85,regY:-3},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC4_head_base.png"},a.thinkingBackC5_head={images:["./animations/thinkingBackC5_head.png"],
frames:{height:75,width:60,count:100,regX:-85,regY:-11},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC5_head_base.png"},a.thinkingBackC6_head={images:["./animations/thinkingBackC6_head.png"],frames:{height:72,width:64,count:100,regX:-85,regY:-8},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC6_head_base.png"},a.thinkingBackC7_head={images:["./animations/thinkingBackC7_head.png"],
frames:{height:76,width:66,count:100,regX:-85,regY:-3},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC7_head_base.png"},a.thinkingBackC8_head={images:["./animations/thinkingBackC8_head.png"],frames:{height:74,width:62,count:100,regX:-83,regY:-11},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC8_head_base.png"},a.thinkingBackC9_head={images:["./animations/thinkingBackC9_head.png"],
frames:{height:95,width:71,count:100,regX:-85,regY:-11},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC9_head_base.png"},a.thinkingBackC10_head={images:["./animations/thinkingBackC10_head.png"],frames:{height:95,width:71,count:100,regX:-85,regY:-12},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC10_head_base.png"},a.thinkingBackC11_head={images:["./animations/thinkingBackC11_head.png"],
frames:{height:93,width:67,count:100,regX:-85,regY:-12},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC11_head_base.png"},a.thinkingBackC12_head={images:["./animations/thinkingBackC12_head.png"],frames:{height:94,width:70,count:100,regX:-82,regY:-10},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC12_head_base.png"},a.thinkingBackC1_pants={images:["./animations/empty_sheet.png"],
frames:{height:1,width:1,count:100,regX:0,regY:0},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC1_pants_base.png"},a.thinkingBackC9_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:100,regX:0,regY:0},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC9_pants_base.png"},a.airCon={images:["./animations/superb/airCon.png"],frames:{height:68,
width:105,count:62,regX:-392,regY:-410},animations:{loop:[0,61]},targetFPS:{loop:30},baseImage:"./animations/superb/airCon_base.png"},a.waterCooler={images:["./animations/superb/waterCooler.png"],frames:{height:37,width:16,count:46,regX:-40,regY:-65},animations:{loop:[0,45]},targetFPS:{loop:30},baseImage:"./animations/superb/waterCooler_base.png"},a.printer={images:["./animations/superb/printer.png"],frames:{height:50,width:58,count:121,regX:-58,regY:-86},animations:{loop:[0,120]},targetFPS:{loop:30},
baseImage:"./animations/superb/printer_base.png"},a.rndPrinterLeftScreen={images:["./animations/superb/rndPrinterLeftScreen.png"],frames:{height:133,width:187,count:90,regX:-19,regY:-68},animations:{loop:[0,89]},targetFPS:{loop:30},baseImage:"./animations/superb/rndPrinterLeftScreen_base.png"},a.rndPrinterRightScreen={images:["./animations/superb/rndPrinterRightScreen.png"],frames:{height:181,width:186,count:90,regX:-42,regY:-16},animations:{loop:[0,89]},targetFPS:{loop:30},baseImage:"./animations/superb/rndPrinterRightScreen_base.png"})})();
"use strict";
var BitmapAnimationFactory={createAnimation:function(a,d,c,b,g){var e,h=CanvasManager.globalScale;switch(a){case "thinking":e=BitmapAnimationFactory.createThinkingAnimation(d,c,b,g);e.scaleX=h;e.scaleY=h;break;case "typing":e=BitmapAnimationFactory.createTypingAnimation(d,c,b,g);e.scaleX=h;e.scaleY=h;break;case "sitBack":e=BitmapAnimationFactory.createIdleAnimation(d,c,b,g);e.scaleX=h;e.scaleY=h;break;case "drawNotepad":e=BitmapAnimationFactory.createNotepadAnimation(d,c,b,g);e.scaleX=h;e.scaleY=
h;break;case "screen":e=BitmapAnimationFactory.createScreenAnimation(d,c)}return e},createTeaCupAnimation:function(a){return 2===GameManager.company.currentLevel?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.teaCupImageLevel2),a):new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.teaCupImage),a)},createScreenAnimation:function(a,d){var c=CanvasManager.globalScale;if(d===CharacterOrientation.NW){if(1===GameManager.company.currentLevel){var b=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.typingScreenL1),
a);b.x=VisualsManager.toScreenCoordinates(12,c);b.scaleX=c;b.scaleY=c;return b}if(2===GameManager.company.currentLevel)return b=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.typingScreenL2),a),b.x=VisualsManager.toScreenCoordinates(-1,c),b.y=VisualsManager.toScreenCoordinates(-17,c),b.scaleX=c,b.scaleY=c,b;if(3===GameManager.company.currentLevel)return b=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.typingScreenL3),a),b.x=VisualsManager.toScreenCoordinates(-16,c),b.y=VisualsManager.toScreenCoordinates(-35,
c),b.scaleX=c,b.scaleY=c,b;if(4===GameManager.company.currentLevel)return b=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.typingScreenL4),a),b.x=VisualsManager.toScreenCoordinates(-4,c),b.y=VisualsManager.toScreenCoordinates(-39,c),b.scaleX=c,b.scaleY=c,b}},createThinkingAnimation:function(a,d,c,b){return this._createAnimation(a,d,c,b,"thinking")},createNotepadAnimation:function(a,d,c,b){return this._createAnimation(a,d,c,b,"notepad")},createIdleAnimation:function(a,d,c,b){return this._createAnimation(a,
d,c,b,"idle")},createTypingAnimation:function(a,d,c,b){return this._createAnimation(a,d,c,b,"typing")},_createAnimation:function(a,d,c,b,g){d===CharacterOrientation.NW?(d=new CompositeBitmapAnimation,d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"BackC1_chair"]),a)),8<b?d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"BackC9_pants"]),a)):d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"BackC1_pants"]),a)),4===
b||7===b?d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"BackC4_hand"]),a)):5===b||8===b?d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"BackC5_hand"]),a)):9===b||11===b?d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"BackC9_hand"]),a)):10===b?d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"BackC10_hand"]),a)):12===b?d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+
"BackC12_hand"]),a)):d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"BackC1_hand"]),a)),void 0===c&&(c=1),d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"BackC"+c+"_body"]),a)),void 0===b&&(b=1),d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"BackC"+b+"_head"]),a))):(d=new CompositeBitmapAnimation,d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"FrontC1_chair"]),a)),8<b?d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+
"FrontC9_pants"]),a)):d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"FrontC1_pants"]),a)),4===b||7===b?d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"FrontC4_hand"]),a)):5===b||8===b?d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"FrontC5_hand"]),a)):9===b||11===b?d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"FrontC9_hand"]),a)):10===b?d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+
"FrontC10_hand"]),a)):12===b?d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"FrontC12_hand"]),a)):d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"FrontC1_hand"]),a)),void 0===c&&(c=1),d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"FrontC"+c+"_body"]),a)),void 0===b&&(b=1),d.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[g+"FrontC"+b+"_head"]),a)));return d}},BitmapAnimationX=function(a,
d){this.speedFactor=1;d&&(this.speedFactor=d);createjs.BitmapAnimation.apply(this,arguments);this.targetFPS=a.targetFPS;a.baseImage&&(!0===GameFlags.SLOWDOWN_BASEIMAGE?window.setTimeout(function(c){c.baseImage=new Image;c.baseImage.src=a.baseImage},500,this):(this.baseImage=new Image,this.baseImage.src=a.baseImage))};
(function(){BitmapAnimationX.prototype=new createjs.BitmapAnimation;var a=BitmapAnimationX.prototype;a.setAlpha=function(a){this.alpha=a};a.setPaused=function(a){this.paused=a};a.saveState=function(){var a={};a.currentFrame=this.currentAnimationFrame;a.currentAnimation=this.currentAnimation;a.storyBoard=this.currentStoryBoard;a.paused=this.paused;a.alpha=this.alpha;return a};a.loadState=function(a){a&&(this.currentStoryBoard=a.storyBoard,this.currentAnimationFrame=a.currentFrame,this._animation=this.spriteSheet.getAnimation(a.currentAnimation),
this.currentAnimation=a.currentAnimation,this._normalizeFrame(),this.paused=a.paused,this.alpha=a.alpha)};a.playStoryBoard=function(a){this.currentStoryBoard=a;!a||!a.length?this.stop():(a=a[0],"#stop"==a?this._stopAnimation():this.gotoAndPlay(a))};a._stopAnimation=function(){this.gotoAndStop(this._animation.frames.last())};a.onAnimationEnd=function(a,c){if(this.currentStoryBoard&&0<this.currentStoryBoard.length&&(this.currentStoryBoard.splice(0,1),0<this.currentStoryBoard.length)){var b=this.currentStoryBoard[0];
"#stop"==b?this._stopAnimation():this.gotoAndPlay(b)}if(this.onAnimationEnded&&this.currentStoryBoard&&(0==this.currentStoryBoard.length||1==this.currentStoryBoard.length&&"#stop"===this.currentStoryBoard[0]))this.onAnimationEnded(a,c)};a._tick=function(){if(this.paused||!this._lastFrameTime||!this._animation)this._lastFrameTime=GameManager.gameTime;else{var a=GameManager.gameTime-this._lastFrameTime;this.onFire&&(a*=2);a=Math.floor(a*this.speedFactor/(1E3/this.targetFPS[this._animation.name]));if(0<
a){for(var c=0;c<a;c++)this._advanceCount++,this.advance();this._lastFrameTime=GameManager.gameTime}}};a.draw=function(a,c){if(this.DisplayObject_draw(a,c))return!0;this._normalizeFrame();var b=this.spriteSheet.getFrame(this.currentFrame);if(null!=b){var g=b.rect;if(this.baseImage){if(this.baseImage.complete&&b.image.complete){this.cachedFrame||(this.cachedFrame=document.createElement("canvas"),this.cachedFrame.width=this.baseImage.naturalWidth,this.cachedFrame.height=this.baseImage.naturalHeight);
if(this.cachedFrame.frameNr!==this.currentFrame){var e=this.cachedFrame.getContext("2d");e.clearRect(0,0,this.cachedFrame.width,this.cachedFrame.height);e.drawImage(this.baseImage,0,0);e.drawImage(b.image,g.x,g.y,g.width,g.height,-b.regX,-b.regY,g.width,g.height);this.cachedFrame.frameNr=this.currentFrame}a.drawImage(this.cachedFrame,0,0)}return!0}b.image.complete&&a.drawImage(b.image,g.x,g.y,g.width,g.height,-b.regX,-b.regY,g.width,g.height);return!0}}})();
CharacterNameVisual=function(a){createjs.Container.apply(this,arguments);this.character=a;this.init()};
(function(){CharacterNameVisual.prototype=new createjs.Container;CharacterNameVisual.prototype.init=function(){this.removeAllChildren();var a=0===this.character.id?"":this.character.name,d=VisualsManager.toScreenCoordinates(280,CanvasManager.globalScaleIgnoringLowResBackground),c=24;do var b="bold {0}pt {1}".format(c,"Segoe UI"),b=new createjs.Text(a,b,"black"),c=c-2;while(b.getMeasuredWidth()>d&&10<c);d=c/32;c=createjs.Graphics.getHSL(0,0,34);b=this.character.flags.expert?"{0}({1})".format(""!=a?
"\n":"",Missions.getMissionWithId(this.character.flags.expert).name):"";b=new createjs.Text(a+b,"bold 32pt {0}".format("Segoe UI"),c);b.textAlign="center";b.textBaseline="alphabetical";this.addChildAt(b,0);this.scaleX=d*CanvasManager.globalScale;this.scaleY=d*CanvasManager.globalScale;switch(this.character.getOrientation()){case CharacterOrientation.NW:this.skewY=-30;this.skewX=-60;this.x=VisualsManager.toScreenCoordinates(170,CanvasManager.globalScale);this.y=VisualsManager.toScreenCoordinates(230,
CanvasManager.globalScale);break;case CharacterOrientation.SE:this.skewY=-30,this.skewX=-60,this.x=VisualsManager.toScreenCoordinates(-50,CanvasManager.globalScale),this.y=VisualsManager.toScreenCoordinates(90,CanvasManager.globalScale)}}})();var CompositeBitmapAnimation=function(){this._internalAnimations=[]};
(function(){CompositeBitmapAnimation.prototype=new createjs.DisplayObject;var a=CompositeBitmapAnimation.prototype;a.isVisible=function(){return 0<this._internalAnimations[0].alpha};a.addAnimation=function(a){if(0<this._internalAnimations.length){if(this._internalAnimations[0].speedFactor!=a.speedFactor)throw"invalid speedFactor for CompositeBitmapAnimation";}else{var c=this;a.onAnimationEnded=function(a,d){c.onAnimationEnd(a,d)}}this._internalAnimations.push(a)};a.setAlpha=function(a){for(var c=
0;c<this._internalAnimations.length;c++)this._internalAnimations[c].setAlpha(a)};a.isAllLoaded=function(){for(var a=0,c=this._internalAnimations.length;a<c;a++)if(this._internalAnimations[a].baseImage&&!this._internalAnimations[a].baseImage.complete||!this._internalAnimations[a].spriteSheet.complete)return!1;return this.overlay&&(this.overlay.deskImage&&!this.overlay.deskImage.complete||this.overlay.keyBoardImage&&!this.overlay.keyBoardImage.complete||this.overlay.pcImage&&!this.overlay.pcImage.complete)?
!1:!0};a.setPaused=function(a){this.paused=a;for(var c=0;c<this._internalAnimations.length;c++)this._internalAnimations[c].setPaused(a)};a.saveState=function(){var a={};a.currentFrame=this._internalAnimations[0].currentAnimationFrame;a.currentAnimation=this._internalAnimations[0].currentAnimation;a.storyBoard=this._internalAnimations[0].currentStoryBoard;a.paused=this._internalAnimations[0].paused;a.alpha=this._internalAnimations[0].alpha;return a};a.loadState=function(a){if(a)for(var c=0;c<this._internalAnimations.length;c++){this._internalAnimations[c].currentStoryBoard=
a.storyBoard;this._internalAnimations[c].currentAnimationFrame=a.currentFrame;var b=this._internalAnimations[c].spriteSheet.getAnimation(a.currentAnimation);this._internalAnimations[c]._animation=b;this._internalAnimations[c].currentAnimation=a.currentAnimation;if(this._internalAnimations[c].currentStoryBoard)for(var g=this._internalAnimations[c].currentStoryBoard,e=0;e<g.length;e++)(b=this._internalAnimations[c].spriteSheet._animations.first(function(a){return a===g[e]}))||(g[e]="loop");if(this._internalAnimations[c].currentAnimation){var h=
this._internalAnimations[c].currentAnimation,b=this._internalAnimations[c].spriteSheet._animations.first(function(a){return a===h});b||(this._internalAnimations[c].currentAnimation="loop",this._internalAnimations[c]._animation=this._internalAnimations[c].spriteSheet.getAnimation(this._internalAnimations[c].currentAnimation),this._internalAnimations[c].currentAnimationFrame=0)}this._internalAnimations[c]._normalizeFrame();this._internalAnimations[c].paused=a.paused;this._internalAnimations[c].alpha=
a.alpha}};a.stop=function(){for(var a=0;a<this._internalAnimations.length;a++)this._internalAnimations[a].stop()};a.gotoAndPlay=function(a){for(var c=0;c<this._internalAnimations.length;c++)this._internalAnimations[c].gotoAndPlay(a)};a.gotoAndStop=function(a){for(var c=0;c<this._internalAnimations.length;c++)this._internalAnimations[c].gotoAndStop(a)};a.playStoryBoard=function(a){for(var c=0;c<this._internalAnimations.length;c++)if(this._internalAnimations[c].currentStoryBoard=a,!a||!a.length)this._internalAnimations[c].stop();
else{var b=a[0];"#stop"==b?this._internalAnimations[c]._stopAnimation():this._internalAnimations[c].gotoAndPlay(b)}};a._stopAnimation=function(){for(var a=0;a<this._internalAnimations.length;a++){var c=this._internalAnimations[a]._animation.frames.last();this._internalAnimations[a].gotoAndStop(c)}};a.onAnimationEnd=function(a,c){if(this.onAnimationEnded&&(0==a.currentStoryBoard.length||1==a.currentStoryBoard.length&&"#stop"===a.currentStoryBoard[0]))this.onAnimationEnded(a,c)};a._tick=function(){for(var a=
0;a<this._internalAnimations.length;a++)this._internalAnimations[a]._tick()};a.draw=function(a,c){var b=this._internalAnimations[0].currentFrame;if(!this.isAllLoaded()||void 0===this._internalAnimations[0].baseImage)return!0;this.cachedFrame||(this.cachedFrame=document.createElement("canvas"),this.cachedFrame.width=this._internalAnimations[0].baseImage.naturalWidth,this.cachedFrame.height=this._internalAnimations[0].baseImage.naturalHeight);if(this.cachedFrame.frameNr!==b){var g=this.cachedFrame.getContext("2d");
g.clearRect(0,0,this.cachedFrame.width,this.cachedFrame.height);for(var e=0,h=this._internalAnimations.length;e<h;e++)if(this._internalAnimations[e].currentFrame=this._internalAnimations[0].currentFrame,this._internalAnimations[e].currentAnimationFrame=this._internalAnimations[0].currentAnimationFrame,this._internalAnimations[e]._animation=this._internalAnimations[0]._animation,this._internalAnimations[e].draw(g,c,void 0),(1===e&&2<h||1===h||0===e&&2===h)&&this.overlay)this.overlay.deskImage&&g.drawImage(this.overlay.deskImage,
0,0),this.overlay.keyBoardImage&&g.drawImage(this.overlay.keyBoardImage,0,0);this.overlay&&this.overlay.pcImage&&g.drawImage(this.overlay.pcImage,0,0);this.cachedFrame.frameNr=b}this.cachedFrame&&a.drawImage(this.cachedFrame,this.x,this.y);return!0}})();
var GameStatusBar=function(){this.initialize();this.width=300;this.textContainerHeight=this.height=80;this.mainShape=new createjs.Shape;this.addChild(this.mainShape);this.gameName=new createjs.Text;this.gameName.textBaseline="middle";this.addChild(this.gameName);this.gameDetailText=new createjs.Text("","12pt Segoe UI","black");this.gameDetailText.textAlign="center";this.gameDetailText.textBaseline="alphabetic";this.gameDetailText.text="No project".localize();this.gameDetailText.x=this.width/2;this.gameDetailText.y=
this.textContainerHeight/2+10;this.gameDetailText.lineHeight=this.gameDetailText.getMeasuredLineHeight();this.addChild(this.gameDetailText);this.progressBar=new ProgressBarVisual;this.progressBar.height=20;this.progressBar.width=this.width-60;this.progressBar.x=30;this.progressBar.y=this.textContainerHeight-25;this.progressBar.alpha=0;this.addChild(this.progressBar);this.stateText=new createjs.Text("","10pt Segoe UI","DimGray");this.stateText.x=this.width/2;this.stateText.y=this.textContainerHeight-
11;this.stateText.textAlign="center";this.stateText.textBaseline="alphabetic";this.addChild(this.stateText);var a=this.textContainerHeight/2-30;this.designPoints=new PointsDisplayVisual(DESIGN_POINTS_COLOR,"black","Design".localize());this.designPoints.x=-30;this.designPoints.y=a;this.addChild(this.designPoints);this.technologyPoints=new PointsDisplayVisual(TECHNOLOGY_POINTS_COLOR,"black","Technology".localize());this.technologyPoints.x=this.width-30;this.technologyPoints.y=a;this.addChild(this.technologyPoints);
this.bugs=new PointsDisplayVisual(BUGS_COLOR,"black","Bugs".localize());this.bugs.x=this.x-120;this.bugs.y=0;this.bugs.size=100;this.addChild(this.bugs);this.enginePoints=new PointsDisplayVisual(TECHNOLOGY_POINTS_COLOR,"black","Remaining".localize("label for visual which shows 'points remaining'"));this.enginePoints.x=this.width/2-this.enginePoints.size/4;this.enginePoints.y=this.textContainerHeight+5;this.enginePoints.alpha=0;this.addChild(this.enginePoints);this.hypePoints=new HypePointsVisual;
this.hypePoints.x=this.width/2-this.hypePoints.width/2;this.hypePoints.y=this.textContainerHeight;this.hypePoints.alpha=0;this.addChildAt(this.hypePoints,0);this.isInvalid=!0};
(function(){GameStatusBar.prototype=new createjs.Container;var a=GameStatusBar.prototype;a.reset=function(){this.finishEngine()};a.startDevelopment=function(){createjs.Tween.get(this.designPoints).to({alpha:1},400);createjs.Tween.get(this.technologyPoints).to({alpha:1},400);createjs.Tween.get(this.bugs).to({alpha:1},400);createjs.Tween.get(this.gameName).to({alpha:1},400);this.stateText.shadow=null;this.stateText.color="DimGray";createjs.Tween.get(this.stateText).to({alpha:1},400)};a.startEngine=
function(){createjs.Tween.get(this.designPoints).to({alpha:0},400);createjs.Tween.get(this.technologyPoints).to({alpha:0},400);createjs.Tween.get(this.bugs).to({alpha:0},400);createjs.Tween.get(this.enginePoints).to({alpha:1},400);this.updateGameNameText(GameManager.currentEngineDev.name);this.gameDetailText.text="Custom Game Engine".localize();createjs.Tween.get(this.gameName).to({alpha:1},400)};a.startContract=function(){var a=GameManager.currentContract;createjs.Tween.get(this.designPoints).to({alpha:1},
400);createjs.Tween.get(this.technologyPoints).to({alpha:1},400);createjs.Tween.get(this.bugs).to({alpha:0},400);this.updateGameNameText(a.name);this.gameDetailText.text="Contract".localize();this.stateText.text="Time Left".localize("label for progressbar");this.stateText.shadow=null;this.stateText.color="DimGray";createjs.Tween.get(this.stateText).to({alpha:1},400);createjs.Tween.get(this.gameName).to({alpha:1},400)};a.finishContract=function(){this.endDevelopment()};a.finishEngine=function(){this.enginePoints.alpha=
0;this.endDevelopment()};a.endDevelopment=function(){this.designPoints.alpha=0.2;this.technologyPoints.alpha=0.2;this.bugs.alpha=0.2;this.gameName.alpha=0;this.stateText.alpha=0;this.progressBar.alpha=0;this.hypePoints.alpha=0;this.gameDetailText.text="No Project".localize();this.designPoints.updatePoints(0);this.technologyPoints.updatePoints(0);this.bugs.updatePoints(0);this.updateProgress(!1);GameManager.spawnedPoints=0};a.onTick=function(){this.isInvalid&&(this.redraw(),this.isInvalid=!1)};a.updateProgress=
function(a,c,b){b||(b=400);!a||isNaN(a)?1===this.progressBar.alpha&&(createjs.Tween.get(this.progressBar).to({alpha:0},b),this.stateText.shadow=null,this.stateText.color="DimGray"):(c&&0<a?createjs.Tween.get(this.progressBar).to({progress:a},b):this.progressBar.progress=a,0===this.progressBar.alpha&&(createjs.Tween.get(this.progressBar).to({alpha:1},b),this.stateText.color="white",this.stateText.shadow=new createjs.Shadow("black",0,0,2)))};a.updateStatusMessage=function(a){this.stateText.text=a;this.stateText.lineHeight||
(this.stateText.lineHeight=this.stateText.getMeasuredLineHeight());0===this.stateText.alpha&&createjs.Tween.get(this.stateText).to({alpha:1},400)};a.updateHypePoints=function(a){this.hypePoints.points!=a&&(this.hypePoints.points=a,this.hypePoints.updateText("Hype {0}".localize("hype {0} points").format(a)));0===this.hypePoints.alpha&&createjs.Tween.get(this.hypePoints).to({alpha:1},400)};a.getGlobalLocationOfPointsDisplay=function(a){a="t"===a?this.technologyPoints:"e"===a?this.enginePoints:"b"===
a?this.bugs:this.designPoints;return this.localToGlobal(a.x+a.size/4,a.y+a.size/4)};a.pulsePointsDisplay=function(a,c){("t"===a?this.technologyPoints:"e"===a?this.enginePoints:"b"===a||"br"===a?this.bugs:this.designPoints).pulse(c)};a.updateGameNameText=function(a){var c=this.children.indexOf(this.gameName);this.removeChild(this.gameName);var b=24;do var g="{0}pt Segoe UI".format(b),g=new createjs.Text(a,g,"black"),b=b-2;while(g.getMeasuredWidth()>this.width&&10<b);g.textAlign="center";g.textBaseline=
"middle";g.lineHeight=g.getMeasuredLineHeight();g.y=this.textContainerHeight/4;g.x=30+(this.width-60)/2;g.maxWidth=this.width-60;this.gameName=g;this.addChildAt(this.gameName,c)};a.updateGameName=function(){var a=GameManager.company.currentGame;a&&(a.topic&&a.genre)&&(this.updateGameNameText(a.title),this.gameDetailText.text=a.topic.name+" / "+a.genre.name,a.secondGenre&&(this.gameDetailText.text+="-"+a.secondGenre.name))};a.updatePoints=function(){var a=GameManager.company.currentGame;a?(this.designPoints.updatePoints(a.designPoints),
this.technologyPoints.updatePoints(a.technologyPoints),this.bugs.updatePoints(a.bugs)):GameManager.currentEngineDev?this.enginePoints.updatePoints(GameManager.currentEngineDev.remainingPointsDisplay):GameManager.currentContract&&(a=GameManager.currentContract,this.designPoints.updatePoints(a.visualDRemaining),this.technologyPoints.updatePoints(a.visualTRemaining))};a.redraw=function(){var a=this.mainShape.graphics;a.beginFill(createjs.Graphics.getRGB(255,255,255,0.8));a.beginStroke("black");a.setStrokeStyle(1);
a.drawRoundRect(0,0,this.width,this.textContainerHeight,14.3);a.closePath()}})();var LevelOverlay=function(a){this.centerOverlay=new createjs.Container;this.leftOverlay=new createjs.Container;this.rightOverlay=new createjs.Container;this.company=a;this.initAnimations();a.levelOverlay&&this.loadState(a.levelOverlay)};
(function(){var a=LevelOverlay.prototype;a.initAnimations=function(){var a=GameManager.company.currentLevel,c=CanvasManager.globalScale;if(2===a||3===a)this.airConAnimation1=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.airCon)),this.airConAnimation1.scaleX=c,this.airConAnimation1.scaleY=c,this.airConAnimation1.x=VisualsManager.toScreenCoordinates(84,c),this.airConAnimation1.y=VisualsManager.toScreenCoordinates(-2,c),this.airConAnimation2=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.airCon)),
this.airConAnimation2.scaleX=c,this.airConAnimation2.scaleY=c,this.airConAnimation2.x=VisualsManager.toScreenCoordinates(406,c),this.airConAnimation2.y=VisualsManager.toScreenCoordinates(-188,c);1<a&&(this.waterCoolerAnimation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.waterCooler)),this.waterCoolerAnimation.scaleX=c,this.waterCoolerAnimation.scaleY=c);if(4===a&&(GameManager.company.flags.hwLabUnlocked&&(this.hwLabScreenWallAnimation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwLabScreenWall)),
this.hwLabScreenWallAnimation.scaleX=c,this.hwLabScreenWallAnimation.scaleY=c,this.hwLabScreenWallAnimation.x=VisualsManager.toScreenCoordinates(503,c),this.hwLabScreenWallAnimation.y=VisualsManager.toScreenCoordinates(182,c),this.hwLabTVAnimation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwTV)),this.hwLabTVAnimation.scaleX=c,this.hwLabTVAnimation.scaleY=c,this.hwLabTVAnimation.x=VisualsManager.toScreenCoordinates(2298,c),this.hwLabTVAnimation.y=VisualsManager.toScreenCoordinates(788,
c),this.hwLabTVAnimationCenter=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwTV)),this.hwLabTVAnimationCenter.scaleX=c,this.hwLabTVAnimationCenter.scaleY=c,this.hwLabTVAnimationCenter.x=VisualsManager.toScreenCoordinates(-262,c),this.hwLabTVAnimationCenter.y=VisualsManager.toScreenCoordinates(788,c)),GameManager.company.flags.rndLabUnlocked))this.printerAnimation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.printer)),this.printerAnimation.scaleX=c,this.printerAnimation.scaleY=
c,this.printerAnimation.x=VisualsManager.toScreenCoordinates(608,c),this.printerAnimation.y=VisualsManager.toScreenCoordinates(435,c),this.rndPrinterLeftScreen=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndPrinterLeftScreen)),this.rndPrinterLeftScreen.scaleX=c,this.rndPrinterLeftScreen.scaleY=c,this.rndPrinterLeftScreen.x=VisualsManager.toScreenCoordinates(395,c),this.rndPrinterLeftScreen.y=VisualsManager.toScreenCoordinates(311,c),this.rndPrinterRightScreen=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndPrinterRightScreen)),
this.rndPrinterRightScreen.scaleX=c,this.rndPrinterRightScreen.scaleY=c,this.rndPrinterRightScreen.x=VisualsManager.toScreenCoordinates(747,c),this.rndPrinterRightScreen.y=VisualsManager.toScreenCoordinates(311,c);var b=this,a=GameManager.company.currentLevel;if(4===a&&(GameManager.company.flags.hwLabUnlocked&&(this.leftOverlay.addChild(this.hwLabScreenWallAnimation),this.leftOverlay.addChild(this.hwLabTVAnimation),this.centerOverlay.addChild(this.hwLabTVAnimationCenter)),GameManager.company.flags.rndLabUnlocked))this.rightOverlay.addChild(this.rndPrinterLeftScreen),
this.rightOverlay.addChild(this.rndPrinterRightScreen),this.rightOverlay.addChild(this.printerAnimation);if(2===a||3===a)this.centerOverlay.addChild(this.airConAnimation1),this.centerOverlay.addChild(this.airConAnimation2),this.airConAnimation1.onAnimationEnded=function(a,c){b.endedAnimation.call(b,a,c,"airConAnimation1")},this.airConAnimation2.onAnimationEnded=function(a,c){b.endedAnimation.call(b,a,c,"airConAnimation2")};1<a&&(4===a?(this.waterCoolerAnimation.x=1541/VisualsManager.Divisor*c,this.waterCoolerAnimation.y=
440/VisualsManager.Divisor*c):(this.waterCoolerAnimation.x=1501/VisualsManager.Divisor*c,this.waterCoolerAnimation.y=211/VisualsManager.Divisor*c),this.centerOverlay.addChild(this.waterCoolerAnimation),this.waterCoolerAnimation.onAnimationEnded=function(a,c){b.endedAnimation.call(b,a,c,"waterCoolerAnimation")});this.airConAnimation1&&(this.airConAnimation1.gotoAndStop("loop"),this.airConAnimation2.gotoAndStop("loop"),this.airConAnimation1.setAlpha(0),this.airConAnimation2.setAlpha(0));this.waterCoolerAnimation&&
(this.waterCoolerAnimation.gotoAndStop("loop"),this.waterCoolerAnimation.setAlpha(1));this.hwLabScreenWallAnimation&&(this.hwLabScreenWallAnimation.gotoAndStop("loop"),this.hwLabScreenWallAnimation.setAlpha(0),this.hwLabTVAnimation.gotoAndStop("loop"),this.hwLabTVAnimation.setAlpha(0),this.hwLabTVAnimationCenter.gotoAndStop("loop"),this.hwLabTVAnimationCenter.setAlpha(0));this.printerAnimation&&(this.printerAnimation.gotoAndStop("loop"),this.printerAnimation.setAlpha(0),this.rndPrinterLeftScreen.gotoAndStop("loop"),
this.rndPrinterLeftScreen.setAlpha(0),this.rndPrinterRightScreen.gotoAndStop("loop"),this.rndPrinterRightScreen.setAlpha(0))};a.startAirCon1=function(){this.airConAnimation1&&(this.airConAnimation1.setAlpha(1),this.airConAnimation1.playStoryBoard(["loop"]))};a.startHwLabScreenWall=function(){this.hwLabScreenWallAnimation.paused&&(this.hwLabScreenWallAnimation.setAlpha(1),this.hwLabScreenWallAnimation.playStoryBoard(["loop"]))};a.stopHwLabScreenWall=function(){this.hwLabScreenWallAnimation.paused||
(this.hwLabScreenWallAnimation.setAlpha(0),this.hwLabScreenWallAnimation.paused=!0)};a.starthwLabTV=function(){this.hwLabTVAnimation.paused&&(this.hwLabTVAnimation.setAlpha(1),this.hwLabTVAnimation.playStoryBoard(["loop"]),this.hwLabTVAnimationCenter.setAlpha(1),this.hwLabTVAnimationCenter.playStoryBoard(["loop"]))};a.stophwLabTV=function(){this.hwLabTVAnimation.paused||(this.hwLabTVAnimation.setAlpha(0),this.hwLabTVAnimation.paused=!0,this.hwLabTVAnimationCenter.setAlpha(0),this.hwLabTVAnimationCenter.paused=
!0)};a.startPrinter=function(){this.printerAnimation.paused&&(this.printerAnimation.setAlpha(1),this.printerAnimation.playStoryBoard(["loop"]))};a.stopPrinter=function(){this.printerAnimation.paused||(this.printerAnimation.setAlpha(0),this.printerAnimation.paused=!0)};a.startRndPrinterLeftScreen=function(){this.rndPrinterLeftScreen.paused&&(this.rndPrinterLeftScreen.setAlpha(1),this.rndPrinterLeftScreen.playStoryBoard(["loop"]))};a.stopRndPrinterLeftScreen=function(){this.rndPrinterLeftScreen.paused||
(this.rndPrinterLeftScreen.setAlpha(0),this.rndPrinterLeftScreen.paused=!0)};a.startRndPrinterRightScreen=function(){this.rndPrinterRightScreen.paused&&(this.rndPrinterRightScreen.setAlpha(1),this.rndPrinterRightScreen.playStoryBoard(["loop"]))};a.stopRndPrinterRightScreen=function(){this.rndPrinterRightScreen.paused||(this.rndPrinterRightScreen.setAlpha(0),this.rndPrinterRightScreen.paused=!0)};a.startAirCon2=function(){this.airConAnimation2&&(this.airConAnimation2.setAlpha(1),this.airConAnimation2.playStoryBoard(["loop"]))};
a.startWaterCooler=function(){this.waterCoolerAnimation&&!0===this.waterCoolerAnimation.paused&&this.waterCoolerAnimation.playStoryBoard(["loop"])};a.endedAnimation=function(a,c,b){"loop"===a.currentAnimation&&"airConAnimation1"!==b&&"airConAnimation2"!==b&&"waterCoolerAnimation"===b&&this.waterCoolerAnimation.gotoAndStop("loop")};a.saveState=function(){var a={};this.airConAnimation1&&(a.airConAnimation1=this.airConAnimation1.saveState());this.airConAnimation2&&(a.airConAnimation2=this.airConAnimation2.saveState());
this.waterCoolerAnimation&&(a.waterCoolerAnimation=this.waterCoolerAnimation.saveState());this.hwLabScreenWallAnimation&&(a.hwLabScreenWallAnimation=this.hwLabScreenWallAnimation.saveState());this.hwLabTVAnimation&&(a.hwLabTVnimation=this.hwLabTVAnimation.saveState());this.printerAnimation&&(a.printerAnimation=this.printerAnimation.saveState());this.rndPrinterLeftScreen&&(a.rndPrinterLeftScreen=this.rndPrinterLeftScreen.saveState());this.rndPrinterRightScreen&&(a.rndPrinterRightScreen=this.rndPrinterRightScreen.saveState());
return a};a.loadState=function(a){if(a){if(2===GameManager.company.currentLevel||3===GameManager.company.currentLevel)this.airConAnimation1.loadState(a.airConAnimation1),this.airConAnimation2.loadState(a.airConAnimation2);1<GameManager.company.currentLevel&&this.waterCoolerAnimation.loadState(a.waterCoolerAnimation);4===GameManager.company.currentLevel&&GameManager.company.flags.hwLabUnlocked&&(this.hwLabScreenWallAnimation.loadState(a.hwLabScreenWallAnimation),this.hwLabTVAnimation.loadState(a.hwLabTVnimation),
this.hwLabTVAnimationCenter.loadState(a.hwLabTVnimation));4===GameManager.company.currentLevel&&GameManager.company.flags.rndLabUnlocked&&(this.printerAnimation.loadState(a.printerAnimation),this.rndPrinterLeftScreen.loadState(a.rndPrinterLeftScreen),this.rndPrinterRightScreen.loadState(a.rndPrinterRightScreen))}}})();
var PointsDisplayVisual=function(a,d,c){this.initialize();this.innerContainer=new createjs.Container;this.mainShape=new createjs.Shape;this.innerContainer.addChild(this.mainShape);this.text=new createjs.Text("0","14pt Segoe UI",d);this.text.textAlign="center";this.text.textBaseline="middle";this.text.lineHeight=this.text.getMeasuredLineHeight();GameFlags.TEXT_CACHING&&this.text.cache(-50,-50,100,100);this.innerContainer.addChild(this.text);this.points=0;this.size=120;this.addChild(this.innerContainer);
this.color=a;this.captionBorder=new createjs.Shape;this.innerContainer.addChild(this.captionBorder);this.captionText=new createjs.Text(c,"10pt Segoe UI",d);this.captionText.textBaseline="alphabetic";this.captionText.lineHeight=this.captionText.getMeasuredLineHeight();this.captionText.lineWidth=this.captionText.getMeasuredWidth();this.innerContainer.addChild(this.captionText);this.isInvalid=!0};
(function(){PointsDisplayVisual.prototype=new createjs.Container;var a=PointsDisplayVisual.prototype;a.updatePoints=function(a){this.points=a};a.pulse=function(a){var c=new createjs.Shape;c.alpha=0;var b=c.graphics;b.clear();var g=this.size/4;b.beginRadialGradientFill([this.color,this.color,this.color,"white",this.color,"transparent"],[0,0.8,0.85,0.86,0.9,1],g,g,0,g,g,g);b.drawEllipse(0,0,this.size/2,this.size/2);b.closePath();this.addChildAt(c,0);b=0.4*this.size/4;c.scaleX=1.4;c.scaleY=1.4;c.x=-b;
c.y=-b;createjs.Tween.get(c).to({alpha:0.8},100).wait(200).to({alpha:0},100);createjs.Tween.get(c).to({scaleX:1,scaleY:1,x:0,y:0},400).call(function(){c.parent.removeChild(c);a&&a()})};a.onTick=function(){this.isInvalid&&(this.drawMainShape(),this.text.y=this.size/4,this.text.x=this.size/4);this.text.text!=Math.floor(this.points)&&(this.text.text=Math.floor(this.points),GameFlags.TEXT_CACHING&&this.text.updateCache());this.isInvalid=!1};a.drawMainShape=function(){var a=this.mainShape.graphics;a.clear();
a.beginFill(this.color);a.setStrokeStyle(2);a.beginStroke("black");a.drawEllipse(0,0,this.size/2,this.size/2);a.closePath();var c=this.captionText.lineWidth||this.captionText.getMeasuredWidth(),b=this.captionText.lineHeight||this.captionText.getMeasuredLineHeight(),a=this.captionBorder.graphics;a.clear();a.beginFill(this.color);a.setStrokeStyle(1);a.beginStroke("black");var g=this.size/4-c/2,e=this.size/2+5;a.drawRoundRect(g-5,e,c+10,b+10,2);a.closePath();0===this.captionText.cacheID&&(this.captionText.x=
g,this.captionText.y=e+10+b/2,GameFlags.TEXT_CACHING&&this.captionText.cache(0,-15,100,25))}})();var ProgressBarVisual=function(){this.initialize()};
(function(){ProgressBarVisual.prototype=new createjs.Shape;var a=ProgressBarVisual.prototype;a.width=100;a.height=20;a.progress=0;a.color="darkblue";a.isHorizontal=!0;a.onTick=function(){if(0!=this.alpha){var a=this.width,c=this.height,b=this.graphics;b.clear();b.beginFill("#A0A0A0");b.drawRoundRect(0,0,a,c,2);b.beginFill(this.color);var g=1,a=a-2,c=c-2;if(this.isHorizontal)a*=this.progress.clamp(0,1);else var e=c*this.progress.clamp(0,1),g=c-e+1,c=e;b.drawRoundRect(1,g,a,c,2);b.closePath()}}})();
var CharacterOverlay=function(a){this.initialize();this.character=a;this.speedFactor=0.8+0.2*this.character.speedFactor;this.initAnimations();this.progressBar=new ProgressBarVisual;this.progressBar.alpha=0;this.progressBar.y=VisualsManager.toScreenCoordinates(-30);this.addChild(this.progressBar);this.efficiencyBar=new ProgressBarVisual;this.efficiencyBar.alpha=1>a.efficiency?1:0;this.efficiencyBar.progress=0.3;this.efficiencyBar.width=12;this.efficiencyBar.height=70;this.efficiencyBar.isHorizontal=
!1;this.efficiencyBar.x-=VisualsManager.toScreenCoordinates(30);this.addChild(this.efficiencyBar);this.boostVisual=new CircularProgressVisual;this.boostVisual.radius=20;this.boostVisual.x=VisualsManager.toScreenCoordinates(166,CanvasManager.globalScale);this.boostVisual.y=VisualsManager.toScreenCoordinates(5,CanvasManager.globalScale);this.boostVisual.alpha=0.8;this.addChild(this.boostVisual);a.visualData&&this.loadState(a.visualData);a.onFire&&this.setOnFire(!0)};
(function(){var a=CharacterOverlay;a.prototype=new createjs.Container;a=a.prototype;a.saySomething=function(a,c,b,g){void 0===b&&(b=0);g||(g="black");c||(c=800);var e=new createjs.Container;e.x=25;e.y=-25+b;a=new createjs.Text(a,"18pt Arial",g);a.textBaseline="top";var g=a.getMeasuredWidth(),h=a.getMeasuredLineHeight(),f=new createjs.Shape,j=f.graphics;j.beginFill(createjs.Graphics.getRGB(255,255,255,0.8));j.beginStroke("black");j.setStrokeStyle(1);j.drawRoundRect(-4,-4,g+8,h+8,5);j.closePath();e.addChild(f);
e.addChild(a);e.alpha=0;this.addChild(e);var l=this,a=c/6;createjs.Tween.get(e).to({y:-60+b},c);createjs.Tween.get(e).to({alpha:1},a).wait(c-2*a).to({alpha:0,x:35},a).call(function(){l.removeChild(e)})};a._getSpawnPointOrigin=function(){return this.character.getOrientation()===CharacterOrientation.NW?{x:25,y:-10}:{x:130,y:90}};a.spawnBugRemovePoint=function(a,c,b,g){g||(g=0);var c=new MersenneTwister(a),e=new createjs.Shape;e.alpha=0;var h=this._getSpawnPointOrigin();e.x=h.x+10*c.random()*c.randomSign();
e.y=h.y-40+-20*c.random();e.regX=5;e.regY=5;e.scaleX=0;e.scaleY=0;var f=e.graphics;f.beginFill(BUGS_COLOR);f.beginStroke("black");f.setStrokeStyle(0.5);f.drawCircle(5,5,10);f.closePath();this.addChild(e);var j=this,f=b/8,b=b/2,l=GameManager.gameId;GameManager.increaseSpawnedPoints();var m=[],k=this;m.push(createjs.Tween.get(e).wait(g).to({y:h.y-80-60*c.random()},b,createjs.Ease.backIn).call(function(){l==GameManager.gameId&&(GameManager.decreaseBugs(1),VisualsManager.updatePoints(),1==GameManager.company.flags.currentZone&&
Sound.playSoundOnce("bugDecrease",0.2),k.character.removeSpawnedPoint(a),GameManager.decreaseSpawnedPoints(),VisualsManager.pulsePointsDisplay("br"))}));m.push(createjs.Tween.get(e).wait(g).to({alpha:1},f).wait(b-2*f).to({alpha:0},f).call(function(){j.removeChild(e)}));m.push(createjs.Tween.get(e).wait(g).to({scaleX:1,scaleY:1},2*f,createjs.Ease.backOut));return m};a.spawnPoint=function(a,c,b,g){g||(g=0);if(!this.spawnPointVisuals||this.spawnPointVisuals.gameId!=GameManager.gameId)this.spawnPointVisuals=
{gameId:GameManager.gameId};else if(GameFlags.GROUP_POINTS&&c in this.spawnPointVisuals){var e=this.spawnPointVisuals[c];if(e){e.weight++;b=e.targetScaleX;g=e.targetScaleY;e.targetScaleX=Math.min(2,b+0.2);e.targetScaleY=Math.min(2,g+0.2);var h=createjs.Tween.get(e);h.isScaleTween=!0;h.set({scaleX:b,scaleY:g}).to({scaleX:e.targetScaleX,scaleY:e.targetScaleY},100);e.ids.push(a);e.textShape||(e.textShape=new createjs.Text(e.weight,"10pt Segoe UI","black"),e.textShape.textAlign="center",e.textShape.textBaseline=
"middle",e.textShape.x=5,e.textShape.y=4,e.addChild(e.textShape));e.textShape.text=e.weight;GameManager.increaseSpawnedPoints();return[h]}}h=new MersenneTwister(a);e=new createjs.Container;e.alpha=0;var f=this._getSpawnPointOrigin();f.x+=this.x;f.y+=this.y;e.x=f.x+10*h.random()*h.randomSign();e.y=f.y+-20*h.random();e.regX=5;e.regY=5;e.scaleX=0;e.scaleY=0;e.targetScaleX=1;e.targetScaleY=1;var j="t"===c||"e"===c?TECHNOLOGY_POINTS_COLOR:"d"===c?DESIGN_POINTS_COLOR:"b"===c?BUGS_COLOR:RESEARCH_POINTS_COLOR;
1==GameManager.company.flags.currentZone&&Sound.playSpawnSound(c);var l=new createjs.Shape;e.addChild(l);l=l.graphics;l.beginFill(j);l.beginStroke("black");l.setStrokeStyle(0.5);l.drawCircle(5,5,10);l.closePath();CanvasManager.characterStage.addChild(e);e.weight=1;e.ids=[a];this.spawnPointVisuals[c]=e;var m=CanvasManager.characterStage,a=VisualsManager.getGlobalLocationOfPointsDisplay(c),j=b/8,l=b/2,k=GameManager.gameId;GameManager.increaseSpawnedPoints();var n=[],p=this;n.push(createjs.Tween.get(e).wait(g).to({y:f.y-
80-20*h.random()},l,createjs.Ease.backOut).call(function(){delete p.spawnPointVisuals[c]}).to({x:a.x,y:a.y},b-l,createjs.Ease.quadIn).call(function(){if(k==GameManager.gameId){var a=e.weight;VisualsManager.pulsePointsDisplay(c);"t"===c?GameManager.company.currentGame?GameManager.company.currentGame.technologyPoints+=a:GameManager.currentContract&&(GameManager.currentContract.visualTRemaining-=a):"d"===c?GameManager.company.currentGame?GameManager.company.currentGame.designPoints+=a:GameManager.currentContract&&
(GameManager.currentContract.visualDRemaining-=a):"r"===c?GameManager.company.researchPoints+=a:"e"===c?GameManager.increaseDisplayEnginePoints(p.character,a):"b"===c&&GameManager.company.currentGame&&(GameManager.company.currentGame.bugs+=a);1==GameManager.company.flags.currentZone&&Sound.playSpawnSound(c,!0);VisualsManager.updatePoints();for(a=0;a<e.ids.length;a++)p.character.removeSpawnedPoint(e.ids[a]),GameManager.decreaseSpawnedPoints();"r"!=c&&GameManager.currentFeature&&"preparation"!=GameManager.currentFeature.id&&
Tutorial.gamePoints()}}));n.push(createjs.Tween.get(e).wait(g).to({alpha:1},j).wait(b-2*j).to({alpha:0},j).call(function(){m.removeChild(e)}));n.push(createjs.Tween.get(e).wait(g).to({scaleX:1,scaleY:1},2*j,createjs.Ease.backOut));return n};a.startResearching=function(){if(1!=this.progressBar.alpha&&(createjs.Tween.get(this.progressBar).to({alpha:1},400),this.character.currentResearch.isTraining)){var a=this.character.currentResearch,c=Training.getAllTrainings().first(function(b){return b.id===a.id});
a.isSkillTraining=c&&c.isSkillTraining;a.isSkillTraining&&(this.animateTrainingProgress(),this.trainingOverlay.fadeIn(1200))}};a.finishResearching=function(){createjs.Tween.get(this.progressBar).to({alpha:0},400);this.trainingOverlay.fadeOut(1200)};a.onTick=function(){this.character.state===CharacterState.Researching&&(this.progressBar.progress=this.character.currentResearch.progress,this.progressBar.color=this.character.currentResearch.progressColor?this.character.currentResearch.progressColor:"research"==
this.character.currentResearch.type?"darkblue":"lightgreen");var a=this.character.efficiency;1!=a?(this.efficiencyBar.progress=a,this.efficiencyBar.color=createjs.Graphics.getHSL(80*a,100,50),this.efficiencyBar.alpha=(this.efficiencyBar.alpha+0.01).clamp(0,0.8)):0!=this.efficiencyBar.alpha&&(this.efficiencyBar.alpha=(this.efficiencyBar.alpha-0.01).clamp(0,1))};a.initAnimations=function(){var a=CanvasManager.globalScale;if(this.character.getOrientation()===CharacterOrientation.NW){var c=BitmapAnimationFactory.createAnimation("screen",
this.speedFactor,this.character.getOrientation(),this.character.flags.body,this.character.flags.head);c&&this.addChild(c);this.screenAnimation=c}c=BitmapAnimationFactory.createAnimation("typing",this.speedFactor,this.character.getOrientation(),this.character.flags.body,this.character.flags.head);c.overlay=this;this.addChild(c);this.typingAnimation=c;c=BitmapAnimationFactory.createAnimation("thinking",this.speedFactor,this.character.getOrientation(),this.character.flags.body,this.character.flags.head);
c.overlay=this;this.addChild(c);this.thinkingAnimation=c;c=BitmapAnimationFactory.createAnimation("sitBack",this.speedFactor,this.character.getOrientation(),this.character.flags.body,this.character.flags.head);c.overlay=this;this.addChild(c);this.sitBackAnimation=c;c=BitmapAnimationFactory.createAnimation("drawNotepad",this.speedFactor,this.character.getOrientation(),this.character.flags.body,this.character.flags.head);c.overlay=this;this.addChild(c);this.drawNotepadAnimation=c;c="";c=this.character.getOrientation()==
CharacterOrientation.NW?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.notepadImage),this.speedFactor):BitmapAnimationFactory.createTeaCupAnimation(this.speedFactor);c.overlay=this;c.scaleX=a;c.scaleY=a;this.addChild(c);this.notepadImage=c;var b=this;this.typingAnimation.onAnimationEnded=function(a,c){b.endedAnimation.call(b,a,c,"typing")};this.thinkingAnimation.onAnimationEnded=function(a,c){b.endedAnimation.call(b,a,c,"thinking")};this.sitBackAnimation.onAnimationEnded=function(a,c){b.endedAnimation.call(b,
a,c,"sitBack")};this.drawNotepadAnimation.onAnimationEnded=function(a,c){b.endedAnimation.call(b,a,c,"drawNotepad")};1===GameManager.company.currentLevel&&(c=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.pong)),c.x=VisualsManager.toScreenCoordinates(1321,a)-VisualsManager.toScreenCoordinates(1039,a),c.y=VisualsManager.toScreenCoordinates(261,a)-VisualsManager.toScreenCoordinates(539,a),c.scaleX=a,c.scaleY=a,this.addChild(c),this.pongAnimation=c);this.notepadImage.gotoAndStop("all");
this.sitBackAnimation.gotoAndStop("loop");this.screenAnimation&&this.screenAnimation.gotoAndStop("loop");this.pongAnimation&&this.pongAnimation.gotoAndStop("all");this.typingAnimation.setAlpha(0);this.thinkingAnimation.setAlpha(0);this.sitBackAnimation.setAlpha(1);this.drawNotepadAnimation.setAlpha(0);this.refreshName()};a.refreshName=function(){var a=new CharacterNameVisual(this.character);a.alpha=0.7;this.characterNameVisual&&this.removeChild(this.characterNameVisual);this.characterNameVisual=a;
this.addChildAt(this.characterNameVisual,0)};a.endedAnimation=function(a,c,b){"loop"===a.currentAnimation?this.character.loopEnded():null===a.currentAnimation&&a.paused||"end"===a.currentAnimation?this.character.animationEnded(b):!0===a.paused?this.character.loopEnded():"sitBack"===b&&("start"===c&&null!=a.currentStoryBoard&&0===a.currentStoryBoard.length)&&this.sitBackAnimation.playStoryBoard(["loop"])};a.removeAllAnimation=function(){this.typingAnimation.setAlpha(0);this.thinkingAnimation.setAlpha(0);
this.sitBackAnimation.setAlpha(0);this.drawNotepadAnimation.setAlpha(0);this.notepadImage.setAlpha(1);this.screenAnimation&&this.screenAnimation.setPaused(!0);this.typingAnimation.stop();this.thinkingAnimation.stop();this.sitBackAnimation.stop();this.drawNotepadAnimation.stop()};a.startThinking=function(){this.removeAllAnimation();this.thinkingAnimation.setAlpha(1);this.thinkingAnimation.playStoryBoard(["start","loop"])};a.continueThinking=function(){this.thinkingAnimation.setPaused(!1)};a.endThinking=
function(){this.thinkingAnimation.playStoryBoard(["end","#stop"])};a.startDrawNotepad=function(){this.removeAllAnimation();this.notepadImage.setAlpha(0);this.drawNotepadAnimation.setAlpha(1);this.drawNotepadAnimation.playStoryBoard(["start","loop"])};a.continueDrawNotepad=function(){this.drawNotepadAnimation.setPaused(!1)};a.endDrawNotepad=function(){this.drawNotepadAnimation.playStoryBoard(["end","#stop"])};a.startSitBack=function(){this.removeAllAnimation();this.sitBackAnimation.setAlpha(1);this.sitBackAnimation.playStoryBoard(["start",
"loop"])};a.startSitBackLoop=function(){this.removeAllAnimation();this.sitBackAnimation.setAlpha(1);this.sitBackAnimation.playStoryBoard(["loop"])};a.continueSitBack=function(){this.sitBackAnimation.setPaused(!1)};a.endSitBack=function(){this.sitBackAnimation.playStoryBoard(["end","#stop"])};a.startTyping=function(){this.removeAllAnimation();this.screenAnimation&&this.screenAnimation.setPaused(!1);this.typingAnimation.setAlpha(1);this.typingAnimation.playStoryBoard(["start","loop"])};a.continueTyping=
function(){this.screenAnimation&&this.screenAnimation.setPaused(!1);this.typingAnimation.setPaused(!1)};a.endTyping=function(){this.screenAnimation&&this.screenAnimation.stop();this.typingAnimation.playStoryBoard(["end","#stop"])};a.playPong=function(){if(this.pongAnimation&&this.pongAnimation.paused){this.pongAnimation.playStoryBoard(["all","#stop"]);var a=GameManager.gameId,c=function(){a==GameManager.gameId&&1==GameManager.company.flags.currentZone&&Sound.playSoundOnce("ping",0.5)},b=function(){a==
GameManager.gameId&&1==GameManager.company.flags.currentZone&&Sound.playSoundOnce("pong",0.5)};createjs.Tween.get(this).wait(500).call(c).wait(720).call(b).wait(650).call(c).wait(1100).call(b).wait(300).call(c).wait(850).call(c).wait(500).call(b).wait(650).call(c).wait(1100).call(b).wait(200).call(c).wait(2E3).call(function(){Achievements.activate(Achievements.lvl1EasterEgg);GameManager.checkAchievements()});ghg4.ghg5("pong played")}};a.saveState=function(){var a={};a.typingAnimation=this.typingAnimation.saveState();
this.screenAnimation&&(a.screenAnimation=this.screenAnimation.saveState());a.thinkingAnimation=this.thinkingAnimation.saveState();a.sitBackAnimation=this.sitBackAnimation.saveState();a.drawNotepadAnimation=this.drawNotepadAnimation.saveState();a.notepadImage=this.notepadImage.saveState();this.pongAnimation&&(a.pong=this.pongAnimation.saveState());this.character.state===CharacterState.Researching&&(a.currentTraining=this.currentTrainingState);return a};a.loadState=function(a){a&&(this.typingAnimation.loadState(a.typingAnimation),
this.screenAnimation&&this.screenAnimation.loadState(a.screenAnimation),this.thinkingAnimation.loadState(a.thinkingAnimation),this.sitBackAnimation.loadState(a.sitBackAnimation),this.drawNotepadAnimation.loadState(a.drawNotepadAnimation),this.notepadImage.loadState(a.notepadImage),this.pongAnimation&&this.pongAnimation.loadState(a.pongAnimation),a.currentTraining&&(this.currentTrainingState=a.currentTraining))};a.resumeTraining=function(){if(void 0==this.currentTrainingState)this.character.currentResearch&&
this.character.currentResearch.isSkillTraining&&this.trainingOverlay.show();else if(this.character.currentResearch&&this.character.currentResearch.isSkillTraining){var a=this.currentTrainingState;this.animateTrainingProgress(a.updates);var c=GameManager.gameTime-a.start;this.trainingTweens.forEach(function(a){a.setPosition(c)});this.trainingOverlay.show()}};a.setOnFire=function(a){if(a){if(this.typingAnimation.onFire=!0,this.screenAnimation&&(this.screenAnimation.onFire=!0),this.thinkingAnimation.onFire=
!0,this.sitBackAnimation.onFire=!0,this.drawNotepadAnimation.onFire=!0,this.notepadImage.onFire=!0,this.pongAnimation)this.pongAnimation.onFire=!0}else if(this.typingAnimation.onFire=void 0,this.screenAnimation&&(this.screenAnimation.onFire=void 0),this.thinkingAnimation.onFire=void 0,this.sitBackAnimation.onFire=void 0,this.drawNotepadAnimation.onFire=void 0,this.notepadImage.onFire=void 0,this.pongAnimation)this.pongAnimation.onFire=void 0};GameManager.addTickListener(function(){VisualsManager.characterOverlays.forEach(function(a){a.character.state==
CharacterState.Researching&&a.trainingOverlay&&a.trainingTweens&&a.trainingTweens.forEach(function(a){a=a._target;void 0!=a.gamedev_text_int&&a.text(Math.floor(a.gamedev_text_int));void 0!=a.gamedev_yTilt&&a.css("transform","rotateY({0}deg)".format(a.gamedev_yTilt))})})},!0);a.animateTrainingProgress=function(a){if(this.trainingOverlay){for(var c=this.trainingOverlay,b=[],g=[{p:this.character.designFactor,t:"d"},{p:this.character.technologyFactor,t:"t"},{p:this.character.speedFactor,t:"s"},{p:this.character.researchFactor,
t:"r"}],e=0;e<g.length;e++){var h=g[e],f=c.find(".training{0}.trainingColumnRight".format(h.t.toUpperCase()));if(void 0==f.gamedev_text_int){var j=Math.floor(500*h.p);f.text(j);if(a&&(f=a.first(function(a){return a.t===h.t})))f.o=j}}if(a){if(0<a.length){1==GameManager.company.flags.currentZone&&Sound.playSoundOnce("trainingProgress",0.1);for(var l=this,e=0;e<a.length;e++){var m=GameManager.gameId;(function(a){var d=c.find(".trainingGain.training{0}".format(a.t.toUpperCase()));d.text("+"+a.p);void 0===
d.gamedev_yTilt&&(d.gamedev_yTilt=90);b.push(createjs.Tween.get(d).to({gamedev_yTilt:0},400,createjs.Ease.bounceOut).wait(800).to({gamedev_yTilt:90},400));d=c.find(".training{0}.trainingColumnRight".format(a.t.toUpperCase()));void 0===d.gamedev_text_int&&(d.gamedev_text_int=a.o);var e=createjs.Tween.get(d).wait(200).to({gamedev_text_int:a.o+a.p},500);e.call(function(){if(m==GameManager.gameId){l.character.applyTrainingUpdate(a);l.trainingTweens.indexOf(e)!=-1&&l.trainingTweens.remove(e)}});b.push(e)})(a[e])}}this.currentTrainingState=
{updates:a,start:GameManager.gameTime}}this.trainingTweens=b}}})();var ProjectWorkerVisual=function(a){this.state={progressF:0};this.efficiency=0;createjs.Container.apply(this,arguments);this.init();this.visualData=a};
(function(){var a=ProjectWorkerVisual;a.prototype=new createjs.Container;a=a.prototype;a.init=function(){this.alpha=0;this.efficiencyBar=new ProgressBarVisual;this.efficiencyBar.alpha=1>this.efficiency?1:0;this.efficiencyBar.progress=0.3;this.efficiencyBar.width=12;this.efficiencyBar.height=70;this.efficiencyBar.isHorizontal=!1;this.efficiencyBar.x-=30/VisualsManager.Divisor;this.scaleY=this.scaleX=CanvasManager.globalScale;this.addChild(this.efficiencyBar)};a.save=function(){var a={};a.id=this.id;
a.alpha=this.alpha;a.progress=this.efficiencyBar.progress;a.efficiencyBarAlpha=this.efficiencyBar.alpha;a.state=this.state;a.efficiency=this.efficiency;a.zone=this.zone;a.visualData=this.animation.saveState();return a};a.load=function(){this.visualData&&(this.zone=this.visualData.zone,this.setPosition(this.visualData.id),this.alpha=this.visualData.alpha,void 0!=this.visualData.efficiencyBarAlpha&&(this.efficiencyBar.alpha=this.visualData.efficiencyBarAlpha),this.efficiencyBar.progress=this.visualData.progress,
this.state=this.visualData.state,this.efficiency=this.visualData.efficiency,this.loadAnimations(),this.animation.loadState(this.visualData.visualData))};a.loadAnimations=function(){var a=200,b=150,d=250;PlatformShim.ISLOWRES&&(a=107,b=80,d=133);var e=CanvasManager.globalScale;0===this.id?this.animation=0===this.zone?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwFrontFemale1),1):new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndFemaleTypingBack1),1):1===this.id?this.animation=
0===this.zone?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwBackMale2),1):new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleTypingBack1),1):2===this.id?this.animation=0===this.zone?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwBackFemale2),1):new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndOperator1),1):3===this.id?this.animation=0===this.zone?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwBackMale1),1):new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndActor1),
1):4===this.id?0===this.zone?(this.animation=new CompositeBitmapAnimation,this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwFrontMale2),1)),this.animation.overlay={deskImage:this.getSubImage(this.x-552/VisualsManager.Divisor*e,this.y-746/VisualsManager.Divisor*e,b,d,ResourceKeys.hwDesk2)}):this.animation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndFemaleBoardBack1),1):5===this.id?0===this.zone?(this.animation=new CompositeBitmapAnimation,
this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwFrontMale3),1)),this.animation.overlay={deskImage:this.getSubImage(this.x-998/VisualsManager.Divisor*e,this.y-486/VisualsManager.Divisor*e,b,d,ResourceKeys.hwDesk1)}):this.animation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndFemaleTableBack1),1):6===this.id?0===this.zone?this.animation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwBackFemale3),1):(this.animation=new CompositeBitmapAnimation,
this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleFrontTable1_pants),1)),this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleFrontTable1_body),1)),this.animation.overlay={deskImage:this.getSubImage(this.x-735/VisualsManager.Divisor*e,this.y-600/VisualsManager.Divisor*e,a,a,ResourceKeys.rndDesk1)}):7===this.id?this.animation=0===this.zone?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwBackFemale4),
1):new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleTableBack1),1):8===this.id?0===this.zone?(this.animation=new CompositeBitmapAnimation,this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwFrontFemale2),1)),this.animation.overlay={deskImage:this.getSubImage(this.x-552/VisualsManager.Divisor*e,this.y-746/VisualsManager.Divisor*e,b,d,ResourceKeys.hwDesk2)}):this.animation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleTableBack2),
1):9===this.id?0===this.zone?(this.animation=new CompositeBitmapAnimation,this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwFrontMale4),1)),this.animation.overlay={deskImage:this.getSubImage(this.x-552/VisualsManager.Divisor*e,this.y-746/VisualsManager.Divisor*e,b,d,ResourceKeys.hwDesk2)}):(this.animation=new CompositeBitmapAnimation,this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndFemaleTableFront1_pants),1)),this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndFemaleTableFront1_body),
1)),this.animation.overlay={deskImage:this.getSubImage(this.x-1043/VisualsManager.Divisor*e,this.y-765/VisualsManager.Divisor*e,a,a,ResourceKeys.rndDesk2)}):10===this.id?0===this.zone?this.animation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwFrontFemale4),1):(this.animation=new CompositeBitmapAnimation,this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleFrontTable2_pants),1)),this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleFrontTable2_body),
1)),this.animation.overlay={deskImage:this.getSubImage(this.x-1043/VisualsManager.Divisor*e,this.y-765/VisualsManager.Divisor*e,a,a,ResourceKeys.rndDesk2)}):this.animation=0===this.zone?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwBackFemale1),1):new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleBoardFront1),1);this.animation.gotoAndPlay("loop");this.animation.setAlpha(1);this.addChild(this.animation)};a.getSubImage=function(a,b,d,e,h){var f=document.createElement("canvas");
f.width=d;f.height=e;f.getContext("2d").drawImage(GameDev.ResourceManager.resources[h],-a/CanvasManager.globalScale,-b/CanvasManager.globalScale);a=new Image;a.src=f.toDataURL("image/png");return a};a.setPosition=function(a){this.id=a;0===this.zone?this.setHwLabPosition():this.setRndLabPosition()};a.setHwLabPosition=function(){var a=CanvasManager.globalScale;0===this.id?(this.x=1860*a,this.y=920*a):1===this.id?(this.x=1720*a,this.y=940*a):2===this.id?(this.x=1400*a,this.y=820*a):3===this.id?(this.x=
770*a,this.y=850*a):4===this.id?(this.x=1300*a,this.y=980*a):5===this.id?(this.x=1240*a,this.y=530*a):6===this.id?(this.x=1100*a,this.y=640*a):7===this.id?(this.x=1100*a,this.y=1040*a):8===this.id?(this.x=800*a,this.y=670*a):9===this.id?(this.x=1100*a,this.y=850*a):10===this.id?(this.x=1788*a,this.y=850*a):(this.x=2100*a,this.y=1102*a);this.x/=VisualsManager.Divisor;this.y/=VisualsManager.Divisor};a.setRndLabPosition=function(){var a=CanvasManager.globalScale;0===this.id?(this.x=820*a,this.y=420*
a):1===this.id?(this.x=420*a,this.y=420*a):2===this.id?(this.x=1620*a,this.y=900*a):3===this.id?(this.x=1830*a,this.y=770*a):4===this.id?(this.x=1520*a,this.y=510*a):5===this.id?(this.x=1080*a,this.y=955*a):11===this.id?(this.x=1250*a,this.y=470*a):6===this.id?(this.x=960*a,this.y=560*a):7===this.id?(this.x=1370*a,this.y=790*a):8===this.id?(this.x=810*a,this.y=800*a):9===this.id?(this.x=1100*a,this.y=790*a):10===this.id&&(this.x=1258*a,this.y=700*a);this.x/=VisualsManager.Divisor;this.y/=VisualsManager.Divisor};
a.tick=function(){this.lastUpdate||(this.lastUpdate=GameManager.gameTime);var a=GameManager.gameTime-this.lastUpdate;if(!(0>=a)){var b=this.getAffordanceFactor();1>b&&(b*=2);this.efficiency=(this.efficiency+a/22E3*b).clamp(0,1);this.animation.speedFactor!=this.efficiency&&(this.animation.speedFactor=this.efficiency);0<this.efficiency&&1>this.alpha&&(this.alpha+=0.02,0.9<this.alpha&&(2===this.zone?0===this.id?VisualsManager.levelOverlay.startRndPrinterRightScreen():1===this.id?VisualsManager.levelOverlay.startRndPrinterLeftScreen():
2===this.id&&VisualsManager.levelOverlay.startPrinter():0===this.zone&&(0===this.id?VisualsManager.levelOverlay.starthwLabTV():2===this.id&&VisualsManager.levelOverlay.startHwLabScreenWall())));0===this.efficiency&&0<this.alpha&&(this.alpha-=0.02,0.9>this.alpha&&(2===this.zone?0===this.id?VisualsManager.levelOverlay.stopRndPrinterRightScreen():1===this.id?VisualsManager.levelOverlay.stopRndPrinterLeftScreen():2===this.id&&VisualsManager.levelOverlay.stopPrinter():0===this.zone&&(0===this.id?VisualsManager.levelOverlay.stophwLabTV():
2===this.id&&VisualsManager.levelOverlay.stopHwLabScreenWall())));1!=this.efficiency?(this.efficiencyBar.progress=this.efficiency,this.efficiencyBar.color=createjs.Graphics.getHSL(80*this.efficiency,100,50),this.efficiencyBar.alpha=(this.efficiencyBar.alpha+0.01).clamp(0,0.8)):0!=this.efficiencyBar.alpha&&(this.efficiencyBar.alpha=(this.efficiencyBar.alpha-0.01).clamp(0,1));this._doWork(a);this.lastUpdate=GameManager.gameTime}};a._doWork=function(a){var b;b=1*(a/1E3)*this.efficiency;var a=this.getCurrentProject(),
d=GameManager.company.licencedPlatforms.filter(function(a){return!0===a.isCustom&&0<a.maintenancePoints&&1E6*a.unitsSold*Sales.consoleUnitPrice>a.currentSalesCash});if(!a&&(0===d.length||2===this.zone))b/=7;this.state.progressF+=b;b=Math.floor(this.state.progressF);0<b&&(this.state.progressF-=b);for(var e=0;e<b;e++){var h=a&&0<a.remainingPoints;if(0===this.zone&&0<d.length)for(var f=d.length-1;0<=f;f--)if(0<d[f].maintenancePoints){d[f].maintenancePoints--;d[f].repairPoints++;0===d[f].maintenancePoints&&
d[f].unitsSold===Math.floor(d[f].currentSalesCash/Sales.consoleUnitPrice)?UI.removeMaintenanceCard(d[f]):(UI.updateRepairPoints(d[f]),UI.updateMaintenanceCard(d[f]));this._spawnPoint("t");return}h&&(a.remainingPoints--,h=a.startPoints-a.remainingPoints,a.progress=0==h?0:h/a.startPoints,0>=a.remainingPoints&&GameManager.finishProject(a));var j;if(2==this.zone){if(j=a?"d":"r","r"===j&&(GameManager.company.researchPoints++,VisualsManager.pulsePointsDisplay(j),VisualsManager.updatePoints()),a&&a.id===
Research.AAAMarketingCampaign.id)GameManager.company.currentGame?GameManager.company.currentGame.hypePoints+=100/a.startPoints:GameManager.finishProject(a)}else 0===this.zone&&(j="t",a&&a.id===Research.AAACustomHardware.id&&(GameManager.company.currentGame?GameManager.company.currentGame.hypePoints+=50/a.startPoints:GameManager.finishProject(a)));this._spawnPoint(j)}};var d=new MersenneTwister(0);a._spawnPoint=function(a){var b=new createjs.Shape;b.alpha=0;b.x=20*d.random()*d.randomSign();b.y=-20*
d.random();b.regX=5;b.regY=5;b.scaleX=0;b.scaleY=0;var g="t"===a||"e"===a?TECHNOLOGY_POINTS_COLOR:"d"===a?DESIGN_POINTS_COLOR:"b"===a?BUGS_COLOR:RESEARCH_POINTS_COLOR;this.zone==GameManager.company.flags.currentZone&&Sound.playSpawnSound(a);a=b.graphics;a.beginFill(g);a.beginStroke("black");a.setStrokeStyle(0.5);a.drawCircle(5,5,10);a.closePath();this.addChild(b);var e=this,g=[];g.push(createjs.Tween.get(b).to({y:-80-60*d.random()},600,createjs.Ease.backIn));g.push(createjs.Tween.get(b).to({alpha:1},
150).wait(300).to({alpha:0},150).call(function(){e.removeChild(b)}));g.push(createjs.Tween.get(b).to({scaleX:1,scaleY:1},300,createjs.Ease.backOut))}})();IsometricCompanyNameVisual=function(){createjs.Container.apply(this,arguments)};
(function(){IsometricCompanyNameVisual.prototype=new createjs.Container;IsometricCompanyNameVisual.prototype.updateVisual=function(a){this.removeAllChildren();var d=GameManager.company.name,c=VisualsManager.toScreenCoordinates(600,CanvasManager.globalScaleIgnoringLowResBackground),b=54;do var g="{0}pt {1}".format(b,"Calibri"),g=new createjs.Text(d,g,"black"),b=b-2;while(g.getMeasuredWidth()>c&&10<b);for(var c=b/32,b=a?1:5,e=0;e<b;e++)g=createjs.Graphics.getHSL(0,0,0==e?70:60/e),a&&(g=createjs.Graphics.getHSL(0,
0,41)),g=new createjs.Text(d,"32pt {0}".format("Calibri"),g),g.textAlign="center",g.textBaseline="alphabetical",g.x+=1*e,g.y-=1*e,this.addChildAt(g,0);this.skewY=30;this.scaleX=c*CanvasManager.globalScale;this.scaleY=c*CanvasManager.globalScale;this.alpha=a?0.8:1}})();
var HypePointsVisual=function(){this.initialize();this.width=150;this.height=30;this.border=new createjs.Shape;this.addChild(this.border);this.text=new createjs.Text("Hype 400","14pt Segoe UI","white");this.text.textAlign="center";this.text.textBaseline="middle";this.text.x=this.width/2;this.text.y=this.height/2-2;this.text.maxWidth=this.width-10;this.addChild(this.text);this._redraw()};
(function(){var a=HypePointsVisual;a.prototype=new createjs.Container;a=a.prototype;a.updateText=function(a){this.text.text=a};a._redraw=function(){var a=this.width,c=this.height,b=this.border.graphics;b.clear();var g=createjs.Graphics.getRGB(204,0,51,0.7);b.beginFill(g);b.setStrokeStyle(2);b.beginStroke("black");b.drawRoundRect(0,0,a,c,2);b.closePath()}})();
var CircularProgressVisual=function(){this.maxValue=this.angleArc=360;this.minValue=0;this.bgColor="red";this.fgColor="blue";this.radius=20;this.lineWidth=10;this.updateValue(0);this.startAngle=1.5*Math.PI;createjs.Shape.apply(this,arguments)};
(function(){CircularProgressVisual.prototype=new createjs.Shape;var a=CircularProgressVisual.prototype;a.onTick=function(){this.invalid&&(this._redraw(),this.invalid=!1)};a.invalidate=function(){this.invalid=!0};a.updateValue=function(a){this.value=a;this.endAngle=0===a||360===a?this.startAngle:(this.value-90)/180*Math.PI};var d=2*Math.PI;a._redraw=function(){var a=this.graphics;a.clear();a.setStrokeStyle(this.lineWidth);this.bgColor&&(a.beginStroke(this.bgColor),a.arc(this.radius,this.radius,this.radius,
0,d));a.beginStroke(this.fgColor);a.arc(this.radius,this.radius,this.radius,this.startAngle,this.endAngle)}})();var TopicsSerializer={};(function(){TopicsSerializer.load=function(a){return Topics.topics.first(function(d){return d.id===a.id})};TopicsSerializer.save=function(a){var d={};d.id=a.id;return d}})();var EnginePartsSerializer={};
(function(){EnginePartsSerializer.load=function(a){return Research.getAllItems().first(function(d){return d.id===a.id})};EnginePartsSerializer.save=function(a){var d={};d.id=a.id;return d}})();var EngineSerializer={};
(function(){EngineSerializer.load=function(a){var d={};$.extend(d,a);d.parts=a.parts.map(function(a){return EnginePartsSerializer.load(a)}).filter(function(a){return a});return d};EngineSerializer.save=function(a){var d={};$.extend(d,a);d.parts=a.parts.map(function(a){return EnginePartsSerializer.save(a)});return d}})();var FeatureSerializer={};
(function(){FeatureSerializer.load=function(a){var d=Research.getAllItems().first(function(c){return c.id===a.id});if(d)return void 0!=a.experience&&(d.experience=a.experience),d};FeatureSerializer.save=function(a){var d={};d.id=a.id;void 0!=a.experience&&(d.experience=a.experience);return d}})();var PlatformsSerializer={};
(function(){PlatformsSerializer.load=function(a){return a.isCustom?a:Platforms.allPlatforms.first(function(d){return d.id===a.id})};PlatformsSerializer.save=function(a){if(a.isCustom)return a;var d={};d.id=a.id;return d}})();var CompanyFeatureSerializer={};
(function(){CompanyFeatureSerializer.load=function(a){var d={};d.id=a.id;d.lastUpdate=a.lastUpdate;d.progress=a.progress;d.type=a.type;a.missionType&&(d.missionType=a.missionType);a.duration&&(d.duration=a.duration);return d};CompanyFeatureSerializer.save=function(a){var d={};d.id=a.id;d.lastUpdate=a.lastUpdate;d.progress=a.progress;d.type=a.type;a.missionType&&(d.missionType=a.missionType);a.duration&&(d.duration=a.duration);return d}})();var SpawnedPointsSerializer={};
(function(){SpawnedPointsSerializer.load=function(a){var d={};d.duration=a.duration;d.id=a.id;d.type=a.type;d.gameTime=a.gameTime;d.delay=a.delay;return d};SpawnedPointsSerializer.save=function(a){var d={};d.duration=a.duration;d.id=a.id;d.type=a.type;d.gameTime=a.gameTime;d.delay=a.delay;return d}})();var LevelCalculator={};
(function(){var a=LevelCalculator,d=[350,900,1600,2400,3400,4400,5500,7E3,9500,14E3,2E4,36E3,6E4,1E5];a.getEnginePartLevel=function(a,b){return this.getLevel(this.getFeatureExperience(a,b))};a.getFeatureExperience=function(a,b){return Research.getAllItems().first(function(a){return a.id===b}).experience};a.getFeatureLevel=function(a,b){return this.getLevel(this.getFeatureExperience(a,b))};a.getMissionLevel=function(a){return this.getLevel((a.id?a:Missions.getMissionWithId(a)).experience)};a.getLevelBonusFactor=
function(c){c=a.getLevel(c);return 1===c?1:1+0.5*((c-1)/10)};a.getXpForLevel=function(a){var b=Math.floor(a),g=a-b,e=1==b?0:d.length<a?d.last():d[a-2];5>a&&0!=g&&(e+=(1==b+1?0:d.length<a?d.last():d[a-2])*g);return e};a.getLevel=function(a){if(GameFlags.ghg6&&void 0===a)throw"no experience provided";var b=d.last(function(b){return a>=b}),b=d.indexOf(b);return-1==b?1:b+2};a.getLevelFractional=function(c){var b=a.getLevel(c),c=a.getProgressToNextLevel(c);return b+c/100};a.getProgressToNextLevel=function(c){var b=
a.getXpToNextLevel(c),d=a.getLevel(c),d=a.getXpForLevel(d);return 0==b-d?0:100*((c-d)/(b-d))};a.getProgressToLevel=function(c,b){var d=a.getXpForLevel(c),e=0;1<c&&(e=a.getXpForLevel(c-1));return(100*((b-e)/(d-e))).clamp(0,100)};a.getXpToNextLevel=function(c){c=a.getLevel(c);return d.length<=c?d.last():d[c-1]}})();var UpdateNotifications={};
(function(){var a=UpdateNotifications;a.showFullGameIsAvailable=function(){var a=$("#fullGameAvailable");a.find(".okButton").clickExcl(function(){var a=DataStore.getValue("full-game-uri");if(PlatformShim.ISWIN8){var b=new Windows.Foundation.Uri(a);Windows.System.Launcher.launchUriAsync(b).then(function(b){b?ghg4.ghg5("navigate-to-full-game",{url:a,success:!0}):(ghg4.ghg5("navigate-to-full-game",{url:a,success:!1}),Windows.UI.Popups.MessageDialog("It seems that something went wrong when trying to go to the Store page for the full app.\nPlease try again and if the issue persists please contact support@greenheartgames.com or search for Game Dev Tycoon manually on the Windows Store.",
"Store Error").showAsync())})}else PlatformShim.openUrlExternal(a)});ghg4.ghg5("showing full game available message");a.gdDialog({zIndex:7500,popout:!0,close:!0})};a.checkAndShowNotifications=function(){var a=GameManager.getSaveGames();if(!a||!a.length)DataStore.setValue("shown-udate-notification-v1",!0);else if(!DataStore.getValue("shown-udate-notification-v1")){var c=$("#appUpdateNotificationV1");c.find(".okButton").clickExclOnce(function(){DataStore.setValue("shown-udate-notification-v1",!0);c.dialog("close")});
c.gdDialog({zIndex:7500})}}})();var SavegameMigrator={};
(function(){function a(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(-0.5*a*d+3*d*d+-3.5*a+2*d)}function d(a,b,c,d){a=a(d,0,1,1);return b+(c-b)*a}SavegameMigrator.migrate=function(a){if(GameManager.VERSION==a.version)return a;if(1==a.version){var d=new Company(a.company.name);d.currentLevel=1;a.company=$.extend(!0,d,a.company);for(d=0;d<a.company.gameLog.length;d++)for(var m=a.company.gameLog[d],k=0;k<m.missionLog.length;k++)"finishing"===m.missionLog[k]&&(m.missionLog[k]="BugFixing");d=a.company.staff[0];
d.id=0;d.name=PlatformShim.getUserName();a.company.currentGame&&(a.company.currentGame.bugs=0);$.extend(a.uiSettings,UI.createDefaultUISettings());a.currentHwProject||(a.currentHwProject=[]);a.currentRnDProject||(a.currentRnDProject=[]);a.currentResearches||(a.currentResearches=[],a.currentResearch&&(a.currentResearch.staffId=a.company.staff[0].id,a.currentResearches.push(a.currentResearch),a.currentResearch=null));isNaN(a.company.cash)&&(a.company.cash=0);a.company.activeNotifications.insertAt(0,
{header:"Warning",text:"This savegame has been imported from a preview version of Game Dev Tycoon. You can try to continue this game but we *strongly recommend* that you start a new game. We have made many changes to the game since the first preview and you might run into issues if you continue this save game."});c(a,1,2);a.version=2}2==a.version&&(a=b(a));3==a.version&&(a.flags.gameLengthModifier=1,c(a,3,4),a.version=4);4==a.version&&(!PlatformShim.ISWIN8&&a.company&&(d=a.company.activeNotifications)&&
0<d.length&&"{SupportGreenheartGames}"===d[0].header&&d.splice(0,1),c(a,4,5),a.version=5);if(5==a.version){g(a,"mBox Next","mBox One");if(d=a.company.scheduledStoriesShown)for(m=0;m<d.length;m++)"mboxNext"==d[m]&&(d[m]="mboxOne");m=a.company.gameLog;for(d=0;d<m.length;d++)e(m[d]);m=a.company.trashedGames;for(d=0;d<m.length;d++)e(m[d]);(d=a.company.currentGame)&&e(d);h(a);f(a);a.company.activeNotifications.insertAt(0,{header:"Updated Version",text:"This save game has been imported from an older version of Game Dev Tycoon. We have re-balanced the game, added new consoles, increased the story-line (runs for 35 years) and added a couple of new features. You should be able to continue this save game without issues but if you want to get the full re-worked experience, please consider starting a new game."});
c(a,5,6);a.version=6}if(6==a.version){if(a.company&&a.company.licencedPlatforms)for(d=0;d<a.company.licencedPlatforms.length;d++)m=a.company.licencedPlatforms[d],m.isCustom&&(m.genreWeightings=m.ghg7,delete m.ghg7,m.audienceWeightings=m.ghg8,delete m.ghg8);c(a,6,7);a.version=7}if(a.version!=GameManager.VERSION)throw"unable to load game - could not upgrade to latest file version";return a};var c=function(a,b,c){var d=PlatformShim.getVersion();GameFlags.ghg6&&(d+=";GameFlags.DEBUG");a.upgradeHistory||
(a.upgradeHistory=[]);a.upgradeHistory.push({from:b,to:c,"is-win-8-version":PlatformShim.ISWIN8,"app-version":d,date:(new Date).toISOString()})},b=function(b){if(b.currentHwProject&&0===b.currentHwProject.pointsCost){var e;e=1E7+b.currentHwProject.features.sum(function(a){return 100*Research.getEngineCost(General.getFeature(a))});var f=d(a,1,20,b.currentHwProject.qF),f=Math.floor(f);e+=1E6*f;b.company.cash+=e;b.company.cashLog.push({amount:e,label:b.currentHwProject.name+" refund"});b.currentHwProject=
void 0;b.company.activeNotifications.insertAt(0,{header:"Warning",text:"We have identified that a console project in this save game was not making any progress. This was caused by a bug in the previous version. We have fixed this bug in the version you are running now but you will need to start a new console project. The costs for the old project have been refunded."})}e=b.company.activeNotifications.filter(function(a){return"{Training}"===a.header||"{Research}"===a.header});for(f=0;f<e.length;f++)b.company.activeNotifications.remove(e[f]);
if(e=b.company.activeNotifications.concat(b.company.notifications).first(function(a){return"airCon1Callback"===a.sourceId}))b.company.activeNotifications.first(function(a){return"airCon1Callback"===a.sourceId})?b.company.activeNotifications.remove(e):b.company.notifications.remove(e),isNan(e.weeksUntilFired)&&(e.weeksUntilFired=0),b.company.flags.airCon1=!0,b.company.flags.airCon1Declined=b.company.currentWeek+e.weeksUntilFired,e=void 0;else if(e=b.company.activeNotifications.concat(b.company.notifications).first(function(a){return"airCon2Callback"===
a.sourceId}))b.company.activeNotifications.first(function(a){return"airCon2Callback"===a.sourceId})?b.company.activeNotifications.remove(e):b.company.notifications.remove(e),isNan(e.weeksUntilFired)&&(e.weeksUntilFired=0),b.company.flags.airCon2=!0,b.company.flags.airCon2Declined=b.company.currentWeek+e.weeksUntilFired,e=void 0;c(b,2,3);b.version=3;return b},g=function(a,b,c){var a=a.company,d=a.flags,e=function(a){if(a)for(var d=0;d<a.length;d++)a[d]&&(a[d]==b?a[d]=c:a[d].id==b?a[d].id=c:a[d].platform==
b&&(a[d].platform=c))};d&&d.contractspublisher&&e(d.contractspublisher.platforms);e(a.licencedPlatforms);e(a.availablePlatforms);e(a.gameLog)},e=function(a){a.platforms=[];a.platforms.push({id:a.platform});a.platform=void 0},h=function(a){var b=["Mouse","Joystick","Controller","Steering Wheel"],c=a.company.researchCompleted.count(function(a){return b.first(function(b){return a==b})});1<=c&&a.company.researchCompleted.push(Research.GameTutorials.id);2<=c&&a.company.researchCompleted.push(Research.BetterUI.id);
a.company.researchCompleted.push(Research.mono.id)},f=function(a){a.company.gameLog.concat(a.company.trashedGames).forEach(function(a){"Startups"==a.topic&&(a.topic="Business")});a.company.currentGame&&(a.company.currentGame.topic&&"Startups"==a.company.currentGame.topic)&&(a.company.currentGame.topic="Business");var b=a.company.topics.first(function(a){return a.id=="Startups"});b&&(a.company.topics.splice(a.company.topics.indexOf(b),1),a.company.topics.some(function(a){return a.id=="Business"})?
a.company.researchPoints+=10:a.company.topics.push({id:"Business"}));a.company.flags.contractspublisher&&(b=function(a){if(a)for(var b=0;b<a.length;b++)a[b]=="Startups"&&(a[b]="Business")},b(a.company.flags.contractspublisher.topics),b(a.company.flags.contractspublisher.researchedTopics))}})();var SupportPacks={};
(function(){var a=SupportPacks,d;a.getPacks=function(a){d?a(d):GameManager.ghg3().loadListingInformationAsync().done(function(b){d=b;a(d)},function(){})};a.hasBought=function(a){return GameManager.ghg3().licenseInformation.productLicenses.lookup(a)};a.buy=function(c,b){GameManager.ghg3().requestProductPurchaseAsync(c,!0).done(function(d){d&&(a.hasBought(c)?(ghg4.ghg5("feature purchased",{id:c}),Achievements.activate(Achievements.supporter2),GameManager.checkAchievements(),b&&b()):(ghg4.ghg5("feature purchase unsuccessful"),
Windows.UI.Popups.MessageDialog("It seems that something went wrong when purchasing this feature pack.\nPlease close the app and try again later.\n If the issue persists please contact\n\nsupport@greenheartgames.com","purchase not validated").showAsync()))},function(){Windows.UI.Popups.MessageDialog("It seems that something went wrong when trying to purchase this feature pack.\nPlease close the app and try again later.\n If the issue persists please contact\n\nsupport@greenheartgames.com","Store Error").showAsync()})}})();
var ghg4={};ANALYTICS_ENABLED=!GameFlags.ghg6;
(function(){var a=ghg4,d;a.init=function(){if(ANALYTICS_ENABLED){PlatformShim.ISWIN8&&GameManager.ghg3().licenseInformation.addEventListener("licensechanged",function(){});try{d=LocalyticsSession(PlatformShim.ISWIN8?"a81d66cf7ac434d5db026f5-02cfbbe2-3c4e-11e2-685f-00ef75f32667":GameFlags.ghg7?"41c2fa766702efda9d050cf-4cbeae62-ac6f-11e2-8796-005cf8cbabd8":GameFlags.G782?"9c7a8f4b73c5b371e62dd52-6f5ec11e-ac6f-11e2-8798-005cf8cbabd8":"81926045ae9a704f220ff42-cadd95fa-d7af-11e2-0f20-004a77f8b47f",{polling:!1}),
d.open(),d.upload(),a.ghg5("system-info",{platform:navigator.platform,cpuClass:navigator.cpuClass,userLanguage:navigator.userLanguage,"is-steam":GameFlags.IS_STEAM}),document.addEventListener("visibilitychange",function(){try{var a=document.visibilityState;"visible"==a?(d.open(),d.upload()):"hidden"==a&&(d.close(),d.upload())}catch(c){}},!1)}catch(c){}$(document).on("click","a",function(a){try{if(a&&a.srcElement){var c=$(a.srcElement).attr("href");"#"!=c&&(PlatformShim.ISWIN8||(PlatformShim.openUrlExternal(c),
a.preventDefault()),ghg4.ghg5("clicked link",{href:c}))}}catch(d){}})}};a.ghg5=function(a,b){if(ANALYTICS_ENABLED)try{d.tagEvent(a,b)}catch(g){}}})();var UpdateChecker={};
(function(){function a(a){if("string"!=typeof a)return null;var c=a.split("."),a=parseInt(c[0]),d=parseInt(c[1]),c=parseInt(c[2]);return isNaN(a)||isNaN(d)||isNaN(c)?null:{major:a,minor:d,patch:c}}var d=UpdateChecker;d.VERSION="1.4.5";d.checkForUpdate=function(){if(!GameFlags.IS_STEAM){try{var b=a("1.4.5")}catch(d){b=null}if(b){try{require("nw.gui").App.clearCache()}catch(e){}var h=navigator.platform;if(h=h.startsWith("Win")?"win":h.startsWith("Mac")?"mac":h.startsWith("linux")?"linux":null){var f=
"http://www.greenheartgames.com/utils/releases/gdt/lite/"+h;GameFlags.ghg7||(f="http://www.greenheartgames.com/utils/releases/gdt/"+h);$.get(f,function(d){if(-1!=d.indexOf(";")){d=d.split(";");try{var e=a(d[0])}catch(f){e=null}e&&(!e||!b?0:e.major>b.major||e.major==b.major&&(e.minor>b.minor||e.minor==b.minor&&e.patch>b.patch))&&c(d[1])}})}else ghg4.ghg5("check-update-error",{msg:"unknown platform"})}else PlatformShim.alert("version not valid: 1.4.5")}};var c=function(a){var c=$("#upateNotificationWindow");
c.find(".updateButton").clickExclOnce(function(){Sound.click();PlatformShim.openUrlExternal(a);c.dialog("close")});c.gdDialog({zIndex:15E3,popout:!0,close:!0})};d.checkForUpdate()})();
